Insert validity checks during your recording sessions to generate action lines that check the output of the AUT during automated testing.
- If the Car Rental application is running, return to the
Login window; otherwise, start the application by
- In TestArchitect, if you haven't already done
so, select and ensure that the settings are set as follows:
Then click OK.
The Generate "navigate" action for web
, Highlight element on hover
Ignore formatting tags
settings only apply to
browser-based recording (learn
), and may be ignored for purposes of this
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.
In the Recording
test module you created
previously, create a new test case:
Place your cell pointer on a line somewhere below the existing set of
action lines (but before the FINAL section, if any).
Click Create New Test Case
on the toolbar.
A test case line similar to the following is inserted.
In the second column of the new line, assign the test
case an ID of TC 02 (if not already set to that
Press Tab to
advance to the next column, and provide a description for your test
case, such as Recording control checks.
Select an empty cell within test case TC 02.
Start the Action Recorder by clicking Record on the
The Action Recorder panel appears in the lower right corner of the
screen, , indicating recording mode is now in effect.
Use your mouse to drag the Action Recorder's Check
to the User name text box in the
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.)
Note: 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:
checks the contents of the value property of the
User name control, which is the value displayed by
Note: Performing a check action on the
value property is TestArchitect's default check action for
controls of type textbox, such as this
Now return again to the Action Recorder Settings (select ), and clear the Always use the default action when I
define a control check check box:
In the editor, select an empty cell below the new action line, and again start
the Action Recorder by clicking Record on the
Note: 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
Use your mouse to drag the Check button to the
Password text box in the Login
Because of our change in the settings, the Check
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
with an Expected value
. Click Use
Note: As before, you may be presented with a dialog box
asking you to select an interface entity. And again, choose either
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
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
field, and the Password