【问题标题】:go test some functions/suites from package only仅从包中测试一些功能/套件
【发布时间】:2013-08-10 21:53:33
【问题描述】:

是否可以在 go 中拆分某些包的测试过程? go test package - 使用包中所有 *_test.go 文件中的所有函数 Test*。如果您有很多测试并尝试 TDT,那么总是接收所有测试日志会很无聊。

【问题讨论】:

    标签: testing go


    【解决方案1】:

    参见“go help test”和“go help testflag”。引用后文:

    ...
    
    -run regexp
        Run only those tests and examples matching the regular
        expression.
    ...
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-02-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-02
      • 2020-12-18
      • 1970-01-01
      相关资源
      最近更新 更多