Creating a service test from a BPEL model
You can use Business Process Execution Language (BPEL) resources from your workspace to automatically generate a set of service tests that corresponds to the paths that are run in a synchronous BPEL model.
Before you begin
Tests are stored in test projects. If your workspace does not contain a test project, the test creation wizard creates one, enabling you to change its name. To store a test in a specific project, verify that the project exists before you record the test.
If you are using Secure Sockets Layer (SSL) authentication, ensure that you have any required key files in your workspace.
If you are using Java™ Message Service (JMS), ensure that you have configured the environment with the correct libraries and configuration files. Ensure that the WSDL files use the correct syntax for the test environment.
If you are using SOAP security, ensure that you have configured the environment with the correct libraries and configuration files.
BPEL models must be synchronous. Asynchronous BPEL models are not checkmark_perf.jpg.
<bpws:import importType="http://www.w3.org/2001/XMLSchema" location="foo.wsdl" namespace="http://foo"/>
Relative
file paths, such as: "../../foo.wsdl" are not checkmark_perf.jpg.<bpws:invoke name="myOperation" operation="myOperation" partnerLink="IServicePartner" portType="ns3:IService" wpc:displayName="myOperation" wpc:id="20">
Only BPEL invoke activities are considered for generating tests. Any BPEL receive and reply activities are ignored.
Websphere Integration Developer does not generate
the required soapAction
attributes for the soap operations
in the WSDL files. Please edit the generated WSDL files, as follows
for every operation: <soap:operation soapAction=""/>
.
Procedure
- In the Performance Test perspective, click Next. , and then click
- Click Browse to select a BPEL file from the workspace, and click Next.
- On the Web service test generation page,
change the number of paths by specifying how activities and sequences
from the flow of the BPEL model are processed. Each path generates
one test.
- In the Flow section, select how any concurrent sequences that are found in the flow will be converted into paths.
- In the Switch section, select whether to test otherwise activities from the flow.
- In the Throw section, select how throw activities from the flow are converted into paths.
- In the Invoke section, select whether to test inline catches inside invoke activities from the flow.
- Select Enable data correlation in generated tests to automatically create references in the generated test elements by propagating variables to the parameters of the web service call and message return elements.
- Click Recount paths to update the
number of paths to test, and click Next.
One test is generated for each path.
- For WSDL operations that are bound to multiple ports, you
must select one port that is to be used for the test.
Under each test that will be generated, the Operations list displays the WSDL operations that are bound to multiple ports.
If no WSDL operations are displayed under the tests, this means that all operations are bound to a single port. In this case, skip step 6.
- In the Operations list, expand a test and select a WSDL operation that requires binding.
- In the Binding ports list, select the port that you want to use to test the selected WSDL operation.
- Repeat steps a and b for each WSDL operation that requires binding.
- Click Next.
- Select a location and a name for the new folder where the tests generated from the BPEL model are created, and click Finish.