NI Requirements Gateway for Test, Measurement, and Control Applications

Overview

This article is part of a series on software engineering practices and tools for large application development in LabVIEW.

Click here to view the list of other articles



Most engineering projects start with high-level specifications, followed by the definition of more detailed specifications as the project progresses. Specifications contain technical and procedural requirements that guide the product through each engineering phase. In addition, working documents, such as hardware schematics, simulation models, software source code, and test specifications and procedures must adhere to and cover the requirements defined by specifications.

Tracking the relationship from requirements to test, measurement, and control software is crucial for validating implementation, analyzing the full impact of changing requirements, and understanding the impact of test failures. Performing this coverage and impact analysis helps engineers meet their requirements and streamline development efforts. NI Requirements Gateway is ideal for applications that simulate or test complex components against documented requirements in industries such as automotive, defense, aerospace, and consumer electronics.

In this document, we will take a quick tour of NI Requirements Gateway and explore how NI Requirements Gateway interacts with your applications to capture traceability information. For more detailed information on how you can use NI Requirements Gateway, please take a look at the software’s Getting Started manual and User Manual.

Contents

Tour NI Requirements Gateway

NI Requirements Gateway is a requirements traceability solution that links your development and verification documents to formal requirements stored in documents and databases. NI Requirements Gateway performs coverage and impact analysis, graphically displays coverage relationships, and generates comprehensive reports. NI Requirements Gateway improves quality by effectively managing requirements traceability and impact analysis throughout a project's lifecycle.

NI Requirements Gateway allows you to configure which specification and working documents to process, the type of traceability information to obtain from each type of document, and the traceability relationship between these documents. These coverage relationships are specified graphically, as seen in Figure 1.


Figure 1: Coverage relationships are configured graphically


Once coverage relationships are specified, traceability information is displayed in several distinct views:

Management View – Displays a high-level view of the project including the documents in the project, the elements of each document, and a summary of coverage information for the project.


Figure 2: The Management View of a project displays key coverage information


NI Requirements Gateway displays the hierarchical structure of the included documents. The views in Figures 2 and 3 reflect this for the DOORS and NI TestStand documents included in the example project.

Coverage Analysis View – For a selected element of a document, e.g. a specific requirement or test case, this view displays one level of covering elements and one level of covered elements from the other documents as defined by the project.


Figure 3: View coverage information for a selected element one level up and downstream


Impact Analysis View – For a selected element of a document, this view displays all levels of covering elements and all levels of covered elements from the other documents as defined by the project.


Figure 4: The Impact Analysis View shows coverage information for all levels up or downstream


Graphical View – Displays each document graphically using a tree view with lines connecting requirement elements to covering elements.


Figure 5: Requirements traceability information can be viewed graphically


With several project documents containing potentially hundreds of requirements, the graphical view in Figure 5 could get very large and complex. You can simplify the graphical view by choosing to display only select relationships or documents.

In addition to having multiple views for analyzing how your applications are covering your requirements, with NI Requirements Gateway you can generate a variety of reports. These reports document different aspects of the project. These reports are based on customizable templates.

NI Requirements Gateway also gives you a way to take snapshots of your projects at different stages of development. These snapshots capture the current state of a project and can be used to document changes in requirements coverage and progress of development projects.

See Also:
Download Evaluation Software
Getting Started Manual for NI Requirements Gateway
Pricing and Ordering Information for NI Requirements Gateway

Capturing Traceability Information

While the preceding screenshots feature NI TestStand and Telelogic DOORS, NI Requirements Gateway can be used to capture traceability information from other software packages as well. NI Requirements Gateway works with the NI LabVIEW graphical development environment, LabWindows/CVI for ANSI C development, and NI TestStand test management software design and development tools, as well as several common tools for managing and documenting requirements, such as Telelogic DOORS, IBM Rational RequisitePro and Microsoft Word.


Figure 6: Covering documents contain references to the requirements


