OpenHTF
Integrate your OpenHTF scripts with TofuPilot in a single line.

Overview
OpenHTF is an open-source Python framework for automating hardware tests. It makes writing and running tests easier with a modular design. Built at Google, it's now used by teams around the world.
By adding a single line to your OpenHTF script, TofuPilot's open-source Python client automatically creates a run on TofuPilot, capturing the test phases, measurements, and attachments, and storing the original OpenHTF JSON log for traceability.
Installation
-
Install OpenHTF:
pip install openhtf six setuptools
- Install the TofuPilot open-source Python client:
pip install tofupilot
Add it to your test like this:
import openhtf as htf from tofupilot.openhtf import TofuPilot # Import OpenHTF for TofuPilot def phase_one(test): return htf.PhaseResult.CONTINUE def main(): test = htf.Test(phase_one) with TofuPilot(test): # One-line integration test.execute(lambda: "PCB1A001") if __name__ == "__main__": main()
Your OpenHTF reports are uploaded to your TofuPilot account using the Unit Under Test serial number dut_id
(e.g., "PCB001"), which you can find on the Runs page.

Supported features
We are continuously adding features to the integration. Below is a table of OpenHTF features currently supported by TofuPilot.
OpenHTF features | TofuPilot support | |
---|---|---|
Phases | Phases | ✅ |
Sub-phases | ✅ | |
Skipped phases | ✅ | |
Measurements | Numeric measurement | ✅ |
Boolean measurement | ✅ | |
String measurement | ✅ | |
Arbitrary measurement | ✅ | |
Limits | ✅ | |
Units | ✅ | |
Multiple measurements | ✅ | |
Attachments | File | ✅ |
File from path | ✅ | |
Output Callback | JSON Report | ✅ |
More documentation
Discover TofuPilot integrations in Test Runs sections and OpenHTF features in our dedicated documentation maintained by our team.
OpenHTF Documentation