Вы находитесь на странице: 1из 4

Application Note 165

Using TestStand to Test Diverse Products


Richard McDonell

Introduction
A typical functional test system usually tests a set of products within a product line. Although similar, these products
are likely to have differences that must be accounted for during test. In high-mix testing, products tested on a given test
stand may seem to differ completely, but common components may still exist from one product to the next.
The challenge in these testing scenarios is to create a test framework in which tests can be reused for these common
components on diverse products. Additionally, to make test program maintenance feasible, it is often requisite not to
have separate test programs for each slight product variation. Instead, you demand a test architecture that enables you
to make intelligent decisions at run time to load parameters or test programs based on the current product being tested.
This technique is diversity testing.
Using TestStand, the test management software from National Instruments, you can easily set up diversity testing.
Because the diverse range of products could mean that the products are (1) completely different or (2) similar in most
aspects but are tested according to a different set of standards or limits, TestStand provides two features to develop
these tests:

Property loading

Dynamic sequence calling

Your application might use one of these methods or a combination of both.

Property Loading
One method for testing several products on a single test station is to use TestStand to statically or dynamically load
properties of test sequences. For instance, you may be testing a product that has a consumer and a commercial model.
You might need to test the commercial model according to different limits and properties than those for the consumer
model. Thus, it would be efficient to use the same test code but have TestStand automatically load different properties
for each model tested. By storing product-specific input properties in a file or database, you can create sequences that
are more generic and can be reused across a product line.
TestStand can read sequence properties, such as step limits and custom strings, from a text file, a spreadsheet file, or a
database. To read step properties statically, you can use the Import/Export Properties tool located under the Tools
menu in TestStand. Before you run a test, this tool automatically loads the step limits and step properties from a text
file or a spreadsheet file and loads the values into the local variables that you specify. Often, a test requires that new
limits be loaded on the fly based on an operator selection or information such as the product serial number. To read
step properties dynamically in TestStand, use the Property Loader step within your test sequence. With the Property
Loader step, you can dynamically load the step limits and step properties during execution of your test sequence
without requiring any extra effort by the test operator.

ni.com, National Instruments, and TestStand are trademarks of National Instruments Corporation. Product and company names mentioned herein are trademarks
or trade names of their respective companies.

342068B-01

Copyright 2001 National Instruments Corporation. All rights reserved.

May 2001

Several examples demonstrate how the Import/Export Properties tool and Property Loader step can be used in
TestStand.
Examples showing how to use the Property Loader can be found in the
<TestStand directory>\Examples\Database\ and <TestStand directory>\Examples\LoadingLimits\ directories.
Additionally, similar examples are available in the Developer Zone located at zone.ni.com

Dynamic Sequence Calling


Another way to test numerous products on a single test station is to use TestStand to dynamically call different test
sequences depending on the product being tested. Dynamic sequence calling can be used when the products being
tested are different but still share portions of test code. An example is testing computer motherboards with different
types of processors. The majority of the components on the motherboards being tested are identical; however, the
processors must be tested differently.
TestStand can easily accomplish this challenge by dynamically calling subsequences. There are many different ways
to determine which test sequence should be called. One way is to use the UUT serial number to identify which test
sequence to run. The serial number may contain a product code, or you can use a database lookup to identify the
product line based on the serial number. On stations that are not fully automated, a Message Popup step or graphical
user interface can be used to ask the test operator which product to test. Once you have identified the product to be
tested, a Sequence Call step that uses an expression evaluated at run time selects which test sequence to call.

Application Note 165

ni.com

You could also use the preconditions and branching capabilities of TestStand to automatically select which test
sequence to execute. The test sequences can be contained either within the same sequence file as the main testing
routine or within a separate sequence file. In addition, parameters can be passed into and out of the sequences for
passing data. An example, located at zone.ni.com is named Select Sequence to Execute.

Summary
If you test a variety of products on a single test station, use the TestStand tools for diversity testing to make creating
these test programs easier. Diversity testing will make your test sequences more flexible and easier to maintain and
save you time and money in your test development.

National Instruments Corporation

Application Note 165

Вам также может понравиться