...
- Create an empty test suite (.tst) file called
TestFlowLogic.tst
as follows:- Right-click the Examples project node in the Test Case Explorer, then choose Add New> Test (.tst) file.
- Under File name, enter
TestFlowLogic
. - Click Next.
- Select Empty, then click Finish.
- Open the test suite configuration panel by expanding the test suite, then double-clicking the Test Suite: Test Suite node.
- Open the Execution Options> Test Flow Logic tab.
- Set the Flow type to While pass/fail.
- Set the Maximum number of loops to
20
. - Change the Loop until setting to One test and Succeeds.
- Save the test suite configuration settings.
- Create a SOAP Client test as follows.
- Right-click the TestFlowLogic.tst> Test Suite: Test Suite node, then choose Add New> Test.
- In the dialog that opens, select SOAP Client, then click Finish.
- Configure the SOAP Client test as follows:
- In the test configuration panel’s WSDL tab, enter
http://localhost:8080/parabank/services/store-01?wsdl
for the WSDL URL. - In the Request tab, set Operation to getItemByTitle.
- For titleKeyword, check the box, then enter
PowerBuilder
as the value. - Save the changes to the SOAP Client test.
- In the test configuration panel’s WSDL tab, enter
- Create a regression control for that test as follows:
- Right-click the SOAP Client test node and select Create/Update Regression Control.
- Select Create Regression Control.
- Click Finish.
- Modify the expected price in the regression control as follows:
- Double-click the newly-created Diff control node to open the Diff tool editor.
- Modify the value in the price element. The store service increases the price of the book by $1.00 after several calls to getItemByTitle, so depending on how many times you’ve ran tests in this tutorial, the current price may be different than shown.
- Double-click the newly-created Diff control node to open the Diff tool editor.
Run the current test suite by selecting the test suite node, then clicking the Test toolbar button. Even though specific tests failed, the test suite will succeed because the price entered in the expected response will be reached before looping 20 times. You can see this in the Console tab:
Info title Higher prices than expected? The more times you’ve called getItemByTitle, the more the prices will have increased. To bring prices back down, restart the Parabank server and rerun the SOAP Client that calls getItemByTitle.- Double click the previously-created Diff Control node to re-open the Diff tool editor.
- Modify the price so that the test will loop the full 20 times before the price is reached.
- Run the Test Suite again. The Test Suite will fail because the price is never reached after looping 20 times.
...