Test Plan YAML definition

../../_images/suite.svg

PLT Test Plan (.YAML)

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

ppc:

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.

impedance:

Specifies the offset for impedance measurements.

voltage:

Specifies the offset for voltage measurements.

voltageDATP07:

Specifies the offset for voltage measurements on the voltageDATP07 measurement channel. Overrides the offset specified in the voltage: field.

voltageDATP08:

Specifies the offset for voltage measurements on the voltageDATP08 measurement channel. Overrides the offset specified in the voltage: field.

voltageDATP09:

Specifies the offset for voltage measurements on the voltageDATP09 measurement channel. Overrides the offset specified in the voltage: field.

voltageDATP10:

Specifies the offset for voltage measurements on the voltageDATP10 measurement channel. Overrides the offset specified in the voltage: field.

voltageDATP11:

Specifies the offset for voltage measurements on the voltageDATP11 measurement channel. Overrides the offset specified in the voltage: field.

voltageDATP12:

Specifies the offset for voltage measurements on the voltageDATP12 measurement channel. Overrides the offset specified in the voltage: field.

voltageMUX0:

Specifies the offset for voltage measurements on the voltageDATP09 measurement channel. Overrides the offset specified in the voltage: field.

voltageMUX1:

Specifies the offset for voltage measurements on the voltageDATP10 measurement channel. Overrides the offset specified in the voltage: field.

voltageMUX2:

Specifies the offset for voltage measurements on the voltageDATP11 measurement channel. Overrides the offset specified in the voltage: field.

voltageMUX3:

Specifies the offset for voltage measurements of the voltageDATP12 measurement channel. Overrides the offset specified in the voltage: field.

current:

Specifies the offset for current measurements.

current3V3:

Specifies the offset for current measurements of the current3V3 measurement channel. Overrides the offset specified in the current: field.

current5V:

Specifies the offset for current measurements of the current5V measurement channel. Overrides the offset specified in the current: field.

currentVARV:

Specifies the offset for current measurements of the currentVARV measurement channel. Overrides the offset specified in the current: field.

With the following argument values:

Argument

Description

ppcID

PPC identifier for a ppc: field, to define a calibration specific to a particular PPC.

impedanceOffset

Offset for impedance measurements. Can be specified with nOhm, uOhm/µOhm, mOhm, Ohm, kOhm/KOhm or MOhm suffixes. If no suffix is specified, the offset is assumed to be specified in Ohm.

voltageOffset

Offset for voltage measurements. Can be specified with nV, uV/µV, mV, V, kV/KV or MV suffixes. If no suffix is specified, the offset is assumed to be specified in Volt.

currentOffset

Offset for current measurements. Can be specified with nA, uA/µA, mA or A suffixes. If no suffix is specified, the offset is assumed to be specified in Ampere.

Example:

Example test plan with a Calibration Section
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

See also