Recording check actions on controls

Insert validity checks during your recording sessions to generate action lines that check the output of the AUT during automated testing.

The Car Rental Login window should be displaying john as the User name (the default value). You will now define a check action for this value, and validate that the Password text box is enabled.

  1. In the Recording Lesson test module you created previously, create a new test case:

    1. Place your cell pointer on a line somewhere below the existing set of action lines (but before the FINAL section, if any).

    2. Click Create New Test Case on the toolbar.

      A test case line similar to the following is inserted.

    3. In the second column of the new line, assign the test case an ID of TC 02(if not already set to that value).

    4. Optional: Press Tab to advance to the next column, and provide a description for your test case, such as Recording control checks.

  2. Select an empty cell within test case TC 02.

  3. Start the Action Recorder by clicking Record on the toolbar.

    The Action Recorder panel appears in the lower right corner of the screen, , indicating recording mode is now in effect.

  4. Use your mouse to drag the Action Recorder’s Check button to the User name text box in the Login window.

    Your check action for verifying that User Name text box control has a value of john has now been recorded. (Note that no explicit confirmation of this is provided.)

  5. Click Stop on the recording panel.

    注意: 
    If you have been practicing these tutorial lessons in sequence, your project should now have more than one interface entity defined for the Login dialog box. If that is indeed the case, you are presented with a dialog box informing you that More than one interface entity matches the dialog. To continue, select one of the interface entities – either should suffice.

    A check action such as shown below should now appear in your test case:

    The action checks the contents of the value property of the User name control, which is the value displayed by the control.

    注意: 
    Performing a check action on the value property is TestArchitect’s default check action for controls of type textbox, such as this one.

  6. Now return again to the Action Recorder Settings (select Tools > Action Recorder Settings…), and clear the Always use the default action when I define a control check check box:

  7. In the editor, select an empty cell below the new action line, and again start the Action Recorder by clicking Record on the toolbar.

    注意: 
    Generally, we don’t start and stop the recording process when recording a sequence of action lines. We’re only doing that here in order to demonstrate the effect of changing the default check action setting.

  8. Use your mouse to drag the Check button to the Password text box in the Login window.

    注意: 
    Because of our change in the settings, the Check Action dialog box appears, enabling you to choose the property to be checked in the action you are about to create. In our case, we want to verify that this control is enabled, so select a Control property of enabled, with an Expected value of true. Click Use.

  9. Click Stop on the recording panel.

    注意: 
    As before, you may be presented with a dialog box asking you to select an interface entity. And again, choose either one.

    Rather than a regular check action, the Action Recorder has created a check control property action. The property to be checked is the enabled property of the Password control of the Car Rental-Login window, and its expected value is true.

Your complete test case should now look something like this:

When executed, this test case can only pass if the value John is displayed in the User name field, and the Password field is enabled.


Copyright © 2024 LogiGear Corporation. All rights reserved. LogiGearはLogiGear Corporationの登録商標であり、Action Based TestingおよびTestArchitectはLogiGear Corporationの商標です。ここに記載されているその他の商標は、各所有者の財産です。

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1 (650) 572-1400