5. Record a Test

Applies to TestComplete 15.69, last modified on November 13, 2024

Do not switch to the TestComplete help during the recording. The recording engine traces and records all user actions, so the recorded test will contain commands that simulate “switching”.
To see the instructions, you can print them before starting the record. Or, if you have two monitors, you can move the TestComplete help system window to the other monitor.

  1. TestComplete will start test recording, switch to the recording mode and show the Recording toolbar on screen:

    Getting Started With TestComplete (iOS): Recording Toolbar
  2. Wait until the Mobile Screen window will display the initial window of the application:

    Note: If you’ve skipped specifying the bundleId capability, the application won’t start automatically. Launch it manually.

    Getting Started With TestComplete (iOS): iOS Orders Application

    Click the image to enlarge it.

  3. In the Mobile Screen window, click the Edit button:

    Getting Started With TestComplete (iOS): Switching the Orders application to the edit mode

    Click the image to enlarge it.

    This will switch the Orders application to the edit mode.

  4. Click the second order in the list made by Samuel Clemens. This will display the Edit Order panel:

    Getting Started With TestComplete (iOS): The Edit Order Panel

    Click the image to enlarge it.

  5. Change the customer name in the order details.

    Clear the Samuel Clemens text, type Mark Twain, and press Enter. Use your desktop keyboard to input text in the Mobile Screen window.

  6. Click the Save button in the Edit Order panel and confirm the changes.

  7. If you are recording the test on an iPhone device (whose display shows only one panel at a time), you need to touch the Orders button in the navigation bar. This will take you back to the Orders List panel.

    iPad devices display both panels simultaneously, so, there is no need to perform such an action.

  8. Click Done to switch off the edit mode:

    Getting Started With TestComplete (iOS): Modified Orders List

    Click the image to enlarge it.

    The orders list will return to normal mode.

  9. Let’s insert a comparison command into our test. It will verify that the application customer list displays the modified name - Mark Twain.

    We call comparison commands checkpoints. TestComplete offers various types of checkpoints to verify various types of data (see Checkpoints). One of the most frequently used checkpoints is the Property checkpoint. You use it to check data of application controls. We will use this checkpoint in our tutorial.

    • Click Add Check on the Recording toolbar:

      Getting Started With TestComplete (iOS): Creating a Checkpoint

      TestComplete will open the Checkpoint wizard. It will guide you through the process of checkpoint creation.

    • On the first page of the wizard, click Text or property.

      The Checkpoint Wizard
    • Click the target glyph () with the left mouse button and keep the button pressed.

      Wait until the wizard minimizes, and then drag the icon to the orders list of the Orders application. While you are dragging, TestComplete will highlight the controls under the mouse cursor with a red frame.

      Release the mouse button when the target glyph is over the order made by Mark Twain, and when the entire item is highlighted with the red frame:

      Getting Started With TestComplete (iOS): Selecting an order

      Click the image to enlarge it.

    • After you release the mouse button, TestComplete will restore the wizard and show the name of the selected object in the Object box and the image of the object below it:

      The Property Checkpoint Wizard

      Click Next to continue.

    • The next page of the wizard shows a list of properties suggested for checking:

      Getting Started With TestComplete (iOS): The list of suggested properties

      This list includes the properties provided by TestComplete and the properties defined by the tested application. To view all the available properties, you can click More Properties.

    • Make sure the Text property is selected and that the Equals (case-sensitive) condition is selected in the Condition column:

      Getting Started With TestComplete (iOS): The Property Checkpoint Wizard
    • Click Finish to complete the checkpoint creation. TestComplete will append the checkpoint command to the recorded test.

  10. Click Stop on the Recording toolbar to stop recording. TestComplete will process the recorded test commands and save them to the keyword test.

Prev     Next

See Also

Testing iOS Applications - Tutorial
Recording Automated Tests
About Property Checkpoints

Highlight search results