1.0.19 • Published 1 month ago

apipost-cli v1.0.19

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
1 month ago

apipost-cli 是一个基于命令行的 Apipost 接口用例以及测试用例运行工具。它允许您轻松地直接从命令行运行和测试 Apipost 接口用例以及测试用例。它专注于可扩展性,因此您可以轻松地将其与持续集成服务器和构建系统集成。这使得您可以在不需要手动操作的情况下自动化测试和运行 Apipost 接口用例以及测试用例。

安装

npm install -g apipost-cli

基础使用

需引入:

apipost run 'https://v7-api-test.apipost.cc/api/cli/open?type=single&id=7e58e858-c1ce-4c97-a0bf-5c0a559d9422&token=pnaoakyf4ivnqmi905sj82e0j60y0w6l' -r json,html -n 2
apipost run data.json -r json,html -n 2

Options type:Object

Options:
  -r, --reporters <reporters>           指定测试报告类型, 支持 cli,html,json  (default: "cli")
  -n, --iteration-count <n>             设置循环次数。默认值 1
  -d, --iteration-data <path>           设置用例循环的 [公共] 测试数据路径 (JSON 或 CSV)。如设置将替换默认 [公共] 测试数据。
  --external-program-path <path>        指定 [外部程序] 的所处文件路径,默认值为命令当前执行目录
  --out-dir <outDir>                    输出测试报告目录,默认为当前目录下的 ./apipost-reports
  --out-file <outFile>                  输出测试报告文件名,不需要添加后缀,默认格式为 apipost-reports-当前 YYYY-MM-DD HH:mm:ss
  --ignore-redirects <0/1>              阻止 Apipost 自动重定向返回 3XX 状态码的请求。0 阻止, 1 不阻止 (default: "0")
  --max-requst-loop <n>                 3XX重定向时的最大定向次数 (default: 5)
  --timeout-request <n>                 指定接口请求超时时间 (default: 0)
  --timeout-script <n>                  指定脚本预执行/后执行接口运行超时时间 (default: 5000)
  --delay-request <n>                   指定请求之间停顿间隔 (default: 0) (default: 0)
  -k --insecure <n>                     关闭 SSL 校验 (1 关闭, 0 开启。default: 1) (default: 1)
  --ssl-client-cert-list <path>         客户端证书配置文件(JSON)的路径。此选项优先于sslClientCert、sslClientKey和sslClientPassphrase。
  --ssl-client-cert <path>              指定客户端证书路径 (CRT file)
  --ssl-client-pfx <path>               指定客户端证书路径 (PFX file)
  --ssl-client-key <path>               指定客户端证书私钥路径 (KEY file)
  --ssl-client-passphrase <passphrase>  指定客户端证书密码 (for protected key)
  --ssl-extra-ca-certs <path>           指定额外受信任的 CA 证书 (PEM)
  -h, --help                            display help for command
1.0.19

1 month ago

1.0.18

2 months ago

1.0.17

4 months ago

1.0.16

4 months ago

1.0.15

4 months ago

1.0.14

4 months ago

1.0.13

4 months ago

1.0.10

4 months ago

1.0.9

4 months ago

1.0.8

6 months ago

1.0.7

6 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago