When I record/playback after login in to my web portal, I am required to include the login steps within my script if i want to play back the script. I believe this is the case because the browser that Katalon uses does not keep cashed sessions.How do i bypass this? Since i already have a login script/test case, I wouldnt want to include that part of the script in other scripts. I should be able to run the whole test suite or run scripts independently. How is this achieved with Katalon Studio? Many thanks!!
You want to modularise your test scripts. Use WebUI.callTestCase keyword.
You can create 3 test case scripts:
Test Cases/login
Test Cases/case1
Test Cases/case2
The case1 script would be something like this:
WebUI.openBrowser('...')
WebUI.callTestCase('TestCases/login')
// do whatever needed in the case1
WebUI.closeBrowser()
The case2 script would be something like this:
WebUI.openBrowser('...')
WebUI.callTestCase('TestCases/login')
// do whatever needed in the case2
WebUI.closeBrowser()
Thus you can repeat calling the login script in both of the case1 and case2. You do not have to manually copy&paste the login code into the caller scripts.
I agree with that and have done that. But if i then decide to run the whole thing in a suite, it would unecessarily repeat the Test Cases/login part, adding test time to run. I would have to disable that part in each script.
Yes. I have a much bigger problem that noone is commenting on. I get a black monitor sometimes when I spy on an object, and/or record a test. The only workaround is to reboot the PC. Has anyone encountered this? Note that I am not using the payed version yet but this would definitely be a deal breaker since it happens often and is quite annoying.