Setting properties from an external file

It can be a good idea to maintain your properties externally to your SoapUI project. This can help make your projects more flexible when switching between target environments, especially when running SoapUI from scripts (see Chapter 5, Automation and Scripting). In this recipe, we will see how to do this using the Properties TestStep.

Getting ready

I have added a sample properties file called test-properties.txt, which contains the following code:

environmentName=Dev Test
invoiceEndpoint=http://localhost:9000
userName=test
password=password

There is a completed sample project called PropertiesProject in the Chapter 2 samples.

How to do it...

First, we create a new empty project, TestSuite and TestCase. Then, ...

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.