How to automatically run multiple load tests in the free version of SOAP UI?

I have two load tests below, each of which is in their separate test cases. This is using SOAP UI for free:

Currently, I need to manually select a load test, start it manually, wait until it finishes, and then manually export the results before manually proceeding to the next load test and perform the same steps.

Is there a way (and if so, how) to be able to automatically run all load tests (one after another) and extract each of them own set of results in a file (test step, min, max avg, etc.). This is necessary in order to save the tester, which must perform manual intervention, and can simply allow a test run while they do other things.

+5
source share
2 answers

You can use the command line load tests, doc here .

Sort of

loadtestrunner -ehttp://localhost:8080/services/MyService c:\projects\my-soapui-project.xml -r -f folder_name 

Using these two parameters:

  • r: Enables export of summary statistics report LoadTest
  • f: indicates the root folder into which test results should be exported.

Then a file of type LoadTest_1-statistics.txt will be located in your specified folder with csv statistics results.

+2
source

inspired by @aristotll's answer)

loadtestrunner.bat runs the following class: com.eviware.soapui.tools.SoapUITestCaseRunner

from groovy you can call the same thing:

 com.eviware.soapui.tools.SoapUITestCaseRunner.main([ "-ehttp://localhost:8080/services/MyService", "c:\projects\my-soapui-project.xml", "-r", "-f", "folder_name" ]) 

but the main method calls System.exit () ...

and soapui will come out in this case.

so let's go deeper:

 def res = new com.eviware.soapui.tools.SoapUITestCaseRunner().runFromCommandLine([ "-ehttp://localhost:8080/services/MyService", "c:\projects\my-soapui-project.xml", "-r", "-f", "folder_name" ]) assert res == 0 : "SoapUITestCaseRunner failed with code $res" 

PS: not tested - just an idea

+1
source

Source: https://habr.com/ru/post/1270785/


All Articles