# TestStand

**TestStand** 是一款测试管理软件，即测试执行程序，由[国家仪器公司](https://www.edgepedia.org/zh/national-instruments)（National Instruments，简称 NI，现属艾默生旗下）开发，用于对验证测试和生产测试中的自动化测试进行排序、执行和报告。它是一款现成软件，旨在省去企业内部自行开发序列器的需要：工程师在图形编辑器中搭建测试序列，序列再调用以 LabVIEW、C/C++、.NET 或 Python 编写的测量代码。<sup>[1](https://www.ni.com/teststand/whatis/)</sup><sup> • </sup><sup>[2](https://www.ni.com/docs/en-US/csh?context=ts_9420)</sup>

| 关键事实 | 详情 |
|---|---|
| 类别 | 测试执行程序（测试管理软件），用于验证测试和生产测试，来自国家仪器公司（NI）<sup>[1](https://www.ni.com/teststand/whatis/)</sup> |
| 代码集成 | 适配器可调用以 LabVIEW、C/C++、.NET 和 Python 编写的代码模块，甚至可在同一序列内混用<sup>[1](https://www.ni.com/teststand/whatis/)</sup> |
| 并行测试 | 内置并行执行和共享资源自动调度；NI 表示，从零搭建这一架构通常需要数百个开发小时<sup>[1](https://www.ni.com/teststand/whatis/)</sup> |
| 过程模型 | 附带顺序、并行和批处理三种模型；并行和批处理模型可同时测试多个被测单元（UUT）<sup>[3](https://www.galoislabs.ai/blog/test-executive-comparison)</sup> |
| 结果 | 自动生成 HTML、XML、ATML 和 ASCII 文本格式的报告，并支持数据库记录<sup>[1](https://www.ni.com/teststand/whatis/)</sup> |
| 平台与授权 | 支持 Windows 10 和 11；开发者按订阅授权，工站按一次性部署许可授权<sup>[3](https://www.galoislabs.ai/blog/test-executive-comparison)</sup> |
| 节省成效 | 据 NI 的“自建对比购买”比较，节省 75% 开发时间，减少 67% 维护工作，并行测试使生产力提升 97%<sup>[1](https://www.ni.com/teststand/whatis/)</sup> |

## 在测试系统中的用途与定位

测试执行程序位于测试代码与生产现场之间。它将测试建模为带测量值和限值的有序步骤，打开和关闭仪器与被测设备，控制故障时的流程，提供操作员界面，为每个单元存储一条可查询记录，并将同一份经批准的测试部署到每个工站。TestStand 在一款产品中集成了全部六项功能，而开源工具通常只覆盖前三项，操作员界面、结果存储和部署则留给用户自行解决。<sup>[3](https://www.galoislabs.ai/blog/test-executive-comparison)</sup>

NI 将 TestStand 定位为其软件产品组合中的序列层。它被收录在 NI LabVIEW+ 套件中，与 LabVIEW 及其他测量与分析软件并列，并可连接 DIAdem 和 SystemLink 等工具，用于分析和测试运营。<sup>[1](https://www.ni.com/teststand/whatis/)</sup>

## 架构

**引擎与编辑器。** TestStand 引擎是一组 DLL，提供一套内容丰富的 ActiveX 自动化 API，用于控制 TestStand 并与之交互；序列编辑器、TestStand 用户界面控件以及自定义用户界面均使用该 API。TestStand 序列编辑器是一个独立的可定制开发环境，用于创建、修改、执行和调试序列，也可修改步骤类型、数据类型、过程模型和过程模型插件。<sup>[4](https://download.ni.com/support/manuals/373457f.pdf)</sup>

**序列与步骤。** 序列文件（扩展名为 .seq）包含任意数量的序列、文件所使用的数据类型和步骤类型，以及共享全局变量。序列包含步骤组、局部变量以及用于向子序列传递数据的参数。步骤分三组运行：先 Setup，再 Main，最后 Cleanup；默认情况下，当 Setup 或 Main 中的某个步骤产生错误时，序列即转入 Cleanup。<sup>[4](https://download.ni.com/support/manuals/373457f.pdf)</sup>

**适配器。** 适配器让引擎能够调用多种格式和语言的代码模块，包括 LabVIEW VI、C/C++ DLL、.NET 程序集和可执行文件、ActiveX/COM 服务器、HTBasic 程序以及其他 TestStand 序列。每个适配器都提供一套接口，用于传递参数、处理返回值和管理执行设置。<sup>[4](https://download.ni.com/support/manuals/373457f.pdf)</sup><sup> • </sup><sup>[1](https://www.ni.com/teststand/whatis/)</sup>

**测量值与限值分离。** 在数值限值测试步骤中，会调用一个代码模块产生单个测量值，然后该步骤对照自身存储的限值进行检查：`Step.Result.Numeric` 保存测量值，`Step.Limits.Low` 和 `Step.Limits.High` 保存限值，`Step.Comp` 指定比较方式。通过/失败测试和字符串值测试步骤也遵循同样的模式。由于限值存储在序列文件中而非代码中，更改限值属于序列变更而非代码变更，一个代码模块可以服务于多个具有不同限值的步骤。TestStand 还提供工具，可从文件或数据库为每个限值测试步骤动态导入限值。<sup>[3](https://www.galoislabs.ai/blog/test-executive-comparison)</sup><sup> • </sup><sup>[5](https://www.ni.com/en-us/support/documentation/supplemental/06/guide-to-effective-test-software-development-with-teststand.html)</sup>

**过程模型。** 过程模型定义了每次测试前后的标准操作，在序列文件中实现，与 TestStand 引擎相互独立。TestStand 附带顺序、并行和批处理模型；并行和批处理模型可同时测试多个被测单元，每次并行执行在各自的测试套接字中运行。过程模型通过插件架构进一步模块化，用户可以自定义它们，以促进序列之间的代码复用。<sup>[3](https://www.galoislabs.ai/blog/test-executive-comparison)</sup><sup> • </sup><sup>[4](https://download.ni.com/support/manuals/373457f.pdf)</sup><sup> • </sup><sup>[6](https://www.ni.com/en/support/documentation/supplemental/08/teststand-process-model-development-and-customization.html)</sup>

## 开发与部署工作流

工程师通过拖放步骤并实现条件逻辑来交互式地搭建序列，然后监控执行以在部署前识别瓶颈。调试工具包括断点、单步执行、跟踪、变量窗格和监视视图窗格，并可连接到代码模块的开发环境；可同时运行多个并发执行和同一序列的多个实例。<sup>[1](https://www.ni.com/teststand/whatis/)</sup><sup> • </sup><sup>[4](https://download.ni.com/support/manuals/373457f.pdf)</sup>

在生产环境中，TestStand 将序列打包以便部署到一组测试机上，并提供标准或自定义操作员界面，简化技术人员的操作，支持序列号录入和通过/失败显示。报告以 HTML、XML、ATML 和 ASCII 文本格式自动生成，可保存到本地或网络数据库。<sup>[1](https://www.ni.com/teststand/whatis/)</sup>

在 TestStand 中运行测试不需要外部应用开发环境即可执行，不过它所调用的代码模块是在各自的环境中开发的；部署序列逻辑需要 TestStand 运行时，其中包含 TestStand 引擎和支持文件。<sup>[5](https://www.ni.com/en-us/support/documentation/supplemental/06/guide-to-effective-test-software-development-with-teststand.html)</sup><sup> • </sup><sup>[10](https://www.ni.com/en/support/documentation/supplemental/08/teststand-system-deployment-best-practices.html)</sup>

## AI 辅助

当前版本包含 NI Nigel AI，专门针对测试与测量进行了优化：它提供测试与测量信息、生成序列，并在 TestStand 环境中给出上下文相关的开发建议。在 TestStand 2026 Q3 中，Nigel 可根据用户提供的规格文档创建序列。<sup>[1](https://www.ni.com/teststand/whatis/)</sup><sup> • </sup><sup>[3](https://www.galoislabs.ai/blog/test-executive-comparison)</sup>

## 授权、平台与版本

TestStand 可在 [Windows 10](https://www.edgepedia.org/zh/windows-10) 和 11 上运行。开发者按订阅授权，工站按一次性部署许可授权；NI 软件同时提供订阅和永久授权两种方式，有效订阅或永久授权首年包含软件服务协议。<sup>[3](https://www.galoislabs.ai/blog/test-executive-comparison)</sup><sup> • </sup><sup>[1](https://www.ni.com/teststand/whatis/)</sup>

NI 公布的最低系统要求为：Pentium 4 G1 等效处理器（推荐 [Intel Core i5](https://www.edgepedia.org/zh/intel-core-i5) 或更高）、4 GB 内存（推荐 8 GB 或以上）、12 GB 磁盘空间。<sup>[1](https://www.ni.com/teststand/whatis/)</sup> 版本发布采用季度版本方案；已列出的版本包括 TestStand 2016 SP1 至 TestStand 2026 Q3，NI 还发布兼容性对照表，将每个 TestStand 版本与支持的 LabVIEW 和 LabWindows/CVI 版本配对。<sup>[7](https://www.ni.com/en/support/documentation/release-notes/product.teststand.html)</sup><sup> • </sup><sup>[8](https://www.ni.com/en/support/documentation/compatibility/18/teststand-compatibility-with-labview-and-labwindows--cvi-.html)</sup>

## 采用情况与报告成效

NI 的“自建对比购买”比较报告称，使用现成测试执行程序的用户可节省 75% 的开发时间，减少 67% 的维护工作，并行测试使生产力提升 97%，该数据来自其对自建与购买测试执行程序的财务比较。<sup>[1](https://www.ni.com/teststand/whatis/)</sup>

已发表的案例研究描述了其在电子、音频、航空航天和电池测试领域的应用。[德州仪器](https://www.edgepedia.org/zh/texas-instruments)（Texas Instruments）射频部门基于 TestStand 和 LabVIEW 构建了其自动化表征环境（ACE），该公司称该环境支撑了其 40 亿美元的射频业务；一位德州仪器工程师报告称，将手动测试流程改造后，回归测试周期从数周缩短到数天。GN Audio 在全球六个制造基地统一采用 TestStand，将测试开发时间从数月缩短到数周，测试覆盖率提升至原来的 2.5 倍。[洛克希德·马丁](https://www.edgepedia.org/zh/lockheed-martin)（Lockheed Martin）在 F-35 航电测试中统一采用 TestStand，据报告节省了数百万美元，并在此项目生命周期内可能再节省数亿美元。<sup>[1](https://www.ni.com/teststand/whatis/)</sup>

## 替代方案

开源测试执行程序占据同一细分领域，但各有取舍。OpenTAP 是一款开源 .NET 序列器，通过插件扩展，测试计划以 XML 存储，在代码审查中便于对比差异；OpenHTF 是源自谷歌的 Python 硬件测试框架；pytest 是一款通用 Python 运行器，可用于台架测试。与 TestStand 相比，这些工具将更多的操作员界面、结果存储和部署工作留给用户，但不产生按席位授权费用。TestFlow 的一项比较指出，一个拥有两名开发人员和十二个生产工站的实验室使用 OpenTAP 无需付费，而 TestStand 每年需五位数金额，其中大部分为部署许可；但该比较也认可 TestStand 拥有更强大的操作员界面、成熟的多被测单元并行模型、更大的内置步骤类型库，以及在航空航天、国防和医疗等受监管行业中数十年的部署经验。<sup>[3](https://www.galoislabs.ai/blog/test-executive-comparison)</sup><sup> • </sup><sup>[9](https://www.testflowinc.com/blog/opentap-vs-teststand)</sup>

## References

1. [What Is NI TestStand? – NI](https://www.ni.com/teststand/whatis/)
2. [TestStand Overview – NI TestStand User Manual](https://www.ni.com/docs/en-US/csh?context=ts_9420)
3. [OpenHTF vs OpenTAP vs pytest vs TestStand: choosing a test executive – Galois Labs](https://www.galoislabs.ai/blog/test-executive-comparison)
4. [NI TestStand System and Architecture Overview Card – NI](https://download.ni.com/support/manuals/373457f.pdf)
5. [Guide to Effective Test Software Development with TestStand – NI](https://www.ni.com/en-us/support/documentation/supplemental/06/guide-to-effective-test-software-development-with-teststand.html)
6. [TestStand Process Model Development and Customization – NI](https://www.ni.com/en/support/documentation/supplemental/08/teststand-process-model-development-and-customization.html)
7. [TestStand Release Notes – NI](https://www.ni.com/en/support/documentation/release-notes/product.teststand.html)
8. [TestStand Compatibility with LabVIEW and LabWindows/CVI – NI](https://www.ni.com/en/support/documentation/compatibility/18/teststand-compatibility-with-labview-and-labwindows--cvi-.html)
9. [OpenTAP vs NI TestStand in 2026 – TestFlow](https://www.testflowinc.com/blog/opentap-vs-teststand)
10. [TestStand System Deployment Best Practices](https://www.ni.com/en/support/documentation/supplemental/08/teststand-system-deployment-best-practices.html)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Software engineering and development process › Software testing and quality › Test infrastructure and tooling

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/teststand

English original: https://www.edgepedia.org/teststand
