User Keys

Set User Key

- ident: ICT-T0
  title: Set variables
  steps:
  - command: define work_order 1011X02
- ident: ICT-T1
  title: Invoke webhook with work_order key
  steps:
  - command: webhook request

Commands

Extracting User Keys

Most commands support extracting the test value result in a user key, by specifying name of the user key as the value of an extractKey:: field.

Evaluate Expressions

PLT Test Plan: Evaluate Expressions
title: Evaluate Expressions
suite:
- title: Eval
  steps:
  - command: define test "AC1D"
  - command: eval "test != 'FOOBAR'"
  - command: eval "test == 'AC1D'"
  - command: define ONE 1
  - command: eval "numeric(ONE)+2"
    extractKey: SUM
  - command: eval "SUM == 3"

Commands

Evaluating Measurements

Since measurement values stored in a user key include the unit, the numeric(..) function can be used within expressions to cast the measurement result stored in a user key, into a specific unit.

PLT Test Plan: Evaluate Measurement
title: Evaluate Measurement
suite:
- title: Evaluate Measurement
  steps:
  - command: measure voltageDATP08 <4V
    extractKey: VOLTAGE
  - command: eval "numeric(VOLTAGE, 'mV') < 4000"

Commands