Here I am, again with a new limitation of Katalon studio.
I am using katalon studio Enterprise v-10.4.3 offline license, for automating web and desktop applications.
Scenario: I have created a TestSuiteCollection which run and cover 3 applications
TestSuiteCollection1
TS1: WebApplication
a. Group of TCs
TS2:Desktop Application 1
a. Group of TCs
TS3:Desktop Application 2
a. Group of TCs
Now I want to run TestSuiteCollection1 n-times. I search online and created TC which loops on the testSuiteCollection
suiteCollectionName = â01-Create and produce a batch to close without autobatchesâ
n= 10
for (int i = 0; i < n; i++) {
println âRunning suite collection: ${suiteCollectionName} - Run #${i + 1}â
TestSuiteCollectionRunner.runTestSuiteCollection(suiteCollectionName)
}
but it looks like Katalon does not support and I get the below error while executing the above testcase
Test Cases/TestCase - Scenarios/Test Suite Collections Wrapper/Produce and close batch from IP-OFF-INT FAILED.Reason:org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:file:/C:/GIT/Projects/Parvis.Automation.Test/Scripts/TestCase%20-%20Scenarios/Test%20Suite%20Collections%20Wrapper/Produce%20and%20close%20batch%20from%20IP-OFF-INT/Script1775033157942.groovy: 19: unable to resolve class com.kms.katalon.core.main.TestSuiteCollectionRunner@ line 19, column 1.import com.kms.katalon.core.main.TestSuiteCollectionRunner^
1 error
at com.kms.katalon.core.main.ScriptEngine.getScript(ScriptEngine.java:199)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:490)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:481)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:460)
Is there any way to loop over a testSuiteCollection?
If so you would be able to do something in a bash shell (or PowerShell) script that invoke your test suites in the command line.
If you do not have KRE license and you want to do it in Katalon Studio IDE, you can repeat delaring TS1 for n-times in your Test Suite Collection. I think it would be good enough. Arenât you satisfied with it? Then please explain why.
Related to KRE, we do not have KRE yet and we are not planning in near future.
For repeating the TS multiple time is not a good solution to manage large number of tests.
We will have alot of duplications in case we have to run 20 or 30 times
What if after few day we need to increment or decrement the re-execution TS. in case of loop we just have to change the N variable value
I again ask, is there any other way to do it? without KRE and duplicating TS?
You would be able to write a script code that generates such XML file so that it satisfies whatever you require. Any programming tools you can choose for this custom task.
Be aware: when you update the XML file on disk, you need to ârefleshâ your project; or close&open your project to let Katalon Studio be informed.
currently this specific testSuiteCollection takes upto 15 minutes with addition of testsuites in future as we are trying to create a E2E testCollection,
For me the duration is not a problem at the moment, If you have a solution to run the testSuiteCollection multiple times without duplication, I can give a try
Of course you can express your requirement to Katalon through the official support channel. I think that this small topic in the user forum is not significant enough for the Katalonâs serious attention.
We do care and pay attention, and every piece of feedback is invaluable to us. When it is shared through the official support channel or in the user forum, we truly appreciate it because it helps us improve each day.