OpenHTF Integration

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.

Learn more about OpenHTF

With just one line added to your OpenHTF scripts, TofuPilot open-source Python client automatically creates a run on TofuPilot, parsing the test phases, measurements, and attachments, while storing the original OpenHTF JSON log for traceability.

Installation

  1. Create a TofuPilot account

  2. Install OpenHTF and create your test script

  3. Install the TofuPilot open-source Python client:

pip install tofupilot

Add it to your test like this:

main.py

import openhtf as htf
from tofupilot.openhtf import TofuPilot

def phase_one(test):
    return htf.PhaseResult.CONTINUE

def main():
    test = htf.Test(phase_one)
    with TofuPilot(test):
      test.execute(lambda: "PCB001")

if __name__ == '__main__':
    main()

The integration automatically uploads your OpenHTF report to your TofuPilot account using the DUT's serial number dut_id.

Run page showing the different steps performed for a Unit Under Test (UUT) in OpenHTF with TofuPilot.

Discover OpenHTF features and TofuPilot integration in the dedicated documentation maintained by our team.

Learn more about OpenHTF

Advanced

Supported features

Below is a table of the supported OpenHTF features when using TofuPilot.

OpenHTF featuresTofuPilot support
PhasesPhases
Sub-phases
MeasurementsNumeric measurement
Boolean measurement
String measurement
Limits
Units
AttachmentsFile
File from path

We are continually adding more capabilities to the integration.

Was this page helpful?