Test Step Commands

This page describes the structure of test step commands and provides a reference for all available commands.

Test Step Command Structure

Each test step in a stage has this structure:

AttributeTypeRequiredDescription
cmdstringYesIdentifies which test step to execute
namestringYesUniquely identifies the step for reports and logs
transportTransportObjectYesDefines how the command is executed
parametersobjectYesCommand-specific parameters
optionsOptionsObjectNoAdditional command options

Examples

- cmd: dutctl
  name: Shutdown the DUT.
  parameters:
    host: "[[attributes.Flasher]]"
    command: power
    args: ["off"]

- cmd: dutctl
  name: Flash the provided binary.
  parameters:
    host: "[[attributes.Flasher]]"
    command: flash
    args: [write, "[[input.Binary]]"]

- cmd: sleep
  name: Wait for the DUT to settle
  parameters:
    duration: 15s

- cmd: dutctl
  name: Turn the DUT on
  parameters:
    host: "[[attributes.Flasher]]"
    command: power
    args: ["hardreset"]
  options:
    timeout: 2m

- cmd: ping
  name: Wait for the device to become online.
  options:
    timeout: 4m
  parameters:
    host: "[[attributes.Host]]"

Transport

The transport object defines how test steps are executed, either locally or on a remote machine. This configuration ensures proper command execution and authentication.

AttributeTypeRequiredDescription
protostringYesProtocol for command execution: local (local execution) or ssh (remote execution)
optionsTransportOptionsRequired for SSHProtocol-specific configuration options

Transport Options

When using the SSH protocol (proto: "ssh"), the following options are available:

AttributeTypeRequiredDefaultDescription
hoststringYesHostname or IP address of remote machine
portintegerNo22SSH port number
userstringYesUsername for authentication
passwordstringNo*User’s password
identity_filestringNo*Path to SSH private key or template reference (e.g., [[ssh-keys.key_name]])
timeoutstringNoTimeout duration for SSH connections (e.g., ’30s’, ‘5m’)
jump_hostJumpHostOptionsNoConfiguration for jump host (bastion) to connect through

* Both password and identity_file are optional. If neither is provided, all organization SSH keys are automatically discovered and tried. If identity_file is specified, only that key is used. See SSH Key Management for details.

Jump Host Options

AttributeTypeRequiredDefaultDescription
hoststringYesHostname or IP address of jump host
portintegerNo22SSH port number for jump host
userstringYesUsername for authentication on jump host
passwordstringNo*Password for jump host
identity_filestringNo*Path to SSH private key or template reference for jump host
timeoutstringNoTimeout duration for jump host SSH connections (e.g., ’30s’, ‘5m’)

* Both password and identity_file are optional for jump host. If neither is provided, auto-discovery is used.

Protocol-Specific Requirements

Local Protocol

When using proto: "local":

  • Commands execute on the local machine
  • No options are required or allowed

SSH Protocol

When using proto: "ssh":

  • The options object is required
  • Must provide host and user
  • Authentication (password or identity_file) is optional:
    • If identity_file is provided, only that SSH key is used
    • If password is provided, password authentication is used
    • If neither is provided, all organization SSH keys are automatically discovered and tried (auto-discovery)
    • You can provide both password and identity_file, and both methods will be tried

Transport Examples

Local Execution

transport:
  proto: local

SSH with Password

transport:
  proto: ssh
  options:
    host: "192.168.1.100"
    user: "admin"
    password: "secretpassword"

SSH with Organization SSH Key

Use SSH keys managed at the organization level via template syntax:

transport:
  proto: ssh
  options:
    host: "[[attributes.Host]]"
    user: "root"
    identity_file: "[[ssh-keys.deployment_key]]"

See SSH Key Management for details on managing organization SSH keys.

SSH with Auto-Discovery

When no authentication is specified, all organization SSH keys are automatically discovered and tried:

transport:
  proto: ssh
  options:
    host: "[[attributes.Host]]"
    user: "root"
    # No password or identity_file - uses auto-discovery

SSH with Jump Host

transport:
  proto: ssh
  options:
    host: "192.168.1.100"
    user: "admin"
    identity_file: "[[ssh-keys.deployment_key]]"
    jump_host:
      host: "bastion.example.com"
      user: "jump_user"
      identity_file: "[[ssh-keys.deployment_key]]"
      port: 22
      timeout: "30s"

Options

The options object provides common configuration settings that can be applied to any test step. These settings control the test step’s execution behavior.

AttributeTypeRequiredDefaultDescription
timeoutstringNo6h00m00sMaximum duration for test step execution. If the step takes longer than this timeout, it will fail. Format: hours(h), minutes(m), seconds(s)
pathstringNoOptional path specifying the directory where required files for command execution are copied to on the machine before the command runs. If not specified these tools will be copied to /root/default-tools instead.

Timeout Format

The timeout value must follow this pattern: ^((\\d+h)?(\\d+m)?(\\d+s)?)?$

Valid examples:

  • "30s" - 30 seconds
  • "5m" - 5 minutes
  • "2h30m" - 2 hours and 30 minutes
  • "1h30m45s" - 1 hour, 30 minutes, and 45 seconds

Timeout Examples

Basic Timeout

options:
  timeout: "30s"

Complex Timeout

options:
  timeout: "1h30m45s"

Command Categories

Commands are organized into the following categories:

File Operations

File manipulation and archive operations.

  • Archive - Extract archives
  • Copy - Copy files between locations

Execution

Execute commands on target systems.

  • Command - Execute arbitrary commands

Network

Network connectivity and testing.

  • Ping - Wait for network connectivity

Hardware Control

Control and manage hardware devices.

  • DUTCTL - Control DUT hardware
  • PiKVM - Control via PiKVM interface
  • Qemu - Manage QEMU virtual machines

Firmware Analysis

Firmware security and vulnerability scanning.

BIOS Operations

BIOS/UEFI configuration and management.

CPU Operations

CPU performance and monitoring.

Benchmarking

Performance testing and benchmarking.

Automation

Test automation and control flow.

All Commands Reference

Complete alphabetical list of all available commands:

CommandCategoryDescription
ArchiveFile OperationsExtract archives (zip, tar, tar.gz, etc.)
BinarlyFirmware AnalysisAnalyze firmware with Binarly
BIOS CertificateBIOS OperationsManage BIOS/UEFI certificates
BIOS Settings GetBIOS OperationsRead current BIOS settings
BIOS Settings SetBIOS OperationsUpdate BIOS settings
ChipSecFirmware AnalysisRun ChipSec security checks
CommandExecutionExecute arbitrary commands
CopyFile OperationsCopy files/directories between locations
CPULoadCPU OperationsGenerate CPU load for testing
CPUSetCPU OperationsSet CPU affinity for processes
CPUStatsCPU OperationsCollect CPU performance statistics
DUTCTLHardware ControlControl DUT hardware (power, flash, etc.)
Firmware VersionFirmware AnalysisRead firmware version information
FWHuntFirmware AnalysisScan firmware for vulnerabilities
FWTSFirmware AnalysisRun Firmware Test Suite
HSIFirmware AnalysisCheck Hardware Security Index
PiKVMHardware ControlControl device via PiKVM
PingNetworkWait for network connectivity
QemuHardware ControlManage QEMU virtual machines
Robot Test FrameworkAutomationExecute Robot Framework test suites
S0ix-SelftestBenchmarkingTest S0ix suspend states
SecureBoot ManagementBIOS OperationsManage SecureBoot configuration
SleepAutomationPause execution for specified duration
SysBenchBenchmarkingRun system benchmarks