The testdriverai CLI is the primary interface for running, managing, and debugging TestDriver scripts. It provides commands to execute tests, validate configurations, and interact with the TestDriver framework.

Usage

testdriverai <command> [options]

Available commands

CommandDescription
runExecutes a TestDriver script.
validateValidates the syntax and structure of a TestDriver script.
initInitializes a new TestDriver project in the current directory.
versionDisplays the current version of the TestDriver CLI.
helpDisplays help information for the CLI or a specific command.

Example usage

Running a test script

testdriverai run path/to/testdriver.yaml

This command runs the specified TestDriver script, executing all steps defined in the file.

Validating a script

testdriverai validate path/to/testdriver.yaml

This command checks the syntax and structure of the script to ensure it’s valid before execution.

Initializing a new project

testdriverai init

This command sets up a new TestDriver project in the current directory, creating the necessary folder structure and configuration files.

Checking the version

testdriverai version

This command displays the installed version of the TestDriver CLI.

Getting help

testdriverai help

This command displays general help information. To get help for a specific command, use:

testdriverai help <command>

Protips

  • Use testdriverai validate before running a script to catch errors early.
  • Combine testdriverai run with CI/CD pipelines to automate test execution.
  • Use the --debug flag with run to enable detailed logging for troubleshooting.

Running testdriverai init will create a blank testdriver.yaml file in the current directory. You can then edit this file to define your test steps.

Notes

  • The testdriverai CLI is cross-platform and works on macOS, Windows, and Linux.
  • Ensure you have the required dependencies installed and configured before running scripts.
  • For more advanced usage, refer to the official TestDriver documentation.