pytest, OpenHTF, HardPy, TofuPilot, OpenTAP, Robot Framework, and TestFlow ranked for Python test stations on license, sequencing, operator UI, data, and drivers, each checked against the project's own repository.

The main Python hardware test frameworks in 2026 are pytest with plugins, OpenHTF, HardPy, the TofuPilot framework, OpenTAP with its Python plugin, and Robot Framework, plus TestFlow as the AI agent option that builds the test for you. pytest stays the default for engineer-run validation. OpenHTF and the TofuPilot framework are the strongest pytest alternatives for production stations that need phases, measurements with limits, and operator prompts, and HardPy keeps pytest while adding an operator panel and a results database.
This guide is for engineers building a production or validation test station in Python, often after leaving LabVIEW or NI TestStand. Every license, release, and price below was checked on the project's own GitHub repository or website on November 24, 2026. For the wider Python stack underneath these frameworks, start with the Python instrument control guide.
A unit-test runner and a station framework overlap by about half. pytest was built to test software, and the gaps show up the first time a technician, not an engineer, starts a run.
Score every option on six jobs:
Sequencing. Ordered steps, setup and teardown that always run, retries, and a clear rule for what a failed step does to the rest of the run.
Measurements with limits. A named value, a unit, a lower and upper bound, and a verdict, recorded as data rather than buried inside an assert.
Operator UI. A screen where a technician scans a serial number, follows prompts, and reads PASS or FAIL.
Data and reports. A per-run record in a stable schema, stored somewhere that can answer cross-unit questions in a year.
Instrument drivers. What the framework gives you for the power supply, DMM, and scope. For most of this list the answer is nothing, and you bring PyVISA.
License. MIT and Apache-2.0 are permissive. GPL-3.0 is copyleft and MPL-2.0 is file-level copyleft, which matters the day you sell a tester with the framework inside it.
If you only need jobs 1 and 2, plain pytest is enough. Jobs 3 and 4 are where the frameworks below earn their place, and the test sequencer comparison covers the same split from the TestStand side.
Ranked for a team that writes Python and needs a station someone else can run. TestFlow sits second because it answers a different question from the rest: who writes the test in the first place.
What it is. The standard Python test runner, maintained by the pytest-dev community. Version 9.2.0 shipped on October 27, 2026, and the README lists Python 3.10 or newer as the requirement.
pytest-order runs tests in a set order and pytest-rerunfailures re-runs failed tests.--junit-xml writes a JUnit XML file that Jenkins and other CI servers read, and the pytest-html plugin renders an HTML report.The reporting command, as pytest's documentation gives it:
pytest --junit-xml=pathWho it fits. Engineer-run validation and characterization, hardware checks in CI, and any team that plans to add an operator layer later. HardPy and TofuPilot both sit on top of pytest, so starting here closes no doors. The catch: limits live in code, so changing a bound is a code change and a review.
What it is. An AI agent for electronics testing from TestFlow (testflowinc.com). You describe the test, naming the instruments, set points, and limits, and the agent builds a reviewable workflow and the Python for your instrument models, runs it on the bench, and writes the report from the measured results.
Honest limits. Bench runs need the Windows 10 or 11 desktop app; the web app builds and simulates. TestFlow covers only a few NI DAQ devices, and it is not a full test executive: there is no operator and user management and no database connectivity.
Who it fits. Teams where writing the test is the bottleneck, mixed-vendor benches, and LabVIEW or TestStand shops that want working automation next to what they already run. The line-by-line trade-off against a hand-written script is in TestFlow vs Python and PyVISA.

