I am facing some issue, when i am using hooks and background . With multiple features files and Background in them, @Before and @After are working differently. Execution happens in this order @Before, Scenario,Background,@After @Before, Scenario,Background,@After. Please suggest what should i do
You can find the code in below link
https://github.com/RajaRaviTeja/DummyCucumberProjectForHooksFlow.git
Instructor
Ashish Thakur Replied on 09/08/2019
This is how it executes actually. @Before is executed before the scenario and then @After would be executed.
But i have Background too. So, the order should be
@Before
Background:
Scenario:
@After
but the order is
@Before
Background:
@After
@Before
Scenario:
Background
@After
@Before
Scenario:
Background
@After
This is a wrong order right.