Open Source Test Executive Alternatives
NI TestStand costs $3-5K per seat and runs only on Windows. Engineers are searching for open source alternatives that run on Linux, integrate with Git, and don't require proprietary licenses. This guide compares the main open source test executives for manufacturing: OpenHTF, OpenTAP, pytest (with hardware plugins), and HardPy.
What a Test Executive Does
A test executive manages the execution of test sequences. It handles:
| Function | What It Does |
|---|---|
| Sequencing | Runs test steps in order with branching and looping |
| Measurement collection | Records values with units and limits |
| Pass/fail decisions | Compares measurements to limits, determines result |
| Operator interaction | Prompts for input, displays status |
| Data logging | Stores results for traceability and analytics |
| Plug/driver management | Initializes and tears down instrument connections |
TestStand does all of this in a proprietary Windows application. The open source alternatives do it in code.
Comparison Table
| Feature | NI TestStand | OpenHTF | OpenTAP | pytest + plugins | HardPy |
|---|---|---|---|---|---|
| Language | LabVIEW/C#/VB | Python | C#/.NET | Python | Python |
| License | Proprietary ($3-5K) | Apache 2.0 | MPL 2.0 | MIT | Apache 2.0 |
| Platform | Windows only | Windows/Linux/macOS | Windows/Linux | Windows/Linux/macOS | Windows/Linux/macOS |
| Origin | National Instruments | Keysight | Community | EverPin | |
| Measurements with limits | Yes | Yes | Yes | Via plugins | Yes |
| Phase/step sequencing | Visual editor | Python decorators | C# classes | Test functions | Test functions |
| Operator UI | Built-in OIs | Station Server | Operator Panel | None built-in | Browser panel |
| Instrument plugins | NI drivers | Plugs system | DUT/Instrument plugins | Fixtures | Fixtures |
| Data export | ATML, custom | JSON, protobuf | CSV, custom | JUnit XML | JSON |
| Version control | Difficult (binary) | Git-native | Git-native | Git-native | Git-native |
| Community | Large (NI forums) | Small (GitHub) | Small (forum) | Large (general pytest) | Tiny |
OpenHTF
OpenHTF is Google's open source test framework for manufacturing. It was built for testing consumer electronics at scale.
Strengths
- Python-native. Tests are Python functions decorated with measurements. No visual editor, no XML, no binary files.
- Plug system. Instruments are injected into test phases automatically. Plugs handle initialization and teardown.
- Measurement validators. Built-in support for ranges, tolerances, regex, and exact match.
- Station Server. Web-based operator interface at
localhost:12000. - TofuPilot integration. Full operator UI, data logging, and analytics via the TofuPilot SDK.
Weaknesses
- Documentation. Official docs from Google don't exist. The community (via openhtf.org) fills the gap.
- Community size. ~640 GitHub stars, low Stack Overflow presence.
- Built-in UI. The Station Server is functional but basic. Most production deployments use TofuPilot for the operator interface.
Example
import openhtf as htf
from openhtf.util import units
@htf.measures(
htf.Measurement("voltage_V")
.in_range(minimum=4.9, maximum=5.1)
.with_units(units.VOLT),
)
def phase_voltage_check(test):
"""Measure and validate supply voltage."""
test.measurements.voltage_V = 5.01
test = htf.Test(phase_voltage_check)
test.execute(test_start=lambda: input("Scan serial: "))OpenTAP
OpenTAP is Keysight's open source test automation framework. It's written in C# and runs on .NET.
Strengths
- Keysight backing. Active development, commercial support available.
- Plugin ecosystem. DUT, instrument, and result listener plugins.
- Test plan editor. GUI for building test sequences without code.
- Cross-platform. Runs on Windows and Linux via .NET.
Weaknesses
- C#/.NET. Most test engineers prefer Python. .NET adds deployment complexity on Linux.
- Operator panel. Basic, requires Keysight Test Automation license for full features.
- Learning curve. Plugin architecture is powerful but complex for simple tests.
Example
[Display("Voltage Check", Description = "Measure supply voltage")]
public class VoltageCheck : TestStep
{
[Display("Voltage")]
[Unit("V")]
public double Voltage { get; set; }
public override void Run()
{
Voltage = 5.01;
if (Voltage < 4.9 || Voltage > 5.1)
UpgradeVerdict(Verdict.Fail);
else
UpgradeVerdict(Verdict.Pass);
}
}pytest with Hardware Plugins
pytest is the standard Python testing framework. With the right plugins, it can work for hardware testing.
Strengths
- Massive community. Most Python developers already know pytest.
- Fixture system. Handles instrument setup/teardown cleanly.
- Plugin ecosystem. Thousands of plugins for reporting, parallel execution, and CI integration.
- Low learning curve. If you know Python, you know pytest.
Weaknesses
- Not built for manufacturing. No built-in measurement system with limits, units, or validators.
- No operator UI. No prompts, no serial number input, no pass/fail display.
- No native data logging. Requires custom code or third-party tools to store results.
- Designed for software testing. Concepts like fixtures, marks, and parametrize don't map cleanly to hardware test sequences.
Example
def test_voltage_check(dmm_fixture):
"""Measure and validate supply voltage."""
voltage = dmm_fixture.measure_voltage()
assert 4.9 <= voltage <= 5.1, f"Voltage {voltage}V out of range"HardPy
HardPy adds a browser-based operator panel to pytest for hardware testing.
Strengths
- pytest-native. Tests are regular pytest functions with hardware-specific additions.
- Browser UI. Operator panel with test hierarchy, dialogs, and real-time charts.
- Measurement storage. Built-in CouchDB integration for test results.
- Modern stack. React frontend, clean API.
Weaknesses
- New project. Limited adoption, small community.
- Basic features. No measurement limit system, no marginal bands, no analytics.
- CouchDB dependency. Adds infrastructure complexity.
When to Use Each
| Situation | Recommendation |
|---|---|
| Starting a new production test system in Python | OpenHTF + TofuPilot |
| Already using pytest for hardware tests | Add TofuPilot SDK for data logging and operator UI |
| .NET shop with Keysight instruments | OpenTAP |
| Need the simplest possible operator panel | HardPy |
| Migrating from TestStand, want minimal change | OpenTAP (closest architecture) |
| Migrating from TestStand, want Python | OpenHTF + TofuPilot |
| Budget is zero, need it working today | OpenHTF with built-in Station Server |
| Need analytics, traceability, and operator UI | Any framework + TofuPilot |
Cost Comparison
| Solution | Software License | Per-Station Cost | Operator UI | Data Analytics |
|---|---|---|---|---|
| NI TestStand | $3-5K/seat | $3-5K | Included | NI InsightCM (extra) |
| OpenHTF + TofuPilot | Free | $0 | Included (all tiers) | Included |
| OpenTAP | Free (core) | $0 | Plugin (may need license) | Custom |
| pytest + TofuPilot | Free | $0 | Via TofuPilot | Included |
| HardPy | Free | $0 | Included | Basic |
The open source alternatives eliminate per-seat licensing. The total cost of ownership depends on engineering time to set up and maintain the system. Pre-built integrations (like TofuPilot's OpenHTF and pytest support) reduce that cost significantly.