Recall the scenario testing section from earlier in this tutorial (Scenario Testing)—it proceeded through a series of actions and validations, but all within the same environment.
The goal of the current tutorial lesson is to show how you can string together a few different types of tests in order to exercise end-to-end scenarios that invoke different interfaces to a business system, or model a multistep transaction in a heterogeneous environment.
Here is an overview of the steps we want the end to end test suite to perform:
- Initialize the ParaBank database via an HTTP SOAP request
- Deposit $5000 into account #13344 via an HTTP SOAP request
- Verify the new balance via an HTTP SOAP request
- Login to ParaBank web application in a new web browser
- Verify the new balance via HTML validation
- Reset the database (initialize again)
- Verify the balance for account #13344 changed after reinitialization (via HTTP SOAP request)
To set up and run this end-to-end test:
- Choose File> New> Project.
- Select SOAtest> Empty Project, then click Next.
End to End Testing as the Project Name, then click Finish.
- Copy, paste, and move the tests from EndToEndSOAP.tst and EndToEndWeb.tst (in the examples provided with SOAtest) to construct the scenario shown below:
Be sure to copy the Environment from one of the test cases (or the SOAP Clients and Browser Playback tools won’t know where to direct their traffic). You will need to copy the SOAP clients twice.
- If you run the scenario at this point, Test 6: getAccount 2 will fail because of the XML Assertor currently chained to it (if you copied and pasted it).
- Open the XML Assertor chained to Test 6: getAccount 2, go to the Configuration tab, select Value Assertion – balance, and change the expected value to
- Save the tool.
- Rerun the scenario. No failures should be reported.