[Sharing is learning] [Get rewards] Join Us Now to Become Katalon Champions. Learn more
Hiral
Katalon Apprentice
06/21/2018

Prevent browser from closing after every test from test suit

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
Upvote
Quote

Comments

  • Hiral
    Katalon Apprentice
    06/25/2018
    Thanks David,

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




    Best Answer
    Upvote
    Quote
  • David Edmondson
    Katalon Ambassador
    06/22/2018
    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...


    Upvote
    Quote
  • Susan Dollar
    Katalon Apprentice
    07/05/2018
    You can also uncheck Terminate drivers after each Test Case under Project-Settings-Execution-Default.
    Upvote
    Quote
  • Hiral
    Katalon Apprentice
    07/11/2018
    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. 
    Upvote
    Quote
  • Peter Wilson
    Katalon Ambassador
    07/13/2018
    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


    Upvote
    Quote
Sign In or Register to comment.
Not the answer you're looking for? Consider subscribing to Business support.