Saturday, August 26, 2017

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

1 comment

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

enter image description here

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.

2 Answers

Answers 1

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.

Answers 2

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

If You Enjoyed This, Take 5 Seconds To Share It

1 comment:

  1. This is realy a Nice blog post read on of my blogs It is really helpful article please read it too my blog AVG UI failed to load you can visits our websites or toll free no +1-866-558-4555. solve your problem fastly.

    ReplyDelete