What it is. "The open-source hardware testing framework", hosted under Google's GitHub organization. Its README states plainly that it is not an official Google product. Version 1.6.3 shipped on October 8, 2026, and commits landed through November 2026, including a phase graph example and Mermaid flowchart visualization of test recipes.
Test with phases, which are plain Python callables. The repository's examples cover phase groups, phase branches, checkpoints, repeats, and stop on first failure.in_range (including marginal bands), units, and dimensions. Any measurement out of spec fails the run.user_input plug that prompts the operator for a DUT ID at test start.json_factory and a console summary, and you can write your own. Each run produces a test record with measurements, attachments, and an outcome.A validated measurement, from OpenHTF's examples/measurements.py with the comments removed:
import openhtf as htf
@htf.measures(
htf.Measurement('validated_measurement')
.in_range(0, 10)
.doc('This measurement is validated.')
.with_units(htf.units.SECOND)
)
def measure_seconds(test):
test.measurements.validated_measurement = 5Who it fits. Code-first teams building manufacturing stations who want a measurement model stricter than assert, and who are comfortable writing their own plugs.
What it is. A Python library "for creating a test bench for devices", built as a pytest plugin and published under the everypinio GitHub account, which also points users to its StandCloud analytics service. Version 0.25.2 shipped on June 9, 2026, and that was also the latest commit on its main branch when checked on November 24, 2026.
hardpy run on port 8000, with start and stop, dialog boxes with text, numeric, and checkbox widgets, operator messages, language switching, and test history. It opens on a tablet or phone while the tests run on the host PC.A measurement with limits, trimmed from HardPy's examples/measurement/test_1.py:
import pytest
from hardpy import (
ComparisonOperation as CompOp,
NumericMeasurement,
set_case_measurement,
)
@pytest.mark.case_name("Advanced numeric measurements")
def test_advanced_numeric_measurements():
voltage_meas = NumericMeasurement(
name="Voltage",
value=1.2,
unit="V",
operation=CompOp.GELE,
lower_limit=1.0,
upper_limit=1.5,
)
set_case_measurement(voltage_meas)Who it fits. pytest teams that need an operator panel and a results store this quarter without rewriting tests. If you ship stations to customers, have the GPL-3.0 terms reviewed before HardPy goes inside the product.
What it is. A test data platform for hardware production from a team based in Lausanne, Switzerland, plus an open-source framework of its own. The platform adds unit traceability, alerts, and AI investigations across runs; the framework executes the procedures.
Who it fits. Production lines with several stations, where yield and traceability across thousands of units matter more than any single run. It pairs with OpenHTF or pytest as readily as with its own framework, which is why it ranks here as a data layer rather than a sequencer.
What it is. An open-source .NET test sequencer, copyright Keysight Technologies, and the engine underneath Keysight's commercial PathWave Test Automation. The core repository's latest tag is v9.35.3, dated November 6, 2026.
tap command line, and a package manager for plugins.ScpiInstrument base class you subclass, plus plugin packages.The Python test step from the OpenTap.Python project template. Note the .NET types:
from opentap import *
from System import Int32
import OpenTap
@attribute(OpenTap.Display("Test Step Example", "A simple python test step", "OpenTap.Python.ProjectTemplate"))
class TestStepExample (TestStep):
Number = property(Int32, 1000)
def __init__(self):
super(TestStepExample, self).__init__()
def Run(self):
self.log.Debug("Number: {0}", Int32(self.Number))Who it fits. Teams on Keysight's stack, or with C# skills on staff, who want a real sequencer without per-station fees. The engine comparison against the incumbent is in OpenTAP vs NI TestStand, and the commercial wrapper is covered in Keysight PathWave alternatives.
What it is. A generic keyword-driven automation framework for acceptance testing and RPA, implemented in Python and sponsored by the non-profit Robot Framework Foundation. Version 7.5.1 shipped on November 2, 2026.
rebot to merge and post-process results.Who it fits. Teams where sequences must be readable and editable by people who will not write Python, and where one suite spans hardware checks and system-level acceptance tests.
| pytest + plugins | TestFlow | OpenHTF | HardPy | TofuPilot | OpenTAP + Python | Robot Framework | |
|---|---|---|---|---|---|---|---|
| License | MIT | Commercial, free version | Apache-2.0 | GPL-3.0 | MIT framework, paid platform | MPL-2.0 core, Apache-2.0 plugin | Apache-2.0 |
| Test written as | Python functions | A description; agent builds steps | Python phases | pytest functions | Python phases + YAML | Python or C# steps | Keywords |
| Limits as data | In code, or via a plugin | Yes, per step | Yes, validators | Yes, measurement objects | Yes, measurements | Yes, in steps | In test tables |
| Operator UI | None | Exported EXE panel | Web GUI | Browser panel | Kiosk or browser | Developer's System GUI | None |
| Results | JUnit XML, HTML plugin | PDF, Word, Excel, Markdown, JSON, CSV | JSON, custom callbacks | CouchDB, JSON, StandCloud | Hosted platform | Result listeners | XML or JSON, HTML log and report |
| Database built in | No | No | No | CouchDB | Hosted | Via listener | No |
| Instrument drivers | Bring PyVISA | SCPI catalog, few DAQ | Plugs you write | Bring your own | Plugs you write | ScpiInstrument base class | Keywords you write |
| Per-station cost | $0 | See pricing | $0 | $0 | $50/month on Pro | $0 for the core | $0 |
No column wins every row. TestFlow is the only column where nobody writes the steps, and it pays for that with Windows-only bench runs, narrow DAQ support, and no database connectivity.
| Project | License | Latest release or tag | Date | Source |
|---|---|---|---|---|
| pytest | MIT | 9.2.0 | Oct 27, 2026 | github.com/pytest-dev/pytest |
| OpenHTF | Apache-2.0 | 1.6.3 | Oct 8, 2026 | github.com/google/openhtf |
| HardPy | GPL-3.0 | 0.25.2 | Jun 9, 2026 | github.com/everypinio/hardpy |
| TofuPilot framework | MIT | 2.0.0 | Oct 27, 2026 | github.com/tofupilot/framework |
| OpenTAP | MPL-2.0 | 9.35.3 | Nov 6, 2026 | github.com/opentap/opentap |
| OpenTap.Python | Apache-2.0 | 3.2.2 | Oct 28, 2026 | github.com/opentap/OpenTap.Python |
| Robot Framework | Apache-2.0 | 7.5.1 | Nov 2, 2026 | github.com/robotframework/robotframework |
Activity matters more than stars for a station you will run for five years. Six of the seven repositories above tagged a release in the last 60 days. HardPy's main branch has been quiet for five months, which is worth a question in its community channels before you commit a production line to it.
An engineer means pytest, or Robot Framework if the sequence must read like a checklist. A technician means OpenHTF, HardPy, the TofuPilot framework, or a commercial executive. This one question removes half the list.
If yes, do not rewrite it. Add HardPy for an operator panel and a local results store, or point it at TofuPilot through the pytest starter template for cross-station data. A rewrite into OpenHTF phases pays off only when you need its measurement model on every step.
One station and one engineer: a JSON or CSV file per run is fine. Many stations and yield questions: TofuPilot, or your own database fed by OpenHTF output callbacks, HardPy adapters, or OpenTAP result listeners. A signed report for a customer: you need report generation, not logging, and automated test report generation lists the fields a result row has to carry.
Every open-source option here costs $0 per station. TofuPilot Pro bills each station: two engineers and three stations is five billable units, or $250 a month before run overage. TestStand charges a deployment license per station, which NI software licensing costs breaks down. If you sell testers to customers, add the license review for GPL-3.0 and MPL-2.0 to the same line item.
If running is slow, a better framework helps. If writing is slow, every framework here leaves the work exactly where it was, because each one assumes an engineer authors every phase. That is the case for TestFlow: describe the measurement, review the workflow, run it, and keep the exported Python next to the rest of your code.
These tools combine more often than they compete. Four arrangements that follow directly from what each project documents:
The one combination to avoid is two sequencers fighting over the same instruments on one station. Pick one owner for the VISA sessions.
Five of the six open-source options ship no drivers for a bench power supply, DMM, or oscilloscope. OpenTAP comes closest with its ScpiInstrument base class and plugin packages, TestFlow carries an instrument catalog, and everyone else expects you to bring a driver layer. In practice that layer is PyVISA over a VISA backend, speaking SCPI.
Write one class per instrument model, once, and wrap it as whatever the framework expects: a pytest fixture, an OpenHTF plug, a TofuPilot plug, or a Robot Framework keyword library. The hardware knowledge then survives a framework change. Start with the pyVISA tutorial, compare driver libraries in Python instrument control libraries compared, and keep the SCPI command cheat sheet open while you write it. For worked examples, see automating multimeter measurements in Python and automating a Keysight power supply in Python.
DAQ cards are the exception. None of these frameworks changes the fact that an NI DAQmx board needs NI's driver, covered in DAQ with Python. The transport question, USB, LAN, or GPIB, is in GPIB vs USB vs LAN instrument control.
Most teams reading this are moving off NI tooling, not starting fresh. The concepts map closely, with two exceptions.
| TestStand concept | Closest Python equivalent |
|---|---|
| Sequence file | OpenHTF test, pytest module, TofuPilot procedure YAML |
| Step with limits | OpenHTF phase with a validated measurement, HardPy NumericMeasurement |
| Operator interface | OpenHTF web GUI, HardPy panel, TofuPilot kiosk |
| Code module (VI, DLL) | A Python driver class, wrapped as a plug or fixture |
| Database logging | CouchDB via HardPy, TofuPilot platform, or your own schema |
| User privileges | Check each framework line by line |
The two exceptions are run-time user privileges and shipped database schemas. TestStand provides both out of the box, and they are where Python frameworks differ most. If an auditor asks who ran the test and with what rights, settle that before migrating. The TestStand guide collects the full picture, TestStand pricing puts numbers on the licenses you would retire, and NI TestStand alternatives covers the commercial options too.
On the LabVIEW side, LabVIEW to Python migration is the step-by-step path, and LabVIEW vs Python is the honest trade-off for a team that has not decided yet. TestFlow works alongside both rather than requiring a rewrite; TestFlow vs TestStand shows exactly what it does and does not replace.
Python frameworks decide how a test runs and where its data lands. TestFlow works one step earlier, turning a description of the measurement into a reviewable workflow that runs on your bench.
Connect your instruments. Pick the manufacturer and model, paste the VISA address (USB, LAN, GPIB, or serial), and the agent knows what is on your bench. No bench yet? Use a placeholder address, build the full automation, and swap in the real address when you are in the lab.
Tell the agent what to test. For example, "run a VI sweep from 1 to 10 V in 1 V steps at 0.5 A load current," or "suggest the tests for a power-management device."
The agent builds the complete workflow in seconds. Instrument-aware automation appears on the canvas, with the generated scripts visible in a code panel you can inspect and edit.
Run it in your lab. Click Run in the TestFlow desktop app for Windows and the status panel streams results step by step, with measured values inline (VOUT = 3.301 V, asserted 3.2 to 3.4 V, PASS). One click exports a structured PDF report, or the raw results as CSV.


