Sharing variables between test projects

The use of variables to hold temporary values is inevitable in any test plan development. Test developers create a significant number of variables in each project that they developed. Experienced test developers probably have certain naming conventions for variables and use almost the same set of variables across different test developments. So even if the test plans are meant for different projects, the set of variables used in them can be similar. In addition, if the configuration of instruments used in a system remains the same, then probably the test method remains similar and so do the variables. Therefore, being able to duplicate and share a set of commonly used variables for different test developments removes the hassle of creating the same variables again for each test plan.

Let’s talk about the way PathWave Test Executive for Manufacturing (PTEM) handles user variables and how convenient it is to reuse a set of variables for different test development projects.

System Variables
PathWave Test Executive for Manufacturing (PTEM) comes with a set of system variables that provides information about the testplan operation and results. System variables hold generic information like date time, cycle count, device under test (DUT) serial numbers, and results. They are not specific to any instruments or tests. These variables provide information about the progress of the test cycle in real-time and add information to data logs and test reports. Every PTEM installation carries the same set of system variables regardless of what test sequences it executes.

PTEM allows read and write access to its system variables. However, I do not recommend writing into them unless you know exactly what you are doing. System variables are automatically set by the application during runtime, making it difficult to control and know when they will be updated. Writing a value into them does not guarantee that they will stay there forever, making things rather unpredictable.

Fig1 : System variables hold generic information on test operations and status.

User variables
Instruments and logic/ arithmetic test operations in a test plan uses variables that are more specific to their functions. For example, variable names such as Volt and Amp typically associate with power supplies, which represent the value of voltage and current limit for its output channels. Though these variables are unique to the instrument, they can be reused on other test developments that use similar power supplies.

Internal Variables
PTEM categorizes user variables into internal and external types. Internal variables are part of the testplan and are not exportable for sharing. Other developments rarely use these variables. Exporting these variables into other test plans only adds to the confusion when it comes to selecting one to use during development.

Creating variables in PTEM is simple. Give your variable a name and select the type you want. Then enter the default value for it, or you can just leave it empty and let the testplan assign values to it. In the example below, I created a string-type variable to hold the trigger command for a barcode reader. The Edit feature allows me to enter values directly in alphanumeric characters and saves me time to convert it into ascii hex values.

Fig2: Default values of a variable can be entered as string, hexadecimal, or decimals values directly

External Variables
Create external variables the same way as internal variables. A separate file that is independent of the test plan stores these external variables. A new test plan development can import this external variable file and use it as part of the test process. This eliminates the need to recreate the same set of variables all over again for each test plan. \

Fig3: Multiple external variables files can be linked into a single testplan

In PTEM, a testplan can import multiple sets of external variables. You may create different sets of variables specific for each instrument type and then selectively link them to your test plan based on the instruments you use. This keeps your testplan free from unnecessary variables.

I created variables specific to the FlexiCore automated inline handler operations and saved them in an external variable file named HandlerVAR.xml. In this way, I can reuse these variables in all my test plans that uses the FlexiCore handler. \

Fig4: External variable file can be transported and linked into other test plans

Using PTEM, I manage my sets of variables for different test plan requirements. Linking commonly used variables across different test plans saves me the time and effort to create them repeatedly. Test development just got a lot easier with PTEM.

Until the next post, stay healthy and safe!
Ping me with your questions or comments!
kwan-wee_lee@keysight.com

limit
3