【发布时间】:2020-03-20 16:38:37
【问题描述】:
我正在编写一种集成测试。我需要测试测试的环境是否真的在运行。
伪代码:
def "setup test"() {
expect:
service1.isRunning()
service2.isRunning()
}
def "test1"() {
expect:
service1.something() == 1
service2.something() == 2
}
def "test2"() {
// ...
}
基本上,如果“设置测试”失败(它们肯定也会失败!),我什至不想看到“test1”和“test2”的结果。我怎样才能做到这一点?我已经尝试过@IgnoreIf,但它似乎只是针对我们可以从测试之外提供的条件的解决方案。
【问题讨论】: