问题
Please someone help me out on go language automation testing
i have been working out manual coding for automation. Please help me any packages or framework available to run automation testing in go.
回答1:
Go provides its own testing package you can view it here
https://golang.org/pkg/testing/
You can write your own tests a common layout is to write your file, then write a _test.go file to test e.g.
package.go
package_test.go
then you can test your file by running
go test
And bam, you're good to go
Here's a random test package from a random app for example: https://github.com/yohcop/openid-go/blob/master/redirect_test.go
回答2:
A plenty of them! You should check a list of tools for testing here: https://github.com/avelino/awesome-go#testing
回答3:
Try http://goconvey.co
GoConvey also supports Go's native testing package.
回答4:
Go provides its own testing package you can view it here
https://golang.org/pkg/testing/
Or you can get other pkg for testing, for example testify
https://github.com/stretchr/testify
来源:https://stackoverflow.com/questions/34588393/go-language-automation-testing