# @asayer/asayer-cli

> Asayer command line tool for running tests

Latest version **2.7.18** (published 2019-04-19) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @asayer/asayer-cli
pnpm add @asayer/asayer-cli
yarn add @asayer/asayer-cli
bun add @asayer/asayer-cli
```

Provides the command `asayer`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.7.18 |
| Published | 2019-04-19 |
| First published | 2018-08-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 14 |
| Unpacked size | 88.7 MB |
| Known vulnerabilities | 0 (+25 in 2 direct dependencies) |
| Install scripts | no |
| Author | Asayer |
| Maintainers | fangtooth, tahayk |
| Keywords | asayer, devops, replay, automation, test, qa |

## Links

- npm: https://www.npmjs.com/package/@asayer/asayer-cli
- Repository: https://github.com/estradino/asayer-cli
- Homepage: https://asayer.io/
- npm.io page: https://npm.io/package/@asayer/asayer-cli

## Dependencies (14)

- [ora](https://npm.io/package/ora.md) ^3.4.0
- [url](https://npm.io/package/url.md) ^0.11.0
- [axios](https://npm.io/package/axios.md) ^0.18.0
- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [figlet](https://npm.io/package/figlet.md) ^1.2.1
- [xml-js](https://npm.io/package/xml-js.md) ^1.6.11
- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.434.0
- [winston](https://npm.io/package/winston.md) ^3.2.1
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.4
- [fs-extra](https://npm.io/package/fs-extra.md) ^7.0.1
- [inquirer](https://npm.io/package/inquirer.md) ^6.2.2
- [progress](https://npm.io/package/progress.md) ^2.0.3
- [commander](https://npm.io/package/commander.md) ^2.20.0
- [dockerode](https://npm.io/package/dockerode.md) ^2.5.8

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 2.7.18 (latest) — 2019-04-19
- 2.7.16 — 2019-04-16
- 2.7.15 — 2019-04-15
- 2.7.12 — 2019-04-15
- 2.7.11 — 2019-04-12
- 2.7.10 — 2019-04-12
- 2.7.9 — 2019-04-12
- 2.7.8 — 2019-04-12
- 2.7.7 — 2019-04-11
- 2.7.6 — 2019-04-10
- 2.7.5 — 2019-04-10
- 2.7.2 — 2019-04-08
- 2.7.1 — 2019-04-08
- 2.7.0 — 2019-04-05
- 2.6.50 — 2019-04-03
- … 58 more at https://npm.io/package/@asayer/asayer-cli/versions

## README

# asayer-cli
Asayer CLI


## Installation:
`npm i -g @asayer/asayer-cli`


## Usage:


```txt
$ asayer --help
Usage: asayer [options] [command]

     _                              _          ____ _     ___
    / \   ___  __ _ _   _  ___ _ __(_) ___    / ___| |   |_ _|
   / _ \ / __|/ _` | | | |/ _ \ '__| |/ _ \  | |   | |    | |
  / ___ \\__ \ (_| | |_| |  __/ |_ | | (_) | | |___| |___ | |
 /_/   \_\___/\__,_|\__, |\___|_(_)|_|\___/   \____|_____|___|
                    |___/

Options:
  -V, --version                  output the version number
  -t, --token <token>            your user token from Asayer, override the configured token if present
  -u, --url <url>                custom test url
  -T, --tests <test1,test2,...>  a list containing test names or ids to be executed separated by comma ","
  -r, --report <path>            where to save your report (path to xml file)
  -i, --interactive              use interactive mode
  -d, --debug                    debug console errors
  -h, --help                     output usage information

Commands:
  setup [options]                Configure your Asayer CLI
  local [options]                Uses a local server for asayer onpremise
  docker [options]               Configure docker for local testing

Command's help:
  $ asayer [command] --help
  Examples:
    $ asayer setup --help
```


```txt
$ asayer setup --help

Usage: setup [options]

Configure your Asayer CLI

Options:
  -t, --token <token>  your user token from Asayer
  -h, --help           output usage information
```

