Ask a Question

How do run all testsuites in XML in parallel with groovy ?

SOLVED
ricky
Occasional Contributor

How do run all testsuites in XML in parallel with groovy ?

Hi,

I m looking for a solution to run all my test suites in parallel via groovy or events.

As my objective is to limit my test execution time as sequential takes more time.

 

Thanks in  advance for the help.

1 ACCEPTED SOLUTION

Accepted Solutions
Radford
Super Contributor

Re: How do run all testsuites in XML in parallel with groovy ?

If you want to always run your test suites in parallel, add the following code to your project Setup Script

 

import com.eviware.soapui.model.testsuite.TestSuite
project.setRunType(TestSuite.TestSuiteRunType.PARALLEL)

 

Then when ever the project is run it will always run in parallel mode (Note: It looks odd, but it is correct that you use a TestSuite run type to set the Project run type, see here).

 

A similar thing can be done to make your test cases also run in parralel  by setting the test suite run type.

View solution in original post

8 REPLIES 8
TanyaYatskovska
Community Manager

Re: How do run all testsuites in XML in parallel with groovy ?

Hi Ricky,

 

 

Ready! API allows running projects, TestSuite and TestCases in parallel. Please refer to the following articles and those related for more information:

http://readyapi.smartbear.com/features/run/parallel/start?

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Radford
Super Contributor

Re: How do run all testsuites in XML in parallel with groovy ?

If you want to always run your test suites in parallel, add the following code to your project Setup Script

 

import com.eviware.soapui.model.testsuite.TestSuite
project.setRunType(TestSuite.TestSuiteRunType.PARALLEL)

 

Then when ever the project is run it will always run in parallel mode (Note: It looks odd, but it is correct that you use a TestSuite run type to set the Project run type, see here).

 

A similar thing can be done to make your test cases also run in parralel  by setting the test suite run type.

View solution in original post

ricky
Occasional Contributor

Re: How do run all testsuites in XML in parallel with groovy ?

Thanks so much , this helped me !

nmrao
Community Hero

Re: How do run all testsuites in XML in parallel with groovy ?

If you look at the documentation link, ReadyAPI / SoapUI has this functionality out-of-the-box, without needing user to write any custom scripts.


Regards,
Rao.
Radford
Super Contributor

Re: How do run all testsuites in XML in parallel with groovy ?

I agree with @nmrao it's best to stick to the out-of-the-box functionality if it meets your requirements.

 

The script I gave you is one I only use when I have to run tests in a particular mode for them to succeed, and this is usually to force SEQUENTIAL mode due to limitations of an external system. It stops somebody accidentally running it in the wrong mode causing unnecessary failures.

ricky
Occasional Contributor

Re: How do run all testsuites in XML in parallel with groovy ?

Thanks also i'm trying to achieve this at test case level by the below code in setup script

 

import com.eviware.soapui.model.testsuite.TestSuite
TestSuite.TestSuiteRunType.PARALLEL

 

but i cant make it to run, please correct me if i m missing anything here

Radford
Super Contributor

Re: How do run all testsuites in XML in parallel with groovy ?

Test cases are set to run in parallel at the TestSuite level, and each test suite will have to be configured individually. The documentation on how to set test cases to run in parallelcan be found here.

 

Should you need to ensure your test cases are always run in parallel, the following Groovy script can be added to a test suite Setup Script:

 

import com.eviware.soapui.model.testsuite.TestSuite
testSuite.setRunType(TestSuite.TestSuiteRunType.PARALLEL)
ricky
Occasional Contributor

Re: How do run all testsuites in XML in parallel with groovy ?

Thanks for the help!

cancel
Showing results for 
Search instead for 
Did you mean: