@testmonitor/testmonitor-cli
Version:
TestMonitor CLI tool
96 lines (63 loc) • 2.1 kB
Markdown
# TestMonitor CLI
TestMonitor CLI (`testmonitor-cli`) is a command-line tool to submit JUnit XML test results to a JSON API.
## Installation
Simply install the package by using NPM or Yarn:
```sh
npm install -g testmonitor-cli
```
or
```sh
yarn global add testmonitor-cli
```
This installs the TestMonitor CLI tool globally on your system.
## Authentication
TestMonitor CLI requires authentication via an API token. Set the token as an environment variable:
```sh
export TESTMONITOR_TOKEN=<your_api_token>
```
On Windows (PowerShell):
```sh
$env:TESTMONITOR_TOKEN="<your_api_token>"
```
## Usage
Once you've setup your TestMonitor token, you can start submitting JUnit reports:
```sh
testmonitor-cli submit -d <TESTMONITOR_DOMAIN> -i <INTEGRATION_ID> -f <FILE_PATH>
```
For example:
```sh
testmonitor-cli submit -d domain.testmonitor.com -i 12345-abcdef-67890-ghijkl -f results.xml
```
## Commands
### `submit`
Submit a JUnit XML test report.
**Options:**
```sh
-d, --domain <domain> TestMonitor domain (required)
-i, --integration-id <id> Integration ID (required)
-f, --file <path> Path to JUnit XML file (required)
```
## Development
Clone the repository and install dependencies:
```sh
git clone https://github.com/testmonitor/testmonitor-cli.git
cd testmonitor-cli
npm install
```
Run locally:
```sh
node index.js submit -d api.testmonitor.com -i 12345-abcdef-67890-ghijkl -f test-results.xml
```
Run tests:
```sh
npm test
```
## Versioning
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags](https://github.com/testmonitor/testmonitor/tags)
and the [releases](https://github.com/testmonitor/testmonitor/releases) on this repository.
## Authors
* **Thijs Kok** - *Lead developer* - [ThijsKok](https://github.com/thijskok)
* **Stephan Grootveld** - *Developer* - [Stefanius](https://github.com/stefanius)
* **Frank Keulen** - *Developer* - [FrankIsGek](https://github.com/frankisgek)
## License
TestMonitor is a commercial product, provided as a SaaS application to the customers of TestManagement BV.