Providing environment-specific properties

A common requirement when running SoapUI tests from scripts is to be able to provide different hostnames, ports, and file paths for different test environments. This recipe shows some easy ways to do this.

How to do it...

We'll look at two different ways to set the endpoint for Test Request TestStep in SOAPMock-soapui-project.xml. For the examples, assume that there is a mock service that is running http://localhost:9001/mockInvoicePortBinding. Perform the following steps:

  1. Perhaps, the simplest way is to use the –e endpoint parameter to override the Test Request TestSteps endpoint, for example:
    ./testrunner.sh -e http://localhost:9001/mockInvoicePortBinding <chapter3 samples>/SOAPMock-soapui-project.xml

Get SoapUI Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.