echoapi-cli

1.0.23 • Public • Published

echoapi-cli is a command-line tool for running EchoAPI interface use cases and test cases. It allows you to easily run and test EchoAPI interface use cases and test cases directly from the command line. It focuses on scalability, so you can easily integrate it with continuous integration servers and build systems. This allows you to automate the testing and running of EchoAPI interface use cases and test cases without manual intervention.

Installation

Use the following command to install EchoAPI CLI:

npm install -g echoapi-cli

Running

echoapi run https://open.echoapi.com/open/ci/automated_testing?ci_id=MTkzMDI0MTEwMDU2ODQ5NDA4OjEyOTMzMDc1MDgzNjc3NzEwOjEzMDcyNjE0MDg3OTQ2Mjcy&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxODE0NCwiaXNzIjoiYXBpcG9zdCIsImV4cCI6MTcxNzY5MDAxNX0.wNNw0MbsbobhDcAZmiXJQu6lmhWaES6E2y8YFyKkzm8 -n 5 -r cli,json

image.png

Options

Usage: echoapi run [options] <url>

Options:
  -r, --reporters <reporters>           Specify test report formats, supports cli, html, json (default: "cli")
  -n, --iteration-count <n>             Set the number of iterations. Default value is 1
  -d, --iteration-data <path>           Set the path for test data (JSON or CSV) for use case iterations. If provided, it will replace the default test data.
  --external-program-path <path>        Specify the path for the [external program]. Default is the current directory of the command execution
  --out-dir <outDir>                    Output directory for the test reports. Default directory: /Users/mhw/echoapi-reports
  --out-file <outFile>                  Output filename for the test report, without extension. Default format: echoapi-reports-YYYY-MM-DD HH:mm:ss
  --ignore-redirects <0/1>              Prevent EchoAPI from automatically redirecting 3XX status code requests. 0 Prevent, 1 Do not prevent (default: "0")
  --max-request-loop <n>                Maximum redirect count for 3XX status code (default: 5)
  --timeout-request <n>                 Set timeout for interface requests (default: 0)
  --timeout-script <n>                  Set pre/post script execution timeout for interface run (default: 5000)
  --delay-request <n>                   Set interval between requests (default: 0)
  -k --insecure <n>                     Disable SSL verification (1 Disable, 0 Enable. default: 1) (default: 1)
  --ssl-client-cert-list <path>         Path to client certificate configuration file (JSON). This option takes precedence over sslClientCert, sslClientKey, and sslClientPassphrase.
  --ssl-client-cert <path>              Specify the client certificate path (CRT file)
  --ssl-client-pfx <path>               Specify the client certificate path (PFX file)
  --ssl-client-key <path>               Specify the client certificate private key path (KEY file)
  --ssl-client-passphrase <passphrase>  Specify the client certificate password (for protected key)
  --ssl-extra-ca-certs <path>           Specify additional trusted CA certificates (PEM)
  --web-hook <url>                      Web-hook to send JSON report data to a specified URL upon task completion (POST)
  -h, --help                            Display help for command

Upgrading

Use the following command to upgrade the EchoAPI CLI tool:

npm install echoapi-cli@latest -g

Readme

Keywords

none

Package Sidebar

Install

npm i echoapi-cli

Weekly Downloads

238

Version

1.0.23

License

UNLICENSED

Unpacked Size

15.1 MB

Total Files

14

Last publish

Collaborators

  • lee-meng
  • proud_lion
  • xbw19975
  • wjzhangq
  • apipost-lab001
  • chengyang12138