Examples

OpenHTF Examples

Runnable OpenHTF example scripts, one per feature — hello world, measurements, plugs, phase groups, branches, checkpoints, repeat, stop on first failure, custom JSON output, Operator UI — each explained line by line.

Last updated · Verified with OpenHTF 1.6.1

The OpenHTF repository ships an examples/ directory. Each page below takes one of those scripts, trims the boilerplate, explains what it demonstrates and shows its output. All were run against OpenHTF 1.6.1.

Terminal
pip install "openhtf[examples]"        # pandas, for measurements.py
python hello_world.py

Start here

Feature showcases

Tutorial

The resistor tutorial builds a complete test with two instrument plugs and a simulation mode, step by step.

Conventions used in these pages

  • Scripts are shown as single files you can copy. Where upstream imports a sibling module (example_plugs, examples.measurements) the needed code is inlined.
  • Output blocks are trimmed to the relevant lines; timestamps and paths vary.
  • Scripts that prompt the operator (prompt_for_test_start, UserInput.prompt) are run from a terminal; the Operator UI shows the same prompts in the browser.

On this page

First-pass yield
0%4.1
Track with TofuPilot