Forum Discussion

Silwest's avatar
Silwest
Occasional Visitor
8 years ago

Parallel test execution - testrunner.sh

Hello guys,


I'm really out of ideas I searched almost everywhere and cannot find answer.

I'm wondering how can I setup Parallel test execution either on TestCase/TestSuite level.

 

Of course I've found couple of topics to create groovy script and setup it as a first step of suite execution but it doesn't work.

What is more I'm a bit shocked that this parameter is not setup from command line e.g.

./testrunner.sh --runType parallel

 

Can you please point me into right direction? 

https://community.smartbear.com/t5/SoapUI-Pro/Running-tests-in-parallel-via-testrunner/td-p/24339

  • 05ten's avatar
    05ten
    Contributor

    Well, if you want to turn on parallel execution for everything at the testrunner.sh-level then yeah, that's not possible. 

     

    However, you can enable it in the testsuite and project level. I assume that is what you means, running teststeps in parallel makes little sense. At least the maven plugin honors the runType-parameter of a testsuite, that i tested. And i'm pretty sure the Maven plugin uses the SoapUITestCaseRunner under the hood, which is the same as the testrunner.sh/bat does. I actually had a look into the TestMojo for the SoapUI Maven plugin and it's correct, see for yourself in TestMojo:52.

     

    The plugin also tells you what runType is performed. 

     

    13:43:53,987 INFO  [PluginManager] 9 plugins loaded in 3162 ms
    13:43:53,987 INFO  [DefaultSoapUICore] All plugins loaded
    13:43:55,042 INFO  [WsdlProject] Loaded project from [file:/C:/Users/USER/git/soaui-regression-suite/X-Regression-test-soapui-project.xml]
    13:43:55,048 INFO  [SoapUITestCaseRunner] Setting project property [env] to [test]
    13:43:55,053 INFO  [SoapUITestCaseRunner] Running SoapUI tests in project [X Test Suite]
    13:43:55,054 INFO  [SoapUITestCaseRunner] Running TestSuite [X], runType = PARALLEL
    13:43:55,068 INFO [SoapUITestCaseRunner] Running SoapUI testcase [D]
    13:43:55,068 INFO [SoapUITestCaseRunner] Running SoapUI testcase [F]
    13:43:55,070 INFO [SoapUITestCaseRunner] Running SoapUI testcase [G]
    13:43:55,070 INFO [SoapUITestCaseRunner] Running SoapUI testcase [H]
    ...
    BUILD SUCCESS

    Just enable the parallel execution on the testsuite and project level, and you're good to go. 

     

    For testsuite level

     

     

    and on project level

     

     

    Check it out and see if that works! :) 

     

    Here's an example if you want to get setup with maven, but it should be redundant to the testrunner.sh, as long as you specify the project explicitly.