```txt
$ asayer local --help
Usage: local [options]

Uses a local server for asayer onpremise

Options:
  -t, --token <token>            your user token from Asayer
  -T, --tests <test1,test2,...>  a list containing test names or ids to be executed separated by comma ","
  -u, --url <url>                custom test url
  -U, --update                   update images
  -c, --clean                    clean residual containers
  -S, --stop-all                 stop all running tests
  -i, --interactive              use interactive mode
  -h, --help                     output usage information
```

```txt
$ asayer docker --help
Usage: docker [options]

Configure docker for local testing

Options:
  -v, --verify                  verify if the current docker connection is valid
  -h, --host <host>             the docker host address (default: "127.0.0.1")
  -p, --port <port>             the docker host port (default: 2375)
  -P, --protocol <protocol>     the docker host protocol (default: "auto detect")
  -c, --cert-dir <path>         the docker host's certificate directory (default: "/etc/docker/certs.d/")
  --cert <client cert>          the path or name of the client's certificate file (default: "cert.pem")
  --key <client key>            the path or name of the client's key file (default: "key.pem")
  --ca <certificate authority>  the path or name of the certificate authority file (default: "ca.pem")
  --no-check                    don't check the server identity
  --docker-version <version>    the docker version (default: "auto detect")
  --show                        print the current configuration
  -i, --interactive             use interactive mode
  -h, --help                    output usage information
```



## Token configuration:
To start you have to get your token from [Preferences](https://app.asayer.io/client)
In order to configure your token with, use one of these steps:
* saving your token, so you don't have to write it with each command:
    * interactive mode: `asayer setup`
    ![](https://s3-eu-west-1.amazonaws.com/asayer-documentation/cli/tokenInter.gif)
    * direct method: `asayer setup --token "MY_TOKEN..."`
* using the environment variable `ASAYER_TOKEN`
* using the option `--token "MY_TOKEN..."` when executing each command

If more than 1 method is used at the same time, the token value will be as follow:
1. `--token "MY_TOKEN..."`
2. the environment variable
3. the saved token

## Running tests:

* To run all tests: `asayer`
![](https://s3-eu-west-1.amazonaws.com/asayer-documentation/cli/runAll.gif)
* To sepecify which test to run: `asayer --tests "TEST_ID1,TEST_ID2"`
* To change the test's URL: `asayer --url "https://asayer.io"`
* To use interactive mode: `asayer -i`



## On premise:

require `docker` to be installed on the host

### Configure:
To start using asayer on premise you need to configure your cli in order to interact with docker,
to configure your CLI/docker you can use one of the following steps:

* Default configuration: to check if the default configuration works use `asayer docker --verify`
* Interactive mode: `asayer docker -i`
* Direct method: `asayer docker --host "127.0.0.1" --port 3000 --protocol "https"`
    * any missing option will be replaced by the default value
    * the list of options:
        * `-h, --host <host>`: the docker host address (default: "127.0.0.1")
        * `-p, --port <port>`: the docker host port (default: 2375)
        * `-P, --protocol <protocol>`: the docker host protocol (default: "auto detect")
        * `-c, --cert-dir <path>`: the docker host's certificate directory (default: "/etc/docker/certs.d/")
        * `--cert <client cert>`: the path or name of the client's certificate file (default: "cert.pem")
        * `--key <client key>`: the path or name of the client's key file (default: "key.pem")
        * `--ca <certificate authority>`:the path or name of the certificate authority file (default: "ca.pem")
        * `--no-check`: don't check the server identity
        * `--docker-version <version>`:the docker version (default: "auto detect")
In order to check if your configuration is valid, run `asayer docker --verify`


### Running tests:
To run your tests on premise:
* Run all tests: `asayer local`
* Run selected tests: `asayer local --tests "TEST_ID1,TEST_ID2"`
* Change test's URL: `asayer local --url "https://asayer.io"`
* Use interactive mode: `asayer local -i`

### Stopping tests:
In case you have lost the connection to the terminal or started the `asayer local` command in the background, the test containers will keep running until the end of the test, but you can use `asayer local --stop-all` to stop all the running containers

---
_Source: https://npm.io/package/@asayer/asayer-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
