6. Record a Test

Applies to TestComplete 14.30, last modified on November 21, 2019

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 (Android): Recording Toolbar
  2. TestComplete will show the Mobile Screen window with the screen of the connected device. TestComplete records only those actions over mobile applications that you perform in this window and ignores the actions that you perform on the device, emulator or virtual machine.

  3. TestComplete will automatically deploy the Orders application to the mobile device and start this application. If the application does not start, you can launch it manually by selecting it from the Run App menu of the Recording toolbar.

    TestComplete records the application start using a special application launch test command. You will see this command later, when we will analyze the recorded test.

  4. Wait until the Android Orders application starts on the mobile device. The Mobile Screen window will display the initial window of the application:

    Getting Started With TestComplete (Android): Initial Window of the Orders Application

    Click the image to enlarge it.

  5. In the Mobile Screen window, click Samuel Clemens’s order.

    Getting Started With TestComplete (Android): The Selected Order Item

    Click the image to enlarge it.

  6. Click the Edit button of the Orders application. This will invoke the Edit Order page:

    Getting Started With TestComplete (Android): The Edit Order Page

    Click the image to enlarge it.

  7. Change the customer name in the order details.

    Clear the Samuel Clemens text and type Mark Twain instead. Use your desktop keyboard to enter text in the Mobile Screen window.

  8. Scroll down the Edit Order page and click OK. This will save the order changes and return back to the orders list.

    Getting Started With TestComplete (Android): The Modified Orders List

    Click the image to enlarge it.

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

    We call the comparison commands checkpoints. TestComplete offers various types of checkpoints that are suitable for verifying different types of data (see Checkpoints). One of the most frequently used checkpoints is the Property checkpoint. It is used 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 (Android): Creating a Checkpoint

      This will invoke the Checkpoint wizard. It will guide you through the process of checkpoint creation:

      Getting Started With TestComplete (Android): The Checkpoint Wizard

      Click the image to enlarge it.

    • On the first page of the wizard, click Object property.

    • On the next page of the 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 and windows under the mouse cursor with the 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 (Android): Selecting Order Item

      Click the image to enlarge it.

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

      Getting Started With TestComplete (Android): Specifying an object to check

      Click the image to enlarge it.

      Click Next to continue.

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

      Getting Started With TestComplete (Android): List of suggested properties

      Click the image to enlarge it.

      This list includes properties provided by TestComplete, as well as properties defined by the tested application. You can click More Properties to view all available properties.

    • In the table, make sure the ControlText property is selected. Make sure that the Equals (case-sensitive) condition is selected in the Condition column:

      Getting Started With TestComplete (Android): ControlText property

      Click the image to enlarge it.

      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 the recording. TestComplete will process the recorded test commands and save them to a test.

Prev     Next

See Also

About Tested Application
Recording Automated Tests
About Property Checkpoints

Highlight search results