我已经为我的结构设置了一个测试套件(https://github.com/stretchr/testify#suite-package)。在我能够通过仅指定一个模式来运行单个测试之前:
go test -v ./services/gateways/... -run mytest
此方法在转换后不起作用。运气不好还是有办法?
最佳答案
您可以通过指定 -testify.m
参数来运行单个方法。
运行this suite method命令是:
go test -v github.com/vektra/mockery/mockery -run ^TestGeneratorSuite$ -testify.m 测试生成器
关于go - 我可以在套件中运行单个测试吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40433788/