eLEARNING SERIES

THE AVERNA BLOG

How to Become a TestStand Ninja – Part 2

Make the Most Out of TestStand for Effective Automated Test

800x300_TestStand Ninja header


In the previous article we looked at the importance of test automation and the most efficient ways to work with test sequences using National Instruments’ TestStand. Now is the time to focus on something equally important…managing your test code. One of TestStand’s greatest assets is the flexibility to use many types of test codes and have them working together seamlessly. That being said, this doesn’t mean go crazy. It is still important to have uniformity among different code modules. Regardless of which application development environment (ADE) you use, by following the guidelines below, you will build modular & maintainable code.

Use a Source Code Control (SCC) Program for any Project with More than One Developer.

Using an SCC program is crucial when development is shared among several engineers. This will track all changes/revisions made to the source code during software development. It will also prevent multiple users from making changes to the same code at the same time. There are several SCC programs available to help manage shared development of test code. TestStand integrates with any SCC system using the Microsoft SCC interface, allowing the user to check files and projects from a TestStand workspace.

Separate Measurement and Analysis Code.

The test code and the test executive should be independent of one another. Having modular tests that perform a single measurement are both easy to read and easy to reuse. TestStand lets you freely transfer information between a test sequence and the code modules it’s calling. Grouping these calls into a function makes the test code easy to use within other programs.

Use TestStand Code Templates

A TestStand code template defines the skeleton code for a specific step type when a developer creates a sequence using the Create Code option for a particular step. Each step type in TestStand can have associated templates for the LabVIEW, CVI, C/C++ and .NET adapters.

TestStand Edit Code

Example: Edit Code Template

Have a Straightforward Strategy for Error Handling.

In TestStand, an error does not mean there is a problem with the unit under test (UUT), it indicates a problem with the test process. This is a much bigger deal. All standard TestStand step types include an understandable structure to provide information on the error in question. Without information, how do you fix the process?

Another aspect of error handling is the ability to shut down gracefully or attain a known state when there is a problem and the system needs to be shut down manually. This is another instance when cleanup steps are particularly helpful. When you need to shut down, there are 2 options: terminate an execution or abort an execution. By terminating, all the Cleanup steps are run and the process model continues. Here you can take the measures you need to prevent further chaos. When you abort, this means you are not particularly concerned about the test system at this point, and essentially abandon ship. With either option there are several functions you can use to monitor the execution status. It is important to use these functions when displaying a dialog box or running a particularly long test so you can exit routines in response to an operator’s attempt to stop the execution.

By using these tips along with proper test sequence organization, it is certain you will make the most out of TestStand. When you maximize TestStand, you are ensuring efficiency, quality and simplicity throughout the test automation process.

For more information on Test Code Development with TestStand, read this resource from National Instruments.

To consult with a TestStand Developer or Architect, please contact Averna.

 

Do you want to see the full benefits of Test?

Get in touch with our experts or navigate through our resource center

cover-video-test-engineering

 

Check out our video to see the benefits of expert test engineering services.