Test Plan YAML definition
In-circuit and Finished Goods (FG) test plans can be transcribed as PLT test plan (.YAML) files.
Example: A minimal test suite, with a single test item, scanning a bar code.
title: "PLT demo: Scan"
suite:
- ident: SCAN-T1
title: Scan MAC address
steps:
- command: scan ANY
Test Plan Structure
PLT test suites are encoded as YAML text files, starting with the test suite title.
title: "PLT demo: Scan"
The title:
is followed by the suite:
section, containing the test
items in the test plan.
Test Items
Test items are identified with an ident:
line, can contain
a descriptive title
, and should contain one or more test item steps.
Tip
The ident: field can be used to match PLT test plan items with items in the ICT and FG Test Plan .XLSX files or documents.
The ident:
field can be omitted, in which case test items will be
automatically enumerated. A top-level identPrefix:
field can be
used to set common prefix for auto-generated test item identifiers.
During test execution, all test item steps need to complete successfully for the test item to succeed.
Test Item Steps
Test item steps consist of command:
blocks.
A Test Item can contain multiple Test Item steps.
Retries
Retry counts can be set at the test item or at the test item step level,
by adding a retry:
field.
title: "Retries"
identPrefix: "R"
suite:
- title: Test Item retries
retry: 3
steps:
- command: sleepms 1000
- command: operator Manual
- title: Test Item retries
steps:
- command: sleepms 1000
- command: operator Manual
retry: 3
Timeouts
Timeouts can be set at the test item or at the test item step level,
by adding a timeout:
field.
title: Basic timeout field usage
suite:
- steps:
- command: operator "Confirm"
timeout: 5s
The timeout can be can be expressed in milliseconds, which is the default unit, or by using suffixes such as:
“400ms” for 400 milliseconds.
“5s” for a 5-second timeout.
“1m” for a timeout of 1 minute.
Teardown Section
The optional teardown:
section defines cleanup steps
after test execution, such as resetting equipment or powering down devices.
Example:
title: Simple Test Plan with Teardown
suite:
- title: Perform Test
steps:
- command: pin RDTP01 output high
- command: operator "Run test"
teardown:
steps:
- command: pin RDTP01 output low
Calibration Section
Some test setups may require additional calibration, which can be specified
in the YAML test plan with an optional top-level calibration:
section.
calibration:
- [ppc: <ppcID>]
[impedance: <impedanceOffset>]
[voltage: <voltageOffset>]
[voltageDATP07: <voltageOffset>]
[voltageDATP08: <voltageOffset>]
[voltageDATP09: <voltageOffset>]
[voltageDATP10: <voltageOffset>]
[voltageDATP11: <voltageOffset>]
[voltageDATP12: <voltageOffset>]
[voltageMUX0: <voltageOffset>]
[voltageMUX1: <voltageOffset>]
[voltageMUX2: <voltageOffset>]
[voltageMUX3: <voltageOffset>]
[current: <currentOffset>]
[current3V3: <currentOffset>]
[current5V: <currentOffset>]
[currentVARV: <currentOffset>]
- ...
The following fields can be set in a calibration entry:
Field |
Description |
---|---|
|
Define the PPC for which this calibration entry should be applied. If omitted, the section defines the default offsets, to which a PPC-specific calibration section would be added. |
|
Specifies the offset for impedance measurements. |
|
Specifies the offset for voltage measurements. |
|
Specifies the offset for voltage measurements on the
|
|
Specifies the offset for voltage measurements on the
|
|
Specifies the offset for voltage measurements on the
|
|
Specifies the offset for voltage measurements on the
|
|
Specifies the offset for voltage measurements on the
|
|
Specifies the offset for voltage measurements on the
|
|
Specifies the offset for voltage measurements on the
|
|
Specifies the offset for voltage measurements on the
|
|
Specifies the offset for voltage measurements on the
|
|
Specifies the offset for voltage measurements of the
|
|
Specifies the offset for current measurements. |
|
Specifies the offset for current measurements of the
|
|
Specifies the offset for current measurements of the
|
|
Specifies the offset for current measurements of the
|
With the following argument values:
Argument |
Description |
---|---|
ppcID |
PPC identifier for a |
impedanceOffset |
Offset for impedance measurements.
Can be specified with |
voltageOffset |
Offset for voltage measurements.
Can be specified with |
currentOffset |
Offset for current measurements. Can be specified with
|
Example:
title: "test plan with calibration"
identPrefix: "ICT-T"
calibration:
# Default offsets
- impedance: -100 # 100 Ohm
voltage: +20mV # Default for all voltage channels
voltageDATP01: +40mV
voltageMUX2: +20mV
voltageMUX3: +30mV
currentVARV: -20mA
# Additional offsets specific to a particular PPC
- ppc: 39c8db # Additional offsets for this PPC
impedance: +120Ohm
voltageDATP08: -10mV
current5V: +100mA
suite:
- title: Impedance Measurement
steps:
- command: mux 0 RATP02
- command: mux 1 RATP17
- command: mux 2 RA
- command: mux 3 RVREF
- command: short 0 2 set
- command: short 1 3 set
- command: measure impedance 10-20Ohm
runs-on section
An optional runs-on:
section allows specifying test execution
constraints.
Example: test plan requiring PLT-OS v1.9
runs-on:
version: "1.9"
suite:
- steps:
- command: operator "Hello"
Example: Complex constraints
title: Complex constraints
runs-on:
# Supported PLT-OS version(s)
version:
# Multiple version constraints can be provided (OR)
- "1.2.3"
- "~> 2.0"
# Comma-separate constraints (AND)
- ">= 5.0.0, < 7.2.3"
# Only on PLTs with attached PPCs with any of these IDs
ppc:
- "a32fa1"
- "323213"
model:
- "PLT-200A"
- "PLT-300A"
suite:
- steps:
- command: sleepms 1000