Skip to content

Test protocol

Ralf Steinert edited this page Nov 26, 2026 · 1 revision

The HTML report is for the engineer at the bench. The test protocol is the document that goes with the unit: into the device history record, to the customer, into the binder next to the line. Since 0.4.0 every run writes one, made with test-protocol from the run's result.json.

First page of the protocol of a unit with a worn SSD

What is in it

  • the verdict, large, at the top right
  • unit, product, station, operator and start time
  • a summary with the failed checks first, so nobody has to search for them
  • every step with its measurements, limits and a small gauge showing where a value sits inside its tolerance band
  • the full console log and the instrument identities as attachments
  • the SHA-256 of result.json, so the protocol can be traced back to the raw data
  • signature boxes for "Tested by" and, optionally, "Approved by"

Setting it up

The protocol section of station.yaml:

protocol:
  product: "EPC-24 panel PC, 12 V"
  lang: en                   # en or de
  approver: true             # adds an "Approved by" signature box
  company: "Your company"
  logo: logo.svg             # PNG, JPEG or SVG, relative to station.yaml
  title: "Final inspection"  # instead of "Test protocol"

Leave the section out and no protocol is written. An empty section (protocol: {}) writes one with the defaults.

Operator and PDF

bench run --operator "J. Doe" --pdf

--operator fills the name in the "Tested by" box. --pdf also writes protocol.pdf; it needs either WeasyPrint (pip install weasyprint) or Chrome, Chromium or Edge on the machine. Without one, the HTML protocol is still written and the station prints a warning — the verdict and the exit code of the run do not change because of a missing printout.

In German

lang: de gives a "Prüfprotokoll" with German headings, dates and decimal commas. The step and measurement names come from the station and stay as they are.

Adding more results to one protocol

test-protocol can merge several result files of one unit into one protocol, for example the bench test and the interface-test-kit result of the same board. That is a separate call after both tests:

test-protocol reports/EPC-24-00137_*/result.json itk-run/result.json \
    --html EPC-24-00137.html --operator "J. Doe" --approver

Both files must carry the same serial number; test-protocol stops if they do not.

Clone this wiki locally