Execute Test Cases inside of Test Suite in Parallel

We would like to run the Test Cases in our Test Suites in parallel, not different Test Suites in the Test Collection. To do this currently, we have to define a new Test Suite for every Test Case and add them all to a Test Suite Collection, but this adds a lot of extra objects that makes the project more confusing. There should be an option to run a Test Suite’s contents in parallel.

35 Likes

Caleb Wood said:

We would like to run the Test Cases in our Test Suites in parallel, not different Test Suites in the Test Collection. To do this currently, we have to define a new Test Suite for every Test Case and add them all to a Test Suite Collection, but this adds a lot of extra objects that makes the project more confusing. There should be an option to run a Test Suite’s contents in parallel.

Hi Caleb,

Thank you for your request. I can see from your point of view. I have logged a ticket for further consideration.

Please feel free to post on the forum if you have other suggestions or questions,

Thanks again,
Liam

7 Likes

+1 for this feature to be added.

Thanks

Don Welsh said:

+1 for this feature to be added.

Thanks

Hi Don,

If you like this feature, just need to press ‘Upvote’ button :slight_smile:

Regards

3 Likes

+1 for this.

Hi,

I have created around 40 test cases which all pass whenever I run them one by one.
Then i created individual Test suite for each test case and then created Test Suite Collection and added all the 40 test cases. Then whenever i try to run it Parallel mode either Katalon will get struck or it does not start all of them at time.

So, is there any limitation for number of test cases to run it parallel?

I tried with Headless Chrome, cmd prompt triggering and still could not able to trigger all of the test cases at a time.

Please let me know is something I missing while running it.

Thanks
Jambunath

3 Likes

Liam B said:

Caleb Wood said:

We would like to run the Test Cases in our Test Suites in parallel, not different Test Suites in the Test Collection. To do this currently, we have to define a new Test Suite for every Test Case and add them all to a Test Suite Collection, but this adds a lot of extra objects that makes the project more confusing. There should be an option to run a Test Suite’s contents in parallel.

Hi Caleb,

Thank you for your request. I can see from your point of view. I have logged a ticket for further consideration.

Please feel free to post on the forum if you have other suggestions or questions,

Thanks again,
Liam

Please let me know if this feature has been added

It could be nice to provide better reporting handling when executing test suite collection in parallel. When I’m checking under Reports there is nothing under TS_collection that contains 6 test suites (1 test suite per 1 test case). Seems that reports are created one by one in separate folders of each test suite

It would be more comfortable to have it inside TS collection folder that was used for parallel execution - some aggregate report there??

Thanks

Any Update on this feature?

1 Like

i really need a solution for the same issue you are describing. Did you solve your issue?

Hey there, I am also interested in a feature like this. Any news?

1 Like

Im having the same problem, i tried with 2 or 4 max. concurrent instances and no parallel execution was triggered. Any news about this? Im using version 6.2.2. Thanks

I have created around 40 test cases which all pass whenever I run them one by one.

I also encounter the same issue, and since Katalon team seems not interested to implementing this features (which is totally understandable), I have made an bash script which will copy individual test cases into individual test suites inside a folder.

Here’s the script:

auto_convert_test.bash

#######Starts#############
###
# Variables
#
# ${test_case_folder} cannot contain space!
test_case_folder="AutoConvertTests"

echo "===============Start Auto Convert...==============="
#for test_case in "../Test Cases/${test_case_folder}"/*.tc; do
for test_case in "../Test Cases/${test_case_folder}"/* "../Test Cases/${test_case_folder}"/**/*; do
  if [ ! -d "${test_case}" ]; then
    test_case_name=${test_case//"../Test Cases/${test_case_folder}/"/}
    test_case_name=${test_case_name//".tc"/}
    safe_test_case_name=${test_case_name//\ /_}
    just_name="$(basename -- "$test_case" .tc)"
    
    ####
    # test_suite_content Start
    #
    test_suite_content=$(
      cat <<-END
<?xml version="1.0" encoding="UTF-8"?>
<TestSuiteEntity>
   <description></description>
   <name>$just_name</name>
   <tag></tag>
   <isRerun>false</isRerun>
   <mailRecipient></mailRecipient>
   <numberOfRerun>0</numberOfRerun>
   <pageLoadTimeout>30</pageLoadTimeout>
   <pageLoadTimeoutDefault>true</pageLoadTimeoutDefault>
   <rerunFailedTestCasesOnly>false</rerunFailedTestCasesOnly>
   <testSuiteGuid>$safe_test_case_name-TestSuite</testSuiteGuid>
   <testCaseLink>
      <guid>$safe_test_case_name-TestCase</guid>
      <isReuseDriver>false</isReuseDriver>
      <isRun>true</isRun>
      <testCaseId>Test Cases/${test_case_folder}/$test_case_name</testCaseId>
   </testCaseLink>
</TestSuiteEntity>
END
    )
    ####
    # test_suite_content ends
    #

    
    test_suite_path=${test_case//"Test Cases"/"Test Suites"}
    test_suite_path=${test_suite_path//".tc"/".ts"}
    if [ ! -f "$test_suite_path" ]; then
      mkdir -p "${test_suite_path%/*}" && touch "$test_suite_path"
      echo $test_suite_content >"$test_suite_path"
      echo "New test suite added: $test_suite_path"
    else 
      echo "Exists: $test_suite_path"
    fi
  fi
done
echo "===============End Auto Convert...==============="
#######################End###################

Steps:

  1. (For Windows user only) Install git bash, you will need it
  2. Copy the above script, paste it on YOUR_PROJECT/bin/auto_convert_test.bash
  3. Add some test script to the directory AutoConvertTests,
    • e.g. YOUR_PROJECT/Test Cases/AutoConvertTests/MyAwesomeTest
    • e.g. YOUR_PROJECT/Test Cases/AutoConvertTests/MyAwesomeTest2
    • e.g. …
  4. Open terminal / git bash
  5. Execute change directory cd YOUR_PROJECT/bin
  6. Execute the script using: ./auto_convert_test.bash
  7. If you see something like this, your test suites are created:
New test suite added: ../Test Suites/AutoConvertTests/Test_with_space.ts
New test suite added: ../Test Suites/AutoConvertTests/Test1.ts
  1. Open Katalon Studio
  2. You should see all test suites following your test cases name :slight_smile:
  3. At last, you need to manually add your test suites to your test suite collection, but it should be as simple as a few button click so I didn’t brother automate that part

See if the above helps anybody here :+1: