Want to execute multiple test cases one by one in loop in test suite

Hi @ Trong_Bui
i want to execute Test Cases in loop in test suite as per the below scenario.
let say loop 2 times so TC1 execute followed by TC2 and than again TC1 and TC2… in sequence.

as of now the functionality available executing TC 1 two times and than TC 2 2 times.

Please help here.

// This is TestCase0

// loop 10 times
for(int i = 0; i < 10; i++) {
  WebUI.callTestCase(findTestCase("/path/to/TestCase1"), ...)
  WebUI.callTestCase(findTestCase("/path/to/TestCase2"), ...)
}
1 Like

or make a test collection where you add the test suite two times

1 Like

Thanks Thomas,
This loop i have already using in my test case however. I wanted to use test suite functionality in Katalon but here only option available by which test cases executed in loop one by one not all.
Explanation: Lets i have 2 test cases and i add them in test suite and then i want these 2 test cases should execute like 1st test and then 2nd test …10 times in loop. currently if i do the same in suite it execute TC 1 ten times and then TC 2 ten times.

@Russ_Thomas Also in test suite there is iteration option along with Type-(Many/One).

what does Type’s significance here.

@karambir.singh the ‘one-to-many’ feature it is used when you provide multiple data sources for a testcase, when using data driven approach, and defines how the testcase will aggregate the datas.
more info here:
https://docs.katalon.com/katalon-studio/docs/design-a-test-suite.html#modify-execution-information

unfortunately, looks like it wont help you much with your desired scenario, because those will apply on the testcase,not on the suite.

so, for your needs, the only solution at this moment is to use a ‘control’ testcase,as indicated by @Russ_Thomas (you can add then in a for loop or whatever iteration you need)

option two: add a feature request for the katalon devs … and wait untill will be considered/prioritized

@devalex88 any such similar feature request has been made up to now? it will be cool indeed to ane some more flexibility top of testsuites control …

Hi,
See

Hi HeleneB,
This is exactly the same scenario that i am facing.
currently the feature you are looking is not available in Katalon. So the only option left is use loop at test case level and call other test case in it.
and iterate the loop with rownum as below.
for (def rowNum = 1; rowNum <= findTestData(‘Test_Data’).getRowNumbers(); rowNum++)
{ put all test here}

Or use the workaround i gave in the link :wink: