In Lesson 3: Add steps to a test, you created a basic test that runs through the flight reservation application to book a flight.
In this exercise, you will learn how to run the test you just finished.
Before performing this exercise, ensure that the Microsoft Script Debugger was installed as part of the UFT installation. If you did not install it, run a Change installation of UFT before performing this exercise. For details on installing the Microsoft Script Debugger, see the Unified Functional Testing Installation Guide
Start UFT and open the Book Flights test.
- If UFT is not currently open, open UFT as described in Create a solution. Make sure the WPF Add-in is loaded.
- Select File > Open > Solution. The Open Solution dialog box opens.
In the Open Solution dialog box, navigate to the Flight Reservation Application.ftsln file, located in C:\%HOMEPATH%\My Documents\Unified Functional Testing, and click Open.
The Flight Reservation Application solution opens in the Solution Explorer, and the Book Flights test opens as a separate tab in the document pane.
Configure UFT to save all images to the run results.
When you perform a test run, UFT gives you the option to save all images to the test results.
- Select Tools > Options > GUI Testing tab > Screen capture node. The Screen Capture options pane opens.
- In the Screen Capture options pane, select the Save still image captures to results checkbox, and then select Always from the drop-down menu.
- Click OK to close the Options dialog box.
Configure the Record and Run Settings for your test.
In some cases, you may need UFT to open your application for you at the beginning of the test run. In these cases, you can set up the Record and Run Setting to enable this.
- Select Record > Record and Run Settings. The Record and Run Settings dialog box opens.
- In the Windows Application tab of the Record and Run Settings dialog box, select the Record and run only on: option.
- Under the Record and run only on option, select the Applications specified below option.
- In the Application details area, click the Add button . The Application Details dialog box opens.
In the Application details dialog box, enter the application details:
Application C:\%HOMEPATH%\Unified Functional Testing\samples\Flights Application\FlightsGUI.exe Working folder C:\%HOMEPATH%\Unified Functional Testing\samples\Flights Application\
- Click OK to close the Application Details dialog box.
- In the Record and Run Settings dialog box, click Apply and then OK to enable the settings and close the dialog box.
Start running your test.
In the Solution Explorer, select the Book Flights test node.
In the toolbar, click the Run button . The Run Test dialog box opens.
Note: Before running the test ensure that the Flights application is closed.
In the Run Test dialog box, click the Options bar to expand the Run Test Options area, Ensure that the New run results folder option is selected. Accept the default folder name:
Click Run to close the Run dialog box and start the test run.
Watch carefullly as UFT opens the application and starts running the test. In the application, you can see UFT perform each step you inserted: a yellow arrow in the left margin of the Keyword View or Editor and the highlighted row indicate the step that UFT is running:
If any errors appear, go to the point in the test that is indicated in the error message and verify that the step is configured as described in the relevant exercise.
When the test run is complete, the run results open as a separate tab in the document pane.