UNPKG

@testmonitor/testmonitor-cli

Version:

The TestMonitor CLI lets you interact with the TestMonitor platform directly from your terminal or CI pipelines.

85 lines (58 loc) 2.82 kB
# TestMonitor CLI The TestMonitor CLI (`testmonitor-cli`) lets you interact with the [TestMonitor](https://www.testmonitor.com/) platform directly from your terminal or CI pipelines. You can use it to submit automated test results through a simple, scriptable interface. ## Table of Contents - [Installation](#installation) - [Getting Started](#getting-started) - [Command Reference](#command-reference) - [Documentation](#documention) - [License](#license) ## Installation Install the CLI globally using NPM: ```sh npm install -g @testmonitor/testmonitor-cli ``` To upgrade to the latest version later on, run: ```sh npm update -g @testmonitor/testmonitor-cli ``` After installation, you can verify the installed version with: ```sh testmonitor-cli --version ``` ## Getting Started To begin using the CLI, follow these steps: 1. Go to your project settings in TestMonitor. 2. Enable the **JUnit XML** integration under the **Integrations** menu. 3. Copy the **Token**. 4. Run the following command: ```sh testmonitor-cli junit submit -d domain.testmonitor.com -t <token> -f ./junit.xml ``` > Replace `<token>` with your actual integration ID. ## Command Reference This section lists all available commands grouped by functionality. ### JUnit Commands for managing JUnit-style test reports. #### Submit Submit a JUnit XML report and create a new test run in your TestMonitor project. ```sh testmonitor-cli junit submit [options] ``` | Option | Description | |-----------------------------------|--------------------------------------------------| | -d, --domain <domain> | TestMonitor domain (required) | | -t, --token <token> | JUnit token (required) | | -f, --file <path> | Path to JUnit XML file (required) | | -a, --automation-type <type> | Test type (e.g. playwright, selenium) | | -n, --name <name> | Custom test run name | | -m, --milestone-id <id> | Target milestone ID | | -o, --milestone-name <name> | Milestone name to find or create | | -e, --test-environment-id <id> | Target test environment ID | | -p, --preserve-names | Preserve original test case names | | -s, --skip-root-suite | Skip root test suite nesting | | -v, --verbose | Output debug information | ## Documentation Please refer to our [knowledge base](https://help.testmonitor.com/testmonitor-cli) for more information. ## License Copyright (c) TestMonitor | we are Cerios B.V. All rights reserved.