vendredi 26 octobre 2018

Cucumber java, tag execution order (tagged + global)

I am using cucumber java,

I have two @After hook, one for each scenario, and second tagged (for scenario with specific tag) Now I want to specify execution order of those tags, I tried this one:

@After(order = -1)
public void takeScreenShotOnScenarioFailed(Scenario scenario)
{

}

@After(value = "@CloseBrowser", order = 1)
public void tearDown()
{

}

But still tagged hook is executed first (order = 1)

How can I make sure it would be executed last? Thank you

Aucun commentaire:

Enregistrer un commentaire