Viewing the test results
Run a test using yourPython-coded action, and ensure that it properly interacts with the target application.
Before proceeding, ensure that you have:
- Created a test case in TestArchitect which calls check row count, an action for counting selected rows of a table in an application,
- Created the Python method
action_CheckRowCount()
to implement thecheck row count
action, and written the essential code to ensure that the execution ofcheck row count
results in control being directed to that method.
You will run a test which executes the check row count
action, which you have implemented in the TestArchitect harness as aPython script. Your action, as invoked, examines the View Orders table of the Car Rental application (below), counts the number of rows in which the contents of the Car Type column is “Ford Mustang Coupe”, and compares that number to the expected count of 2.
If you have not already done so, start the Car Rental application by selecting Start > All Programs > TestArchitect > Samples > Car Rental Application.
The login window appears.
Log in to the application, and navigate to the View Orders window.
With your test module displayed in the TestArchitect editor, click Execute on the toolbar.
The Execute Test dialog box appears.
Before clicking Execute, click Automation Tools.
The Automation Tools dialog box appears.
Select TestArchitect Python Harness from Playback Tool option.
Click next to the Script(s) field to browse to the fileta_main.py.
注意:The default location for the python executable(s) is c:\Python\python.exe. If you install Python in a different location, you’ll need to set the location, then move to the next step.ヒント:To save time, install Python to the default location C:\Python\.Additionally, from TestArchitect 8.5 onward, in the python_harness.bat file located in the folder C:\Program Files\LogiGear\TestArchitect\harness samples\python, the default value will be Python 3. If a user wants to use Python 2, they will need to modify the path in this file like below:
Click OK to return to the Execute Test dialog box.
In the Test Modules panel, expand the tree. If you so wish, ensure that the only test case selected for execution is the one hosting the check row count action (
TC 02
in the example).Click Execute to run the test.
Upon completion of the test, the results are displayed:
Related tasks
Running a test and viewing the results