This section describes how to modify the values the test sends to the service. If you have switched to the test suite or project level on the previous step of the tutorial, double-click the Request 1 test step to open its editor.
The test sends a request to the server to get a geographical position of 1600 Amphitheatre Parkway, Mountain View, CA. You can see this request in the address field of the request editor:
Let's change it. Double-click the Value field, enter
450 Artisan Way, Somerville, MA, and run the test again.
The response has changed. As long as you provide a valid input, your web service should return correct data. You can then verify the returned data by using assertions.
Let's add the second request to the same web service and send incorrect data to make sure the service handles it well.
Right-click the TestCase and select Add Step > REST Request.
|Tip:||You can also create a request by dragging it from the APIs panel to the Navigator.|
Specify a name for the new test step and click OK.
In the New RestRequest dialog, select the REST method the new test step will send requests to and click OK. SoapUI will create a new test step with default request parameters.
Double-click the newly created request.
Enter a random combination of symbols as a parameter, for example
81a35s72z36 and click . The response will contain ZERO RESULTS, which means your request did not match any results.
|Tip:||To run both requests in one test, run the TestCase containing the requests.|
The next step of the tutorial shows how to create assertions to verify that your test works according to the SLA and always returns the same result.