¤ÈäîPerforming Test Runs
See Also
A BPEL process can have many running instances. When the BPEL Service Engine runtime
receives a message, it uses correlation to route the incoming message to the appropriate instance of the
process. If an instance does not exist yet, a new instance is created.
To test-run a deployed business process, you need to configure test cases to act as remote partner services sending SOAP messages to the BPEL Service Engine runtime. When the BPEL Service Engine runtime receives such a message, it creates an instance of the BPEL process and starts executing the instance.
Before you can test-run a process, make sure that you have done the following:
To test-run a process, do the following:
- Create one or more test cases (for sample projects, the test cases are generated automatically; for new projects, you have to create test cases using a wizard)
- Run test cases.
To create a test case:
- In the Projects window, expand the Composite Application project's node.
- Right-click the Test node and click Add Test Case.
The New Test Case wizard appears.
- Enter the name for the test case and click Next.
- In the list of WSDL files, select the process's WSDL file and click Next.
- In the list of operations available in the selected WSDL file, select the operation you want to test and click Finish.
The new test case node appears under the Test node in the Projects window.
A test case node has the following two messages:
- Input.xml. This is a message sent to the BPEL application. It contains input data created in accordance with the selected WSDL file. To edit the input message, double-click the Input.xml file. The message originally contains default data. You can edit the file so that it contains the data you wish to send for each particular test case.
- Output.xml. This message contains the output data you expect to receive after the input message has been processed on the server. To edit the output message, double-click the Output.xml file. Initially, the Output.xml file is completely empty. If you leave Output.xml empty and perform a test run, the result of the next test run will be written to Output.xml. This is a convenient way to populate Output.xml with test data. However, you are always free to further edit Output.xml at any point and rerun tests. You can enter the data you expect to obtain as a result of test-running the BPEL application. If the expected data in the Output.xml file differs from the actual response, the test will fail.
To run one test case:
- In the Projects window, expand Composite Application project > Test.
- Right-click the test case node you want to run and choose Test.
Watch the results in the JUnit Test Results window.
To run multiple test cases against one process:
- In the Projects window, right-click the Composite Application project and choose Test Project (Alt-F6).
Watch the results in the JUnit Test Results window.
For failed tests, you can see the reason for a test failure and the name of file containing an actual response from your BPEL application (Actual_date.xml). To navigate to the actual response message, open the Files window, expand the project folder and the Test node, and double-click the Actual_date.xml file with the actual response.
- See Also
- Starting and Stopping a Server
- Building BPEL Module Projects
- Adding JBI Modules to Composite Application Projects
- Deploying Composite Application Projects
Legal Notices