Overview of the TestDriver CLI
Learn about the TestDriver CLI, its commands, and how to use it effectively.
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
Available commands
Command | Description |
---|---|
run | Executes a TestDriver script. |
validate | Validates the syntax and structure of a TestDriver script. |
init | Initializes a new TestDriver project in the current directory. |
version | Displays the current version of the TestDriver CLI. |
help | Displays help information for the CLI or a specific command. |
Example usage
Running a test script
This command runs the specified TestDriver script, executing all steps defined in the file.
Validating a script
This command checks the syntax and structure of the script to ensure it’s valid before execution.
Initializing a new project
This command sets up a new TestDriver project in the current directory, creating the necessary folder structure and configuration files.
Checking the version
This command displays the installed version of the TestDriver CLI.
Getting help
This command displays general help information. To get help for a specific command, use:
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 withrun
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.