npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

apidog-cli

v1.5.12

Published

Command line tool for Apidog

Downloads

9,756

Readme

The command line tool for Apidog

Apidog CLI is a command line tool to run Test Case of Apidog

Getting started

To run Apidog CLI, please make sure your Node.js >= 10. Install Node.js

Installation

Install Apidog CLI with the follow command

$ npm install -g apidog-cli

Export data

Export your test case data as a Apidog CLI formatted file from Apidog

Run test case

$ apidog run examples/sample.apidog-cli.json -r cli,html

The test report will be saved in apidog-reports of current directory

  • If you want to customize report, you can pass through the follow option -r cli,json to get the json formatted result

Command options

apidog [options]

  • -h, --help Show command line help, including a list of options, and sample use cases.

  • -v, --version Displays the current Apidog CLI version

apidog run <file-source> [options]

file-source is the file path of the export test case data from Apidog

Options:

  --access-token <accessToken>          Set an authentication token and use it with the -t/-f command to specify a test scenario or test scenario folder to run
  -t, --test-scenario <testScenarioId>  Specify the test scenario ID to run the corresponding test scenario by ID
  -f, --test-scenario-folder <folderId> Specify the test scenario folder ID to run the corresponding test scenarios by folder ID
  -r, --reporters [reporters]           Specify test report file extension, support cli, html, json, junit (default: ["cli"])
  --out-dir <outDir>                    Test report final export dir, by default is apidog-reports folder in the current dir
                                        (default: "./apidog-reports")
  --out-file <outFile>                  Test report name, ignore file extension name, by default is apidog-report-{timestamp}-0
                                        (default: "apidog-report-2022-10-25-15-03-50-160-0")
  -e, --environment                     Specify the runtime environment. All test scenarios in this execution
  -n, --iteration-count <n>             Define the number of iterations to run
  -d, --iteration-data <path|testDataId>           Define the data which use for iterations (either JSON or CSV)
  --env-var <key=value>                 Specifies environment variables, in a key=value format. Multiple CLI environment variables can be added, for example: --env-var "user=123" --env-var "password=123"
  --global-var <key=value>              Specifies global variables, in a key=value format. Multiple CLI global variables can be added, for example: --global-var "user=123" --global-var "password=123"
  --notification <targetIds>            Notify the specified targets after execution. Use a comma (',') to add multiple target IDs.
  --notification-failed-event <targetIds>           Notify the specified targets only when a failure occurs after execution. Use a comma (',') to add multiple target IDs.
  --external-program-path <path>        Specify the file path of external program, by default is current dir
  --database-connection <path>          Specify the file path of database configuration, it is required when CLI run with URL
  --ignore-redirects                    Prevent Apidog from automatically following 3XX redirect response
  --silent                              Prevent Apidog CLI from showing output
  --color <value>                       Enable/Disable colored output (auto|on|off) (default: "auto")
  --delay-request [n]                   Specify the extent of delay between requests (milliseconds) (default: 0)
  --timeout-request [n]                 Specify a timeout for requests (milliseconds) (default: 0)
  --timeout-script [n]                  Specify a timeout for pre/post requests (milliseconds) (default: 0)
  -k, --insecure                        Disables SSL validations
  --ssl-client-cert-list <path>         Specify the path to a client certificates configurations (JSON)
  --ssl-client-cert <path>              Specify the path to a client certificate (PEM)
  --ssl-client-key <path>               Specify the path to a client certificate private key
  --ssl-client-passphrase <passphrase>  Specify the client certificate passphrase (for protected key)
  --ssl-extra-ca-certs <path>           Specify additionally trusted CA certificates (PEM)
  --upload-report                       Upload the overview of this test report to the cloud, and you can view this test report in the app
  -b, --bigint                          Compatible bigint (default: false)
  --verbose                             Show detailed information of each request
  --lang <language>                     Language setting (zh|en) (default: "en")
  -h, --help                            display help for command

SSL

Client Certificates

Apidog CLI supports SSL client certificates

Using a single SSL client certificate

  • --ssl-client-cert The path to the public client certificate file.

  • --ssl-client-key The path to the private client key (optional).

  • --ssl-client-passphrase The secret passphrase used to protect the private client key (optional).

Using SSL client certificates configuration file (supports multiple certificates per run)

  • --ssl-client-cert-list The path to the SSL client certificate list configuration file (JSON format). See ssl-client-cert-list.json
ssl-client-cert-list.json

[
    {
        "name": "domain1",
        "matches": ["https://test.domain1.com/*", "https://www.domain1/*"],
        "key": {"src": "./client.domain1.key"},
        "cert": {"src": "./client.domain1.crt"},
        "passphrase": "changeme"
    },
    {
        "name": "domain2",
        "matches": ["https://domain2.com/*"],
        "key": {"src": "./client.domain2.key"},
        "cert": {"src": "./client.domain2.crt"},
        "passphrase": "changeme"
    }
]

This option allows setting different SSL client certificate according to URL or hostname. This option takes precedence over --ssl-client-cert, --ssl-client-key and --ssl-client-passphrase options. If there is no match for the URL in the list, these options are used as fallback.

Update CLI

Upgrade Apidog CLI with the follow command

$ npm install apidog-cli@latest -g