Procedures

Last updated on July 28, 2026

A procedure is a YAML file that defines your complete test sequence: what to test, how to test it, and what measurements to collect.

File

You can use any name for your procedure file as long as it ends in .yaml or .yml.

procedure.yaml

The file name doesn't affect functionality.

Name

You must set a name for your test procedure.

name: Battery Functional Test

TofuPilot uses this name to identify the procedure in test reports and during execution. The dashboard procedure name is separate, since linking binds by id.

Version

You must set a version for your procedure. Semantic versioning (1.0.0) is recommended.

name: Battery Functional Test
version: 1.0.0

TofuPilot records this version with each test result for traceability.

The version is a label you bump yourself, unlike a deployment, which is built automatically from every commit. Several deployments can carry the same version.

Description

You can add an optional description to document what your procedure tests.

name: Battery Functional Test
version: 1.0.0
description: Validates battery voltage, capacity, and charge cycles

TofuPilot displays this description in test reports and the procedure overview.

Run Metadata

You can attach custom key-value metadata to a test run from any phase function by adding run as a parameter.

def set_metadata(run):
    run.metadata["line"] = "L3"
    run.metadata["fixture_rev"] = 7
    run.metadata["ambient_temp_c"] = 23.4

TofuPilot stores run metadata in test reports and syncs it to your Dashboard, where you can filter runs by any key.

Values can be strings, numbers, or booleans (strings up to 50000 characters). Keys are limited to 40 characters (letters, digits, and _ . : + -), with at most 50 keys per run. An assignment with an invalid key or value raises an error at the faulty line and fails the phase. Setting an existing key overwrites its value.

Each phase validates its own writes; if several phases collectively set more than 50 distinct keys, the upload keeps the first 50 in alphabetical order and logs a warning for the dropped keys.

To store metadata on the unit under test instead of the run, see Unit Metadata.

How is this guide?

On this page