The secret to capturing traceability relationships is the use of requirement IDs. A standard practice in documenting requirements is to have them include an identifier along with textual information describing the requirement. In the covering documents, such as TestStand sequences or LabVIEW VIs, NI Requirements Gateway looks for references to requirement IDs. The basic idea looks something like what is pictured above in Figure 6.

In the rest of this document, you will see some of the default ways NI Requirements Gateway interacts with requirements management and documentation software as well as NI test, measurement, and control software. In many cases, there are default syntaxes for specifying that a CVI function, LabVIEW VI, or TestStand step provides coverage for a requirement. In all cases, this default interaction can be customized if necessary.

In addition to capturing requirements and traceability information, NI Requirements Gateway gives you the ability to navigate from a selected item in NI Requirements Gateway to the appropriate specification or application. In the case of needing to make changes to source code in response to a change in requirements, this navigation makes finding the desired section code easy.

In the example project featured in this section, if the REQ_ROM requirement were to change, you would want to return to the NI TestStand step that is covering that requirement to verify that it is still covering the requirement or to make necessary changes. Your TestStand sequence could contain hundreds of steps. By selecting Navigate from the context menu, as in Figure 7, NI Requirements Gateway will launch TestStand, open the appropriate sequence file, and take you the ROM step.


Figure 7: Navigate from NI Requirements Gateway to your documentation or development environment

Examples of Requirements Documents

Let’s explore a few examples of how you might document your requirements. Specifically, we will look a deeper into how NI Requirements Gateway interacts with the tools for documenting and managing requirements. The tools we look at in this section are not the only environments supported by NI Requirements Gateway. Instead, they are used to give you an idea of how the software collects information from your requirements documents.

In the case of specifications in a Microsoft Word document, the requirements might look something like the document in Figure 8. The requirement IDs appear in blue (blue is, of course, optional).


Figure 8: Requirements can be specified in Microsoft Word


With Microsoft Word you can define formatting styles. If you are using the default font, font size, color, et cetera, then the style is Normal. When you make changes to formatting, you can save those settings with a style name. One of the ways that NI Requirements Gateway interacts with Microsoft Word is to look for text of particular formatting styles. The default styles used by the software include Requirement_ID and Requirement_Text.

If you are using Telelogic DOORS for requirements management, your requirements are saved in modules of a database. There are two default ways NI Requirements Gateway pulls information from DOORS. In one case, NI Requirements Gateway uses an object’s native ID. In the other advanced interface to DOORS, an attribute called ReqID is referenced. The DOORS module shown in Figure 9 can be used with the advanced interface and is used in the project featured in the above Tour.


Figure 9: Requirements can also be stored in requirements management tools such as Telelogic DOORS


With Telelogic DOORS installed, NI Requirements Gateway also has some ability to export information to DOORS. For example, with a covering document selected in NI Requirements Gateway, you will have the option to Export Elements to DOORS. Then, you can specify an existing DOORS module or create a new one. The traceability information is also exported to DOORS.


Figure 10: Information from covering documents can be exported into Telelogic DOORS


If you are interested in sticking to basic software for documenting your requirements, NI Requirements Gateway can parse text files for traceability information. In this case, your documents need to adhere to some formal syntax for the software to understand what is in your documents.

NI Requirements Gateway ships with several example projects and files. With these examples, you can see first-hand how the software interacts with supported requirements documents. Now, that you are somewhat familiar with how the software deals with the documents that specify requirements, let’s take a closer look at how NI Requirements Gateway interacts with test, measurement, and control software from National Instruments.

Requirements Traceability and LabVIEW

For nearly 20 years, the popularity of LabVIEW for beginner and experienced programmers in so many different engineering applications and industries can be attributed to the software's intuitive graphical programming language used for automating measurement and control systems. The LabVIEW graphical dataflow language and block diagram approach naturally represent the flow of your data and intuitively map user interface controls to your data, so you can easily view and modify your data or control inputs.

