Forum Discussion
Hello,
would it possible for you to provide me some example of groovy script to achieve the same.
Thanks
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'
- nmrao8 years agoChampion Level 3By the way, I have created fully testable soapui project and is available under github repo.
https://github.com/nmrao/sample-soapui-projects/tree/master/hybridExecution
- nmrao8 years agoChampion Level 3getarbind, haven't heard any thing from you. Have you got chance to look at the solution provided / sample testable project?
Glad to hear your comments / suggestions / question if any.- getarbind8 years agoOccasional Contributor
Hi nmrao First of all Thanks a lot for the script.
It is working great when i run my testsuite in my soapui pro.
I tried to run using window batch script (invoking test runner) and its not able to create/start thread.
Resulting Test Suite defined in parallelSuites does not execute.
I am trying to debug this.
Any input on this is much appreciated.
Thanks
Related Content
- 3 years ago
- 8 years ago
- 4 years ago
Recent Discussions
- 3 hours ago
- 26 days ago