The step-by-step walkthrough, VISA address formats, and Test Planner prompts are all in the TestFlow product guide.
OpenHTF and the TofuPilot framework are the strongest code-first alternatives for production stations, because they add phases, measurements with limits, and operator prompts. OpenTAP with its Python plugin is a full sequencer, Robot Framework suits keyword-driven suites, and TestFlow builds the test from a description. HardPy is not a replacement: it runs on pytest and adds an operator panel and a results store.
Yes. OpenHTF 1.6.3 shipped on October 8, 2026, and commits landed in November 2026. It is Apache-2.0 licensed and hosted under Google's GitHub organization, although its README states that it is not an official Google product.
Yes. Fixtures hold instrument sessions with setup and teardown, parametrization turns one test into a matrix, and pytest --junit-xml writes results a CI server reads. pytest ships no operator UI and no instrument drivers, so production stations usually add HardPy or TofuPilot on top and use PyVISA underneath.
The TofuPilot framework and its client SDKs are MIT licensed. The hosted platform has a free Lab plan with one paid seat, one station, and 100 runs a month. Pro costs $50 a month per paid seat and per station, with 1,000 runs included and $0.01 per run after that. Enterprise is custom priced and is the only plan with self-hosting.
For a code-first team, OpenHTF or the TofuPilot framework, since both model phases, measurements with limits, and operator prompts. For a team with an existing pytest suite, HardPy adds a panel without a rewrite. If the line needs run-time user privileges and shipped database schemas, NI TestStand provides both out of the box, so check each option here against those two needs before you move.
TestFlow is an AI agent that builds the bench test from a description, runs it on SCPI instruments through a Windows desktop app, and writes the report from measured results. It exports a standalone Python package. Its DAQ card coverage is limited to a few NI devices and has no operator and user management or database connectivity, so it sits next to a framework rather than replacing a production executive.

Article by
Ali Kamaly is the Co-Founder and CEO of TestFlow, an AI-native platform for electronics test automation. He writes about test automation, lab validation, and the infrastructure behind modern hardware engineering.
Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.