# CLI Reference

# Generic commands

There are a couple of generic commands that can be useful when working with OpenTAP from the CLI. These are:

  • tap <command>
    List valid subcommands for the given <command>. For example:
       tap package
    
    1
  • tap <command> -h
    Show help information for the given <command>. For example:
    tap package --help
    
    1
  • tap <command> (-v | --verbose)
    Show all log output from all sources. For example:
    tap package run MyTestPlan.TapPlan -v
    
    1
  • tap <command> (-c | --color)
    Color messages according to their level. Can be used with any of the above commands. Useful in conjunction with --verbose. Note that some terminals do not support colors. For example:
    tap package run MyTestPlan.TapPlan -v -c
    
    1

# The run command

The run command group executes a test plan and can take the following arguments:

  • tap run <testplan>
    Run the specified <testplan>. All log outputs, except Debug, are sent to stdout. For example:
       tap run MyTestPlan.TapPlan
    
    1
  • tap run <testplan> --settings <dirname>
    Specify bench settings for the test plan being run. This refers to the configuration of DUTs, connections, and instruments. <dirname> should be the name of a subdirectory of <install dir>/Settings/Bench. For example:
       tap run MyTestPlan.TapPlan --settings RadioTestSetup
    
    1
  • tap run <testplan> --search <path>
    Add <path> to search path when looking for plugins. By default, OpenTAP searches in the installation directory and the <install dir>/Packages directory. For example:
       tap run MyTestPlan.TapPlan --search C:\Users\Me\OtherPlugins\MyDutProvider
    
    1
  • tap run <testplan> --results
    Set enabled result listeners as a comma separated list. Disable all result listeners with --results "". For example:
       tap run MyTestPlan.TapPlan --results CSV,SQLite
    
    1
  • tap run <testplan> --non-interactive
    Never prompt for user input. For example:
      tap run MyTestPlan.TapPlan --non-interactive
    
    1
  • tap run <testplan> --list-external-parameters
    List available external parameters. For example:
       tap run MyTestPlan.TapPlan --list-external-parameters
    
    1
  • tap run <testplan> (-e | --external) <parameter>=<value>
    Set the value of an external parameter. Can be specified one or more times. Parameters can also be loaded from a csv file using -e params.csv. For example:
       tap run MyTestPlan.TapPlan -e delay=1.0 -e timeout=5.0
    
    1
  • tap run <testplan> (-t | --try-external) <parameter>=<value>
    Same as --external, but ignore errors if the parameter does not exists. For example:
       tap run MyTestPlan.TapPlan -t delay=1.0 -t timeout=5.0 -t nonexistent=fine
    
    1
  • tap run <testplan> --metadata <parameter>=<value>
    Set metadata, such as the serial number of a DUT. Can be specified one or more times. For example:
       tap run MyTestPlan.TapPlan --metadata dut1-id=11 --metadata dut2-id=17
    
    1

# Package manager commands

The package command group contains all commands and subcommands that help you manage your packages.

Package names are case sensitive, and package names containing spaces (such as "Developer's System CE") must be surrounded by quotation marks.

  • tap package create <package xml dir>
    Create a tap package, or plugin, from an XML description (package.xml). For example:
       tap package create /path/to/folder/containing/package.xml/file
    
    1
  • tap package download
    Download <package> to the installation directory without installing it. For example:
       tap package download TestPackage2
    
    1
  • tap package install <package 1…n>
    Install one or more packages. Specify repository with -r <repo url>. Automatically install dependencies with -y. Can either install packages from a repository or local TapPackage. For example:
       tap package install TestPackage1 TestPackage2 -y
    
    1
  • tap package list [package] [--version <version>] [--installed]
    List available packages. If a package name is specified, only list versions of that package. If a version is specified, list all sub-versions of that version. tap package list OpenTAP --version 9.4 lists OpenTAP versions 9.4.0, 9.4.1, 9.4.2. When using the --installed flag, only installed packages are listed. For example:
       tap package list OpenTAP
    
    1
  • tap package show <package> [--version <version>] [--offline] [--include-files] [--include-plugins]
    Show details about a package. If --offline is specified, OpenTAP will only search the local path and installation for packages. --include-files and --include-plugins display all files and plugins included in the package. For example:
       tap package show OpenTAP --include-files
    
    1
  • tap package test <package>
    Run the test actionstep of <package> (defined in the package.xml file). For example:
       tap package test OpenTAP
    
    1
  • tap package uninstall <package 1…n>
    Uninstall one or more packages. Specify location with -t <dir>. For example:
       tap package uninstall Demonstration Python
    
    1
  • tap package verify <package>
    Verify the integrity of installed packages by comparing hashes. For example:
       tap package verify OpenTAP
    
    1

Other packages can add their own commands. Documentation of these commands is beyond the scope of this guide. Please refer to the package's own documentation for more information about them.