GO测试的差异测试范围之间的差异
我打算在GO(使用Godog)和amp;我想出了以下命令进行测试的可能性。
有人可以指出这里的差异吗?推荐的方式是什么每个封面模式等的用例是什么?
go test -test.v -test.run ^TestFeatures$ -coverpkg=../... -coverprofile=coverage.out -race
go test -test.v -test.run ^TestFeatures$ -coverpkg=../... -coverprofile=coverage1.out -covermode=set
go test -test.v -test.run ^TestFeatures$ -coverpkg=../... -coverprofile=coverage2.out -covermode=atomic
go test -test.v -test.run ^TestFeatures$ -coverpkg=../... -coverprofile=coverage3.out
go test -test.v -test.run ^TestFeatures$ -coverpkg=../... -coverprofile=coverage4.out
PS:为成为菜鸟而道歉:)
I am planning to run my Cucumber test in go (using Godog) & I came up with the following possibility of commands to run my tests.
Can someone point out the differences here? What is the recommended way & what's the use-case of each cover mode etc?
go test -test.v -test.run ^TestFeatures$ -coverpkg=../... -coverprofile=coverage.out -race
go test -test.v -test.run ^TestFeatures$ -coverpkg=../... -coverprofile=coverage1.out -covermode=set
go test -test.v -test.run ^TestFeatures$ -coverpkg=../... -coverprofile=coverage2.out -covermode=atomic
go test -test.v -test.run ^TestFeatures$ -coverpkg=../... -coverprofile=coverage3.out
go test -test.v -test.run ^TestFeatures$ -coverpkg=../... -coverprofile=coverage4.out
PS: Apologies for being a noob in GO :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这在GO博客上回答: https://go.dev/blog/cover#heat-heat-地图:
This is answered on the GO blog: https://go.dev/blog/cover#heat-maps: