【发布时间】:2019-03-20 17:07:51
【问题描述】:
我正在尝试使用 Cucumber、TestNG 和 gradle 运行测试(在 cucumber+testng+gradle 中没有官方示例,据我从 gradle github repo 了解到,当前不支持此工具堆栈)
gradle tests --tests com.CR --stacktrace
表明测试没有运行异常
Caused by: org.gradle.api.tasks.testing.TestExecutionException: No tests found for given includes: [com.CR](--tests filter)
其中 com.CR 是带有 @CucumberOptions 的类
经过一番调查,我发现类 cucumber.api.testng.AbstractTestNGCucumberTests.class 的黄瓜库中出现问题,我正在尝试调试它。
我在这个类中设置调试点。并使用调试选项运行 gradle
gradle test --tests com.CR -Dorg.gradle.debug=true --no-daemon
然后连接到远程调试端口 5005 但它不会在我的任何调试点上停止。
所以问题是如何调试依赖库的代码或我做错了什么?
【问题讨论】:
标签: java debugging gradle testng cucumber-jvm