我在Maven作业中运行了一组黄瓜测试。如果测试失败,我该如何执行特定的操作?
RunnerTest.Java
import org.junit.runner.RunWith;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@Cucumber.Options(format = {"html:target/test-report", "json:target/test-report.json", "junit:target/test-report.xml"},
features = "src/test/resource"
)
public class RunnerTest {
}发布于 2016-02-26 00:09:09
我认为你应该使用TestWatcher规则。更多信息请点击此处:JUnit on failure callback/method
https://stackoverflow.com/questions/35632161
复制相似问题