Showing posts with label Run SoapUI from Command Line. Show all posts
Showing posts with label Run SoapUI from Command Line. Show all posts

Tuesday, November 25, 2014

How to execute SoapUI Project from Command Line

SoapUI currently comes with the following command line tools for running TestCases and LoadTests

loadtestrunner.bat => To run Load test
mockservicerunner.bat => to run mock services
securitytestrunner.bat => to run security test
testrunner.bat => Used to run your soapui testcases
toolruner.bat => Runs any of the configured Code Generation tools for specified project and interface
wargenerator.bat => used to generate war files

Syntax to run command line tools is

<command line tool> <parameters> <report(optional)> <project>
eg
testrunner.bat     -FPDF     -R"Project Report"     c:\projects\my-soapui-project.xml

Another example
Here we will pass the property which will be  used in run the test

1)testrunner.bat -P username=ss123 Cc:\projects\my-soapui-project.xml
-P => Sets project property with name=value which can be used to run testsuites

2)testrunner.bat -r c:\projects\my-soapui-project.xml
-r => prints a small report in console

SoapUI 5.0.0 TestCaseRunner Summary
-----------------------------
Time Taken: 5301ms
Total TestSuites: 2
Total TestCases: 2 (1 failed)
Total TestSteps: 3
Total Request Assertions: 2
Total Failed Assertions: 0
Total Exported Results: 1

3)testrunner.bat -j c:\projects\my-soapui-project.xml
-j will create Junit style reports, the xml generated will be in the bin folder of SoapUI

4)testrunner.bat -e www.google.com  c:\projects\my-soapui-project.xml
-e => set end point url, overrides the endpoint set in the project file

5)testrunner.bat -h www.google.com:9001  c:\projects\my-soapui-project.xml
 -h => overrides only the host part of the endpoint set in the project file