How do run all testsuites in XML in parallel with groovy ?
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.
Solved! Go to Solution.
Ready! API allows running projects, TestSuite and TestCases in parallel. Please refer to the following articles and those related for more information:
SmartBear Community and Education Manager
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.
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.
Thanks also i'm trying to achieve this at test case level by the below code in setup script
but i cant make it to run, please correct me if i m missing anything here
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)