The Mockresponse test step listens for a SOAP request and returns a pre-configured response before continuing. The incoming request can be asserted for checking.
This teststep usage scenario is for example:
- Client testing, validating incoming requests and returning false or incorrect responses to test client behavior
- Test asynchronous processes-for example, initially requeststep start some work, then need to wait for notification before continuing
To create a mockresponse step
mockresponse step to create "from Scratch "Use the TestCase or teststep insert or add operation;
The dialog box contains the following options:
- Name--The name of the Create step
- Impersonation operation, specified action
- interface--Specify interface emulation, change this will also update the list of available actions
- Create response--whether a default Mockresponse message is created
- Listening port, port
- path, path to listen
set the desired value and select OK, this step will create and open the editor.
Other ways to create a mockresponse step is:
- from a sample request node at the action level, right-click on the sample request and select "add as Mockresponse step creates a mockresponse step, request, using the last response as Mockresponse content, if available.
- select "Mockresponse add to TestCase ", using the existing Mockresponse content, if available.
Mockresponse Step Properties
The lower-left property is the same as the standard Mockresponse property, with the following exceptions:
- timed out --mockresponse fails if no request is received in the specified number of milliseconds. Specifies that 0 will wait indefinitely.
- handling Failures --Tell Mockresponse to accept incoming SOAP faults
- Handling Responses --tells Mockresponse whether to accept the incoming response message to match the WSDL operation
- steps to begin --Configure which step in this testcase mockresponse will begin to "listen" to the request.
- Port --Port for listening
- Path --Listening path
- host --managed host name using WSDL
mockresponse Step Editor
mockresponse steps basically and standard SOAPUI Pro The Mockresponse editor is the same, with the same assertion/Log tab at the bottom, where the Outline Editor Context Wizard creates assertions and attribute transitions.
Top has a toolbar that adds input fields to the path and port monitoring, The rest of the Mockresponse editor during execution. These are the gray mockresponse steps of the execution period. Assertions can be added/managed just like the Testrequest editor, the list of available assertions is the same except for the soap-fault-related assertion, which does not apply to request messages.
Query/Match configuration
query/Match Configuration tab allows you to specify a query that will be used to choose to process incoming requests. For example, the query specifies an XPath expression, and the selection ID and match will contain a property-expansion
that matches the ID.
mockresponse Step Execution
When the test cases that are executed are up to the configured "one Step" start, The Mockresponse step initiates a local temporary mockservice, waiting for the request to configure the path and the operation configured on the port. Once the request has been received, it will be treated as mockresponse as the configured assertion and validation standard. After the mockresponse results are returned, Mockservice will close, and execution will move to the next step of TestCase.
The Mockresponse step property transfer can be the same as testrequests, where the property can be from an incoming request to an outgoing response.
To create a mockresponse step