Whether you are working with Microsoft Word and NI TestStand or Telelogic DOORS and LabVIEW, once you have configured a project in NI Requirements Gateway to define coverage relationships, all of the traceability information and analysis views we saw, in the Tour of NI Requirements Gateway, are available for your project. NI Requirements Gateway looks in the documentation field of a VI, in the Controls and Indicators of the VI, and even optionally in the documentation of all block diagram elements. In other words, you can specify that a VI, its individual controls and indicators, or even a while loop or label cover a specified requirement. Remember, to do this involves putting a reference to the requirement ID in the field where NI Requirements Gateway is looking. An example should make this clear.

There is a classic LabVIEW example, the Tank Simulation.vi, that displays a history of inflow, level, and temperature in a simulated tank control application. We have taken this example and repackaged it with a specification document in an NI Requirements Gateway example.


Figure 11: Tank Simulation.vi shows information about a simulated tank control application


Some of the controls, indicators, and subVIs of the Tank Simulation.vi include references to requirements in the specification document. For example, the Elapsed Time indicator (right next to the tank display) covers the REQ_DisplayTotalTime requirement for the graphical user interface (GUI) of the application.


Figure 12: Application requirements can include specifications for VI Controls and Indicators


This coverage is specified by adding a comment to the Documentation field of the control’s properties as seen in Figure 13. The syntax used is the default for interfacing NI Requirements Gateway and LabVIEW. It is possible to copy a reference from NI Requirements Gateway and paste it into the Documentation field. Doing this, the software makes sure the correct syntax is used.


Figure 13: Coverage is specified by adding documentation to a VI, Control, or Indicator

 


Figure 14: Copy requirement references to ensure correct syntax and accurate coverage information


When configuring your project in NI Requirements Gateway, you can include a Directory, LabVIEW VI, or LLB of LabVIEW VIs. In this example, the covering “document” is the LLB of VIs used with the Tank Simulation example. This is shown in Figure 15.


Figure 15: View the VIs, Controls, Indicators, and traceability information stored in an LLB


In Figure 15, you can see the Elapsed Time indicator is providing coverage for the expected requirement. You can also see that all of the indicator’s documentation has been captured by NI Requirements Gateway.

NI Requirements Gateway supports LabVIEW 7.0 or later. You can learn more about requirements management, LabVIEW, and using NI Requirements Gateway in the Managing Software Engineering in LabVIEW training course.

See Also:
Pricing and Ordering Information for NI Requirements Gateway
Go to LabVIEW Home Page

Requirements Traceability and LabWindows/CVI

LabWindows/CVI is a proven test and measurement ANSI C development environment that greatly increases the productivity of engineers and scientists. Engineers and scientists use LabWindows/CVI to develop high performance, stable applications in the manufacturing test, military and aerospace, telecommunications, design validation, and automotive industries.

NI Requirements Gateway supports LabWindows/CVI 7.0 or later and gives you all of the traceability information and views you saw in the Tour. NI Requirements Gateway looks for traceability information in source code comments and function panel documentation fields.

You can use both C and C++ style comments in your source code to indicate that a requirement is being covered. If the comment precedes a function declaration or is located within a function definition, then the function is considered to be covering, or implementing, the requirement, as show in Figure 16. The Capturing Traceability Information section of this document further discusses requirements and references to requirements.


Figure 16: Comments can be used to specify that a function is covering a requirement


Additionally, with the navigation feature mentioned earlier, you can go directly to a function in LabWindows/CVI that corresponds to the item you have selected in NI Requirements Gateway.


Figure 17: Navigate from NI Requirements Gateway to the selected function in your source code

Requirements Traceability and NI TestStand

NI TestStand is a ready-to-run test management environment for automating your test and validation systems. NI TestStand is used to develop, manage and execute sequences, which integrate test modules written in any programming language, and specify sequence flow, reporting, database logging and connectivity to other enterprise systems. NI TestStand is designed to maximize test-code reuse through built-in language adapters and simplify maintenance by using a modular fully customizable test-system framework.

