Prevent browser from closing after every test from test suit


#1

I have test suit which contains only one test case but I am using multiple data from data files.

The issue I have is that everytime test case finish with one data browser close and open again for another test data.

Is there a way to leave the browser open for all test data and browser would close once all test data have been tested.

Any suggestion would be helpful.
Thanks


#2

Create one Test Case that opens a browser, then calls a second test case and then closes the browser after the second test case completes…

In the second test case, create a loop that retrieves data from an Excel worksheet and performs a repeatable set of steps for each of the rows in the Excel worksheet that you would like to cycle through without closing the browser…


#3

Thanks David,

I have tried just putting loop within same test case but leave open and close browser outside of loop and it worked.


#4

You can also uncheck Terminate drivers after each Test Case under Project-Settings-Execution-Default.


#5

Thanks Susan,

I have tried initially when I wanted to try this but it did not work for me.
I am using katalon on Mac.


#6

It sounds like you need a data drive test suite, which isn’t actually available, but can be done using what David describes. You have a Test Case that opens the browser, then calls all the other Test Cases you need, then closes out. It would be a series of:

WebUI.callTestCase(findTestCase('Test Cases/Test Case Location/Test Case Name'), [:], FailureHandling.CONTINUE_ON_FAILURE