apipost-cli 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ <p align="center">
2
+ <a href="https://adesign.apipost.cn/" target="_blank">
3
+ <img alt="A-Design Logo" width="360" src="https://img.cdn.apipost.cn/cdn/opensource/apipost-opensource.svg" />
4
+ </a>
5
+ </p>
6
+
7
+ apipost-cli 是一个基于命令行的 Apipost 接口用例以及测试用例运行工具。它允许您轻松地直接从命令行运行和测试 Apipost 接口用例以及测试用例。它专注于可扩展性,因此您可以轻松地将其与持续集成服务器和构建系统集成。这使得您可以在不需要手动操作的情况下自动化测试和运行 Apipost 接口用例以及测试用例。
8
+
9
+ # 安装
10
+
11
+ ```console
12
+ npm install -g apipost-cli
13
+ ```
14
+
15
+ # 基础使用
16
+ 需引入:
17
+
18
+ ```console
19
+ 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
20
+ ```
21
+
22
+ ## Options type:Object
23
+
24
+ ```
25
+ Options:
26
+ -r, --reporters <reporters> 指定测试报告类型, 支持 cli,html,json (default: "cli")
27
+ -n, --iteration-count <n> 设置循环次数。默认值 1
28
+ -d, --iteration-data <path> 设置用例循环的 [公共] 测试数据路径 (JSON 或 CSV)。如设置将替换默认 [公共] 测试数据。
29
+ --external-program-path <path> 指定 [外部程序] 的所处文件路径,默认值为命令当前执行目录
30
+ --out-dir <outDir> 输出测试报告目录,默认为当前目录下的 ./apipost-reports
31
+ --out-file <outFile> 输出测试报告文件名,不需要添加后缀,默认格式为 apipost-reports-当前 YYYY-MM-DD HH:mm:ss
32
+ --ignore-redirects <0/1> 阻止 Apipost 自动重定向返回 3XX 状态码的请求。0 阻止, 1 不阻止 (default: "0")
33
+ --max-requst-loop <n> 3XX重定向时的最大定向次数 (default: 5)
34
+ --timeout-request <n> 指定接口请求超时时间 (default: 0)
35
+ --timeout-script <n> 指定脚本预执行/后执行接口运行超时时间 (default: 5000)
36
+ --delay-request <n> 指定请求之间停顿间隔 (default: 0) (default: 0)
37
+ -k --insecure <n> 关闭 SSL 校验 (1 关闭, 0 开启。default: 1) (default: 1)
38
+ --ssl-client-cert-list <path> 客户端证书配置文件(JSON)的路径。此选项优先于sslClientCert、sslClientKey和sslClientPassphrase。
39
+ --ssl-client-cert <path> 指定客户端证书路径 (CRT file)
40
+ --ssl-client-pfx <path> 指定客户端证书路径 (PFX file)
41
+ --ssl-client-key <path> 指定客户端证书私钥路径 (KEY file)
42
+ --ssl-client-passphrase <passphrase> 指定客户端证书密码 (for protected key)
43
+ --ssl-extra-ca-certs <path> 指定额外受信任的 CA 证书 (PEM)
44
+ --web-hook <url> Web-hook用于在任务完成后向指定URL发送数据 (POST)
45
+ -h, --help display help for command
46
+ ```