如何将数据从示例传递到JBehave AfterScenario方法

时间:2019-12-05 10:48:53

标签: jbehave

故事:

Given User logs in UI application
Then Preview Order Details

Examples:
|ScenarioName|
|test1|

AfterScenario方法:

@AfterScenario(uponType = ScenarioType.ANY, uponOutcome = Outcome.FAILURE)
public void afterFailedScenario(@Named("ScenarioName") String ScenarioName) {
    System.out.println("After Normal Scenario with failed outcome..."+ScenarioName);
}

执行afterScenario方法时,示例表中的censingName值不打印?

0 个答案:

没有答案