Skip to content
Scaling & Monitoring

CI/CD for Hardware Testing with TofuPilot

Learn how to integrate hardware test automation into CI/CD pipelines using TofuPilot for continuous validation and gating.

JJulien Buteau
advanced12 min readMarch 13, 2026

CI/CD for Hardware Testing with TofuPilot

Software teams have had CI/CD for years. Hardware teams still gate releases with spreadsheets and manual sign-offs. TofuPilot bridges that gap by treating hardware test results as pipeline artifacts, so you can automate validation the same way you automate builds.

Why CI/CD Matters for Hardware

Hardware test data is the equivalent of a software test suite. Every unit that comes off the line runs through functional tests, calibration checks, and environmental screens. The question isn't whether you have tests. It's whether you can automatically block a shipment when test data says "stop."

Traditional hardware workflows rely on someone reviewing a report. CI/CD for hardware means the pipeline reviews the data and makes the call.

Architecture

┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ Test Station │────▶│ TofuPilot │────▶│ CI/CD Gate │ │ (OpenHTF / │ │ (Results │ │ (Pass/Fail │ │ pytest) │ │ + API) │ │ Decision) │ └──────────────┘ └──────────────┘ └──────────────┘

Test stations push results to TofuPilot. Your CI/CD system queries TofuPilot's API to check whether a batch meets release criteria.

Setting Up Continuous Hardware Validation

Step 1: Push Results from Test Stations

Every test run uploads to TofuPilot automatically. If you're using OpenHTF, add the TofuPilot output callback. If you're using pytest or a custom framework, use the Python client.

station_test.py
from tofupilot import TofuPilotClient

client = TofuPilotClient()

client.create_run(
    procedure_id="EVT-POWER-CYCLE",
    unit_under_test={"serial_number": "UNIT-4521"},
    run_passed=True,
    steps=[{
        "name": "Power Rail Check",
        "step_type": "measurement",
        "status": True,
        "measurements": [{
            "name": "vcc_3v3",
            "value": 3.31,
            "unit": "V",
            "limit_low": 3.25,
            "limit_high": 3.35,
        }],
    }],
)

Step 2: Query Results in Your Pipeline

Use TofuPilot's API to check batch-level pass rates before allowing a release to proceed.

ci_gate.py
# CI/CD gate script: check batch FPY before release
import requests
import sys

API_KEY = os.environ["TOFUPILOT_API_KEY"]
PROCEDURE = "EVT-POWER-CYCLE"
MIN_FPY = 0.95
MIN_UNITS = 50

response = requests.get(
    "https://app.tofupilot.com/api/v1/runs",
    headers={"Authorization": f"Bearer {API_KEY}"},
    params={"procedure_id": PROCEDURE, "limit": 200},
)

runs = response.json()
passed = sum(1 for r in runs if r["run_passed"])
total = len(runs)
fpy = passed / total if total > 0 else 0

print(f"FPY: {fpy:.1%} ({passed}/{total} units)")

if total < MIN_UNITS:
    print(f"Not enough units tested ({total} < {MIN_UNITS})")
    sys.exit(1)

if fpy < MIN_FPY:
    print(f"FPY below threshold ({fpy:.1%} < {MIN_FPY:.0%})")
    sys.exit(1)

print("Gate passed. Batch approved for release.")

Step 3: Integrate with GitHub Actions or GitLab CI

.github/workflows/hardware-gate.yml
name: Hardware Release Gate
on:
  workflow_dispatch:
    inputs:
      batch_id:
        description: "Batch to validate"
        required: true

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.11"
      - run: pip install requests
      - run: python ci_gate.py
        env:
          TOFUPILOT_API_KEY: ${{ secrets.TOFUPILOT_API_KEY }}

Gating Strategies

StrategyWhen to useHow it works
FPY thresholdProduction releaseBlock if first-pass yield drops below target
Zero critical failuresSafety-critical productsBlock if any critical measurement fails
Cpk minimumProcess validationBlock if process capability index is too low
Trend detectionEarly warningAlert if yield is declining over last N batches

Test Like You Fly

The aerospace principle of "test like you fly" means production tests should mirror real operating conditions. CI/CD for hardware makes this practical by automating the feedback loop:

  1. Run the same tests in EVT, DVT, and PVT
  2. Compare results across phases in TofuPilot
  3. Gate each phase transition on measured data, not opinions

When your DVT thermal cycling shows a 3% yield drop compared to EVT, TofuPilot's comparison dashboards surface it immediately. No waiting for someone to pull a report.

What This Replaces

Most hardware teams gate releases with a combination of Excel reports, email chains, and meeting sign-offs. CI/CD for hardware doesn't eliminate human judgment. It eliminates the manual data gathering that delays judgment. Engineers spend time analyzing instead of aggregating.

More Guides

Put this guide into practice