This section explains how to configure and apply the Call Back tool Tool that supports asynchronous HTTP testing by listening for the asynchronous server response.
...
SOAtest supports asynchronous HTTP testing, including Parlay, Parlay-X, SCP (SOAP Conversation Protocol), WS-Addressing, custom protocols, JMS, TIBCO, IBM MQ, and SonicMQ. After you configure the Call Back toolTool, SOAtest sets up a server to manage the Call Back Messages. It uses the keys you specify in the tool configuration to recognize incoming messages.
Configuring the Call Back Tool
Excerpt |
---|
Before you begin, verify that the local SOAtest server is running |
...
in the SOAtest Server view |
...
. |
...
If the SOAtest Server view is not visible in your workspace, go to Parasoft > Show View > SOAtest Server. |
...
You can start the server by either clicking the Server node then the start icon in the upper-right corner of the panel or by right-clicking the Server node and choosing Start Server. Once you've confirmed the local SOAtest server is running: |
- Ensure that there is a SOAP invocation from a SOAP Client tool.
- Select Right-click the main test suite node and click Add test or outputgo to Add New > Test. The Add Test wizard opens.
- Choose Standard Test > Call Back Tool from the Add Test wizard , and then click Finish. A Call Back Tool test node displays appears in the test suite.
- Double-click the Call Back Tool test node. The following options display Call Back Tool opens in the Call Back tool workspace:
- Data Source: (Only available if a Data Source was added to the test suite) Select the data source that has the desired parameters to be used as call back values. workspace.
- Enter the name of the test in the Name field.
- If there is a Data Source in the project that contains parameters you want to use as call back values, choose it from the Data Source menu. If there are no data sources in the project, this option will not appear.
- Specify
- Call Back URL: Displays the server location of the Call Back tool. For HTTP protocols only. Timeout (sec): Specifies the length of delay (in seconds) after which SOAtest should consider your requests to be timed out in the Timeout (sec) field.
- Protocol: Specifies Choose the asynchronous protocol to be used from the Protocol menu. Note that some of the options available are specific use cases for the HTTP protocol (for example, SCP or WS-Addressing). The rest of the settings for the tool will be specific to the protocol selected.
- Custom: Choose for .
- Parlay: For the Parlay protocol.
- Parlay X: For the Parlay X protocol.
- SCP: For the SCP protocol.
- WS-Addressing: For the WS-Addressing protocol. Custom: Enables custom message correlation over HTTP. The Call Back tool Tool will pick up any messages at the call back URL that match the text value of elements at specified XPaths. For example, assume you have the following message:
<root>
<id>2</id>
<name>Java</name>
</root>
You can define an XPath of/root/id
with value2
. The XPath will select theid
element. The Call Back tool Tool will then check if the text content matches the configured value of2
. The Call Back tool Tool will not pick up any received messages that have a different text value for theid
element.
If selected, the Call Back URL field will show the server location of the Call Back Tool. Enter your XPath/value key sets by clicking Add (if the view is set to Table) or directly (if the view is set to Literal). - IBM MQ: Choose for the IBM MQ protocol. If selected, see IBM MQ Tools Reference for more information about the relevant settings.
- JMS: Choose for the JMS protocol. If selected, see Configuring JMS options for the Call Back Tool for more information about the relevant settings.
- No correlation: Choose No correlation: Select this to use the first message in in
http://localhost:9080/servlet/NoCorrelationCallBackHandler
. If this "protocol" is selected and there is no message at that location, the test will fail once it times out. - JMS: For the JMS protocol. If JMS is selected as the protocol, additional options will be made available. For more information, see Configuring JMS options for the Call Back Tool.
- TIBCO: For the TIBCO protocol. For more information, see Configuring TIBCO options for the Call Back Tool.
- IBM MQ: For the IBM MQ protocol.
- SonicMQ: For the SonicMQ protocol.
- Key Set: Displays Keys and Values used in the Call Back message. These options are not available if JMS was selected as the Protocol.
- Key: The Keys will vary depending on the Protocol selected.
- For Parlay, the keys used to determine a unique Call Back message are sessionID and requestNumber. For more information on Parlay specifications/API, see http://www.parlay.org.
- For Parlay X, the key used to determine a unique Call Back message is correlator.
- For SCP, the key used to determine a unique Call Back message is conversationID. For more information on SCP specifications/API, see http://dev2dev.bea.com/technologies/webservices/SOAPConversation.jsp.
- For WS-Addressing, the key used to determine a unique Call Back message is MessageID. For more information on WS-Addressing specifications, see http://www-106.ibm.com/developerworks/library/specification/ws-add/
- XPath: (Only available for Custom) Double-click to enter an XPath.
- Value: (Not available for JMS) Double-click to enter either a Fixed value or a Parameterized value (if a Data Source is available).
- Key: The Keys will vary depending on the Protocol selected.
- OAuth 2.0: Choose for the OAuth 2.0 protocol. The Call Back URL field will show the server location of the Call Back Tool. Enter a correlation to parameter in the original URL to login page of the authorization server.
- The primary use for this option is to incorporate the Call Back Tool as part of a login test suite where the user navigates in their web browser to the login page of their authorization server, provides their login credentials, and then is redirected back to an application (SOAtest in this case) with the resulting authorization code. The Call Back URL shows the URL that should be used for the
redirect_uri
query parameter when navigating to the login page. After login, the authorization server will redirect the user's browser back to this URL but with additional query parametersstate
andcode
. You want to configure the Call Back Tool to correlate on the value of thestate
parameter, which should match the value of thestate
parameter that was in the original URL to login page of the authorization server. Thecode
can be extracted by chaining a REST URL Data Bank to the tool's Incoming Request > Transport Header output. For more detail about setting up this kind of login test suite, see OAuth Authentication#CreateRefSuite.
- The primary use for this option is to incorporate the Call Back Tool as part of a login test suite where the user navigates in their web browser to the login page of their authorization server, provides their login credentials, and then is redirected back to an application (SOAtest in this case) with the resulting authorization code. The Call Back URL shows the URL that should be used for the
- SonicMQ: Choose for the SonicMQ protocol. If selected, see SonicMQ Transport for more information about the relevant settings.
- SCP: Choose to use SCP over HTTP. If selected, the Call Back URL field will show the server location of the Call Back Tool. Double-click the key set to enter a value for the call back message (the key is automatically set to
conversationID
). - TIBCO: Choose for the TIBCO protocol. If selected, see Configuring TIBCO options for the Call Back Tool for more information about the relevant settings.
- WS-Addressing: Choose to use WS-Addressing over HTTP. If selected, the Call Back URL field will show the server location of the Call Back Tool. Double-click the key set to enter a value for the call back message (the key is automatically set to
MessageID
). - Save your changes.
- Right-click the Right-click the Call Back Tool test node and select Add Output. The Add Output wizard opens.
- Select the desired tool from the Add Output wizard to create an output for the Call Back message from the server. For example, you can select the Diff tool to create a regression control on the Call Back message from the server.
...
If TIBCO is selected as the Protocol for the Call Back toolTool, a TIBCO Properties panel appears at the bottom of the tool configuration panel. SOAtest can listen on a local TIBCO DAEMON or a remote one. That is, the bus daemon could be running on the local machine or somewhere else. The following options are available:
...
The Message Delivery field indicates what type of messages the Call Back tool Tool should look for on the bus. This should correspond to the delivery type established by the message sender.
...
If JMS is selected as the Protocol for the Call Back toolTool, a JMS Properties panel is shown at the bottom of the Call Back tool Tool workspace. The following options are available:
...