Skip to main content

CLI

The Command Line Interface (CLI) serves as DevAssure's test execution extension, facilitating the execution of automation tests in a command-line interface (CLI) environment. This capability enables effortless integration of tests into any CLI-configured CI/CD pipelines.

To utilize the CLI for test execution in CI environments, a valid DevAssure subscription is required.

This guide shows you how to get started with CLI.

Requirements

  • A valid DevAssure subscription.
  • You have created test cases and test suites to be executed.

Download CLI

DevAssure CLI comes with a standalone installation package. Follow these steps to download and install it:

  • Click on Download on our official website: DevAssure
  • Select the compatible version of DevAssure CLI for your operating system and download.
  • Extract the package by unzipping it and move it to your chosen directory for running automation tests.
  • Additional configuration may be necessary depending on your operating system.

Generating Authentication Token

You should generate token when integrating DevAssure with external platforms (or) for execution of tests in console mode.

To generate a token, follow these steps:

  • Log in to the DevAssure web portal
  • Click on your user account located in the top right corner, represented by your initials.
  • Navigate to Settings > Token > Create Token.
  • Provide a name for the token within the Generate Token window and click on the "Generate" button.
  • Copy the generated token for future use.
Icon

CLI Parameters

To execute test suites with the CLI on desired environments, specify the following options:

OptionsMandatoryDescription
auth-tokenYesAuthentication token required for secure access to DevAssure.
sourceYesThe path to the project source in your CI environment.
targetYesA temporary folder designated for test execution.
runYesthe command used to initiate the test execution.
suiteYesSpecifies the test suite that has been created for execution.
total-nodesNoIn a multi-node CI setup, specifies the total number of nodes available.
node-idNoIdentifies the current node, for instance, node zero in a two-node setup.
branchNoSpecifies the branch for which the tests should be executed.
job-nameYesAssigns a job name to the test execution job.
run-profileYesPoints to the run profile file that contains browser configurations
environmentNoIndicates the environment to run the tests in.

Execute Tests with CLI

To execute tests with CLI, follow these steps:

  • Open the command-line interface of your OS and navigate to the folder containing the CLI executable.
  • Enter the executable command along with required arguments.

For example, executing a P0 test suite on the beta branch in the UAT environment from the CLI on macOS can be achieved with the following command:

./DA \
--auth-token DEVASSURE-TOKEN \
--source "Users/username/Documents/Demo Marvel" \
--target "/Users/username/temp/" \
run \
--suite "/Users/username/Documents/Demo Marvel/test-suite/P0.suite.tspp" \
--total-nodes 1 \
--node-id 0 \
--branch beta \
--job-name p0_tests \
--run-profile "/Users/username/Documents/Demo Marvel/run-profile/Chrome.profile.tspp" \
--environment local

DEVASSURE-TOKEN is the authentication token created in web app

Icon

You can also view our demonstration video for guidance : Demo