Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to automatically running multiple load tests in SOAP UI free version?

I have two load tests below with each one being in their separate test cases. This is using SOAP UI free:

Currently I have to manually select a load test, run it manually, wait until it finishes and then manually export the results before manually moving onto the next load test and performing the same actions.

Is there a way (and if so how) to be able to automatically run all the load tests (one by one) and extract each of it's own set of results in a file (test step, min, max avg, etc). This is to save the tester having to do manual intervention and can just let the test run whilst they do other stuff.

like image 646
BruceyBandit Avatar asked Oct 18 '22 07:10

BruceyBandit


2 Answers

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

Something like

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

Using these two options:

  • r : Turns on exporting of a LoadTest statistics summary report
  • f : Specifies the root folder to which test results should be exported

Then file like LoadTest_1-statistics.txt will be in your specified folder with csv statistics results.

like image 115
aristotll Avatar answered Nov 16 '22 18:11

aristotll


inspired with answer of @aristotll )

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

from groovy you can call the same like this:

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

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

and soapui will exit 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: did not tested - just an idea

like image 43
daggett Avatar answered Nov 16 '22 16:11

daggett