Configure Python Module Step Settings In TestStand 2019

Updated May 4, 2023

Reported In

Software

  • TestStand 2019

Issue Details

How do I set my Python module step settings to access different elements of my Python code in TestStand 2019?

Solution

TestStand 2019 offers a number of new features including a built-in Python adapter, enabling Python steps to be implemented in automated test sequences. General help on this new feature can be found in the help files (online or in TestStand) or in the built-in examples.

Below is specific information on the configuration of the step settings to allow access to various elements within Python code.The example Python code which will be used is attached, and shown below:


In this article an action step has been added to a blank sequence and the step settings show the various configuration drop downs shown in the below picture:


The module, like other steps, is the file/code module you would like to access, it is possible to view this once selected by clicking on the view icon which is the 2nd icon from the left next to the module. The 3rd icon, Advanced, allow you to choose an alternate adpater setting that the global setting for this particular step. The step configuration options are found in the 4 drop down menus: "Operation Scope", "Class Name", "Operation Type" and "Attribute Name". These menus will enable access to different elements within your code, as demonstrated in the below images. 

To access the module attributes:


To access module methods:


To access class attributes:


It is possible to access module methods, after class definitions ensuring that they are correctly coded.

Attachments