Execution

Execute arbitrary commands on target systems.

Command

Run any executable or bash-cmd on the DUT.

AttributeTypeRequiredDefaultDescription
cmdconstYescmdString that identifies the teststep that gets executed
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectYesDefines how the command is executed
optionsOptionsObjectNoAdditional command options
parametersCommandOptionsYesTeststep specific parameters

Command Options

AttributeTypeRequiredDefaultDescription
executablestringYesThe executable to run
args[]stringNoArguments to pass to the executable
working_dirstringNoThe working directory to run the executable in
expect[]CommandExpectOptionsNoExpectations to check against the output of the executable
variablestringNoThe name of the variable to store stdout

Command Expect Options

AttributeTypeRequiredDescription
regexstringYesRegular expression to match against the output of the executable

Command Example

cmd: cmd
name: Run echo test
transport: *transport
options:
  timeout: 20m
parameters:
  executable: "echo"
  args:
    - "Hello World!"
  expect:
    - regex: "Hello World!"
  variable: helloWorldVar

Shell

Execute shell commands with full shell features including pipes, redirections, command chaining, variable expansion, and globs.

AttributeTypeRequiredDefaultDescription
cmdconstYesshellString that identifies the teststep that gets executed
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectYesDefines how the command is executed
optionsOptionsObjectNoAdditional command options
parametersShellOptionsYesTeststep specific parameters

Shell Options

AttributeTypeRequiredDefaultDescription
commandstringYesThe shell command to execute. Supports pipes, redirections, chaining, globs, variable expansion
shellstringNo/bin/shPath to the shell interpreter (e.g., /bin/bash, /bin/zsh)
working_dirstringNoThe working directory to run the command in
expect[]ShellExpectOptionsNoExpectations to check against the output of the command
variablestringNoThe name of the variable to store stdout

Shell Expect Options

AttributeTypeRequiredDescription
regexstringYesRegular expression to match against the output of the command

Shell Examples

Using Pipes

cmd: shell
name: Count errors in dmesg
transport: *transport
parameters:
  command: "dmesg | grep -i error | wc -l"
  variable: error_count

Command Chaining

cmd: shell
name: Build and test
transport: *transport
parameters:
  command: "cd /build && make clean && make all"
  working_dir: "/workspace"

Custom Shell with Bash Features

cmd: shell
name: Check disk usage
transport: *transport
parameters:
  command: "df -h / | tail -1 | awk '{print $5}' | sed 's/%//'"
  shell: "/bin/bash"
  variable: disk_usage_percent
  expect:
    - regex: "^[0-9]+$"