Write and execute a test that makes use of the interface definitions you have
Before proceeding: Ensure that you have created the interface entity my login as described in the preceding lesson.
In this exercise you will write a simple test case that uses your interface
definitions for the Login
window to enter text into the
fields. To do
this you will create the following:
- A test case action line with descriptive information.
- A use interface action that directs TestArchitect to use interface named
- An enter action, to enter text into the User
name field. This action needs to be provided a window, , a
control residing in that window, and the text to be entered into that control.
Hence, you will specify:
- The Car Rental-Login window. You do this by
assigning the TA name my login – the name of the
interface entity you created earlier - to the action’s
- The User name text box. You do this by assigning
TA name my user name – defined in one of your
interface element actions – to the action’s control
- The text to be entered into the User name
- Another enter action to supply the password. In a similar
manner as before, you will specify TA names for the window (same window) and the
Password field, as well as text (the password).
In the TestArchitect explorer tree, select any item within the
current project, then click Create new test module
in the toolbar.
The New Test Module dialog box appears.
In the Name field, type My login
test and click Create.
The new test module appears in the editor
with a default template containing suggested basic components for a
well-designed test. For this lesson, you only need the TEST
In the editor, delete all content except for the TEST CASE
line. Optionally, you can also delete any blank lines above the TEST
You are now ready to begin writing your action lines.
Enter the actions and arguments as described above:
Run your test against the Car Rental's Login window:
If you have not already done so, start
the Car Rental application by selecting .
The login window appears.
This clears the text fields so that you can better see the effect of your
With your test module displayed in the TestArchitect editor, click
on the toolbar.
The Execute Test dialog box appears.
The status bar indicates the stages of the test as it progresses. Upon
test completion, the newly generated results page is displayed showing that the
test case passed (only because no actual test was performed), and the login
screen of the Car Rental application displays the text entered by your test: