如何仅运行测试用例的一种方法以使用 Gradle 进行调试?我试过了:
gradle test -tests example.TestFoo#testMethod1 --debug-jvm
Run Code Online (Sandbox Code Playgroud)
但最终出现以下错误:
No tests found for given includes: example.TestFoo#testMethod1
Run Code Online (Sandbox Code Playgroud)
测试TestFoo类有testMethod1(),testMethod2()等等。
Szy*_*iak 12
使用.,而不是#在你的测试过滤器表达式指向一个方法名称:
gradle test --tests example.TestFoo.testMethod1 --debug-jvm
Run Code Online (Sandbox Code Playgroud)
您可以在48.14.3 中找到有关过滤测试的更多示例。测试过滤文档部分。
| 归档时间: |
|
| 查看次数: |
8047 次 |
| 最近记录: |