Forum Discussion
nmrao
Champion Level 3
You can either change the order in the project and execute the project or write a groovy script to achieve the same.
getarbind
8 years agoOccasional Contributor
Hello,
would it possible for you to provide me some example of groovy script to achieve the same.
Thanks
- groovyguy8 years agoCommunity Hero
So you have 5 test suites to be ran, right? Does that mean you want to run 1, then run 2, 3, 4, 5 in parallell?
- getarbind8 years agoOccasional Contributor
Yes groovyguy, You are right.
The Struct is
Project
>TS1
>TS2
>TS3
>TS4
>TS5
First TS1 should run (it sets all env variable)
Once TS1 is done, TS2, TS3, TS4 and TS4 can run in parallel.
- nmrao8 years agoChampion Level 3
Here is the script you would need:
Create another suite, add a test case, add a groovy script and use below script
import com.eviware.soapui.support.types.StringToObjectMap //Modify below as needed sequenceSuites = ['TestSuite1'] parallelSuites = ['TestSuite2', 'TestSuite3', 'TestSuite4', 'TestSuite5'] //DO NOT MODIFY BEYOND THIS POINT def project = context.testCase.testSuite.project def runSuite = { suiteName, async = true -> suite = project.testSuites[suiteName] suite.run([] as StringToObjectMap, async) } println '=====================Running Suite Sequencially Start=====================' sequenceSuites.each{ runSuite(it, false) } println '=====================Sequential Execution End===========================' println '+++++++++++++++++++++Paralled Execution Start++++++++++++++++++++++++++++' Thread.start{ parallelSuites.each { runSuite(it) } }*.join() println '+++++++++++++++++++++Paralled Execution End++++++++++++++++++++++++++++' println 'completed'
Related Content
- 3 years ago
- 8 years ago
- 4 years ago
Recent Discussions
- 4 hours ago
- 17 days ago