Generating Automated Test Scripts

Test planning involves deciding which tests to automate. If you choose to execute tests manually, the tests are ready for execution as soon as you define the test steps. If you choose to automate tests, you can generate test scripts and complete them using other Micro Focus testing tools (for example, UFT One).

Consider these issues when deciding whether to automate a test.

Do Automate Do Not Automate
Tests that run with each new version of your application to check the stability of basic functionality across the entire application (regression tests).

Tests that are executed only once.

Tests that use multiple data values for the same operation (data-driven tests).

Tests that require immediate execution.

Tests that are run many times (stress tests) and tests that check a multi-user client/server system (load tests). Tests that check how easy the application is to use (usability tests).
  Tests that do not have predictable results.

In this exercise, you will generate a UFT test script for the Address Options test.

Note: For prerequisites to working with a UFT test, see Before You Begin.

To generate an automated test script:

  1. Make sure the test plan tree view is displayed.

    If the test plan tree view is not displayed, select View > Test Plan Tree.

  2. Locate the Address Options manual test.

    1. Select the Subject folder at the root of the test plan tree and choose Edit > Find. The Find dialog box opens.

    2. In Value To Find, type Book.

    3. In the Search for, select Folders.

    4. Click Find. The Search Results dialog box opens and displays a list of possible matches.

    5. Double-click the Flight Reservation\Book Flight folder to highlight the folder in the test plan tree. Click Close to close the Search Results dialog box.

    6. In the test plan tree, expand the Book Flight folder and select the Address Options test.

  3. Display the Design Steps tab.

    In the right pane, click the Design Steps tab.

  4. Generate a test script.

    1. Click the Generate Script button.

    2. Choose QUICKTEST_TEST to generate a UFT test.

    3. Version Control: If a check out message box opens, click OK.

    The steps in the Address Options test are used to create the automated test script.

  5. View the test script.

    1. Click the Test Script tab.

    2. To display and modify your test script in UFT, click the Launch UFT One button.