@BeforeTestCase runs simultaneously for multiple tstscases

In case of multiple testcases(here,2) the flow should be like:
@BeforeTestSuite@BeforeTestCase1@AfterTestCase1@BeforeTestCase2@AfterTestCase2 -> @AfterTestSuite

But in my case, it is like
@BeforeTestSuite → **@BeforeTestCase1 → @****BeforeTestCase2 ****-> @**AfterTestCase1 -> @AfterTestCase2 -> @AfterTestSuite

Please help. As my code would not work in this approach

According to notes from this document page: http://docs.katalon.com/pages/viewpage.action?pageId=5126383

  • Execution order of multiple Test Listeners (in case you define more than one) will be from top to down.

=> So I believe you should change Test Listeners order from Tests Explorer to make sure @BeforeTestCase1 hook is executed first

1 Like