What Is Acceptance Testing with TofuPilot
Acceptance testing verifies that a product meets the criteria agreed upon between supplier and customer before delivery. It's the contractual gate: if the unit passes, the customer accepts it. This guide covers what acceptance testing involves for hardware, how to build acceptance test procedures in Python, and how to generate auditable records with TofuPilot.
Types of Acceptance Testing
| Type | Who Runs It | Where | Purpose |
|---|---|---|---|
| FAT (Factory Acceptance Test) | Supplier | Supplier's facility | Prove it works before shipping |
| SAT (Site Acceptance Test) | Customer or supplier | Customer's facility | Prove it works after installation |
| ATP (Acceptance Test Procedure) | Either | Either | The documented test procedure itself |
FAT and SAT often run the same test procedure but in different environments. The ATP defines the exact steps, measurements, and pass/fail criteria both parties agreed to.
What Makes Acceptance Testing Different
Acceptance testing is not exploratory. Every step is pre-defined, and the customer typically reviews and approves the ATP before testing begins.
| Aspect | Acceptance Test | Production Test |
|---|---|---|
| Scope | Per contract requirements | Per design spec |
| Documentation | Formal report required | Internal records |
| Witness | Customer may be present | Internal only |
| Criteria | Contractually agreed limits | Engineering limits |
| Frequency | Per batch or per unit | Every unit |
The key difference: acceptance test limits come from the contract, not from engineering margins. They're often tighter than production limits because the customer specifies what they need, not what the design can do.
Prerequisites
- Python 3.10+
- OpenHTF installed (
pip install openhtf) - TofuPilot Python SDK installed (
pip install tofupilot)
Step 1: Define the Acceptance Criteria
Map each ATP requirement to an OpenHTF measurement with the contractual limits.
import openhtf as htf
from openhtf.util import units
@htf.measures(
htf.Measurement("output_power_W")
.in_range(minimum=95, maximum=105)
.with_units(units.WATT),
htf.Measurement("efficiency_percent")
.in_range(minimum=92)
.with_units(units.PERCENT),
)
def phase_power_output(test):
"""ATP Section 4.1: Output power and efficiency."""
test.measurements.output_power_W = 100.3
test.measurements.efficiency_percent = 94.7
@htf.measures(
htf.Measurement("ripple_voltage_mV")
.in_range(maximum=50)
.with_units(units.MILLIVOLT),
)
def phase_output_quality(test):
"""ATP Section 4.2: Output ripple at full load."""
test.measurements.ripple_voltage_mV = 32.1
@htf.measures(
htf.Measurement("leakage_current_uA")
.in_range(maximum=500)
.with_units(units.MICROAMPERE),
)
def phase_safety(test):
"""ATP Section 4.3: Leakage current per IEC 60950."""
test.measurements.leakage_current_uA = 120.0Step 2: Run the Acceptance Test
Connect the test to TofuPilot so every result is logged with the unit's serial number. This creates the traceability record the customer needs.
from tofupilot.openhtf import TofuPilot
test = htf.Test(
phase_power_output,
phase_output_quality,
phase_safety,
)
with TofuPilot(test):
test.execute(test_start=lambda: input("Scan unit serial: "))Step 3: Generate Acceptance Records
TofuPilot stores every measurement, limit, and pass/fail result per serial number. Open the unit's test history to see:
- Full test record with all measurements against contractual limits
- Pass/fail status for each ATP section
- Timestamps showing exactly when each test ran
- Test reports exportable for customer review and audits
This replaces the manual process of filling out ATP datasheets and scanning signed paper forms. The customer gets the same data in a format that's searchable and auditable.
Writing a Good ATP
A strong acceptance test procedure includes:
| Section | Content |
|---|---|
| Scope | What product, what revision, what contract |
| Equipment list | Instruments, fixtures, software versions |
| Environment | Temperature, humidity, power conditions |
| Test steps | Numbered, with exact setup and expected result |
| Pass/fail criteria | Numeric limits traceable to contract requirements |
| Data recording | What gets recorded, where, and in what format |
Keep the ATP stable. Changes require customer approval. Version-control the ATP alongside your test scripts in Git so the test procedure and the code stay in sync.