Tuskr CLI reference


Overview

Tuskr CLI (command line interface) helps in integrating your automation frameworks and CI/CD tools with Tuskr.

Downloading

Run the below command to install "tuskr" CLI tool from npm:

$ npm install tuskr

General Usage

tuskr —-api-token=your-api-key --command=[command] [command specific options]

It is recommended that the API token used is of a user having Admin access.

Commands

Importing JUnit XML files (--command=import-junit-xml)

This program sends the XML JUnit files along with attachments to Tuskr. Tuskr will then create a test run (if necessary), test suites & sections (if not found),test cases (if necessary) and results.

--api-token <string> Required
API token of an Admin access user.

--project <string> Required
Project ID, name, automation ID or external ID of an existing project.

--file <path> Required
Path to the JUnit XML file.

--test-run-id <string>
ID of an existing test run.

--test-run-name <string>
Name of the test run.

--test-run-external-id <string>
External ID of the test run.

--test-run-deadline <date>
Deadline of the test run. Format is YYYY-MM-DD.

--test-run-assigned-to <email>
Email or Full Name to assign the test run.

--attachments-path <path>
Fully-qualified path of the directory to search for attachments. If unspecified, the directory of the JUnit XML file will be used.

--test-case-rules <path>
Path to the test case rules JSON file.

--emails <emails>
Comma-separated email addresses to be notified when import is completed.

Example:
tuskr --api-token=YourAPIKey --file="path/to/file.xml" --test-run-name="My Test Run" --project="My Project" --test-case-rules="rules.json"