Is there any way to handle recovery scenario with katalon studio web testing?
recovery scenario
Suppose you have test that need to login to system to carryout the test
but test getting fail before logout from the system. - then browser will close without logout.
if test getting fail, is there any way to logout from the system before browser close (even fail the test)
What do you worry about the user session after closing the browser and need the handle to remove it? Can you recheck if the browser has closed (due to failed tests) it will automatically remove user session on the browser or not?
If the user session has destroyed after closing the browser, it should be the same as logged out.
When browser close it is not removing the session. what is happening session hanging on the server. when there are huge number of test cases those are getting fail; all session getting hang. there will be hit for the server.
This is the entire point of test listeners. They are meant to run every time, regardless of whether your test fails in the middle. You would need a @AfterTestCase listener, like this:
@AfterTestCase
def logOutAfterTestCaseEnds(TestCaseContext testCaseContext) {
// code to log out
}