10 April 2007 - 1.7 |
soapUI Pro includes a MockResponse step that listens/waits for a SOAP Request and returns a preconfigured response before moving on. The incoming request can be validated just as the response of a TestRequest Step with the same configurable assertions.
Usage scenarios for this TestStep are for example:
When selecting to create a MockResponse Step from the TestCases Insert/Add Step menu, the following dialog will be displayed:
The dialog contains the following options:
After setting the desired values and selecting OK, the step will be created and its editor opened
The MockResponse Step is the basically the same as the standard MockResponse editor with the addition of the same assertions/log tabs in the bottom as the TestRequest editor and a number of context-sensitive wizards in the Outline Editor for creating assertions and Property Transfers.
At the top there is a toolbar that adds input fields for the path and port to listen on during execution, the rest is the same as the MockResponse editor. These are grayed out during execution of the MockResponse step. Assertions can be added/managed just as for the TestRequest editor, the list of available assertions is the same except the SOAP-Fault-related assertions, which are not applicable to request messages.
When the execution of a TestCase reaches a MockResponse Step, the step will start a local temporary MockService and wait for a request to the configured operation on the configured path and port. Onces a request has been received, it will be validated with the configured assertions and processed just like a standard MockResponse. After returning the MockResponse result, the MockService will be closed down. and execution will move to the next step in the TestCase.
Property Transfers can be used with MockResponse Steps just as with TestRequests, ie properties can be transferred from incoming requests and to outgoing responses.
Although running a LoadTest containing MockResponse steps will work, these steps are not designed for LoadTesting due to the following: