-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathnewman.ts
223 lines (221 loc) · 7.34 KB
/
newman.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
// Autogenerated by @fig/complete-commander
const completionSpec: Fig.Spec = {
name: "newman",
description: "Newman is a command-line collection runner for Postman",
subcommands: [
{
name: "run",
description: "Initiate a Postman Collection run from a given URL or path",
options: [
{
name: ["-e", "--environment"],
description: "Specify a URL or path to a Postman Environment",
args: { name: "path", template: "filepaths" },
},
{
name: ["-g", "--globals"],
description:
"Specify a URL or path to a file containing Postman Globals",
args: { name: "path", template: "filepaths" },
},
{
name: ["-r", "--reporters"],
description: "Specify the reporters to use for this run",
args: { name: "reporters", isOptional: true, default: "cli" },
},
{
name: ["-n", "--iteration-count"],
description: "Define the number of iterations to run",
args: { name: "n" },
},
{
name: ["-d", "--iteration-data"],
description:
"Specify a data file to use for iterations (either JSON or CSV)",
args: {
name: "path",
template: "filepaths",
suggestions: ["JSON", "CSV"],
},
},
{
name: "--folder",
description:
"Specify the folder to run from a collection. Can be specified multiple times to run multiple folders",
isRepeatable: true,
args: { name: "path", template: "filepaths" },
},
{
name: "--global-var",
description:
"Allows the specification of global variables via the command line, in a key=value format",
args: { name: "value" },
},
{
name: "--env-var",
description:
"Allows the specification of environment variables via the command line, in a key=value format",
args: { name: "value" },
},
{
name: "--export-environment",
description:
"Exports the final environment to a file after completing the run",
args: { name: "path", template: "filepaths" },
},
{
name: "--export-globals",
description:
"Exports the final globals to a file after completing the run",
args: { name: "path", template: "filepaths" },
},
{
name: "--export-collection",
description:
"Exports the executed collection to a file after completing the run",
args: { name: "path", template: "filepaths" },
},
{
name: "--postman-api-key",
description:
"API Key used to load the resources from the Postman API",
args: { name: "apiKey" },
},
{
name: "--bail",
description:
"Specify whether or not to gracefully stop a collection run on encountering an error and whether to end the run with an error based on the optional modifier",
args: { name: "modifiers", isOptional: true },
},
{
name: "--ignore-redirects",
description:
"Prevents Newman from automatically following 3XX redirect responses",
},
{
name: ["-x", "--suppress-exit-code"],
description:
"Specify whether or not to override the default exit code for the current run",
},
{
name: "--silent",
description: "Prevents Newman from showing output to CLI",
},
{
name: "--disable-unicode",
description:
"Forces Unicode compliant symbols to be replaced by their plain text equivalents",
},
{
name: "--color",
description: "Enable/Disable colored output (auto|on|off)",
args: {
name: "value",
default: "auto",
suggestions: ["auto", "on", "off"],
},
},
{
name: "--delay-request",
description:
"Specify the extent of delay between requests (milliseconds)",
args: { name: "n", isOptional: true },
},
{
name: "--timeout",
description: "Specify a timeout for collection run (milliseconds)",
args: { name: "n", isOptional: true },
},
{
name: "--timeout-request",
description: "Specify a timeout for requests (milliseconds)",
args: { name: "n", isOptional: true },
},
{
name: "--timeout-script",
description: "Specify a timeout for scripts (milliseconds)",
args: { name: "n", isOptional: true },
},
{
name: "--working-dir",
description: "Specify the path to the working directory",
args: { name: "path", template: "filepaths" },
},
{
name: "--no-insecure-file-read",
description:
"Prevents reading the files situated outside of the working directory",
},
{ name: ["-k", "--insecure"], description: "Disables SSL validations" },
{
name: "--ssl-client-cert-list",
description:
"Specify the path to a client certificates configurations (JSON)",
args: { name: "path", template: "filepaths" },
},
{
name: "--ssl-client-cert",
description: "Specify the path to a client certificate (PEM)",
args: { name: "path", template: "filepaths" },
},
{
name: "--ssl-client-key",
description: "Specify the path to a client certificate private key",
args: { name: "path", template: "filepaths" },
},
{
name: "--ssl-client-passphrase",
description:
"Specify the client certificate passphrase (for protected key)",
args: { name: "passphrase" },
},
{
name: "--ssl-extra-ca-certs",
description: "Specify additionally trusted CA certificates (PEM)",
args: { name: "path", template: "filepaths" },
},
{
name: "--cookie-jar",
description:
"Specify the path to a custom cookie jar (serialized tough-cookie JSON)",
args: { name: "path", template: "filepaths" },
},
{
name: "--export-cookie-jar",
description:
"Exports the cookie jar to a file after completing the run",
args: { name: "path", template: "filepaths" },
},
{
name: "--verbose",
description:
"Show detailed information of collection run and each request sent",
},
{
name: ["-h", "--help"],
description: "Display help for command",
priority: 49,
},
],
args: {
name: "collection",
template: "filepaths",
},
},
{
name: "help",
description: "Display help for command",
priority: 49,
args: { name: "command", template: "help", isOptional: true },
},
],
options: [
{ name: ["-v", "--version"], description: "Output the version number" },
{
name: ["-h", "--help"],
description: "Display help for command",
priority: 49,
},
],
};
export default completionSpec;