TestStand vs LabWindows/CVI Test Executive Toolkit
Overview
TestStand has roughly 20 times as many features as the LabWindows/CVI test executive toolkit. However, TestStand's fundamental operation is quite similar to the CVI test executive toolkit. In fact, the CVI operator interface that you can launch from the TestStand start menu looks like the CVI test executive toolkit program. Although the operator interface program uses the TestStand engine to load and execute sequence files, it's display is much simpler than the sequence editor. TestStand imposes no limitations on the appearance of your operator interface program. TestStand also does not impose any requirements for the set of features your operator interface program supports. Your operator interface can be as feature-packed as the sequence editor or as simple as a full screen window with only a Start Testing button on it.
TestStand is modifiable. Unlike the CVI test executive toolkit, TestStand is modularly organized. The toolkit is just a collection of source files while in TestStand the places you make modifications to are more clearly separated. This document lists some specifics on where you make modifications.
Table of Contents
User Interface
Operator interface programs call the TestStand API to load and execute TestStand sequence files. The TestStand engine sends events to the operator interface to inform the GUI of the progress of the executions started by the operator interface. The GUI can display this information in any form that you deem appropriate. To help you create your own operator interface programs, TestStand includes complete source code and user interface files for four full-featured sample operator interfaces. The sample operator interfaces, located in <TestStand>\OperatorInterfaces\NI, are written in the following languages: VisualBasic, LabVIEW, LabWindows/CVI, and Delphi. These sample programs all look and function similarly. In fact they look like the previous CVI and LV toolkit programs. Just like the toolkits, you can modify the source code and user interfaces resources to meet your requirements. However, unlike the toolkits, your modifications will be compatible with TestStand sequences and other TestStand components. Because operator interfaces use the TestStand API, they all execute the same sequences and support the same tools, although they may appear very different.
There are also even simpler operator interface example programs for users who want to start from ground up. These simple interfaces demonstrate how to call the TestStand API to load and run sequences, but they do not support features such as breakpoints, multiple executions, etc. We provide simple examples for CVI, LabVIEW, VB, and MFC (available from tech support at http://zone.ni.com/devzone/fn/p/sn/n15:EXAMPLE).
See Also:
Examples Database
Process Model (Reports, Database Logging)
TestStand uses the term process model to describe the actions that surround the execution of your sequence file. These actions include UUT identification, report generation, database logging, and UUT final status reporting. TestStand lets you specify this sequence of actions in a sequence file that you designate as the process model file. All the report generation and logging abilities that seem to be built into TestStand are actually provided by the default process model files: SequentialModel.seq, ParallelModel.seq, and BatchModel.seq, which you can find in <TestStand>\Components\NI\Models\TestStandModel\. You can modify or replace the process model files. Your modification can call code that you write in any environment, including LabWindows/CVI.
Step Types
TestStand has a number of different types of steps that you can insert into a sequence. Some steps, such as the String Limit Test and Numeric Limit Test, are designed to call code that you write and then perform additional processing. Other steps, such as the Limit Loader and the Message Popup, perform a configurable action for which you do not need to write additional code. None of these step types are "hard coded" into TestStand. In fact, you can add or subtract from the set of available step types. You can create your own step types with unique data properties and run-time behavior. You can code the run-time behavior and optional editing dialog box for new step types in any environment, including LabWindows/CVI, LabVIEW, VB, VC++, etc.
Callbacks
Like the CVI test executive toolkit, TestStand uses callbacks. For callbacks related to sequence execution, such as PreStep and PostStep callbacks, the TestStand engine calls the callback. For callbacks related to the process model, such as the TestReport callback, the process model sequence file calls the callback. For callbacks related to the operator interface, such as the LoginLogout call back, the operator interface calls the callback.
One difference between TestStand and the CVI test executive toolkit is that TestStand callbacks are sequences instead of function pointers. From steps in a callback sequence, you can call code you write in any development environment, including LabWindows/CVI.
TestStand operator interfaces update their display in response to user interface events they obtain from the TestStand engine. TestStand does not use callbacks to update operator interfaces as does the CVI test executive toolkit.
Setup/Cleanup/Parameters/Locals/File Globals/Step Properties/Expressions/Data Types, etc.
Users of the CVI test executive toolkit often modify the code of the toolkit to share additional data between steps or to obtain more control over sequence execution. In TestStand, although the fundamental view of a sequence is still a list of steps, you have access to many of the elements you would expect from a programming language. Thus, you can use local variables, expressions, parameters, etc. to easily perform tasks in a sequence rather than making modifications to the test executive source code as you would with the CVI test executive toolkit.
TestStand API
The CVI test executive toolkit has an engine API. However the API is very limited and does little more than manage lists of steps. The TestStand API is a much more functional ActiveX object oriented API that includes object classes such as SequenceFile, Sequence, Step, Report, Execution, Thread, etc. TestStand includes an instrument driver, <TestStand>\API\CVI\TSAPICVI.FP, that provides easy access to the TestStand API from CVI.
Typically, you call the API when you write an operator interface or when you create a tool or step type. However, it is also sometimes convenient to call the API directly from a sequence via the ActiveX Automation adapter or from within the code called by one of your sequence steps.
Your Modifications
National Instruments (NI) has a staff of knowledgeable application engineers that are available to answer your specific questions about how to modify TestStand. We also monitor TestStand questions posted to the NI Developer Exchange, which you can reach through the link www.ni.com/exchange. If you require help building a radically customized system, NI also offers onsite engineering assistance through our advanced operations support group.
See Also:
TestStand Support
TestStand Modification Limitations
There is a limit to how far you can customize TestStand. NI does not provide source code for the sequence editor. Although you can add certain menu items to the sequence editor, you cannot make significant changes. Some customers use the TestStand API to create simpler editors. However, in TestStand 1.0.x, the API does not expose the complete set of objects that you would need to implement an editor that is fully equivalent to the sequence editor. Most of the missing functionality is related to creating and editing TestStand data types. TestStand 2.0 includes ALL the objects and methods that the sequence editor uses.
Related Links:
TestStand Features Matrix
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
