Book Image

SoapUI Cookbook

By : Rupert Anderson
Book Image

SoapUI Cookbook

By: Rupert Anderson

Overview of this book

Table of Contents (19 chapters)
SoapUI Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Running mocks from the command line


SoapUI mocks can easily be run from the command line using the bundled <SoapUI Home>/java/app/bin/mockservicerunner.sh script. This recipe covers running both a REST and SOAP mock in this way.

Getting ready

The only real prerequisites are a SoapUI install and a project with a mock that you'd like to run. In this recipe, we'll try out the mocks in the RESTMock-soapui-project.xml and SOAPMock-soapui-project.xml projects from the chapter 3 samples.

How to do it...

If you run mockservicerunner without any parameters, you will see the help options, as shown in the following screenshot:

Note

Pro version reporting options are -g, -o, and -f.

The only parameter that is actually mandatory is <project file>, because if you don't specify a mock with –m, then all the mocks in the project are run. See Chapter 6, Reporting for more information on the Pro reporting options.

To run the SOAPDBMock project, the following is the simplest command:

./bin/mockservicerunner...