embeint.htf
Station runtime

Custom stages

Extend a station with product-specific test logic.

Built-in stages cover common actions such as printing, programming, validation, and HTTP calls. A product can register its own stage factory when a jig needs logic specific to its hardware.

The sample runtime constructs a BasicStation with a map of custom stage kinds:

from embeint_htf_station.stages import StageFactory
from embeint_htf_station.stations import BasicStation

stage_factories: dict[str, StageFactory] = {
    # "my-stage-kind": MyStage,
}
station = BasicStation(settings, stage_factories=stage_factories)

Add the stage implementation to your station application, register its kind, then use that kind in the YAML plan. Keep pass and fail criteria explicit and make each stage report enough context to diagnose a failed DUT without rerunning it blindly.

In runtime v0.3.0, call context.capture("device.serial_number", serial_number) to attach a structured value to the test report. See Capture DUT values for verification rules, limits, and the local report helper.

If the stage calls context.require_secret("NAME"), declare required_secrets: [NAME] in its YAML. The runtime checks all declared secret dependencies for the lane's plan before executing any stage. See Credentials and secrets.

Use the samples in your station repository checkout as the current reference for stage configuration and runtime APIs.