product: maestro
audience: test-developer
authority: normative
Composition Patterns
Pattern A — Critical-path with early termination
steps:
- name: "Power supply on"
type: mock
post_execution_action: terminate-on-fail
- name: "Core rail check"
type: mock
measurement:
name: "VCORE"
target: 1.20
low_limit: 1.10
high_limit: 1.30
unit: "V"
post_execution_action: terminate-on-fail
- name: "Non-critical check"
type: mock
measurement:
name: "AUX_5V"
target: 5.0
low_limit: 4.5
high_limit: 5.5
unit: "V"
# no post_execution_action → continues even on fail
Pattern B — Feature-flag gated phases
variables:
runCalibration: true
runExtendedTests: false
steps:
- name: "Calibration"
type: mock
precondition: "runCalibration == true"
- name: "Extended thermal soak"
type: mock
precondition: "runExtendedTests == true"
Pattern C — Cross-package instrument driver
steps:
- name: "Init DMM"
type: sequence
sequence: "shared-dmm-driver/tests/init.yaml"
parameters:
dmm_address: "TCPIP::192.168.1.50::INSTR"
outputs:
dmm_serial: "{{dmm_serial}}"
- name: "Measure rail"
type: sequence
sequence: "shared-dmm-driver/tests/measure-voltage.yaml"
parameters:
channel: "CH1"
expected_voltage: "3.3"
outputs:
rail_voltage: "{{measured_voltage}}"
Pattern D — Retry with timeout
- name: "Connect to device"
runner: dotnet
runner_type: net10.0
assembly: "BoardTests.dll"
class: "BoardTests.Comms"
method: "Connect"
retry:
count: 2
delay_ms: 1000
timeout_ms: 5000
post_execution_action: terminate-on-fail
Pattern E — Guaranteed cleanup on abort
steps:
- name: "Run test suite"
runner: dotnet
runner_type: net10.0
assembly: "Tests.dll"
class: "Tests.Functional"
method: "RunAll"
timeout_ms: 60000
- name: "Power down (always)"
runner: dotnet
runner_type: net10.0
assembly: "Tests.dll"
class: "Tests.Cleanup"
method: "PowerDown"
run_on_abort: true
Pattern F — Operator inspection gate
- name: "Solder inspection"
type: prompt
prompt:
title: "Connector J5"
message: "Are all solder joints clean and shiny?"
buttons:
- name: "YES"
action: pass
- name: "NO"
action: fail
post_execution_action: terminate-on-fail
Pattern G — Measurement sweep with repeat loop
- name: "Voltage sweep"
runner: python
runner_type: python3.11
module: "sweep"
function: "measure_at_step"
parameters:
step: "{{__iteration__}}"
outputs:
measured_v: "{{voltage}}"
repeat:
condition: "__iteration__ < 4"
max_iterations: 10
measurement:
name: "VSWEEP_CYCLE{{__cycle__}}" # produces VSWEEP_CYCLE1, VSWEEP_CYCLE2, …
value: "{{measured_v}}"
low_limit: 4.80
high_limit: 5.20
unit: "V"