test that calls the user-scripted action you implemented in the Python harness.
Note: On macOS 10.11 or later versions, you should have
installed your own Python interpreter, rather than rely on Apple's pre-installed
version (learn more). Assuming that this is the case, ensure that you modify
the Python path in the run_mac.sh file (in
created a test case that calls the action hello, passing it
an argument (Earth, in this example). Prior to
that you implemented the action in Python, and created the necessary harness code to
direct execution of action hello to your implemented
definition of it.
With your test module displayed in the TestArchitect editor, click
on the toolbar.
The Execute Test dialog box appears.
Before clicking Execute, click Automation
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 file ta_main.py.
Click OK to return to the Execute
Test dialog box.
Click Execute to run the test.
of execution, the Result Details tab of the test results
displays the text hello, followed by the value you
entered as an argument to the action:
Users: It is generally recommended that you try out your automation in
your IDE (Integrated Development Environment), such as Eclipse. Use the
Compile button in TestArchitect’s
Execution dialog to set up the necessary information
for the test to run. Afterwards, launch the test directly from the IDE. Be sure
to set the PYTHONPATH environment variable to the
lib/python directory in the
TestArchitect program folder. Under Windows, if
TestArchitect is installed in the default folder, this would typically be:
Tip: Developers: Eclipse with PyDev is a good solution for
Python. In Eclipse with PyDev, this setting is best set in the project
properties. Right click the project node in the
Package Explorer, then select
Properties. In the Properties
dialog select Python - PYTHONPATH. Select the
External Libraries tab, and click the Add
source folder button.
So far, you have created your own user-scripted action
along with a test that runs it, but they have no interaction with the outside
In the next exercise, you will create a user-scripted action that
communicates with a target application.