NI Requirements Gateway supports NI TestStand 3.1 or later and looks for requirement coverage in steps, sequences, and files. NI TestStand 3.5 includes built-in fields for notating product and unit requirements at the workspace, project, sequence file, sequence, and step level. The Capturing Traceability Information section of this document discusses requirements and references to requirements.


Figure 18: Specify which TestStand steps, sequences, or files provide coverage for documented requirements


The example test sequence shown in Figure 18 provides coverage for the requirements specified in the example Word document and DOORS module in the figures above. The sequence file is part of a TestStand workspace. As mentioned above and as can be seen in Figure 19, NI Requirements Gateway displays the hierarchical structure of the TestStand files, showing steps in step groups and sequences in sequence files.

The sequence in Figure 18 is also featured as part of the NI Requirements Gateway project in the first section of this document. In that first section, you saw that NI Requirements Gateway can pull traceability information from TestStand sequences, and can also pull information from TestStand results.


Figure 19: Use TestStand results to examine the upstream impact of test failures


To use NI TestStand results as part of your coverage analysis, you simply need to include a TestStand report as a project document when you configure your NI Requirements Gateway project. This is shown in Figure 1. An important thing to note is that NI Requirements Gateway can only perform this analysis with results that are saved using the TestStand XML Document report format. This is one of the default formats available in TestStand and can be selected in the Report Options dialog box (Configure>>Report Options from the TestStand Sequence Editor).

See Also:
Pricing and Ordering Information for NI Requirements Gateway
Go to the NI TestStand Home Page

Requirements Traceability and MATRIXx

For more than 20 years, engineers worldwide have relied on the MATRIXx product family for control design applications in automotive, aerospace and defense, process control, and academic environments. The MATRIXx suite of software includes tools for: graphical system modeling and simulation; interactive analysis, visualization, and control development; automatic documentation generation; and automatic embedded code generation for C and Ada.

NI Requirements Gateway supports MATRIXx 7.1.6 or later and gives you a tool for linking the requirements in your specification documents to the SuperBlocks that have been implemented to cover your requirements. To do this, NI Requirements Gateway looks for requirement references in specific SuperBlock properties such as the Comment field. The Capturing Traceability Information section of this document discusses requirements and references to requirements in greater detail.

As an example, consider the classic MATRIXx cruise control demo. That demo, with references to requirements added in the SuperBlocks, comes with NI Requirements Gateway. When configuring a project in NI Requirements Gateway, you can point to MATRIXx Catalog Files and the software will look for traceability information in the SuperBlocks.


Figure 20: Classic MATRIXx cruise demo enhanced to include references to requirements


With the cruise demo catalog file selected as the “document” that is covering the requirements in the specification document, NI Requirements Gateway gives you multiple views for analyzing coverage information. NI Requirements Gateway also displays the structure of the catalog file. This can be seen in Figure 21.


Figure 21: Display the coverage relationship between SuperBlocks and documented requirements


NI Requirements Gateway “knows” that the Set Speed SuperBlock is covering the REQ_SetSpeed requirement. This knowledge comes from finding the reference to the requirement in the Comment field in the SuperBlock properties. The syntax of the reference that you see in Figure 22 is the default syntax NI Requirements Gateway uses when interacting with MATRIXx.


Figure 22: References to requirements can be added to a SuperBlock’s properties


It is possible to copy the reference from NI Requirements Gateway with the necessary syntax for MATRIXx. This removes the chance for typos and inaccurate coverage information.

 

Figure 23: Copy requirement references to ensure correct syntax and accurate coverage information

See Also:
Pricing and Ordering Information for NI Requirements Gateway

Conclusion

Whether you are developing a user interface, test system software, or a control application, you are probably basing your design and development on specified requirements. With NI Requirements Gateway, you have seen how you can gather and analyze requirement and traceability information from your specifications and your software solutions. This gives you a quick, easy, and more complete means to analyze and report how well your development is progressing. Ultimately, you can use NI Requirements Gateway to ensure compliance with internal, customer, or industry requirements and standards.