In Exercise 3a: Create a test with standard activities, you created a test using standard API testing activities. In Lesson 4: Parameterize API test steps, you then parameterized the test, using a number of different methods.
In this lesson, you will learn how to prepare UFT to run the test and how to run your API tests.
Start UFT and open the Book Flights solution.
- Open UFT as described in Create a solution.
On the Start Page, in the Recent Tests area, click Flight Reservation Application.
The Flight Reservation Application solution opens, containing the Book Flights test you created in Exercise 3a: Create a test with standard activities.
Set the run mode for the test.
Before you run your test, you must instruct UFT how you want to run the test. You can run a test in Release mode, which runs the test quickly, or Debug mode, which runs more slowly as UFT needs to load the debugging tools before the test run.
- Select Tools > Options. The Options dialog opens.
- In the Options dialog box, select the API Testing tab.
- In the API Testing tab, select the General node.
- In the General pane, select the Run test in debugging mode option.
Start running your test.
- In the toolbar, click the Run button . The Run dialog box opens.
- In the Run dialog box, click on the Options bar to expand the dialog box.
- In the Options area, click the Results location tab. This enables you to specify where the test results are saved.
- In the Results location, select the New run results folder option. Accept the default folder name.
Click Run to close the Run dialog box and start running the test.
As UFT runs the test, it provides a log of steps performed in the output pane, including the input and output parameters,and the result of any checkpoints run:
Any errors that occur during the test run are reported as part of the log. You can return to the relevant step to fix these errors.
When the test run is complete, the run results open as a separate tab in the document pane. Continue to Exercise 5b: Navigate the run results to learn more about the run results.