NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand with Python Test Step

Hi,

 

I want to use Python Test Step with TestStand and have found it difficult to find enough information on how to use (properly!); either via help or online resources.

 

I would greatly appreciate some how-to-use guidance. I am fairly new to TestStand. I have Python Test Step installed with TestStand 2014. My Python version is 3.6.6.

 

Q's:

 

a. how do I pass parameters to a Python function? Say just a few strings.

b. How do I access the return data? Say just a list of strings

c. How do I process the return data to acheive a meaning result in TestStand?

d. If the Python function 'print'ed again to standard output, how do I access this output? I might want to analyse it.

e. Can I record the Python data in the TestStand test result, for evidence purposes?

 

Examples or similar would be appreciated if possible.

 

Thanks in advance,

Paul

0 Kudos
Message 1 of 4
(3,587 Views)

Hey Paul,

 

If you installed the TestStand Python Step Types, there are a few examples that are installed with them at <TestStand Public>\Examples\Custom Step Types\Python Step Types. These examples should help answer your answers for a-c and e. 

 

The python step types do not currently support a standard out. If you are using this functionality, pass the information out of your module instead and access that in the same fashion that you would access other variables. 

 

 Hope this helps! 

Roxy

0 Kudos
Message 2 of 4
(3,583 Views)

Thanks,

 

Is there any supporting documentation for those examples? Browsing through the TestStand sequence stuff is a bit of a minefield.

 

Kind regards,

Paul

0 Kudos
Message 3 of 4
(3,568 Views)

The "About this Example" and the comments are the documentation for the examples. I'd also recommend taking a read through the TestStand Python Step Types Help that can be found when you go to the configuration panel of a Python step. It's a PDF document that outlines how to communicate between Python & TestStand, how data types between the two map, how to debug and just the general interaction between the two. 

 

If you have more questions, please let me know. 

0 Kudos
Message 4 of 4
(3,559 Views)