【发布时间】:2020-06-05 02:37:42
【问题描述】:
我正在使用黄瓜框架进行测试。我有三个 @then 条件,如果第一个 @then 条件失败,它不会进入第二个 @then 条件。我该如何克服?
@Then("^I check first result$")
public void verifyFirstResult() {
Assert.assertEquals(results.get("first"), true); --> This gets failed as its returning false.
}
@Then("^I check second result$")
public void verifySecondResult() {
Assert.assertEquals(results.get("second"), true); --> This is not even triggering, the execution stops at the first method itself
}
@Then("^I check third result$")
public void verifyThirdResult() {
Assert.assertEquals(results.get("third"), true);
}
我该如何克服这个问题?
【问题讨论】:
标签: java automation cucumber