在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:smartystreets/goconvey开源软件地址:https://github.com/smartystreets/goconvey开源编程语言:Go 69.4%开源软件介绍:SMARTY DISCLAIMER: Subject to the terms of the associated license agreement, this software is freely available for your use. This software is FREE, AS IN PUPPIES, and is a gift. Enjoy your new responsibility. This means that while we may consider enhancement requests, we may or may not choose to entertain requests at our sole and absolute discretion.GoConvey is awesome Go testingWelcome to GoConvey, a yummy Go testing tool for gophers. Works with GoConvey supports the current versions of Go (see the official Go release policy). Currently this means Go 1.16 and Go 1.17 are supported. Features:
You can ask questions about how to use GoConvey on StackOverflow. Use the tags Menu: Installation
Quick startMake a test, for example: package package_name
import (
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func TestSpec(t *testing.T) {
// Only pass t into top-level Convey calls
Convey("Given some integer with a starting value", t, func() {
x := 1
Convey("When the integer is incremented", func() {
x++
Convey("The value should be greater by one", func() {
So(x, ShouldEqual, 2)
})
})
})
} In the browserStart up the GoConvey web server at your project's path:
Then watch the test results display in your browser at:
If the browser doesn't open automatically, please click http://localhost:8080 to open manually. There you have it. As long as GoConvey is running, test results will automatically update in your browser window. The design is responsive, so you can squish the browser real tight if you need to put it beside your code. The web UI supports traditional Go tests, so use it even if you're not using GoConvey tests. In the terminalJust do what you do best:
Or if you want the output to include the story:
DocumentationCheck out the
ScreenshotsFor web UI and terminal screenshots, check out the full feature tour. ContributorsGoConvey is brought to you by SmartyStreets and several contributors (Thanks!). |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论