Skip to main content

test commands

Test commands manage test executions.

test run

test run command runs a test from selected target ports.

Usage

test run [options] <target> <script>

Arguments

  • target: selects a port or ports using a port's name or a tag.
    • all can be used to select all ports.
  • script: path to a script file.
    • The path is relative to the current workspace directory.

Options

  • -t, --taskId <taskId>: uses a user specified task ID instead of an auto-generated task ID.
  • -m, --monitor: allows displaying a log from a selected port.
  • -d, --dryrun: dry run for investigating files to be transferred.
  • -i, --input <input> : sets input contexts that are passed to the
    • The value for <input> must be a JSON string. test framework.
  • -w, --wait: waits until the end of the test.
  • -p, --period <period>: sets a polling period for the wait option (default: 15s)
  • --throwOnError: throw error on failure

Examples

coordinator # test run all test.js // runs test.js from all ports
coordinator # test run -t debug all test.js // runs test.js from all ports using 'debug' as a task ID
coordinator # test run -i '{"hello":"world"}' test.js // runs test.js from all ports using {"hello":"world"} as an input context

test abort

test abort command aborts tests from selected target ports.

Usage

test abort [options] <target>

Arguments

  • target: selects a port or ports using a port's name or a tag.
    • all can be used to select all ports.

Options

  • --throwOnError: throw error on failure

Examples

coordinator # test abort all // Aborts test from all ports

test status

test status command displays status of tests running selected target ports.

Usage

test status <target>

Arguments

  • target: selects a port or ports using a port's name or a tag.
    • all can be used to select all ports.

Options

  • -f, --filter <filter>: allows filtering results based on conditions. each filter should be formatted to <key>=<value>. Value may have a prefix for special operations:
    • re:<value>: use value as Regular Expression
    • in:<value>: value is included
    • possible filter keys:
      • portname: Port Name
      • status: Status
      • taskid: Task ID
      • error: Error Message
      • script: Script
      • starttime: Started
      • submitter: Submitted By
      • inputcontext: Input Context
      • outputcontext: Ouptut Context
  • -s, --showCounts: display total number of data rows.
  • -c, --columns <columns>: displays only selected table columns. select the columns you would like to display separted by comma.
    • supported columns:
      • portname: Port Name
      • status: Status
      • taskid: Task ID
      • error: Error Message
      • script: Script
      • starttime: Started
      • duration: Duration
      • submitter: Submitted By
      • inputcontext: Input Context
      • outputcontext: Ouptut Context
  • -x, --failIfNotZero: fail if the number of filtered results is not zero. (default: false)
  • --throwOnError: throw error on failure

Examples

coordinator # test status all // Displays test status from all ports
coordinator # test status all -f status=FAILED // Shows ports with failed tests only
coordinator # test status --filter 'status=in:FAIL' all // Shows status that includes FAIL
coordinator # test status -f 'status=re:(FAIL.*|COMP.*)' all// Shows status that includes both FAIL and COMP regular expression
coordinator # test status -s all // Displays total number of data rows
coordinator # test status --columns 'portname,status' all // Shows only port name and status