使用 goconvey 在 golang 中显式指定要 运行 测试的主包
Explicitly specifying the main package to run tests for in golang with goconvey
如何使用 go test 命令明确说明 运行 仅测试主包而不测试源目录中的其他包。
目前正在与 $go test -v
合作。但是...我也在使用 goconvey,它似乎是递归地 运行ning。根据此页面 https://github.com/smartystreets/goconvey/wiki/Profiles 我有一个文件,我可以在其中将参数传递给 go test 命令。我知道你可以 go test -v ./...
递归或 go test -c packagename/...
但我该怎么做才主要呢?
Profiles 是实现此目的的工具,但您也可以为跑步者指定 'depth':
$ goconvey -depth=0
0
的值将运行器限制在工作目录。
运行 goconvey -help
了解详情。
如何使用 go test 命令明确说明 运行 仅测试主包而不测试源目录中的其他包。
目前正在与 $go test -v
合作。但是...我也在使用 goconvey,它似乎是递归地 运行ning。根据此页面 https://github.com/smartystreets/goconvey/wiki/Profiles 我有一个文件,我可以在其中将参数传递给 go test 命令。我知道你可以 go test -v ./...
递归或 go test -c packagename/...
但我该怎么做才主要呢?
Profiles 是实现此目的的工具,但您也可以为跑步者指定 'depth':
$ goconvey -depth=0
0
的值将运行器限制在工作目录。
运行 goconvey -help
了解详情。