3. Recording a Test

Applies to TestComplete 15.40, last modified on March 25, 2022

In this step, we will record a keyword test for inputting one set of test data. The test will launch the tested application, add a new order, check the order information generated by the application and close the application. During the recording, we will add comments to separate parts of the test performing different tasks.

Here are the detailed steps to record a keyword test:

  1. Select Test > Record > Record Keyword Test from the TestComplete main menu.

  2. After you start recording, TestComplete will automatically start the Orders application.

    If the application window has not appeared on screen, click the down arrow of the Run App item on the Recording toolbar and choose Tested Application > Orders from the drop-down list:

    Launching the Tested Application

    This will launch the Orders application.

    Tested Application Window
  3. Insert a comment into the recorded test to mark the test commands:

    • Click on the Recording toolbar. The Add Comment to Test dialog will appear.
      The Add Comment to Test Dialog
    • In the dialog, enter Start creating an order and click Add.
  4. Switch to the Orders application and select Orders > New order from the main menu:

    Selecting the Orders > New order item

    The Order form will appear.

  5. Enter the following values into the controls of the Order form:

    Field Value
    Product Select FamilyAlbum.
    Quantity 20
    Date 05/06/2005
    Customer Name John Smith Jr
    Street 12, Orange Blvd
    City Grovetown, CA
    State US
    Zip 111155
    Card Select MasterCard.
    Card No 555777555888
    Expiration Date 05/06/2005
  6. Add a checkpoint to the test and verify the value of the Price per unit box:

    • Click on the Recording toolbar and make sure the Enable Quick Checkpoints check box is selected.

    • Move the mouse pointer to the Price per unit text box. TestComplete will highlight it with a red frame.

    • Stop moving the mouse pointer until the icon becomes opaque and move the pointer to the icon. TestComplete will show the Quick Checkpoints menu.

      In the menu, click wText = "$80":

      Selecting a property to check

      TestComplete will add a property checkpoint to your recorded test and will display a notification about it. The checkpoint will verify that the wText property of the Price per unit text box equals the specified text.

  7. You can also create checkpoints for the wText property of the Discount and Total edit boxes in the same way.

  8. After you added the checkpoints, click OK in the Order form to close.

  9. Add the Finish creating an order comment to the test.

  10. Close the Orders application by clicking the Close button in its title. The application will display a message box asking you to save the changes.

  11. Click No in the Confirmation dialog box. Wait until the application window is hidden.

  12. Click Stop on the Recording toolbar.

On the next step we will modify this test so that it can work with several sets of data.

Prev     Next

See Also

Tutorial Home Page
Using DDT Drivers

Highlight search results