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:

  1. Initialize the ParaBank database via an HTTP SOAP request
  2. Deposit $5000 into account #13344 via an HTTP SOAP request
  3. Verify the new balance via an HTTP SOAP request
  4. Login to ParaBank web application in a new web browser
  5. Verify the new balance via HTML validation
  6. Reset the database (initialize again)
  7. Verify the balance for account #13344 changed after reinitialization (via HTTP SOAP request)

To set up and run this end-to-end test:

  1. Choose File> New> Project.
  2. Select SOAtest> Empty Project, then click Next.
  3. Enter End to End Testing as the Project Name, then click Finish.
  4. 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.
  5. 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).
  6. 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 1231.10.
  7. Save the tool.
  8. Rerun the scenario. No failures should be reported.
  • No labels