@autifyhq/autify-cli 0.8.0 → 0.10.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 +79 -28
- package/bin/dev.cmd +16 -2
- package/bin/run.cmd +16 -2
- package/dist/autify/connect/accessPointConfig.d.ts +2 -0
- package/dist/autify/connect/accessPointConfig.js +33 -0
- package/dist/autify/connect/installClient.d.ts +11 -2
- package/dist/autify/connect/installClient.js +65 -28
- package/dist/autify/connect/spawnClient.d.ts +18 -11
- package/dist/autify/connect/spawnClient.js +128 -42
- package/dist/autify/web/parseAutifyTestUrl.d.ts +11 -0
- package/dist/autify/web/parseAutifyTestUrl.js +37 -0
- package/dist/autify/web/runTest.d.ts +2 -2
- package/dist/autify/web/runTest.js +6 -33
- package/dist/autify/web/waitTestResult.js +9 -0
- package/dist/commands/connect/access-point/create.d.ts +11 -0
- package/dist/commands/connect/access-point/create.js +41 -0
- package/dist/commands/connect/access-point/set.js +5 -3
- package/dist/commands/connect/client/install.d.ts +5 -1
- package/dist/commands/connect/client/install.js +18 -6
- package/dist/commands/connect/client/start.d.ts +2 -0
- package/dist/commands/connect/client/start.js +41 -13
- package/dist/commands/mobile/test/run.d.ts +1 -0
- package/dist/commands/mobile/test/run.js +45 -12
- package/dist/commands/mobile/test/wait.js +2 -1
- package/dist/commands/web/test/run.d.ts +4 -0
- package/dist/commands/web/test/run.js +87 -37
- package/dist/commands/web/test/wait.js +2 -1
- package/dist/config.d.ts +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +13 -6
|
@@ -25,19 +25,48 @@ class MobileTestRun extends core_1.Command {
|
|
|
25
25
|
const uploadCommand = new upload_1.default(uploadArgs, this.config);
|
|
26
26
|
buildId = (await uploadCommand.run()).buildId;
|
|
27
27
|
}
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
const runTestPlanOnce = async () => {
|
|
29
|
+
const res = await client.runTestPlan(testPlanId, {
|
|
30
|
+
// eslint-disable-next-line camelcase
|
|
31
|
+
build_id: buildId,
|
|
32
|
+
});
|
|
33
|
+
if (!res.data.id)
|
|
34
|
+
throw new errors_1.CLIError(`Failed to run a test plan.`);
|
|
35
|
+
const testResultUrl = (0, getTestResultUrl_1.getMobileTestResultUrl)(configDir, workspaceId, res.data.id);
|
|
36
|
+
this.log(`${node_emoji_1.default.get("white_check_mark")} Successfully started: ${testResultUrl}`);
|
|
37
|
+
return testResultUrl;
|
|
38
|
+
};
|
|
39
|
+
let testResultUrl = await runTestPlanOnce();
|
|
36
40
|
if (flags.wait) {
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
const mobileTestWait = async (url) => {
|
|
42
|
+
const waitArgs = ["--timeout", flags.timeout.toString(), url];
|
|
43
|
+
if (flags.verbose)
|
|
44
|
+
waitArgs.push("--verbose");
|
|
45
|
+
try {
|
|
46
|
+
await wait_1.default.run(waitArgs);
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
if (error.oclif.exit === 0)
|
|
50
|
+
return null;
|
|
51
|
+
return error;
|
|
52
|
+
}
|
|
53
|
+
throw new errors_1.CLIError(`Unexpected behavior.`);
|
|
54
|
+
};
|
|
55
|
+
const maxRetryCount = flags["max-retry-count"];
|
|
56
|
+
let error;
|
|
57
|
+
for await (const [i] of Array.from({
|
|
58
|
+
length: maxRetryCount + 1,
|
|
59
|
+
}).entries()) {
|
|
60
|
+
error = await mobileTestWait(testResultUrl);
|
|
61
|
+
if (error === null)
|
|
62
|
+
this.exit();
|
|
63
|
+
else if (i === maxRetryCount)
|
|
64
|
+
throw error;
|
|
65
|
+
else {
|
|
66
|
+
this.log(`${node_emoji_1.default.get("repeat")} Retrying... (attempt: ${i + 1}/${maxRetryCount})`);
|
|
67
|
+
testResultUrl = await runTestPlanOnce();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
41
70
|
}
|
|
42
71
|
else {
|
|
43
72
|
this.log("To wait for the test result, run the command below:");
|
|
@@ -76,6 +105,10 @@ MobileTestRun.flags = {
|
|
|
76
105
|
description: "Verbose output",
|
|
77
106
|
default: false,
|
|
78
107
|
}),
|
|
108
|
+
"max-retry-count": core_1.Flags.integer({
|
|
109
|
+
description: "Maximum retry count. The command can take up to timeout * (max-retry-count + 1).",
|
|
110
|
+
default: 0,
|
|
111
|
+
}),
|
|
79
112
|
};
|
|
80
113
|
MobileTestRun.args = [
|
|
81
114
|
{
|
|
@@ -30,7 +30,8 @@ class MobileTestWait extends core_1.Command {
|
|
|
30
30
|
this.exit();
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
|
-
this.
|
|
33
|
+
this.log(`${node_emoji_1.default.get("x")} Test didn't pass. See ${testResultUrl}: ${JSON.stringify(data)}`);
|
|
34
|
+
this.exit(1);
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
}
|
|
@@ -7,6 +7,9 @@ export default class WebTestRun extends Command {
|
|
|
7
7
|
"url-replacements": import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined>;
|
|
8
8
|
"autify-connect": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
9
9
|
"autify-connect-client": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
"autify-connect-client-verbose": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
"autify-connect-client-file-logging": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
"autify-connect-client-debug-server-port": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
10
13
|
os: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
11
14
|
"os-version": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
12
15
|
browser: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
@@ -15,6 +18,7 @@ export default class WebTestRun extends Command {
|
|
|
15
18
|
wait: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
19
|
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
17
20
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
21
|
+
"max-retry-count": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
18
22
|
};
|
|
19
23
|
static args: {
|
|
20
24
|
name: string;
|
|
@@ -9,6 +9,8 @@ const runTest_1 = require("../../../autify/web/runTest");
|
|
|
9
9
|
const getTestResultUrl_1 = require("../../../autify/web/getTestResultUrl");
|
|
10
10
|
const wait_1 = tslib_1.__importDefault(require("./wait"));
|
|
11
11
|
const spawnClient_1 = require("../../../autify/connect/spawnClient");
|
|
12
|
+
const errors_1 = require("@oclif/errors");
|
|
13
|
+
const parseAutifyTestUrl_1 = require("../../../autify/web/parseAutifyTestUrl");
|
|
12
14
|
const parseUrlReplacements = (urlReplacements) => {
|
|
13
15
|
return urlReplacements.map((s) => {
|
|
14
16
|
// eslint-disable-next-line camelcase
|
|
@@ -46,26 +48,12 @@ class WebTestRun extends core_1.Command {
|
|
|
46
48
|
const accessToken = (0, config_1.getOrThrow)(configDir, "AUTIFY_WEB_ACCESS_TOKEN");
|
|
47
49
|
const basePath = (0, config_1.get)(configDir, "AUTIFY_WEB_BASE_PATH");
|
|
48
50
|
const client = new autify_sdk_1.WebClient(accessToken, { basePath, userAgent });
|
|
49
|
-
const
|
|
51
|
+
const parsedTest = (0, parseAutifyTestUrl_1.parseAutifyTestUrl)(args["scenario-or-test-plan-url"]);
|
|
52
|
+
const { workspaceId } = parsedTest;
|
|
50
53
|
let autifyConnectAccessPoint = flags["autify-connect"];
|
|
51
54
|
let autifyConnectClient;
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
autifyConnectClient = await (0, spawnClient_1.spawnClient)(configDir, cacheDir, {
|
|
55
|
-
verbose,
|
|
56
|
-
fileLogging,
|
|
57
|
-
});
|
|
58
|
-
const { version, logFile, accessPoint, waitReady } = autifyConnectClient;
|
|
59
|
-
autifyConnectAccessPoint = accessPoint;
|
|
60
|
-
this.log(`Starting Autify Connect Client for Access Point "${accessPoint}" (${version})...`);
|
|
61
|
-
if (logFile)
|
|
62
|
-
this.log(`Log file is located at ${logFile}`);
|
|
63
|
-
this.log("Waiting until Autify Connect Client is ready...");
|
|
64
|
-
await waitReady();
|
|
65
|
-
this.log("Autify Connect Client is ready!");
|
|
66
|
-
}
|
|
67
|
-
try {
|
|
68
|
-
const { workspaceId, resultId, capability } = await (0, runTest_1.runTest)(client, args["scenario-or-test-plan-url"], {
|
|
55
|
+
const runTestOnce = async () => {
|
|
56
|
+
const { resultId, capability } = await (0, runTest_1.runTest)(client, parsedTest, {
|
|
69
57
|
option: capabilityOption,
|
|
70
58
|
name: flags.name,
|
|
71
59
|
urlReplacements,
|
|
@@ -73,11 +61,65 @@ class WebTestRun extends core_1.Command {
|
|
|
73
61
|
});
|
|
74
62
|
const testResultUrl = (0, getTestResultUrl_1.getWebTestResultUrl)(configDir, workspaceId, resultId);
|
|
75
63
|
this.log(`${node_emoji_1.default.get("white_check_mark")} Successfully started: ${testResultUrl} (Capability is ${capability})`);
|
|
64
|
+
return testResultUrl;
|
|
65
|
+
};
|
|
66
|
+
try {
|
|
67
|
+
if (flags["autify-connect-client"]) {
|
|
68
|
+
const errorHandler = (error) => {
|
|
69
|
+
if (flags.verbose)
|
|
70
|
+
this.warn(error);
|
|
71
|
+
};
|
|
72
|
+
autifyConnectClient = await (0, spawnClient_1.spawnClient)(configDir, cacheDir, errorHandler, {
|
|
73
|
+
verbose: flags["autify-connect-client-verbose"],
|
|
74
|
+
fileLogging: flags["autify-connect-client-file-logging"],
|
|
75
|
+
debugServerPort: flags["autify-connect-client-debug-server-port"],
|
|
76
|
+
ephemeralAccessPoint: {
|
|
77
|
+
webClient: client,
|
|
78
|
+
workspaceId,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
const { version, versionMismatchWarning, logFile, accessPointName, waitReady, } = autifyConnectClient;
|
|
82
|
+
autifyConnectAccessPoint = accessPointName;
|
|
83
|
+
this.log(`Starting Autify Connect Client for Access Point "${accessPointName}" (${version})...`);
|
|
84
|
+
if (versionMismatchWarning)
|
|
85
|
+
this.warn(versionMismatchWarning);
|
|
86
|
+
if (logFile)
|
|
87
|
+
this.log(`Autify Connect Client log file is located at ${logFile}`);
|
|
88
|
+
this.log("Waiting until Autify Connect Client is ready...");
|
|
89
|
+
await waitReady();
|
|
90
|
+
this.log("Autify Connect Client is ready!");
|
|
91
|
+
}
|
|
92
|
+
let testResultUrl = await runTestOnce();
|
|
76
93
|
if (flags.wait) {
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
94
|
+
const webTestWait = async (url) => {
|
|
95
|
+
const waitArgs = ["--timeout", flags.timeout.toString(), url];
|
|
96
|
+
if (flags.verbose)
|
|
97
|
+
waitArgs.push("--verbose");
|
|
98
|
+
try {
|
|
99
|
+
await wait_1.default.run(waitArgs);
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
if (error.oclif.exit === 0)
|
|
103
|
+
return null;
|
|
104
|
+
return error;
|
|
105
|
+
}
|
|
106
|
+
throw new errors_1.CLIError(`Unexpected behavior.`);
|
|
107
|
+
};
|
|
108
|
+
const maxRetryCount = flags["max-retry-count"];
|
|
109
|
+
let error;
|
|
110
|
+
for await (const [i] of Array.from({
|
|
111
|
+
length: maxRetryCount + 1,
|
|
112
|
+
}).entries()) {
|
|
113
|
+
error = await webTestWait(testResultUrl);
|
|
114
|
+
if (error === null)
|
|
115
|
+
this.exit();
|
|
116
|
+
else if (i === maxRetryCount)
|
|
117
|
+
throw error;
|
|
118
|
+
else {
|
|
119
|
+
this.log(`${node_emoji_1.default.get("repeat")} Retrying... (attempt: ${i + 1}/${maxRetryCount})`);
|
|
120
|
+
testResultUrl = await runTestOnce();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
81
123
|
}
|
|
82
124
|
else {
|
|
83
125
|
this.log("To wait for the test result, run the command below:");
|
|
@@ -86,22 +128,14 @@ class WebTestRun extends core_1.Command {
|
|
|
86
128
|
}
|
|
87
129
|
catch (error) {
|
|
88
130
|
if (autifyConnectClient) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if (clientError instanceof spawnClient_1.ClientExitError) {
|
|
96
|
-
this.log(clientError.message);
|
|
97
|
-
throw error;
|
|
98
|
-
}
|
|
99
|
-
throw clientError;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
throw error;
|
|
131
|
+
this.log("Waiting until Autify Connect Client exits...");
|
|
132
|
+
await autifyConnectClient.kill();
|
|
133
|
+
const [code, signal, deletedAccessPointName] = await autifyConnectClient.waitExit();
|
|
134
|
+
if (deletedAccessPointName)
|
|
135
|
+
this.log(`Autify Connect Access Point was deleted: "${deletedAccessPointName}"`);
|
|
136
|
+
this.log(`Autify Connect Client exited (code: ${code}, signal: ${signal})`);
|
|
104
137
|
}
|
|
138
|
+
throw error;
|
|
105
139
|
}
|
|
106
140
|
}
|
|
107
141
|
}
|
|
@@ -135,6 +169,18 @@ WebTestRun.flags = {
|
|
|
135
169
|
exclusive: ["autify-connect"],
|
|
136
170
|
dependsOn: ["wait"],
|
|
137
171
|
}),
|
|
172
|
+
"autify-connect-client-verbose": core_1.Flags.boolean({
|
|
173
|
+
description: "[Experimental] Verbose output for Autify Connect Client (Only for test scenario execution.)",
|
|
174
|
+
dependsOn: ["autify-connect-client"],
|
|
175
|
+
}),
|
|
176
|
+
"autify-connect-client-file-logging": core_1.Flags.boolean({
|
|
177
|
+
description: "[Experimental] Logging Autify Connect Client log to a file instead of console.",
|
|
178
|
+
dependsOn: ["autify-connect-client"],
|
|
179
|
+
}),
|
|
180
|
+
"autify-connect-client-debug-server-port": core_1.Flags.integer({
|
|
181
|
+
description: `[Experimental] [default: ${spawnClient_1.DEFAULT_CLIENT_DEBUG_SERVER_PORT}] Port for Autify Connect Client debug server.`,
|
|
182
|
+
dependsOn: ["autify-connect-client"],
|
|
183
|
+
}),
|
|
138
184
|
os: core_1.Flags.string({ description: "OS to run the test" }),
|
|
139
185
|
"os-version": core_1.Flags.string({ description: "OS version to run the test" }),
|
|
140
186
|
browser: core_1.Flags.string({ description: "Browser to run the test" }),
|
|
@@ -155,6 +201,10 @@ WebTestRun.flags = {
|
|
|
155
201
|
description: "Verbose output",
|
|
156
202
|
default: false,
|
|
157
203
|
}),
|
|
204
|
+
"max-retry-count": core_1.Flags.integer({
|
|
205
|
+
description: "Maximum retry count. The command can take up to timeout * (max-retry-count + 1).",
|
|
206
|
+
default: 0,
|
|
207
|
+
}),
|
|
158
208
|
};
|
|
159
209
|
WebTestRun.args = [
|
|
160
210
|
{
|
|
@@ -30,7 +30,8 @@ class WebTestWait extends core_1.Command {
|
|
|
30
30
|
this.exit();
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
|
-
this.
|
|
33
|
+
this.log(`${node_emoji_1.default.get("x")} Test didn't pass. See ${testResultUrl}: ${JSON.stringify(data)}`);
|
|
34
|
+
this.exit(1);
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
}
|
package/dist/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare type Variable = "AUTIFY_WEB_ACCESS_TOKEN" | "AUTIFY_WEB_BASE_PATH" | "AUTIFY_MOBILE_ACCESS_TOKEN" | "AUTIFY_MOBILE_BASE_PATH" | "AUTIFY_CONNECT_ACCESS_POINT_NAME" | "AUTIFY_CONNECT_ACCESS_POINT_KEY" | "AUTIFY_TEST_WAIT_INTERVAL_SECOND";
|
|
1
|
+
declare type Variable = "AUTIFY_WEB_ACCESS_TOKEN" | "AUTIFY_WEB_BASE_PATH" | "AUTIFY_MOBILE_ACCESS_TOKEN" | "AUTIFY_MOBILE_BASE_PATH" | "AUTIFY_CONNECT_ACCESS_POINT_NAME" | "AUTIFY_CONNECT_ACCESS_POINT_KEY" | "AUTIFY_CONNECT_CLIENT_MODE" | "AUTIFY_TEST_WAIT_INTERVAL_SECOND";
|
|
2
2
|
export declare const set: (configDir: string, key: Variable, value: string | undefined) => void;
|
|
3
3
|
export declare const get: (configDir: string, key: Variable) => string | undefined;
|
|
4
4
|
export declare const getOrThrow: (configDir: string, key: Variable) => string;
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.8.0","commands":{"connect:access-point:set":{"id":"connect:access-point:set","description":"[Experimental] Set Autify Connect Access Point","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["Start interactive setup:\n<%= config.bin %> <%= command.id %> --name=NAME","Reading the key from file:\n<%= config.bin %> <%= command.id %> --name=NAME < key.txt"],"flags":{"name":{"name":"name","type":"option","description":"Name of the Autify Connect Access Point already created","required":true,"multiple":false}},"args":[]},"connect:client:install":{"id":"connect:client:install","description":"[Experimental] Install the latest stable version of Autify Connect Client","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{},"args":[]},"connect:client:start":{"id":"connect:client:start","description":"[Experimental] Start Autify Connect Client","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"verbose":{"name":"verbose","type":"boolean","description":"Make the operation more talkative.","allowNo":false},"file-logging":{"name":"file-logging","type":"boolean","description":"Logging Autify Connect Client log to a file instead of console.","allowNo":false}},"args":[]},"mobile:api:describe-test-result":{"id":"mobile:api:describe-test-result","description":"Get a test result.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"ID of the project from which the test results will be obtained.","required":true,"multiple":false},"id":{"name":"id","type":"option","description":"Test Result ID.","required":true,"multiple":false}},"args":[]},"mobile:api:list-test-results":{"id":"mobile:api:list-test-results","description":"List test results.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"ID of the project from which the list of test results will be retrieved.","required":true,"multiple":false},"page":{"name":"page","type":"option","description":"Page number to be retrieved.","required":false,"multiple":false},"per-page":{"name":"per-page","type":"option","description":"Number of test results per page.","required":false,"multiple":false},"test-plan-id":{"name":"test-plan-id","type":"option","description":"ID of the test plan.","required":false,"multiple":false}},"args":[]},"mobile:api:run-test-plan":{"id":"mobile:api:run-test-plan","description":"Run a test plan","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"test-plan-id":{"name":"test-plan-id","type":"option","description":"The ID of the test plan to run.","required":true,"multiple":false},"run-test-plan-request":{"name":"run-test-plan-request","type":"option","description":"The build_id to execute the test plan.","required":true,"multiple":false}},"args":[]},"mobile:api:upload-build":{"id":"mobile:api:upload-build","description":"Upload the build file.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"The ID of the project to upload the build file to.","required":true,"multiple":false},"file":{"name":"file","type":"option","description":"Build file.","required":true,"multiple":false}},"args":[]},"mobile:auth:login":{"id":"mobile:auth:login","description":"Login to Autify for Mobile","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["Start interactive setup:\n<%= config.bin %> <%= command.id %>","Reading the token from file:\n<%= config.bin %> <%= command.id %> < token.txt"],"flags":{},"args":[]},"mobile:build:upload":{"id":"mobile:build:upload","description":"Upload a build file","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>","Upload build file\n<%= config.bin %> <%= command.id %> --workspace-id AAA ./my.app","Upload build file (JSON output)\n<%= config.bin %> <%= command.id %> --workspace-id AAA ./my.app --json"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"workspace-id":{"name":"workspace-id","type":"option","char":"w","description":"Workspace ID to upload the build file","required":true,"multiple":false}},"args":[{"name":"build-path","description":"File path to the iOS app (*.app) or Android app (*.apk).","required":true}],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"mobile:test:run":{"id":"mobile:test:run","description":"Run a test plan.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["Run a test plan with a build ID:\n<%= config.bin %> <%= command.id %> --build-id CCC https://mobile-app.autify.com/projects/AAA/test_plans/BBB","Run a test plan with a new build file:\n<%= config.bin %> <%= command.id %> --build-path ./my.[app|apk] https://mobile-app.autify.com/projects/AAA/test_plans/BBB","Run and wait a test plan:\n<%= config.bin %> <%= command.id %> --build-id CCC https://mobile-app.autify.com/projects/AAA/test_plans/BBB --wait --timeout 600"],"flags":{"build-id":{"name":"build-id","type":"option","description":"ID of the already uploaded build.","multiple":false,"exclusive":["build-path"]},"build-path":{"name":"build-path","type":"option","description":"File path to the iOS app (*.app) or Android app (*.apk).","multiple":false,"exclusive":["build-id"]},"wait":{"name":"wait","type":"boolean","char":"w","description":"Wait until the test finishes.","allowNo":false},"timeout":{"name":"timeout","type":"option","char":"t","description":"Timeout seconds when waiting for the finish of the test execution.","multiple":false,"default":300},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false}},"args":[{"name":"test-plan-url","description":"Test plan URL e.g. https://mobile-app.autify.com/projects/<ID>/test_plans/<ID>","required":true}]},"mobile:test:wait":{"id":"mobile:test:wait","description":"Wait a test result until it finishes.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %> https://mobile-app.autify.com/projects/AAA/results/BBB"],"flags":{"timeout":{"name":"timeout","type":"option","char":"t","description":"Timeout seconds when waiting for the finish of the test execution.","multiple":false,"default":300},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false}},"args":[{"name":"test-result-url","description":"Test result URL e.g. https://mobile-app.autify.com/projects/<ID>/results/<ID>","required":true}]},"web:api:create-url-replacement":{"id":"web:api:create-url-replacement","description":"Create a new url replacement for the test plan","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"test-plan-id":{"name":"test-plan-id","type":"option","description":"For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15","required":true,"multiple":false},"create-url-replacement-request":{"name":"create-url-replacement-request","type":"option","description":"The url to replace","required":true,"multiple":false}},"args":[]},"web:api:delete-url-replacement":{"id":"web:api:delete-url-replacement","description":"Delete a url replacement for the test plan","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"test-plan-id":{"name":"test-plan-id","type":"option","description":"For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15","required":true,"multiple":false},"url-replacement-id":{"name":"url-replacement-id","type":"option","description":"url_replacement id","required":true,"multiple":false}},"args":[]},"web:api:describe-result":{"id":"web:api:describe-result","description":"Get a result.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"For example, 1 for the following URL: https://app.autify.com/projects/1/results/4","required":true,"multiple":false},"result-id":{"name":"result-id","type":"option","description":"For example, 4 for the following URL: https://app.autify.com/projects/1/results/4","required":true,"multiple":false}},"args":[]},"web:api:describe-scenario":{"id":"web:api:describe-scenario","description":"Get a scenario.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2","required":true,"multiple":false},"scenario-id":{"name":"scenario-id","type":"option","description":"For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2","required":true,"multiple":false}},"args":[]},"web:api:execute-scenarios":{"id":"web:api:execute-scenarios","description":"You can execute any scenarios in your workspace using any execution environments (which is called \"capabilities\" here).","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios","required":true,"multiple":false},"execute-scenarios-request":{"name":"execute-scenarios-request","type":"option","description":"The scenarios and settings to execute","required":true,"multiple":false}},"args":[]},"web:api:execute-schedule":{"id":"web:api:execute-schedule","description":"Run a test plan. (Note: \"Schedule\" is called as \"TestPlan\" now.)","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"schedule-id":{"name":"schedule-id","type":"option","description":"For example, 3 for the following URL: https://app.autify.com/projects/1/test_plans/3","required":true,"multiple":false}},"args":[]},"web:api:list-capabilities":{"id":"web:api:list-capabilities","description":"List available Capabilities.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"For example, 1 for the following URL: https://app.autify.com/projects/1/capabilities","required":true,"multiple":false},"os":{"name":"os","type":"option","description":"os name to filter","required":false,"multiple":false},"browser":{"name":"browser","type":"option","description":"browser name to filter","required":false,"multiple":false},"device-type":{"name":"device-type","type":"option","description":"device_type name to filter","required":false,"multiple":false}},"args":[]},"web:api:list-results":{"id":"web:api:list-results","description":"List results.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"For example, 1 for the following URL: https://app.autify.com/projects/1/results","required":true,"multiple":false},"page":{"name":"page","type":"option","description":"The number of page returns.","required":false,"multiple":false},"per-page":{"name":"per-page","type":"option","description":"The number of items returns. Default number is 30 and up to a maximum of 100","required":false,"multiple":false},"test-plan-id":{"name":"test-plan-id","type":"option","description":"Test plan ID used to filter results.","required":false,"multiple":false}},"args":[]},"web:api:list-scenarios":{"id":"web:api:list-scenarios","description":"List scenarios.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios","required":true,"multiple":false},"page":{"name":"page","type":"option","description":"The number of page returns.","required":false,"multiple":false}},"args":[]},"web:api:list-url-replacements":{"id":"web:api:list-url-replacements","description":"List url replacements for the test plan","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"test-plan-id":{"name":"test-plan-id","type":"option","description":"For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15","required":true,"multiple":false}},"args":[]},"web:api:update-url-replacement":{"id":"web:api:update-url-replacement","description":"Update a url replacement for the test plan","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"test-plan-id":{"name":"test-plan-id","type":"option","description":"For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15","required":true,"multiple":false},"url-replacement-id":{"name":"url-replacement-id","type":"option","description":"url_replacement id","required":true,"multiple":false},"update-url-replacement-request":{"name":"update-url-replacement-request","type":"option","description":"The url to replace. Either pattern_url or replacement_url is required.","required":true,"multiple":false}},"args":[]},"web:auth:login":{"id":"web:auth:login","description":"Login to Autify for Web","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["Start interactive setup:\n<%= config.bin %> <%= command.id %>","Reading the token from file:\n<%= config.bin %> <%= command.id %> < token.txt"],"flags":{},"args":[]},"web:test:run":{"id":"web:test:run","description":"Run a scenario or test plan.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["Run a test scenario (Default capability):\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000","Run a test plan:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/test_plans/0000","Run and wait a test scenario:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --wait --timeout 600","Run a test scenario with a specific capability:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --os \"Windows Server\" --browser Edge","With URL replacements:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 -r http://example.com=http://example.net -r http://example.org=http://example.net","Run a test with specifying the execution name:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --name \"Sample execution\"","Run a test scenario with Autify Connect:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --autify-connect NAME"],"flags":{"name":{"name":"name","type":"option","char":"n","description":"Name of the test execution. (Only for test scenario execution.)","multiple":false},"url-replacements":{"name":"url-replacements","type":"option","char":"r","description":"URL replacements. Example: http://example.com=http://example.net","multiple":true},"autify-connect":{"name":"autify-connect","type":"option","description":"Name of the Autify Connect Access Point (Only for test scenario execution.)","multiple":false,"exclusive":["autify-connect-client"]},"autify-connect-client":{"name":"autify-connect-client","type":"boolean","description":"[Experimental] Start Autify Connect Client (Only for test scenario execution.)","allowNo":false,"dependsOn":["wait"],"exclusive":["autify-connect"]},"os":{"name":"os","type":"option","description":"OS to run the test","multiple":false},"os-version":{"name":"os-version","type":"option","description":"OS version to run the test","multiple":false},"browser":{"name":"browser","type":"option","description":"Browser to run the test","multiple":false},"device":{"name":"device","type":"option","description":"Device to run the test","multiple":false},"device-type":{"name":"device-type","type":"option","description":"Device type to run the test","multiple":false},"wait":{"name":"wait","type":"boolean","char":"w","description":"Wait until the test finishes.","allowNo":false},"timeout":{"name":"timeout","type":"option","char":"t","description":"Timeout seconds when waiting for the finish of the test execution.","multiple":false,"default":300},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false}},"args":[{"name":"scenario-or-test-plan-url","description":"Scenario URL or Test plan URL e.g. https://app.autify.com/projects/<ID>/(scenarios|test_plans)/<ID>","required":true}]},"web:test:wait":{"id":"web:test:wait","description":"Wait a test result until it finishes.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/results/0000"],"flags":{"timeout":{"name":"timeout","type":"option","char":"t","description":"Timeout seconds when waiting for the finish of the test execution.","multiple":false,"default":300},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false}},"args":[{"name":"test-result-url","description":"Test result URL e.g. https://app.autify.com/projects/<ID>/results/<ID>","required":true}]}}}
|
|
1
|
+
{"version":"0.10.0","commands":{"connect:access-point:create":{"id":"connect:access-point:create","description":"[Experimental] Create an Autify Connect Access Point","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %> --name NAME --web-workspace-id ID"],"flags":{"name":{"name":"name","type":"option","description":"Name of Autify Connect Access Point to be created","required":true,"multiple":false},"web-workspace-id":{"name":"web-workspace-id","type":"option","description":"Workspace ID of Autify for Web to which the Access Point belong","multiple":false}},"args":[]},"connect:access-point:set":{"id":"connect:access-point:set","description":"[Experimental] Set Autify Connect Access Point","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["Start interactive setup:\n<%= config.bin %> <%= command.id %> --name=NAME","Reading the key from file:\n<%= config.bin %> <%= command.id %> --name=NAME < key.txt"],"flags":{"name":{"name":"name","type":"option","description":"Name of the Autify Connect Access Point already created","required":true,"multiple":false}},"args":[]},"connect:client:install":{"id":"connect:client:install","description":"[Experimental] Install Autify Connect Client","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["(Recommended) Install the supported version:\n<%= config.bin %> <%= command.id %>","Install a specific version:\n<%= config.bin %> <%= command.id %> v0.6.1","Install a stable version:\n<%= config.bin %> <%= command.id %> stable"],"flags":{},"args":[{"name":"version","description":"Specify the target version of Autify Connect Client.","default":"v0.6.2"}]},"connect:client:start":{"id":"connect:client:start","description":"[Experimental] Start Autify Connect Client","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"verbose":{"name":"verbose","type":"boolean","description":"Make the operation more talkative.","allowNo":false},"file-logging":{"name":"file-logging","type":"boolean","description":"Logging Autify Connect Client log to a file instead of console.","allowNo":false},"debug-server-port":{"name":"debug-server-port","type":"option","description":"[default: 3000] The server for debugging and monitoring launches on your local machine on the given port.","multiple":false},"web-workspace-id":{"name":"web-workspace-id","type":"option","description":"Workspace ID of Autify for Web to create an ephemeral Access Point. If not specified, it will use the one configured by `autify connect access-point set`, instead.","multiple":false}},"args":[]},"mobile:api:describe-test-result":{"id":"mobile:api:describe-test-result","description":"Get a test result.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"ID of the project from which the test results will be obtained.","required":true,"multiple":false},"id":{"name":"id","type":"option","description":"Test Result ID.","required":true,"multiple":false}},"args":[]},"mobile:api:list-test-results":{"id":"mobile:api:list-test-results","description":"List test results.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"ID of the project from which the list of test results will be retrieved.","required":true,"multiple":false},"page":{"name":"page","type":"option","description":"Page number to be retrieved.","required":false,"multiple":false},"per-page":{"name":"per-page","type":"option","description":"Number of test results per page.","required":false,"multiple":false},"test-plan-id":{"name":"test-plan-id","type":"option","description":"ID of the test plan.","required":false,"multiple":false}},"args":[]},"mobile:api:run-test-plan":{"id":"mobile:api:run-test-plan","description":"Run a test plan","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"test-plan-id":{"name":"test-plan-id","type":"option","description":"The ID of the test plan to run.","required":true,"multiple":false},"run-test-plan-request":{"name":"run-test-plan-request","type":"option","description":"The build_id to execute the test plan.","required":true,"multiple":false}},"args":[]},"mobile:api:upload-build":{"id":"mobile:api:upload-build","description":"Upload the build file.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"The ID of the project to upload the build file to.","required":true,"multiple":false},"file":{"name":"file","type":"option","description":"Build file.","required":true,"multiple":false}},"args":[]},"mobile:auth:login":{"id":"mobile:auth:login","description":"Login to Autify for Mobile","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["Start interactive setup:\n<%= config.bin %> <%= command.id %>","Reading the token from file:\n<%= config.bin %> <%= command.id %> < token.txt"],"flags":{},"args":[]},"mobile:build:upload":{"id":"mobile:build:upload","description":"Upload a build file","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>","Upload build file\n<%= config.bin %> <%= command.id %> --workspace-id AAA ./my.app","Upload build file (JSON output)\n<%= config.bin %> <%= command.id %> --workspace-id AAA ./my.app --json"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"workspace-id":{"name":"workspace-id","type":"option","char":"w","description":"Workspace ID to upload the build file","required":true,"multiple":false}},"args":[{"name":"build-path","description":"File path to the iOS app (*.app) or Android app (*.apk).","required":true}],"_enableJsonFlag":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"mobile:test:run":{"id":"mobile:test:run","description":"Run a test plan.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["Run a test plan with a build ID:\n<%= config.bin %> <%= command.id %> --build-id CCC https://mobile-app.autify.com/projects/AAA/test_plans/BBB","Run a test plan with a new build file:\n<%= config.bin %> <%= command.id %> --build-path ./my.[app|apk] https://mobile-app.autify.com/projects/AAA/test_plans/BBB","Run and wait a test plan:\n<%= config.bin %> <%= command.id %> --build-id CCC https://mobile-app.autify.com/projects/AAA/test_plans/BBB --wait --timeout 600"],"flags":{"build-id":{"name":"build-id","type":"option","description":"ID of the already uploaded build.","multiple":false,"exclusive":["build-path"]},"build-path":{"name":"build-path","type":"option","description":"File path to the iOS app (*.app) or Android app (*.apk).","multiple":false,"exclusive":["build-id"]},"wait":{"name":"wait","type":"boolean","char":"w","description":"Wait until the test finishes.","allowNo":false},"timeout":{"name":"timeout","type":"option","char":"t","description":"Timeout seconds when waiting for the finish of the test execution.","multiple":false,"default":300},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"max-retry-count":{"name":"max-retry-count","type":"option","description":"Maximum retry count. The command can take up to timeout * (max-retry-count + 1).","multiple":false,"default":0}},"args":[{"name":"test-plan-url","description":"Test plan URL e.g. https://mobile-app.autify.com/projects/<ID>/test_plans/<ID>","required":true}]},"mobile:test:wait":{"id":"mobile:test:wait","description":"Wait a test result until it finishes.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %> https://mobile-app.autify.com/projects/AAA/results/BBB"],"flags":{"timeout":{"name":"timeout","type":"option","char":"t","description":"Timeout seconds when waiting for the finish of the test execution.","multiple":false,"default":300},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false}},"args":[{"name":"test-result-url","description":"Test result URL e.g. https://mobile-app.autify.com/projects/<ID>/results/<ID>","required":true}]},"web:api:create-url-replacement":{"id":"web:api:create-url-replacement","description":"Create a new url replacement for the test plan","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"test-plan-id":{"name":"test-plan-id","type":"option","description":"For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15","required":true,"multiple":false},"create-url-replacement-request":{"name":"create-url-replacement-request","type":"option","description":"The url to replace","required":true,"multiple":false}},"args":[]},"web:api:delete-url-replacement":{"id":"web:api:delete-url-replacement","description":"Delete a url replacement for the test plan","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"test-plan-id":{"name":"test-plan-id","type":"option","description":"For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15","required":true,"multiple":false},"url-replacement-id":{"name":"url-replacement-id","type":"option","description":"url_replacement id","required":true,"multiple":false}},"args":[]},"web:api:describe-result":{"id":"web:api:describe-result","description":"Get a result.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"For example, 1 for the following URL: https://app.autify.com/projects/1/results/4","required":true,"multiple":false},"result-id":{"name":"result-id","type":"option","description":"For example, 4 for the following URL: https://app.autify.com/projects/1/results/4","required":true,"multiple":false}},"args":[]},"web:api:describe-scenario":{"id":"web:api:describe-scenario","description":"Get a scenario.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2","required":true,"multiple":false},"scenario-id":{"name":"scenario-id","type":"option","description":"For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2","required":true,"multiple":false}},"args":[]},"web:api:execute-scenarios":{"id":"web:api:execute-scenarios","description":"You can execute any scenarios in your workspace using any execution environments (which is called \"capabilities\" here).","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios","required":true,"multiple":false},"execute-scenarios-request":{"name":"execute-scenarios-request","type":"option","description":"The scenarios and settings to execute","required":true,"multiple":false}},"args":[]},"web:api:execute-schedule":{"id":"web:api:execute-schedule","description":"Run a test plan. (Note: \"Schedule\" is called as \"TestPlan\" now.)","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"schedule-id":{"name":"schedule-id","type":"option","description":"For example, 3 for the following URL: https://app.autify.com/projects/1/test_plans/3","required":true,"multiple":false}},"args":[]},"web:api:list-capabilities":{"id":"web:api:list-capabilities","description":"List available Capabilities.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"For example, 1 for the following URL: https://app.autify.com/projects/1/capabilities","required":true,"multiple":false},"os":{"name":"os","type":"option","description":"os name to filter","required":false,"multiple":false},"browser":{"name":"browser","type":"option","description":"browser name to filter","required":false,"multiple":false},"device-type":{"name":"device-type","type":"option","description":"device_type name to filter","required":false,"multiple":false}},"args":[]},"web:api:list-results":{"id":"web:api:list-results","description":"List results.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"For example, 1 for the following URL: https://app.autify.com/projects/1/results","required":true,"multiple":false},"page":{"name":"page","type":"option","description":"The number of page returns.","required":false,"multiple":false},"per-page":{"name":"per-page","type":"option","description":"The number of items returns. Default number is 30 and up to a maximum of 100","required":false,"multiple":false},"test-plan-id":{"name":"test-plan-id","type":"option","description":"Test plan ID used to filter results.","required":false,"multiple":false}},"args":[]},"web:api:list-scenarios":{"id":"web:api:list-scenarios","description":"List scenarios.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"project-id":{"name":"project-id","type":"option","description":"For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios","required":true,"multiple":false},"page":{"name":"page","type":"option","description":"The number of page returns.","required":false,"multiple":false}},"args":[]},"web:api:list-url-replacements":{"id":"web:api:list-url-replacements","description":"List url replacements for the test plan","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"test-plan-id":{"name":"test-plan-id","type":"option","description":"For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15","required":true,"multiple":false}},"args":[]},"web:api:update-url-replacement":{"id":"web:api:update-url-replacement","description":"Update a url replacement for the test plan","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %>"],"flags":{"test-plan-id":{"name":"test-plan-id","type":"option","description":"For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15","required":true,"multiple":false},"url-replacement-id":{"name":"url-replacement-id","type":"option","description":"url_replacement id","required":true,"multiple":false},"update-url-replacement-request":{"name":"update-url-replacement-request","type":"option","description":"The url to replace. Either pattern_url or replacement_url is required.","required":true,"multiple":false}},"args":[]},"web:auth:login":{"id":"web:auth:login","description":"Login to Autify for Web","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["Start interactive setup:\n<%= config.bin %> <%= command.id %>","Reading the token from file:\n<%= config.bin %> <%= command.id %> < token.txt"],"flags":{},"args":[]},"web:test:run":{"id":"web:test:run","description":"Run a scenario or test plan.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["Run a test scenario (Default capability):\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000","Run a test plan:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/test_plans/0000","Run and wait a test scenario:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --wait --timeout 600","Run a test scenario with a specific capability:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --os \"Windows Server\" --browser Edge","With URL replacements:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 -r http://example.com=http://example.net -r http://example.org=http://example.net","Run a test with specifying the execution name:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --name \"Sample execution\"","Run a test scenario with Autify Connect:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --autify-connect NAME"],"flags":{"name":{"name":"name","type":"option","char":"n","description":"Name of the test execution. (Only for test scenario execution.)","multiple":false},"url-replacements":{"name":"url-replacements","type":"option","char":"r","description":"URL replacements. Example: http://example.com=http://example.net","multiple":true},"autify-connect":{"name":"autify-connect","type":"option","description":"Name of the Autify Connect Access Point (Only for test scenario execution.)","multiple":false,"exclusive":["autify-connect-client"]},"autify-connect-client":{"name":"autify-connect-client","type":"boolean","description":"[Experimental] Start Autify Connect Client (Only for test scenario execution.)","allowNo":false,"dependsOn":["wait"],"exclusive":["autify-connect"]},"autify-connect-client-verbose":{"name":"autify-connect-client-verbose","type":"boolean","description":"[Experimental] Verbose output for Autify Connect Client (Only for test scenario execution.)","allowNo":false,"dependsOn":["autify-connect-client"]},"autify-connect-client-file-logging":{"name":"autify-connect-client-file-logging","type":"boolean","description":"[Experimental] Logging Autify Connect Client log to a file instead of console.","allowNo":false,"dependsOn":["autify-connect-client"]},"autify-connect-client-debug-server-port":{"name":"autify-connect-client-debug-server-port","type":"option","description":"[Experimental] [default: 3000] Port for Autify Connect Client debug server.","multiple":false,"dependsOn":["autify-connect-client"]},"os":{"name":"os","type":"option","description":"OS to run the test","multiple":false},"os-version":{"name":"os-version","type":"option","description":"OS version to run the test","multiple":false},"browser":{"name":"browser","type":"option","description":"Browser to run the test","multiple":false},"device":{"name":"device","type":"option","description":"Device to run the test","multiple":false},"device-type":{"name":"device-type","type":"option","description":"Device type to run the test","multiple":false},"wait":{"name":"wait","type":"boolean","char":"w","description":"Wait until the test finishes.","allowNo":false},"timeout":{"name":"timeout","type":"option","char":"t","description":"Timeout seconds when waiting for the finish of the test execution.","multiple":false,"default":300},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false},"max-retry-count":{"name":"max-retry-count","type":"option","description":"Maximum retry count. The command can take up to timeout * (max-retry-count + 1).","multiple":false,"default":0}},"args":[{"name":"scenario-or-test-plan-url","description":"Scenario URL or Test plan URL e.g. https://app.autify.com/projects/<ID>/(scenarios|test_plans)/<ID>","required":true}]},"web:test:wait":{"id":"web:test:wait","description":"Wait a test result until it finishes.","strict":true,"pluginName":"@autifyhq/autify-cli","pluginAlias":"@autifyhq/autify-cli","pluginType":"core","aliases":[],"examples":["<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/results/0000"],"flags":{"timeout":{"name":"timeout","type":"option","char":"t","description":"Timeout seconds when waiting for the finish of the test execution.","multiple":false,"default":300},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose output","allowNo":false}},"args":[{"name":"test-result-url","description":"Test result URL e.g. https://app.autify.com/projects/<ID>/results/<ID>","required":true}]}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autifyhq/autify-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Autify Command Line Interface (CLI)",
|
|
5
5
|
"author": "Autify",
|
|
6
6
|
"bin": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"/oclif.manifest.json"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@autifyhq/autify-sdk": "^0.
|
|
20
|
+
"@autifyhq/autify-sdk": "^0.4.0",
|
|
21
21
|
"@oclif/core": "^1",
|
|
22
22
|
"@oclif/errors": "^1.3.5",
|
|
23
23
|
"@oclif/plugin-help": "^5",
|
|
@@ -25,8 +25,9 @@
|
|
|
25
25
|
"@oclif/plugin-update": "^3.0.0",
|
|
26
26
|
"@oclif/plugin-warn-if-update-available": "^2.0.4",
|
|
27
27
|
"archiver": "^5.3.1",
|
|
28
|
-
"envfile": "^6.
|
|
28
|
+
"envfile": "^6.18.0",
|
|
29
29
|
"inquirer": "^8.2.4",
|
|
30
|
+
"is-running": "^2.1.0",
|
|
30
31
|
"listr": "^0.14.3",
|
|
31
32
|
"node-emoji": "^1.11.0",
|
|
32
33
|
"node-fetch": "^2.6.7",
|
|
@@ -35,8 +36,9 @@
|
|
|
35
36
|
"tempy": "^3.0.0",
|
|
36
37
|
"tsimportlib": "^0.0.3",
|
|
37
38
|
"unzip-stream": "^0.3.1",
|
|
39
|
+
"uuid": "^8.3.2",
|
|
38
40
|
"which": "^2.0.2",
|
|
39
|
-
"winston": "^3.8.
|
|
41
|
+
"winston": "^3.8.2"
|
|
40
42
|
},
|
|
41
43
|
"devDependencies": {
|
|
42
44
|
"@autifyhq/autify-cli-integration-test": "*",
|
|
@@ -44,13 +46,16 @@
|
|
|
44
46
|
"@types/archiver": "^5.3.1",
|
|
45
47
|
"@types/chai": "^4",
|
|
46
48
|
"@types/inquirer": "^8.2.1",
|
|
49
|
+
"@types/is-running": "^2.1.0",
|
|
47
50
|
"@types/listr": "^0.14.4",
|
|
48
51
|
"@types/mocha": "^9.1.1",
|
|
49
|
-
"@types/node": "^16.11.
|
|
52
|
+
"@types/node": "^16.11.58",
|
|
50
53
|
"@types/node-emoji": "^1.8.1",
|
|
51
54
|
"@types/node-fetch": "^2.6.2",
|
|
52
55
|
"@types/unzip-stream": "^0.3.1",
|
|
56
|
+
"@types/uuid": "^8.3.4",
|
|
53
57
|
"chai": "^4",
|
|
58
|
+
"cross-env": "^7.0.3",
|
|
54
59
|
"eslint": "^7.32.0",
|
|
55
60
|
"eslint-config-oclif": "^4",
|
|
56
61
|
"eslint-config-oclif-typescript": "^1.0.2",
|
|
@@ -144,7 +149,9 @@
|
|
|
144
149
|
"release": "ts-node ./scripts/release.ts",
|
|
145
150
|
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
146
151
|
"test:integration": "npm run build -w integration-test && autify-cli-integration-test",
|
|
147
|
-
"test:integration:
|
|
152
|
+
"test:integration:dev": "npm run build -w integration-test && cross-env AUTIFY_CLI_PATH=../bin/dev autify-cli-integration-test",
|
|
153
|
+
"test:integration:record": "npm run build -w integration-test && cross-env AUTIFY_CLI_INTEGRATION_TEST_RECORD=1 autify-cli-integration-test",
|
|
154
|
+
"test:integration:record:dev": "npm run build -w integration-test && cross-env AUTIFY_CLI_PATH=../bin/dev AUTIFY_CLI_INTEGRATION_TEST_RECORD=1 autify-cli-integration-test",
|
|
148
155
|
"version": "oclif readme && git add README.md",
|
|
149
156
|
"prepare": "per-env || true",
|
|
150
157
|
"prepare:development": "husky install",
|