TestStand I Fundamentals
TestStand I Fundamentals
Course Manual
Course Manual
Course Software Version 2.0 Course Software Version 2.0 February 2001
February 2001 EditiEditionon Part Number 322317E-01 Part Number 322317E-01
TestStand I Fundamentals Course Manual
Copyright Copyright
Copyright © 2001 National Instruments Corporation. All rights reserved.
Worldwide Technical Support and Product Information Worldwide Technical Support and Product Information ni.com
National Instruments Corporate Headquarters National Instruments Corporate Headquarters
Contents
Contents
Introduction
Introduction
Introduction...xi
Technical Support Options ... xii
Course Objectives... xiii
Course Map... xiv
Items You Need for This Course...xv
Lesson 1
Lesson 1
Introduction to TestStand
Introduction to TestStand
Introduction to TestStand ...1-1 The Role of a Test Executive... 1-2 Our Goal for TestStand... 1-3 What is TestStand? ... 1-4 The TestStand Architecture ... 1-5 The Sequence Editor...1-6 The Operator Interface...1-7 TestStand Engine...1-8 Module Adapters ...1-9 The TestStand Architecture ... 1-10 Summary...1-13 Exercise 1-1 Running a Sequence File...1-14 Exercise 1-2A Running a Sequence File from the LabVIEW
Operator Interface ...1-19 Exercise 1-2B Running a Sequence File from the
LabWindows/CVI Operator Interface...1-24
Lesson 2
Lesson 2
The TestStand Environment
The TestStand Environment
Introduction...2-1 What is a sequence?... 2-2
Contents
The Default Process Model: Test UUTs Mode ...2-10 SequentialModel.seq...2-11 The Role of a Process Model in TestStand...2-12 Workspaces and Source Control...2-14 Workspaces and Projects Demo ...2-15 Summary...2-16 Exercise 2-1 Understanding the Sequence File ...2-17 Exercise 2-2 Running a Sequence File with Breakpoints
and Single Stepping...2-22 Exercise 2-3 Understanding the Sequential Process Model ...2-29
Lesson 3
Lesson 3
Creating Sequences
Creating Sequences
Introduction...3-1 How to Create Test Sequences ...3-2 Step 1 : Specify the Adapter ... 3-3 Step 2: Select the Step Type ...3-4 Step Types...3-5 Step 3: Specify the Test Module...3-6 Specifying the Module...3-7 Specifying the Module: Search Directories ...3-8 Step 4: Configure Step Properties...3-9 Step Properties: General Tab ...3-10 Step Properties: Preconditions ...3-11 Step Properties: Run Options Tab ...3-12 Step Properties: Run Options Tab (Continued) ...3-13 Step Properties: Run Options Tab (Continued) ...3-14 Step Properties: Post Actions Tab ...3-15 Step Properties: Loop Options Tab...3-16 Step Properties: Loop Options Tab (Continued) ...3-17 Step Properties: Synchronization Tab...3-18 Step Properties: Expressions Tab ...3-19 Useful Step Type Features...3-22 Sequence Call Options...3-23 IVI Step Type Demo...3-24 Exercise 3-1 Creating Steps in the Sequence Editor ...3-28 Exercise 3-2 Configuring Loop Options ...3-38 Exercise 3-3 Creating a Sequence ...3-42 Exercise 3-4 Running Sequences in Parallel (Optional) ...3-60
Contents
Lesson 4
Lesson 4
TestStand Parameters, Variables, and Expressions
TestStand Parameters, Variables, and Expressions
Introduction...4-1 TestStand Variables ... 4-2 Parameters...4-3 Parameters: Passing data to subsequences...4-4 Local Variables ... 4-5 Creating Local Variables ... 4-6 Sequence File Global Variables...4-8 Creating Sequence File Global Variables...4-9 Station Globals...4-10 RunState Property Object ...4-11 RunState Subproperties...4-12 RunState Property Example...4-13 The Expression Browser...4-14 Using the Expression Browser...4-15 Defining Variables and Parameters ...4-16 Summary...4-21 Exercise 4-1 Using Local Variables ...4-22 Exercise 4-2 Examine the Uses and Differences between Locals,
File Globals, and Station Globals...4-25 Exercise 4-3 Using Expressions to Change Step Properties...4-32 Exercise 4-4 Passing Parameters ...4-41 Exercise 4-5 Dynamically Selecting Which Sequence to Run...4-53
Lesson 5
Lesson 5
Creating Test Modules in External Environments
Creating Test Modules in External Environments
Introduction...5-1 Creating Tests in External Environments ...5-2 Data Transfer in TestStand ... 5-3 Using Clusters to Pass Data from LabVIEW...5-4 Using Structures to Pass Data from LabWindows/CVI...5-6 Method 2—Passing Parameters Directly Without Using Structures ... 5-8 Method 3—Using the ActiveX Automation API to Access Properties
and Methods ...5-12 What is ActiveX Automation?...5-13 Summary of ActiveX Automation...5-14 TestStand and ActiveX Automation ...5-15 ActiveX Automation in LabVIEW...5-16 An Example of ActiveX Automation in LabVIEW...5-17
Contents
Exercise 5-1A Creating Pass/Fail Tests in LabVIEW...5-27 Exercise 5-1B Creating Pass/Fail Tests with LabWindows/CVI... 5-38 Exercise 5-1C Creating Pass/Fail Tests for the DLL Flexible
Prototype Adapter...5-47 Exercise 5-2A Creating Numeric Limit Tests with LabVIEW ... 5-55 Exercise 5-2B Creating Numeric Limit Tests with
LabWindows/CVI...5-66 Exercise 5-2C Creating Numeric Limit Tests for the DLL
Flexible Prototype Adapter...5-73 Exercise 5-3A Debugging Tests Using LabVIEW ... 5-85 Exercise 5-3B Debugging Tests Using LabWindows/CVI... 5-90 Exercise 5-3C Debugging Tests that use the DLL Flexible
Prototype Adapter...5-94 Exercise 5-4A Using the ActiveX API in Code Modules
with LabVIEW ...5-97 Exercise 5-4B Using the ActiveX API in Code Modules
with LabWindows/CVI ...5-105 Exercise 5-4C Using the ActiveX API in Flexible DLL Code
Modules ... 5-114 Exercise 5-5A Creating a Simple Test Using the LabVIEW
Standard Prototype Adapter ...5-125 Exercise 5-5B Creating A Simple Test Using The C/CVI
Standard Prototype Adapter ...5-127 Exercise 5-6A Passing Parameters from TestStand to LabVIEW
using The TestStand API...5-128 Exercise 5-6B Passing Parameters from TestStand to
LabWindows/CVI using The TestStand API ... 5-130 Exercise 5-7 Passing Data Between TestStand and a Test
Module Using the DLL Flexible Prototype Adapter...5-132
Lesson 6
Lesson 6
User Management
User Management
Introduction...6-1 The TestStand User Manager ...6-2 Default User Profiles ...6-3 Windows System Users ... 6-5 Summary...6-6 Exercise 6-1 Setting User Login Access and Privileges...6-7
Lesson 7
Contents
Subsequence Results...7-5 Formatting Results into a Report ...7-6 Report Configuration Options ...7-7 Report Options Dialog Box: Contents Tab...7-8 Report Options Dialog Box: Report File Pathname Tab ... 7-9 Inserting Message in Report ...7-10 Using an External Report Viewer from TestStand ... 7-11 Summary...7-13 Exercise 7-1 Customizing Report Generation... ...7-14
Lesson 8
Lesson 8
Database Interaction
Database Interaction
Introduction...8-1 Database Concepts...8-2 Structured Query Language (SQL)...8-3 Database Interface Technologies ...8-4 Database and Database Drivers ...8-5 Configuring Database Options: Logging Options ... 8-6 Configuring Database Options: Data Link ...8-7 Configuring Database Options: Schemas ...8-8 Configuring Database Options: Statements...8-9 Configuring Database Options: Columns/Parameters ... 8-10 Logging Property ... 8-11 Default Schema: Generic Recordset ...8-12 Creating Default Database Tables ...8-13 Database Viewer... 8-14 Open Database Step Type...8-18 Open SQL Statement Step Type...8-19 Open SQL Statement: Build SQL Select Statement Dialog Box ...8-20 Data Operation Step Type...8-21 Data Operation Step Type (Continued) ...8-22 Data Operation Step Type (Continued) ...8-23 Data Operation Step Type (Continued) ...8-24 Close SQL Statement Step Type ...8-25 Close Database Step Type ...8-26 Summary...8-28 Exercise 8-1 Logging UUT Results to Database...8-29 Exercise 8-2 Using Database Step Types ...8-42
Lesson 9
Lesson 9
The Operator Interface
The Operator Interface
Contents
Sequence Display...9-5 Execution Display...9-6 How the Operator Interface Works...9-7 What is a UIMessage? ...9-8 Summary...9-10 Exercise 9-1 Running Tests from the Operator Interface...9-11
Lesson 10
Lesson 10
Additional Topics
Additional Topics
Introduction...10-1 Import/Export Properties ...10-2 Import/Export Properties Dialog Box...10-3 The Property Loader Step ... 10-4 Importing/Exporting Values Summary...10-8 Distributing TestStand ... 10-9 TestStand Run-Time Engine...10-10 Distribute the Operator Interface ...10-11 Distribute Sequences and Code Modules ...10-12 Exercise 10-1 Importing and Exporting Properties ... 10-13 Exercise 10-2 Using the Property Loader Step Type... 10-19 Exercise 10-3 Using the Expressions to Load Properties... 10-24Appendix A
Appendix A
Introduction to Interchangeable Virtual Instruments
Introduction to Interchangeable Virtual Instruments
Introduction to Interchangeable Virtual Instruments (IVI)...A-1 What is an Instrument Driver?...A-2 What is IVI?...A-3 IVI Instrument Drivers...A-4 IVI Instrument Drivers (Continued) ...A-5 IVI Driver ...A-6 IVI Attribute Model ... A-7 State Caching ... A-8 Range Checking...A-9 Simulation...A-10 Standardization ...A-11 Instrument Classes ... A-12 IVI Class Specification ... A-13 IVI Driver Standard ... A-14 Where Does IVI Fit In? ...A-15
Contents
IVI Configuration ...A-22 Logical Names ... A-23 Virtual Instruments ... A-24 Instrument Driver Configuration ...A-25 Device Configuration...A-26 Inherent Attributes ... A-27 Virtual Channel Names...A-28 Default Setup ...A-29 IVI Foundation Update ... A-30 Instrument Driver Network (IDNet) ...A-31
Introduction
Introduction
Introduction
Introduction
TestStand is a powerful, flexible, and easy-to-use test executive software program. Built around an intuitive explorer-style interface and able to execute tests created in a variety of test development environments, TestStand enables developers to build sophisticated testing programs customized to their exact needs.
This course introduces the TestStand environment and teaches you how to use TestStand for your test executive applications. The main emphasis of this course is to cover the fundamental, off-the-shelf features that TestStand offers. A background knowledge of test executive software and a familiarity with either LabVIEW or C programming is required for this course.
National Instruments 11500 N. MoPac Expressway Austin, Texas 78759 (512) 683-0100
TestStand I: Fundamentals
Course Manual
Introduction
Technical Support Options
Technical Support Options
National Instruments is dedicated to providing you with the best support options to help you find solutions to your questions in the shortest possible time. For 24-hour accessibility, we offer complete and exhaustive technical information through our NI Web Support, which features an extensive knowledgebase with search capabilities, a variety of support documents (such as user manuals for our products), application notes, driver software, and much more. Use NI Web Support as your first stop if you have any questions about National Instruments products. If our web site does not answer all your questions, we also offer e-mail and phone support.
Internet Support:
NI Web Support ni.com Email Support ni.com/ask
TestStand Support ni.com/support/teststandsupp.htm The NI Web and TestStand Support pages offer these resources to help you find answers to your measurement and automation questions:
• Developer Zone • TestExec List Server • Example programs database • Searchable KnowledgeBase • Latest product and event information
Telephone Support (USA):
Telephone Support (512)795-8248
Introduction
Course Objectives
Course Objectives
This TestStand course teaches you the fundamentals of the TestStand environment. It begins with a background discussion of the TestStand architecture, including an overview of each constituent part. The course then discusses the TestStand environment and demonstrates how to use TestStand to create a test management program. The course concludes by showing you how to distribute TestStand and your test sequences.
Course Description Course Description
The course is divided into lessons that teach a topic or a set of topics. Each lesson consists of: • An introduction that describes the lesson’s objectives and the topics discussed.
• A discussion of the topics.
• A set of hands-on exercises that reinforce the concepts presented in the discussion. (Some of the exercises are duplicated for LabVIEW and LabWindows/CVI, so you can work in your preferred programming environment. For duplicate exercises, select one of the exercises to complete during the time allotted.)
• A summary that highlights the concepts covered in the lesson.
Course Objectives
• Introduce the TestStand architecture
• Demonstrate the powerful off-the-shelf capabilities of TestStand
In this course, you will learn how to: In this course, you will learn how to: • Build sequences and tests
• Use the operator interfaces • Distribute TestStand and test code
Note
Note You can customize many of the topics discussed in this course to integrate further with your testing requirements.
Introduction
Course Map
Course Map
Over the next two days, the course addresses several key concepts of TestStand.
Lessons 1 through 4 introduce the TestStand development environment. These lessons present basic operations in opening and creating sequence files and using variables, properties, and expressions.
Lesson 5 explains how TestStand communicates with external programming environments and how you can create TestStand-compatible test modules in these environments.
Lesson 6 addresses how you can develop multiple user levels.
Lessons 7 through 10 address collecting results and generating reports, logging results to a database, using the property loader, and distributing TestStand to other test stations.
Day 1 TestStand Environment Result Collection Report Generation Variables, Properties, and Expressions Creating Test Modules in External Environments Creating Sequences Day 2 Operator Interface User Management Database Features
Course Map
Distributing TestStandIntroduction
Items Y
Items You Need
ou Need for This
for This Course
Course
• Computer running Windows 95/NT/98 • TestStand version 2.0• TestStand I Fundamentals Course Manual and disks
Install the course software by inserting the course disks and extracting the contents of the self-extracting archives into your C:\Exercises\TestStand I directory. The solutions to all exercises should be installed in the C:\Solutions\TestStand I directory.
You also need LabVIEW 6.0 or later, LabWindows/CVI 5.5, and Excel 97 or Excel 97 Viewer for some of the exercises.
Items You Need for This Course
Computer running Windows 95/NT/98 with an internal PC speaker (Recommended: Pentium II 266 MHz or better and 64MB RAM)
TestStand version 2.0 or later TestStand I: Fundamentals Course Manual TestStand Development Course disks
Introduction
Hands-On Exercises
• Exercises reinforce the topics presented
• Save exercises in the\Exercises\TestStand I
directory
• Solutions are in the\Solutions\TestStand I
Lesson 1
Lesson 1
Introduction to TestStand
Introduction to TestStand
Introduction to TestStand
Introduction to TestStand
This lesson introduces the basic TestStand concepts and the development environment architecture. The first part introduces the role of a test executive in a test environment and the tasks it performs. The second part addresses the issue of “What is TestStand?”
The third part describes the TestStand architecture and provides detailed information about its constituent parts. The exercises introduce two of the constituent parts of TestStand, the Sequence Editor and the Operator Interface.
Lesson 1: Introduction to TestStand
In this lesson, you will learn:
• The role of a test executive
• The basic TestStand concepts
• The TestStand architecture
Lesson 1 Introduction to TestStand
The Role of a Test Executive
The Role of a Test Executive
In every testing environment, a wide variety of operations must be performed. These operations can be separated into two distinct groups: operations repeated for each product tested and operations different for each product tested.
Test executive programs execute operations that are repeated for each product. Operations such as displaying the user interface, providing user management, performing step branching, archiving results, and creating test reports are similar for each product tested, and are therefore handled by a test executive.
The other set of operations, such as calibration and configuration routines, data acquisition and measurement, analysis of results, and developing test strategies, are different for each product. These operations are written in other environments (for example, LabVIEW and/or
LabWindows/CVI) and implemented as steps in a test executive program.
Thus, a test executive allows test engineers to concentrate on developing tests for their products while providing the basic operations needed for testing environments. This allows test engineers to develop test modules efficiently without redundant code development.
The Role of a Test Executive
Operations different for
each product tested:
Operations repeated for
each product tested:
Components of a Test System:
• Calibration • Configuring instruments • Data acquisition • Measurements • Analyzing results • Test strategies • Operator interfaces • User management
• Unit Under Test (UUT) tracking • Test flow control
• Archiving results • Test reports
T e
s
t
E
x e
c
Lesson 1 Introduction to TestStand
Our Goal for TestStand
Our Goal for TestStand
National Instruments has been designing test executive software for many years and has acquired in-depth experience about the needs of test developers. Test developers need a solution that is easy to use and ready to run right out of the box. At the same time, they need to customize the test management software for their own particular testing environments. Furthermore, they need to integrate the test management software with existing systems, including not only the test development environment, but also the additional tools used in the test systems (such as statistical control and database management).
The goal of TestStand is to provide a product that is versatile and flexible enough that users can both easily use TestStand for their testing needs and customize TestStand quickly to create their own custom test executive systems. As you proceed with the course, you will see how TestStand meets the first goal and in the advanced course you will see how TestStand meets the second goal.
Our Goal for TestStand
To build an off-the-shelf test executive that:
• Any user can modify easily
• Satisfies a variety of user requirements
• Integrates with existing systems (databases, SPC
tools, UUT tracking, and so on)
Lesson 1 Introduction to TestStand
What is TestStand?
What is TestStand?
You can think of TestStand as two products in one. On the one hand, it is a ready-to-run test executive. Right out of the box, you can use it to develop sophisticated sequences to track UUTs and log and display data. Furthermore, because TestStand can call test modules written in a variety of languages, TestStand sequences can integrate a variety of existing code.
TestStand goes beyond just building sequences. The test developer can customize almost every aspect of TestStand itself. So, in effect, TestStand is a tool for building your own test executive.
What is TestStand?
Two Products in One
• Ready-to-run test executive
• Development environment for building a powerful
custom test solution
Lesson 1 Introduction to TestStand
The TestStand Architecture
The TestStand Architecture
To understand TestStand, you must understand its four major components: • Sequence Editor
• Operator Interfaces • TestStand Engine • Module Adapters
It is important to understand how each component fits into the test software design stages: • Sequence Sequence EditorEditor —for developing, debugging, and executing sequences
• Operator Operator InterfacesInterfaces —for executing and debugging sequences on the production floor • TestStand TestStand EngineEngine —an Active X server that performs the test executive operations • Module Module AdaptersAdapters —enable TestStand to interface with external development environments This lesson continues with a detailed discussion of each component.
The TestStand Architecture
Main Components of TestStand
• Sequence Editor
• Operator Interfaces
• TestStand Engine
• Module Adapters
Lesson 1 Introduction to TestStand
The Sequence Editor
The Sequence Editor
The Sequence Editor is a Win32-style application for creating, editing, and debugging TestStand sequences. A sequence is a collection of test modules with a controlled execution order. The Sequence Editor supports standard Windows editing tools such as cut and paste, drag and drop, and context-sensitive menus. The Sequence Editor gives you easy access to powerful TestStand features, such as step types and process models (addressed later in this course). You can use debugging tools such as breakpoints, single-stepping, stepping into or over function calls, tracing, variable display, and watch window. From the Sequence Editor, you can execute multiple instances of the same sequence and execute different sequences at the same time.
The Sequence Editor is the development environment from which you can build and debug your test sequences. The Sequence Editor also has features like source code control and workspaces that help you manage your test development.
TestStand Architecture:
Sequence Editor
The Sequence Editor is:
• A separate application
• A development environment for:
• Building and editing test sequences
• Executing sequences for development and debugging • Managing your test code development
Lesson 1 Introduction to TestStand
The
The Operator Interfac
Operator Interfac e
e
The Operator Interface is a separate application used for executing TestStand sequences on the production floor. It serves as an interface for the engine through the TestStand application programming interface (API). The run-time Operator Interface allows you to start multiple concurrent executions, set breakpoints, and single-step through a sequence. However, the run-time Operator Interface does not allow you to modify sequences or display sequence variables, sequence parameters, or step properties.
TestStand currently includes four operator interfaces in both source code and executable form. Each run-time operator interface is a separate application program, differing primarily with respect to the application development environment (ADE) in which each was developed. TestStand ships with run-time operator interfaces developed in LabVIEW, LabWindows/CVI, Delphi, and Visual Basic. In addition to the these programming environments, you can write the Operator Interface in any programming environment that supports ActiveX client functionality.
Although you can use the TestStand Sequence Editor at a production station, the TestStand run-time operator interfaces are simpler and fully customizable, thus making them more suitable applications for deployment. This course explains the operator interfaces in more detail in a later lesson.
TestStand Architecture:
Operator Interface
The Operator Interface:
• Allows you to start multiple concurrent executions, set
breakpoints, and single-step, but not modify,
sequences
• Can be created in several development environments
• Contains source code for LabVIE
W, LabWindows/CVI,
Lesson 1 Introduction to TestStand
TestStand Engine
TestStand Engine
At the core of the TestStand architecture is the TestStand Engine. The engine is implemented as a set of 32-bit Dynamic Link Libraries (DLLs) that export an ActiveX API. The TestStand Engine handles test executive tasks such as sequencing, branching, looping, limit checking, data allocation, and user management. The engine is optimized for speed and designed for maximum flexibility and long-term compatibility.
The TestStand Sequence Editor and run-time operator interfaces use the engine API for creating, editing, executing, and debugging sequences. You can call the engine API from any programming environment that supports access to ActiveX Automation servers. You can even call the engine API from test modules, including test modules you create in LabVIEW and LabWindows/CVI. ActiveX Automation and the TestStand API are discussed more thoroughly later in the course.
TestStand Architecture:
TestStand Engine
The TestStand Engine is focused on execution, speed,
flexibility, and long-term support/compatibility.
The TestStand Engine offers:
• Multithreaded sequencing
• Flow control (Preconditions, Branching, Looping) • Sequence file creation, modification, saving, and loading • Data collection
Lesson 1 Introduction to TestStand
Module Adapters
Module Adapters
To communicate with external code modules, TestStand must know the code module type, how to call it, and how to pass parameters to it. Module adapters integrate TestStand with external environments. The adapters act as an interface between TestStand and external test development environments, supplying the necessary information for communication between the two environments.
Module adapters allow TestStand to execute test modules, pass and receive data, generate test module templates, and even debug code written in another programming language. TestStand can call a test written in any language for which it has an adapter. Currently, there are adapters for LabVIEW, LabWindows/CVI, Dynamic Linked Libraries (DLLs), ActiveX Automation servers, sequences, and HTBasic. These adapters can call different types of code modules: TestStand sequences, LabVIEW VIs, HTBasic subroutines, C functions in DLLs, and C functions in source, object, or library modules that you create in LabWindows/CVI or other compilers.
Module adapters allow you to integrate your existing test software and tools. Adapters help you benefit from the fully customizable features of TestStand and the investment you have already made in your existing test software infrastructure.
Note
Note When creating TestStand sequences, you can use different adapters within the same sequence. TestStand CVI DLL ActiveX Servers TestStand Sequence
TestStand Architecture:
Module Adapters
Module Adapters:
• Allow TestStand to integrate with various languages • Execute test modules at run-time
• Step into test modules • Generate test module templates
LV HT
Lesson 1 Introduction to TestStand
The TestStand Architecture
The TestStand Architecture
The TestStand architecture involves using all four main components (Sequence Editor, Operator Interfaces, Engine, and Module Adapters) in the test execution. This slide demonstrates how each component interacts with the TestStand Engine. The engine, an ActiveX server, exports an API that the Sequence Editor and operator interfaces use. The engine performs specific operations (for example, running a sequence) in response to ActiveX method calls. The TestStand Engine runs the sequences, which contain steps that can call external code modules. By using module adapters that have a standard adapter interface, the TestStand Engine can load and execute different types of code modules and even call other sequences through the same adapter interface. The TestStand Engine uses a special type of sequence called a process model to direct the flow of its operations. The next lesson addresses process models in detail.
In Exercise 1-1, you will examine the Sequence Editor and one of the sample operator interfaces.
Application Programming Interface Custom Operator Interface Samples in Source: LV, CVI, VB ActiveX Clients Sequence Editor Process Model TestStand Engine (ActiveX Server)
CVI DLL ActiveX Servers TestStand Sequence
TestStand Architecture
LV HT BasicLesson 1 Introduction to TestStand
Exercise 1-1
Objective: To launch TestStand and run a
sequence file from the Sequence Editor
Lesson 1 Introduction to TestStand
Exercises 1-2A and 1-2B
Objective: To run a sequence file from the
LabVIEW or LabWindows/CVI Operator
Interface
Note
Note When there is both an exercise A and B, choose
one of the exercises based on your preferred
development environment
Lesson 1 Introduction to TestStand
Summary
Summary
A test executive program performs tasks in the testing environment that are repetitive for different products tested. This allows you to focus on creating the test modules and prevents redundant programming.
TestStand is a ready-to run test executive software program that is fully customizable so that you can modify TestStand to fit your needs.
The TestStand architecture has four main components:
• Sequence Sequence EditorEditor —for developing, debugging, and executing sequences.
• Operator Operator InterfacesInterfaces —for executing and debugging sequences on the production floor. • TestStand TestStand EngineEngine —an ActiveX server that performs the test executive operations. • Module AdaptersModule Adapters—enable TestStand to interface with external development environments. In the rest of the course, you will learn how to use and develop tests using these key TestStand components.
Lesson 1 Summary:
Introduction to TestStand
• Test executives perform UUT-independent repetitive
operations in testing environments
• TestStand is an off-the-shelf, ready-to-run test
executive that is fully customizable
• TestStand has four main components:
• Sequence Editor • Operator Interfaces • TestStand Engine • Module Adapters
Lesson 1 Introduction to TestStand Exercises
Exe
Exerci
rcise
se 1-1
1-1 Run
Running
ning a
a Seq
Sequenc
uence
e Fil
File
e
Object
Objective: ive: TTo run test o run test sequencesequences from ts from the Sequehe Sequence Editnce Editor and vior and view reporew reports generts generated byated by TestStand.
TestStand.
The Sequence Editor is the TestStand development environment in which you can create, edit, and execute sequences. It is important to be familiar with this environment, because you will develop all sequence files here. 1. Open the Sequence Editor by clicking the Windows Start Start menu, and
then select Programs»National Instruments TestStand»Sequence Programs»National Instruments TestStand»Sequence Editor
Editor. After the Sequence Editor loads, you are prompted to log in. The default input for the Login Name is administrator and the password is left empty. Click OK OK to complete the login.
2. After logging in, select File»Open File»Open and navigate to C:\Exercises\ TestStand I.
This is the location of all TestStand course exercises. 3. Double-click on Ex 1-1 Computer Test.seq to open the
sequence file.
This is a simple sequence that simulates testing parts of a computer motherboard (for example, the RAM, ROM, and keyboard). This particular sequence has tests written in LabVIEW; however, you could write the tests in LabWindows/CVI or a variety of other programming environments compiled as DLLs, EXEs, or ActiveX Servers. The TestStand window should appear as shown below.
Lesson 1 Introduction to TestStand Exercises
4. To run the sequence, select either Execute Execute»»Test UUTsTest UUTs or Execute
Execute»»Single PassSingle Pass or click the Run button, as shown in the toolbar below.
Test UUTs is an execution entry point that runs the sequence in a continuous loop. Execution entry points are used to run the sequence in predefined ways. By default, TestStand has only two execution entry points, Test UUT and Single Pass. Lesson 2 describes execution entry points in more detail, and Lesson 7 explores how to create an execution entry point.
Before executing the sequence, a UUT Information dialog box prompts you for a serial number. Enter any number for the serial number. After executing the sequence, a Pass/Fail banner indicates the sequence status. To stop the loop and generate a sequence report, click on the StopStop button in the UUT Information dialog box.
Test UUTs is the execution entry point for running most test systems in TestStand.
Lesson 1 Introduction to TestStand Exercises
Run Main Sequence allows you to execute the sequence without using the process model. (The process model is discussed in future lessons.) This mode can test only how your main sequence proceeds, because no other parts of the process model are executed in this type of execution. For now, the only noticeable difference is that no report is generated, as compared to the Test UUTs or Single Pass entry points. The process model as used by the Test UUTs and Single Pass entry points is explained later in this course.
5. Use the Motherboard Test Simulator dialog box to select the tests you want to fail. To do this, click on the check boxes beside the name of the part you want to set to fail. (An X appears in the box when you select it.)
Note
Note Checking the CPU test does not cause a failure, because that step is not yet included in the sequence. This dialog box is called in the Setup step group of this test sequence file. Lesson 2 includes an explanation of step groups.
Lesson 1 Introduction to TestStand Exercises
6. Notice that another window is created in the Sequence Editor when the sequence begins execution. This is the execution window, while the window that was initially open is the sequence file window.
To stop an execution, click Stop Stop in the UUT Information dialog box. After you finish execution, the execution window displays the report. You can verify which tests failed by scrolling down the test report generated at the end of execution. Select Execute Execute»»Test UUTsTest UUTs again and run through several UUTs, setting different tests to fail each time, to become familiar with the execution of this sequence.
This sequence uses preconditions to determine when tests should execute. For example, if the Powerup Test is set to fail, all other steps are skipped. Also, notice that the steps labeled “Diagnostics” are skipped unless their corresponding test fails. This scenario is common in test systems. If a test fails, you may want to run a diagnostic to determine exactly which component failed. But it would be a waste of time to run a diagnostic if the srcinal test passed. Dependencies for determining which steps execute are called preconditions. Preconditions are discussed in more detail later in this course.
Lesson 1 Introduction to TestStand Exercises
Optional: Discussion of TestStand Search Directories
Optional: Discussion of TestStand Search Directories
TestStand maintains a list of directories to search for files. To view the current list, select Configure Configure»»Search DirectoriesSearch Directories.
TestStand searches for modules specified in a sequence file beginning at the top of the list and working toward the bottom. You can move directories up or down in the list to specify precedence. If the list contains a directory you do not want TestStand to search, you can uncheck the checkbox next to that directory. See the TestStand User Manual for more information about the Search Directories.
The list of search directories is maintained in TestExec.ini in the <TestStand path>\cfg\ directory. When the test system is distributed, the Engine Installation Wizard includes TestExec.ini in the files to be distributed.
7. When the exercise is complete, close the execution window and sequence display window by selecting File File»»CloseClose.
End of Exercise 1-1
End of Exercise 1-1
Lesson 1 Introduction to TestStand Exercises
Exer
Exercis
cise 1-
e 1-2A
2A Run
Running
ning a Se
a Sequen
quence F
ce File
ile fro
from th
m the La
e LabVI
bVIEW
EW
Operator Interface
Operator Interface
Object
Objective: ive: TTo become famo become familiar wiiliar with runninth running test seqg test sequences frouences from the operam the operator inttor interface anderface and viewing reports generated by TestStand.
viewing reports generated by TestStand.
The Sequence Editor used in the previous exercise is not the only application for executing tests. The operator interface used in this exercise is another interface to execute tests. This interface was built with LabVIEW and is the interface the operator uses on the production floor.
The operator interface looks similar to the Sequence Editor, because it has most of the same functionality. The two critical differences between the operator interface and the Sequence Editor are:
• Currently, the operator interface cannot modify or create sequence files, unlike the Sequence Editor.
• The Sequence Editor is not provided with source code, and therefore you cannot modify it. On the other hand, the operator interface source code is included with the TestStand installation and is meant to be modified so that every user can create a customized operator interface. The source code for the default operator interfaces included with TestStand is in the following directory:
<TestStand path>\Examples\OperatorInterfaces The purpose of this lesson is simply to explore the default LabVIEW operator interface and become familiar with some of the differences and similarities between it and the Sequence Editor.
1. Open the operator interface. From the Windows Start Start menu, select Programs
Programs»»National Instruments TestStandNational Instruments TestStand»»OperatorOperator Interfaces
Interfaces»»LabVIEWLabVIEW. This launches LabVIEW.
The operator interface is an application for opening and running test sequences. As mentioned earlier, the sample operator interfaces included with TestStand are intended to be a starting point for the application that will be installed on the test/production floor. The operator interfaces allow the execution and debugging of multiple sequences.
Lesson 1 Introduction to TestStand Exercises
After the LabVIEW operator interface is loaded, the Login prompt appears.
Log in as administrator; as before, the password should be empty. Click OK OK to continue.
2. After logging in, select File File»»Open Sequence FileOpen Sequence File and navigate to C:\Exercises\TestStand I.
3. Open Ex 1-1 Computer Test.seq.
This is the same sequence that was run in Exercise 1-1. The window should appear as shown below.
Lesson 1 Introduction to TestStand Exercises
4. Execute the sequence by clicking on the Test UUTs Test UUTs button. This displays the UUT Information dialog box (shown below), and opens the execution display window (shown on the next page). Type in any value for the serial number and click OK OK. As in the previous exercise, select different tests to fail before stopping the test to view the report.
During execution, the execution display window shows the status of each step and allows you to control the execution using tools such as breakpoints and stepping mechanisms. These tools are covered in Lesson 2, The TestStand Environment . When you stop the execution (remember to click the Stop Stop button instead of entering another serial number and clicking OK OK), the execution display window displays the report. In the figure below, the report is displayed using HTML, which is the default display format in the operator interface. However, notice that the operator interfaces do not use a web browser control to display the HTML commands, as the Sequence Editor does.
Lesson 1 Introduction to TestStand Exercises
The sequence display and execution display are separate windows. The sequence display window displays all information related to the sequence file currently loaded into memory. This information includes information such as the sequence filename, the current user logged in, and the steps in the sequence. The execution display window shows all information related to the execution of a sequence file. This information includes the status of each step in the sequence file, which sequence is being run, and the sequence report contents. Click on either window to bring it to the front and view its contents.
Note
Note TestStand can run multiple sequence executions in parallel. Switching back to the sequence display window and clicking the Test UUT Test UUT button again causes the sequence to begin executing a second time in a separate execution display window from the first execution. Additionally, you can load and execute a separate sequence file in parallel instead of executing the same sequence file. Lesson 3 includes an example of executing sequences in parallel.
Lesson 1 Introduction to TestStand Exercises
6. When you finish viewing the report file, close the web browser that TestStand used to display the file. Click on the execution display window to bring it to the front and close it by selecting File File»»CloseClose Execution
Execution. Next, bring the sequence display window to the front by clicking on it, and close the sequence by selecting FileFile»»ClosClosee SequencSequencee File
File. Finally, close the operator interface by selecting File File»»ExitExit from the sequence display window.
End of Exercise 1-2A
End of Exercise 1-2A
Lesson 1 Introduction to TestStand Exercises
Exer
Exercis
cise 1-2
e 1-2B
B Runn
Running
ing a Seq
a Sequenc
uence Fi
e File fr
le from t
om the
he
LabWindows/CVI Operator Interface
LabWindows/CVI Operator Interface
Object
Objective: ive: TTo become famo become familiar wiiliar with runninth running test seqg test sequences frouences from the operam the operator inttor interface anderface and viewing reports generated by TestStand.
viewing reports generated by TestStand.
The Sequence Editor used in the previous example is not the only application for executing tests. The operator interface used in this exercise is another interface to execute tests. The interface used in this exercise was built with LabWindows/CVI and is the interface the operator uses on the production floor.
The operator interface looks similar to the Sequence Editor, because it has most of the same functionality. The two critical differences between the operator interface and the Sequence Editor are:
• Currently, the operator interface cannot modify or create sequence files, unlike the Sequence Editor.
• The Sequence Editor is not provided with source code, and therefore you cannot modify it. On the other hand, the operator interface source code is included with the TestStand installation and is meant to be modified so that every user can create a customized operator interface. The source code for the default operator interfaces included with TestStand is in the following directory:
<TestStand path>\Examples\OperatorInterfaces
The purpose of this lesson is to explore the default LabWindows/CVI operator interface and become familiar with some of the differences and similarities between it and the Sequence Editor.
1. Open the operator interface. From the Windows Start Start menu, select Programs
Programs»»National Instruments TestStandNational Instruments TestStand»»OperatorOperator Interfaces
Interfaces»»LabWindows/CVILabWindows/CVI.
The operator interface is an application for opening and running test sequences. As mentioned earlier, the sample operator interfaces included with TestStand are intended to be a starting point for the application that will be installed on the test/production floor. The operator interfaces allow the execution and debugging of multiple sequences.
Lesson 1 Introduction to TestStand Exercises
After the LabWindows/CVI operator interface is loaded, the Login prompt is displayed.
Log in as administrator; as before, the password should be empty. Click OK OK to continue.
2. After logging in, select File File»»Open Sequence fileOpen Sequence file and navigate to C:\Exercises\TestStand I.
3. Open Ex 1-1 Computer Test.seq.
This is the same file used in the previous exercise. The sequence display window of the operator interface should resemble the one shown below.
Lesson 1 Introduction to TestStand Exercises
4. Execute the sequence by clicking the Test UUTs Test UUTs button. This displays the UUT Information dialog box (shown below) and the execution display window (shown on the next page). Type in any value for the serial number and click OK OK. As in the previous exercise, try setting different tests to fail before stopping the test to view the report.
During execution, the execution display window shows the status of each step and allows you to control the execution using tools such as breakpoints and stepping mechanisms. These tools are covered in Lesson 2, The TestStand Environment . When you stop the execution (remember to click the Stop Stop button instead of entering another serial number and press OK OK), the execution display window displays the report. In the figure below, the report is displayed using HTML, which is the default display format in the operator interface. However, notice that the operator interfaces do not use a web browser control to display the HTML commands, as the Sequence Editor does.
Lesson 1 Introduction to TestStand Exercises
The sequence display and execution display are separate windows. The sequence display window displays all information related to the sequence file currently loaded into memory. This information includes the sequence file name, the current user logged in, and the steps in the sequence. The execution display window shows all information related to the execution of a sequence file. This information includes the status of each step in the sequence file, which sequence is being run, and the sequence report contents. Click on either window to bring it to the front and view its contents.
5. Click on the Launch Report Viewer Launch Report Viewer button to launch the application associated with the type of report you are viewing. If the operator interface is still configured to print the report in HTML format, the operating system typically launches Internet Explorer or Netscape to view HTML report files.
6. Close the sequence by selecting File File»»Close Sequence FileClose Sequence File when the exercise is completed. Then close the operator interface by selecting File
Lesson 1 Introduction to TestStand Exercises
Notes
Notes
Lesson 2
Lesson 2
The
The T
TestStand
estStand Environment
Environment
Introduction
Introduction
This lesson discusses TestStand sequences, their component step groups, and sequence files. It then introduces the debugging tools available in TestStand and explains how to execute them in the Sequence Editor. It also discusses the concept of a process model, and explains how TestStand can use the various default process models to execute tests. Test file management tools are also discussed in this lesson.
Lesson 2:
The TestStand Environment
In this lesson, you will learn about:
• TestStand sequences, step groups, and sequence
files
• The debugging features in TestStand and how to use
them
• The definition of a process model and the default
TestStand process models
• The features available in the Sequence Editor for
managing test development
Lesson 2 The TestStand Environment
What is a sequence?
What is a sequence?
Before getting into TestStand sequence files, it helps to examine a sequence at its most basic level. A sequence is a series of TestStand steps combined with the control logic that determines the order in which those steps are executed. Each step performs a particular action that contributes to the overall testing of the UUT. For example, in a step you could execute a LabVIEW VI that performs some type of test. The default operation is such that TestStand begins sequence execution with the topmost step and executes the steps from top to bottom. However, you can control the sequence’s execution flow; this is addressed in the next lesson.
Sequence
Step 1
Step 2
Step 3
Default Execution DirectionTestStand Sequences
What is a sequence?
• A test sequence consists of a series of test modules and flow control settings used to test a Unit Under Test (UUT)
Lesson 2 The TestStand Environment
Step Groups
Step Groups
Within every TestStand sequence, there are three step groups: setup, main, and cleanup. These step groups are always executed in the same order: setup, main, and cleanup. The step groups organize a series of sequence steps in a logical and sequential manner. For example, the setup group might contain initialize or power-up routines, the main group might contain the actual test routines, and the cleanup group might contain steps to close files or power-down instruments. The default settings for TestStand are such that the cleanup steps are executed even if there is a run-time error.
TestStand Sequence
Cleanup
Main
Setup
Steps
TestStand Sequences:
Step Groups
As shown below, all TestStand sequences have
three step groups
Lesson 2 The TestStand Environment
TestStand Sequence Files
TestStand Sequence Files
TestStand sequence files are comprised of multiple sequences. This may include multiple user-defined sequences and/or any callback sequences used with this sequence file (for now, think of callbacks as essentially predefined sequences; callbacks are discussed later).
To illustrate this concept, consider a bar code scanning application. Assume that for a particular product, the serial number is read by scanning a bar code, but for all other products, an operator enters it. The test developer would include the Pre-UUT callback (the callback that includes the serial number inquiry) in the sequence file for that product, and edit it to include the bar code scanning routines. Each time that particular sequence file is loaded, TestStand recognizes that it has its own Pre-UUT callback sequence and uses it. However, when other sequence files are loaded, TestStand still uses the default Pre-UUT callback, which prompts the operator to enter a serial number.
Thus, the sequence file is a TestStand application file that contains all information necessary for TestStand to load and execute a particular test application.
Note
Note TestStand sequences typically contain a sequence namedMainSequence, which is different from the Main step group.
Sequence File MainSequence Main Setup Cleanup Subsequence Pre-UUT Callback Setup Main Cleanup Cleanup Main Setup
TestStand Sequence Files
Sequence files include the MainSequence,Lesson 2 The TestStand Environment
Debugging Tools
Debugging Tools
TestStand has a variety of debugging tools that help you verify the execution of your TestStand applications.
The execution tracing option allows you to view the execution flow for the sequence in the execution window. If tracing is enabled, the Sequence Editor displays the progress of an execution by placing a yellow arrow icon to the left of the icon for the currently executing step. You can adjust the speed of tracing by selecting Configure Configure»»Station OptionsStation Options and adjusting the slider on the Execution tab.
The Sequence Editor and operator interfaces allow you to set breakpoints, step into, step over, or step out of sequences, and set the next step to execute. You can also view variables and create watch expressions (combination of variables). These tools allow you to control the sequence execution manually and identify potential areas that require further modification. The debugging tools are addressed in greater detail in Exercises 2-1 and 2-2.
Step In Step Over Step Out
Debugging Sequences
Types of debugging tools:
• Execution tracing functionality
• Breakpoint setting
Lesson 2 The TestStand Environment
Exercise 2-1
Objective: To understand subsequences, setup
and cleanup routines, and execution tracing
Lesson 2 The TestStand Environment
Exercise 2-2
Objective: To become familiar with using
breakpoints and debugging tools
in the Sequence Editor.
Lesson 2 The TestStand Environment
The TestStand Process Models
The TestStand Process Models
A process model is a list of steps that specify the high-level flow of execution in a test system. In other words, the process model is the flow of execution of the test executive.
TestStand has three available process models. By default, TestStand uses the sequence file SequentialModel.seq as its process model. The TestStand process models contain sequences that define operations TestStand performs before and after it tests a UUT. To invoke (or execute) a sequence in a process model, run one of the Execution Entry Point sequences in the model. The TestStand process models have two modes of operation called execution entry points. They appear as the Test UUTs Test UUTs and Single Pass Single Pass selections in the Execute Execute menu. Single Pass is usually for debugging purposes; it executes the selected sequence file only once and generates a test report. Test UUTs is for testing multiple UUTs. It loops until the operator quits and generates a test report for all UUTs. The Test UUTs mode is discussed next.
Note
Note If you modify the process models under \TestStand\Components, notice that there are two subdirectories for the process models: NI and User. Always copy the process models into the User directory so that you maintain a copy of the srcinals.
TestStand Sequences:
The Process Models
What is a Process Model?
A Process Model is a list of steps that specify the high level flow of execution in a test system
About the Process Models:
• There are 3 available process models: – SequentialModel.seq
– BatchModel.seq – ParallelModel.seq
• The default model isSequentialModel.seq
• The process models have two modes of operation: – Test UUTs
Lesson 2 The TestStand Environment
Available TestStand Process Models
Available TestStand Process Models
As mentioned in the previous slide, there are three process models in TestStand. The default process model is SequentialModel.seq. This sequence file is a multi-purpose process model that is ideal for most testing applications. The other two process models are designed to make it easier to implement running the same test sequence on multiple UUTs at the same time. They are discussed in more detail below.
The Batch process model,BatchModel.seq, can be used for controlling a set of test sockets that test multiple UUTs as a group. For example, you might have a set of circuit boards attached to a common carrier. The Batch model ensures that you start and finish testing all boards at the same time. The Batch model also provides batch synchronization features in which you can indicate that a step applies to the batch as a whole and therefore the step would only run once per batch instead of once for every UUT. Another convenient feature is the ability of the Batch model to generate batch reports that summarize the test results for all UUTs in the batch.
The Parallel process model, ParallelModel.seq, can be used for handling multiple
independent test sockets. The Parallel model allows you to start and stop testing on any socket at any time. For example, you might have five test sockets for testing radios. The Parallel model allows you to load a new radio into an open socket while the other sockets are busy testing other radios.
The TestStand Process Models
• SequentialModel.seq
(Default Process Model)
– Multi-purpose process model ideal for most testing applications
• BatchModel.seq
– Process model used to control a set of test sockets that tests multiple UUTs as a group or “batch”
• ParallelModel.seq
– Process model used for handling multiple independent test sockets
Lesson 2 The TestStand Environment
The Default Process Model: Test UUTs Mode
The Default Process Model: Test UUTs Mode
The flowchart above depicts the order in which MainSequence and all the TestStand callback sequences are executed for the Test UUTs mode of the Sequential process model. When the Test UUTs mode is initiated, TestStand executes the Pre-UUT Loop Callback (test system setup operations), followed by the Pre-UUT Callback (UUT setup operations). These callbacks are always part of the process model, unless you modify the process model yourself (discussed in the customization lesson later in the course).
The next step is the MainSequence step, which the user creates using the Sequence Editor. TestStand then executes the Post-UUT Callback (UUT clean up operations) and updates a test report. Execution then returns to the Pre-UUT Callback for the next UUT to be tested. On completion of testing, TestStand steps out of the loop, generates a test report, and executes the Post-UUT Loop Callback test (system clean up operations).
The Sequential process model contains model callbacks, which are normal TestStand sequences, with the exception that these callbacks perform specific tasks during sequence execution. For example, the Pre-UUT Loop Callback can run setup sequences for testing. The model callbacks can serve as hooks for you to customize the process model for each MainSequence without altering the process model directly.
Pre-UUT Loop Pre-UUT Main Sequence Post-UUT Generate Report Loop until operator quits Post-UUT Loop Main Sequence Main Setup Cleanup Pre-UUT Callback Setup Main Cleanup
Default Process Model
Lesson 2 The TestStand Environment
SequentialModel.seq
SequentialModel.seq
Execution entry points in process models, such as Test UUTs and Single Pass, use callbacks to invoke the MainSequence in your sequence file.
Each sequence file must then define a sequence by the name of MainSequence. The default process model, SequentialModel.seq, contains a MainSequence callback that is merely a place holder. The MainSequence in your sequence file overrides the MainSequence place holder in the SequentialModel.seq.
As shown in the slide above, the default TestStand process model is itself just another sequence file called SequentialModel.seq. Thus, you can completely edit and customize the process model. It includes all the callback sequences (as displayed in the pull down View ring), various steps used for sequencing logic and keeping track of certain TestStand variables, and execution entry points. Exercise 2-3 introduces you to the default process model sequence file in greater detail.
Lesson 2 The TestStand Environment
The Role of a Process Model in TestStand
The Role of a Process Model in TestStand
This slide shows the role of a process model and callbacks in the TestStand architecture. Essentially, the TestStand Engine executes a model sequence file using the specified process model to direct the flow of operations in executing sequence files. While executing the process model, the engine initiates callbacks at the appropriate time to perform their predetermined tasks. In this way, you can implement modifications without directly modifying the TestStand Engine. Modifications and customizations are addressed in the Advanced TestStand course.
Custom Operator Interface ActiveX Clients Sequence Editor Callbacks Callbacks PROCESS MODEL
The Process Model
& TestStand Architecture
Application Programming Interface TestStand Engine (ActiveX Server)
CVI DLL ActiveX Servers TestStand Sequence LV HT Basic
Lesson 2 The TestStand Environment
Exercise 2-3
Objective: To understand the default process
model
Lesson 2 The TestStand Environment
Works
Workspaces and
paces and Source Control
Source Control
A workspace is a TestStand tool that you can use to organize sequence files, code modules, and other files into projects. Projects enable you to access related files quickly. You can check files and projects in and out of a source code control system from within the TestStand environment. You can also share workspaces with other users by checking a workspace file into source code control.
The workspace window displays the contents of a TestStand workspace (.tsw) file. A workspace file displays a list of any number of TestStand project (.tsp) files. In TestStand, a project file can contain any type of file or folder but a workspace file can contain only projects.
TestStand integrates with any source code control system that supports the Microsoft SCC interface. You can check files and projects in and out of your source code control system from a TestStand workspace. TestStand has been tested with the following source code control providers: Microsoft Visual SourceSafe, Perforce, MKS Source Integrity, and Rational ClearCase.
The TestStand Differ is a graphical tool in the Sequence Editor that enables you to compare and merge differences between two sequence files. The TestStand Differ compares the sequence files and presents the differences in a new window.
For more details on these features, please see the TestStand User Manual.
Workspaces and Source Control
• Workspaces
– organize sequence files, code modules, and other files into projects
• Projects
– enables you to access related files quickly
• Source Control
– check files and projects in and out of a source code control system
• Differ
– graphical tool that enables you to compare and merge differences between two sequence files
Lesson 2 The TestStand Environment
Workspaces and Projects Demo
Workspaces and Projects Demo
This demo illustrates many of the features discussed on the previous slide. To use this demo, select File
File»»Open Workspace FileOpen Workspace File from the Sequence Editor menu. Open the TestStand workspace file C:\TestStand\Examples\Example.tsw. This workspace contains projects consisting of all the shipping examples that install with TestStand. Use the tree view to browse through various projects. Notice that the projects can contain not only sequence files but also the associated code modules. By right-clicking on the Examples property at the top of the tree view, you can add and remove files from the workspace as well as check files in and out of source control. The computers used for this course do not have source control software installed on them so you will not be able to demo the source control tools within this class.
You can use the TestStand Differ tool by opening a sequence file in the Sequence Editor and selecting Edit Edit»»Diff Sequence File WithDiff Sequence File With from the menu. A graphical window will then be displayed that shows you the differences between the compared sequence files.
Lesson 2 The TestStand Environment
Summary
Summary
This lesson discussed the basic components of the TestStand environment: sequences, step groups, and process models.
In a sense, you can think of TestStand as providing fully customizable “templates” for every aspect of testing. There is a default template available for the process itself,TestStandModel.seq, and a default order for sequences: setup, main, and cleanup. These templates should work for the majority of test environments, but as you work through the exercises in this course, you will see that you can easily modify each “template” to suit your particular needs.
Taking a top down perspective, a process model consists of a particular ordering of sequences and callbacks which match a testing process. The sequences themselves consist of a group of steps. The groups are, in turn, made up of steps configured by test developers. These steps correspond to a wide variety of actions, including testing a UUT, message popup for status, and so on. The next lesson discusses how these individual steps are configured to create sequences.
Lesson 2 Summary:
The TestStand Environment
• A test sequence is a series of test modules and flow control settings used to test a UUT
• There are three step groups in a sequence: Setup, Main, and Cleanup
• Sequence files contain user-defined main sequences and callback sequences required for sequence execution • A process model defines the high-level flow of execution for a
test executive
• The TestStand default process model is a sequence file called SequentialModel.seq
• Workspaces, projects, and source code control features help provide ways to better manage your test files and structure • The TestStand Differ enables you to make changes to and
Lesson 2 The TestStand Environment Exercises
Exe
Exerci
rcise
se 2-1
2-1 Und
Underst
erstandi
anding
ng the
the Sequ
Sequenc
ence
e Fil
File
e
Object
Objective: ive: TTo understo understand subseand subsequencesquences, setup an, setup and cleanud cleanup routip routines, and enes, and executixecution tracion tracing.ng.
Subsequences allow the test developer to modularize logical portions of the test into smaller sequences that are easier to manage and maintain. Breaking up a sequence file into manageable segments is similar to how a program developer breaks up sections of a program into many separate files. Each smaller segment has a very specific purpose and contributes some basic function to the calling sequence it is a part of. In addition to the sequence it was designed for, many other sequences can use this subsequence. This reusability and modularity make subsequences very useful, and TestStand makes it very easy to create and implement them.
Part A:
Part A: Calli
Calling Subsequences
ng Subsequences
The following example shows how one sequence can call another sequence. In this sequence file are two sequences called from within the main sequence file. This is how TestStand allows one sequence to call another sequence.
1. In the Sequence Editor, select File File»»OpenOpen and navigate to C:\Exercises\TestStand I \ and open Ex 2-1 Computer Motherboard Test.seq.
In this sequence file, the sequences named CPU Test and CPU Diagnostic Test are subsequences. In TestStand, a sequence can call another sequence in the same sequence file or a different sequence file. In this case, the subsequences are in the same sequence file. The light blue icon for the step type denotes a call to a subsequence. Sequences are discussed in greater detail later in the course.
Lesson 2 The TestStand Environment Exercises
.
2. Execute the sequence by selecting Execute Execute»»Single PassSingle Pass. Notice that in the report, the step results in the subsequences are separated from the step results in the calling sequence. Close the Execution window by selectingFileFile»»CloseClose or clicking theXX icon on the window title bar.
3. To open a subsequence, right-click on the blue sequence call icon and select Open Sequence Open Sequence, as shown below. This displays the selected sequence call.