Oracle® Fusion Middleware Infrastructure Components and Utilities User's Guide for Oracle Application Integration Architecture Foundation Pack 11g Release 1 (11.1.1.5.0) Part Number E17366-03 |
|
|
View PDF |
A test definition is a configuration of a single execution of the test initiator service. The test definition stores test data and test execution instructions. A test definition can be executed alone, or in a single-threaded batch as a part of a group definition.
This chapter includes the following sections:
Section 4.3, "How to Provide Multiple Request and Response Message Sets in a Single Test Definition"
To create a test definition:
Access the Oracle Application Integration Architecture (AIA) Home Page. In the Composite Application Validation System area, click the Go button. Select the Definitions tab. Click the Create Test button.
The Create Test page displays, as shown in Figure 4-1 and Figure 4-2.
On the Create Test page, use the page elements discussed in Table 4-1 to create test definitions.
Table 4-1 Create Test Page Elements
Element | Description |
---|---|
Id |
Upon saving the test definition, displays a unique key identifier that is assigned to the test definition. |
Name |
Enter a descriptive name that you want to use for the test definition. |
Type |
Displays the type of definition you chose to create. On the Create Test page, this value will always be set to Test. |
Service Type |
Select the business service pattern of the web service that you want to test using the test definition: Synchronous (request-and-reply), Notify (asynchronous request-only), or Asynchronous two way. |
Service Name |
Enter the name of the web service that you want to test using the test definition. This is the name of the web service being called by the URL provided in the Endpoint URL field. |
Service Version |
Enter the version of the web service that you want to test using the test definition. This is the version of the web service being called by the URL provided in the Endpoint URL field. |
Process Name |
Enter the name of the process that includes the web service that you want to test using the test definition. |
PIP Name (Process Integration Pack name) |
Enter the name of the PIP that includes the web service that you want to test using the test definition. |
Endpoint URL |
Enter the URL of the web service that you want to test using the test definition. The endpoint URL value can be found in the WSDL of the web service that you want to test. |
Get Operations |
Click to display the list of operations supported by the WSDL associated with the Endpoint URL value you provided. Supported operations display in the Select WSDL Operations window. Select the operation that you want to test using the test definition. The selected operation displays in the SOAP Action field. |
SOAP Action |
If you clicked Get Operations to select an operation in the Select WSDL Operations window, the selected operation displays here. Alternatively, you can manually enter the operation called by the web service that you want to test using the test definition. The value you enter must match an action provided in the WSDL of the web service that you want to test. |
Get Messages |
Click to generate a request stub message for the operation specified in the SOAP Action field. For test definitions with the Service Type field set to Synchronous, the response stub message will also be generated. |
Routing Setup Id |
Select a routing configuration that you want to use for the test. For more information about routing configurations, see Chapter 8, "Defining CAVS Routing Setup IDs." |
Test Messages
Use the Test Messages group box to enter request and response XML message text. By default, SOAP envelope XML text is provided in these fields. You can use the Get Messages button to generate request and response stub messages based on selected endpoint URL and operation values. Alternatively, you can paste XML text within this default SOAP envelope or paste your own XML text already enclosed in an envelope into these fields.
Elements available in the Test Messages group box are discussed in Table 4-2.
For more information about obtaining request and response XML message text, see Section 2.5.1, "How to Obtain Message XML Text from a BPEL Process."
For more information about how to create test request and response messages that hold multiple sets of test data in a single definition, see Section 4.3, "How to Provide Multiple Request and Response Message Sets in a Single Test Definition."
Table 4-2 Create Test Page - Test Messages Group Box Elements
Element | Description |
---|---|
Request Message |
Entering request message XML text for a test definition is required, whether the Service Type field value is set to Synchronous, Notify, or Asynchronous two way. When you first access the Create Test page, the Request Message text box is populated with a SOAP stub message. You can use the Get Messages button to generate a request stub message based on selected endpoint URL and operation values. If you are manually entering your request message, the Paste your SOAP Message Content here text in the stub message indicates where you should paste your actual request message text. This request message should mimic the XML message text sent by the service that normally initiates the service. If the Service Type field value is set to Synchronous or Asynchronous two way, you may choose to not enter response message XML text in this field. You do not need to enter response message XML if you are manually entering XPath values directly on the Modify Test Definition page or if the test you are running does not require validation of the response message. For example, your test may be focused on just populating data. |
Expected Response Message |
The ability to enter response message XML text is available when the Service Type field value is set to Synchronous or Asynchronous two way. When you first access the Create Test page, the Expected Response Message text box is populated with a SOAP stub message. If you are manually entering your request message, the Paste your SOAP Message Content here text in the stub message indicates where you should paste your actual response message text. Enter a response message that is the expected response message XML. This facilitates the generation of XPath values, which are used to validate the actual response message returned in the test. You may also choose to manually enter or modify the XPath values directly on the Modify Test Definition page. If you are manually entering XPath values, you do not need to enter response message XML text. For test definitions with the Service Type field set to Synchronous, the response message stub will have been generated when you clicked the Get Messages button during request message generation. When you enter response message XML text on this page, you can click the Generate Xpath button on the Modify Test Definition page to generate the XPath values that will be used to validate the expected response message you entered on this page against the actual response returned by the test. The Expected Response Message text box is unavailable when the Service Type field value is set to Notify. |
Cancel |
Click to exit the page and return to the Definitions page. |
Next |
Click to save entries on the Create Test page and go to the Modify Test Definition page, where you can further edit your test definition, generate XPaths, and execute the test. |
Save and Return |
Click to save entries on the Create Test page and return to the Definitions page. |
To modify a test definition:
Access the Modify Test Definition page, as shown in Figure 4-3, Figure 4-4, Figure 4-5, Figure 4-6, and Figure 4-7.
To access the Modify Test Definition page, use one of the following navigation paths:
Access the AIA Home Page. In the Composite Application Validation System area, click the Go button. Select the Definitions tab. Click the Create Test button. Enter required values on the Create Test page and click Next.
Access the AIA Home Page. In the Composite Application Validation System area, click the Go button. Select the Definitions tab. Click an Id link for an unlocked test definition in the Search Result Selection grid on the Definitions page.
Access the AIA Home Page. In the Composite Application Validation System area, click the Go button. Select the Instances tab. Click a Definition Id link for an unlocked test definition on the Instances page.
Access the AIA Home Page. In the Composite Application Validation System area, click the Go button. Select the Instances tab. Click an instance ID link. Click a Definition Id link for an unlocked test definition on the Test Instances Detail page.
Use the page elements on the Modify Test Definition page to modify an existing test definition and execute and manage existing test definitions.
The page displays values that have already defined for the test definition. You can modify the values in editable fields.
Most of the elements on this page also appear on the Create Test Definition page and are documented in Section 4.1, "How to Create a Test Definition." Any additional elements are discussed here.
The Time-out (msec) (in milliseconds) field displays only for a test definition with a Service Type value of Asynchronous two way.
Enter the number of milliseconds that you want the test definition to remain available for the asynchronous reply before timing out. If this length of time passes before the asynchronous response is returned, a failure will be issued.
If your test includes a simulator definition, the Time-out (msec) value you provide here must be greater than the Delay (msec) value defined on the simulator definition.
For more information about the Delay (msec) field, see Section 5.1, "How to Create a Simulator Definition."
Test Messages
Use the Test Messages group box to generate XPath values based on provided response XML message text. By default, SOAP envelope XML text is provided in these fields. You can use the Get Messages button to generate request and response stub messages based on selected endpoint URL and operation values. Alternatively, you can paste XML text within this default SOAP envelope, or paste your own XML text already enclosed in an envelope into these fields.
Available Test Message group box elements are discussed in Table 4-3.
For more information about obtaining request and response XML message text, see Section 2.5.1, "How to Obtain Message XML Text from a BPEL Process."
For more information about how to create test request and response messages that hold multiple sets of test data in a single definition, see Section 4.3, "How to Provide Multiple Request and Response Message Sets in a Single Test Definition."
Table 4-3 Modify Definitions Page - Test Messages Group Box Elements
Element | Description |
---|---|
Request Message |
If request message XML text was entered on the Create Test page, it is accessible and editable on this page. Entering request message XML text for a test definition is required, whether the Service Type field value is set to Synchronous, Notify, or Asynchronous two way. You can use the Get Messages button to generate a request stub message based on selected endpoint URL and operation values. If you are manually entering your request message, the Paste your SOAP Message Content here text in the stub message indicates where you should paste your actual request message text. This request message should mimic the XML message text sent by the service that normally initiates the service. |
Request CorrelationId Message |
This field only displays for a test definition with the Service Type field value set to Asynchronous two way. For this service type, entering a correlation ID value ensures that when the asynchronous response is actually received, the Composite Application Validation System (CAVS) is able to correlate it to the correct request. If your request message is an Enterprise Business Message (EBM), leave this field blank, as the EBM header ID is automatically used as the correlation ID. In this case, because the EBM header ID is used as the correlation ID, do not use it as a key column in the simulator definition, if applicable. If your request message is not an EBM, you must enter a correlation ID value. This correlation must be based on a unique key of the message. For example, CreateOrder can use Order ID as the correlation ID. Click Lookup to access the Choose Request Correlation Id page, where you can select a correlation ID from XPath variables available in the message. |
Expected Response Message |
The ability to enter response message XML text is available when the Service Type field value is set to Synchronous or Asynchronous two way. If expected response message XML test was entered on the Create Test page, it is accessible and editable on this page. You can manually enter the response message text on this page, or for test definitions with the Service Type field set to Synchronous, you can use the Get Messages button to generate a response stub message based on selected endpoint URL and operation values. Entering the expected response message XML facilitates the generation of XPath values, which are used to validate the actual response message returned in the test. You may also choose to manually enter or modify the XPath values directly on the Modify Test Definition page. If you are manually entering XPath values, you do not need to enter response message XML text. When you enter response message XML text on this page, you can click Generate Xpath button on the Modify Test Definition page to generate the XPath values that will be used to validate the expected response message you entered on this page against the actual response returned by the test. If the Service Type field value is set to Synchronous or Asynchronous two way, you may choose to not enter response message XML text in this field. You do not need to enter response message XML if you are manually entering XPath values directly on the Modify Test Definition or if the test you are running does not require validation of the response message. For example, your test may be focused on just populating data. The Expected Response Message text box is unavailable when the Service Type field value is set to Notify. In this case, a response message is not a test requirement. |
Generate Xpath |
Click to generate namespace and XPath values based on available Endpoint URL and Response Message values. Once you have generated XPath values, consider deleting any rows that will not be used in the testing effort. The Generate Xpath button is unavailable when the Service Type field value is set to Notify. In this case, a response message is not a test requirement. |
Response Message Correlation ID |
This field only displays for a test definition with the Service Type field value set to Asynchronous two way. For this service type, entering a correlation ID value ensures that when the asynchronous response is actually received, the CAVS is able to correlate it to the correct request. If your response message is an EBM, leave this field blank, as the EBM header ID is automatically used as the correlation ID. In this case, because the EBM header ID is used as the correlation ID, do not use it as a key column in the simulator definition, if applicable. If your response message is not an EBM, you must enter a correlation ID value. This correlation must be based on a unique key of the message. For example, CreateOrder can use Order ID as the correlation ID. Click Lookup to access the Choose Response Correlation Id page, where you can select a correlation ID from XPath variables available in the message. |
Prefix and Namespace Selection
Use the Prefix and Namespace Selection grid to define namespace data that will be used in the XPath values defined in the XPath Selection grid. Elements available in the Prefix and Namespace Selection grid are discussed in Table 4-4.
Table 4-4 Prefix and Namespace Selection Grid Elements
Element | Description |
---|---|
Delete |
Select one or more namespace rows and click Delete to execute the deletion. This button only appears when namespace rows are present. |
Create |
Click to manually add and populate a namespace row. |
Prefix |
Prefix that should be used for the namespace. |
Namespace |
Namespace to be used in the XPath data for the test definition. |
XPath Selection
Use the XPath Selection grid to work with XPath values that are used to compare the actual response message returned in the test to the expected response message defined in the Response Message text box on this page. The values in this grid use the namespace values set in the Prefix and Namespace Selection grid.
A common adjustment you will likely need to make to XPath conditions and expected node values in this grid is to generalize certain specific values, such as EBM IDs. For example, an EBM ID is unique for each transaction, so your test definition will likely not want to specify a particular EBM ID as response criteria. Instead, you may want to generalize the criteria to just verify that the EBM ID is a number greater than zero or use the Is Valid
condition value.
Note:
If you are entering XPath values manually, it is important to maintain correlations with the values entered in the Prefix and Namespace Selection grid. Each XPath node must have a prefix (namespace alias) that has been defined in the Prefix and Namespace Selection grid, unless it is an XPath expression.The XPath Selection grid is unavailable when the Service Type field value is set to Notify. In this case, a response message is not a test requirement.
Elements available in the XPath Selection grid are discussed in Table 4-5.
Table 4-5 XPath Selection Grid Elements
Element | Description |
---|---|
Xpath |
When working with a test definition that contains multiple request and response data sets, use the Xpath drop-down list box to select the data set you want to use to run the test. For more information about providing multiple data sets in a test definition, see Section 4.3, "How to Provide Multiple Request and Response Message Sets in a Single Test Definition." |
Delete |
Select one or more XPath rows and click Delete to execute the deletion. This button only appears when XPath rows are present. |
Create |
Click to manually add and populate an XPath row. |
XPath Sequence Id |
Indicates the sequence of the XPath expressions. This value is required. This value is read-only when it has been generated using the Generate Xpath button. |
XPath |
XPath data to be used in the test definition. These values can include XPath nodes and expressions. This value is read-only when it has been generated using the Generate Xpath button. |
Condition |
Select an available value:
|
Test Instance Selection
Select the Test Instances tab to display the Test Instance Selection grid, which displays information about test instances generated using the test definition.
Click Id to access the test instance on the Test Instance Detail page.
For more information about the Test Instance Detail page, see Section 9.2, "How to View Test Instance Details."
Linked Simulator Definition Selection
Select the Simulator Definitions tab to display the Linked Simulator Definition Selection grid, which displays information about simulator definitions that are linked to the selected test definition.
Available elements on the Simulator Definition tab are discussed in Table 4-6.
Table 4-6 Linked Simulator Definition Selection Grid Elements
Element | Description |
---|---|
Unassign |
Select one or more simulator definition rows that you want to disassociate with the test definition. Click Unassign to execute the disassociation. |
Assign |
Click to access the Search Definitions - Simulator page, where you can search for a simulator definition that you want to assign to the test definition. Making this assignment facilitates reporting. Once the test definition runs and generates a test instance, all simulator instances generated by the simulator definition associated with the test definition will automatically be linked to the test instance. Once you have assigned a simulator definition using the Search Definitions - Simulator page, the Modify Test Definition page appears, and displays the selected simulator definition. |
Refresh |
Click to refresh the Modify Test Definition page. |
Simulator Definition Id |
Click for an unlocked simulator definition to access the Modify Simulator Definition page. Click for a locked simulator definition to access the View Simulator Definition page, where you can access a read-only view of the simulator definition. |
Group Definition Selection
Select the Group Definitions tab to display the Group Definition Selection grid, which displays information about group definitions that include the test definition.
Elements available in the Group Definition Selection grid are discussed in Table 4-7.
Table 4-7 Group Definition Selection Grid Elements
Element | Description |
---|---|
Group Definition Id |
Click to access the group definition on the Group Definition Detail page. For more information about the Group Definition Detail page, see Chapter 7, "Working with Group Definitions." |
Group Name |
Displays the descriptive name assigned to the group definition. |
Sequence Id within Group |
Displays the sequence in which the test definition is initiated by the group definition. |
Cancel |
Click to discard any updates you have made and return to the Definitions page. |
Actions |
Select the action you want to take with the test definition.
|
Apply |
Click to apply and save any changes you have made to values on the page. |
Save |
Click to save entries on the page and go to the Definitions page. For more information about the Definitions page, see Chapter 6, "Searching for Test and Simulator Definitions." |
You can create a test definition that contains multiple pairs of request and response message data, as shown in Figure 4-8. This means that test definitions only need to be created per usage requirements, not per test data requirements.
For example, if you want to test a process against five sets of test data, you can create a single test definition to test the process and include in it all five sets of test data against which you want the process to operate. This is as opposed to creating five separate test definitions, one per combination of process and set of test data.
When multiple sets of test data are included in a test definition, each set will be executed in sequence. Separate test instances will be generated for each set of data. Test instances will reflect the success or failure of each segment of the test run using each set of test data.
Use the format shown in Example 4-1 to include multiple sets of request data in the test definition.
The CAVSRequestInputs
and CAVSRequestInput_1
envelope are autogenerated. Use copy and paste commands to create more sets; CAVSRequestInput_2
and CAVSRequestInput_3
, for example.
Example 4-1 Request Message Format
<cavs:CAVSRequestInputs xmlns:cavs="http://schemas.xmlsoap.org/cavs/requestenvelope/"> <cavs:CAVSRequestInput_1> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns:ns1="http://xmlns.oracle.com/SimpleProcess"> <ns1:SimpleProcessProcessRequest> . . . </ns1:SimpleProcessProcessRequest> </soap:Body> </soap:Envelope> </cavs:CAVSRequestInput_1> <cavs:CAVSRequestInput_2> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns:ns1="http://xmlns.oracle.com/SimpleProcess"> <ns1:SimpleProcessProcessRequest> . . . </ns1:SimpleProcessProcessRequest> </soap:Body> </soap:Envelope> </cavs:CAVSRequestInput_2> </cavs:CAVSRequestInputs>
Use the format shown in Example 4-2 to include multiple sets of response data in the test definition.
Example 4-2 Response Message Format
<cavs:CAVSResponseOutput_1> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns:ns1="http://xmlns.oracle.com/SimpleProcess"> <ns1:SimpleProcessProcessResponse> . . . </ns1:SimpleProcessProcessResponse> </soap:Body> </soap:Envelope> </cavs:CAVSResponseOutput_1> <cavs:CAVSResponseOutput_2> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns:ns1="http://xmlns.oracle.com/SimpleProcess"> <ns1:SimpleProcessProcessResponse> . . . </ns1:SimpleProcessProcessResponse> </soap:Body> </soap:Envelope> </cavs:CAVSResponseOutput_2> </cavs:CAVSResponseOutputs>
After entering request and response data sets and clicking the Generate Xpath button on the Modify Test Definition page, the XPath Selection grid provides access to the Please select an Xpath drop-down list box, where you can select the set of test data you want to use to run the test.
For more information about the Modify Test Definition page, see Section 4.2, "How to Modify a Test Definition."
If your testing scenario includes simulator definitions, you can likewise create simulator definitions that contain multiple request and response message sets that work with the sets defined in your test definition.
For more information, see Section 5.3, "How to Provide Multiple Request and Response Message Sets in a Single Simulator Definition."