@autifyhq/autify-cli 0.5.0 → 0.7.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 +102 -3
- package/dist/autify/getWaitIntervalSecond.d.ts +1 -0
- package/dist/autify/getWaitIntervalSecond.js +15 -0
- package/dist/autify/mobile/createZip.d.ts +1 -0
- package/dist/autify/mobile/createZip.js +47 -0
- package/dist/autify/mobile/getBuildDetailUrl.d.ts +1 -0
- package/dist/autify/mobile/getBuildDetailUrl.js +17 -0
- package/dist/autify/mobile/getTestResultUrl.d.ts +1 -0
- package/dist/autify/mobile/getTestResultUrl.js +16 -0
- package/dist/autify/mobile/inspectBuildFile.d.ts +1 -0
- package/dist/autify/mobile/inspectBuildFile.js +34 -0
- package/dist/autify/mobile/parseTestPlanUrl.d.ts +4 -0
- package/dist/autify/mobile/parseTestPlanUrl.js +17 -0
- package/dist/autify/mobile/parseTestResultUrl.d.ts +4 -0
- package/dist/autify/mobile/parseTestResultUrl.js +17 -0
- package/dist/autify/mobile/uploadBuild.d.ts +2 -0
- package/dist/autify/mobile/uploadBuild.js +13 -0
- package/dist/autify/mobile/waitTestResult.d.ts +9 -0
- package/dist/autify/mobile/waitTestResult.js +69 -0
- package/dist/autify/web/runTest.d.ts +2 -1
- package/dist/autify/web/runTest.js +9 -1
- package/dist/autify/web/waitTestResult.d.ts +1 -0
- package/dist/autify/web/waitTestResult.js +1 -1
- package/dist/commands/mobile/build/upload.d.ts +17 -0
- package/dist/commands/mobile/build/upload.js +46 -0
- package/dist/commands/mobile/test/run.d.ts +18 -0
- package/dist/commands/mobile/test/run.js +86 -0
- package/dist/commands/mobile/test/wait.d.ts +15 -0
- package/dist/commands/mobile/test/wait.js +60 -0
- package/dist/commands/web/api/create-url-replacement.d.ts +1 -1
- package/dist/commands/web/api/delete-url-replacement.d.ts +2 -2
- package/dist/commands/web/api/describe-result.d.ts +2 -2
- package/dist/commands/web/api/describe-scenario.d.ts +2 -2
- package/dist/commands/web/api/execute-scenarios.d.ts +1 -1
- package/dist/commands/web/api/execute-schedule.d.ts +1 -1
- package/dist/commands/web/api/list-capabilities.d.ts +1 -1
- package/dist/commands/web/api/list-results.d.ts +1 -1
- package/dist/commands/web/api/list-scenarios.d.ts +1 -1
- package/dist/commands/web/api/list-url-replacements.d.ts +1 -1
- package/dist/commands/web/api/update-url-replacement.d.ts +2 -2
- package/dist/commands/web/test/run.d.ts +3 -2
- package/dist/commands/web/test/run.js +6 -0
- package/dist/commands/web/test/wait.d.ts +1 -1
- package/dist/commands/web/test/wait.js +7 -1
- package/dist/config.d.ts +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ $ npm install -g @autifyhq/autify-cli
|
|
|
20
20
|
$ autify COMMAND
|
|
21
21
|
running command...
|
|
22
22
|
$ autify (--version)
|
|
23
|
-
@autifyhq/autify-cli/0.
|
|
23
|
+
@autifyhq/autify-cli/0.7.0 linux-x64 node-v16.17.0
|
|
24
24
|
$ autify --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ autify COMMAND
|
|
@@ -62,6 +62,9 @@ After the installation, you can always get the latest update on `stable` channel
|
|
|
62
62
|
* [`autify mobile api run-test-plan`](#autify-mobile-api-run-test-plan)
|
|
63
63
|
* [`autify mobile api upload-build`](#autify-mobile-api-upload-build)
|
|
64
64
|
* [`autify mobile auth login`](#autify-mobile-auth-login)
|
|
65
|
+
* [`autify mobile build upload BUILD-PATH`](#autify-mobile-build-upload-build-path)
|
|
66
|
+
* [`autify mobile test run TEST-PLAN-URL`](#autify-mobile-test-run-test-plan-url)
|
|
67
|
+
* [`autify mobile test wait TEST-RESULT-URL`](#autify-mobile-test-wait-test-result-url)
|
|
65
68
|
* [`autify update [CHANNEL]`](#autify-update-channel)
|
|
66
69
|
* [`autify web api create-url-replacement`](#autify-web-api-create-url-replacement)
|
|
67
70
|
* [`autify web api delete-url-replacement`](#autify-web-api-delete-url-replacement)
|
|
@@ -198,6 +201,96 @@ EXAMPLES
|
|
|
198
201
|
$ autify mobile auth login < token.txt
|
|
199
202
|
```
|
|
200
203
|
|
|
204
|
+
## `autify mobile build upload BUILD-PATH`
|
|
205
|
+
|
|
206
|
+
Upload a build file
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
USAGE
|
|
210
|
+
$ autify mobile build upload [BUILD-PATH] -w <value> [--json]
|
|
211
|
+
|
|
212
|
+
ARGUMENTS
|
|
213
|
+
BUILD-PATH File path to the iOS app (*.app) or Android app (*.apk).
|
|
214
|
+
|
|
215
|
+
FLAGS
|
|
216
|
+
-w, --workspace-id=<value> (required) Workspace ID to upload the build file
|
|
217
|
+
|
|
218
|
+
GLOBAL FLAGS
|
|
219
|
+
--json Format output as json.
|
|
220
|
+
|
|
221
|
+
DESCRIPTION
|
|
222
|
+
Upload a build file
|
|
223
|
+
|
|
224
|
+
EXAMPLES
|
|
225
|
+
$ autify mobile build upload
|
|
226
|
+
|
|
227
|
+
Upload build file
|
|
228
|
+
|
|
229
|
+
$ autify mobile build upload --workspace-id AAA ./my.app
|
|
230
|
+
|
|
231
|
+
Upload build file (JSON output)
|
|
232
|
+
|
|
233
|
+
$ autify mobile build upload --workspace-id AAA ./my.app --json
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## `autify mobile test run TEST-PLAN-URL`
|
|
237
|
+
|
|
238
|
+
Run a test plan.
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
USAGE
|
|
242
|
+
$ autify mobile test run [TEST-PLAN-URL] [--build-id <value> | --build-path <value>] [-w] [-t <value>] [-v]
|
|
243
|
+
|
|
244
|
+
ARGUMENTS
|
|
245
|
+
TEST-PLAN-URL Test plan URL e.g. https://mobile-app.autify.com/projects/<ID>/test_plans/<ID>
|
|
246
|
+
|
|
247
|
+
FLAGS
|
|
248
|
+
-t, --timeout=<value> [default: 300] Timeout seconds when waiting for the finish of the test execution.
|
|
249
|
+
-v, --verbose Verbose output
|
|
250
|
+
-w, --wait Wait until the test finishes.
|
|
251
|
+
--build-id=<value> ID of the already uploaded build.
|
|
252
|
+
--build-path=<value> File path to the iOS app (*.app) or Android app (*.apk).
|
|
253
|
+
|
|
254
|
+
DESCRIPTION
|
|
255
|
+
Run a test plan.
|
|
256
|
+
|
|
257
|
+
EXAMPLES
|
|
258
|
+
Run a test plan with a build ID:
|
|
259
|
+
|
|
260
|
+
$ autify mobile test run --build-id CCC https://mobile-app.autify.com/projects/AAA/test_plans/BBB
|
|
261
|
+
|
|
262
|
+
Run a test plan with a new build file:
|
|
263
|
+
|
|
264
|
+
$ autify mobile test run --build-path ./my.[app|apk] https://mobile-app.autify.com/projects/AAA/test_plans/BBB
|
|
265
|
+
|
|
266
|
+
Run and wait a test plan:
|
|
267
|
+
|
|
268
|
+
$ autify mobile test run --build-id CCC https://mobile-app.autify.com/projects/AAA/test_plans/BBB --wait \
|
|
269
|
+
--timeout 600
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## `autify mobile test wait TEST-RESULT-URL`
|
|
273
|
+
|
|
274
|
+
Wait a test result until it finishes.
|
|
275
|
+
|
|
276
|
+
```
|
|
277
|
+
USAGE
|
|
278
|
+
$ autify mobile test wait [TEST-RESULT-URL] [-t <value>] [-v]
|
|
279
|
+
|
|
280
|
+
ARGUMENTS
|
|
281
|
+
TEST-RESULT-URL Test result URL e.g. https://mobile-app.autify.com/projects/<ID>/results/<ID>
|
|
282
|
+
|
|
283
|
+
FLAGS
|
|
284
|
+
-t, --timeout=<value> [default: 300] Timeout seconds when waiting for the finish of the test execution.
|
|
285
|
+
-v, --verbose Verbose output
|
|
286
|
+
|
|
287
|
+
DESCRIPTION
|
|
288
|
+
Wait a test result until it finishes.
|
|
289
|
+
|
|
290
|
+
EXAMPLES
|
|
291
|
+
$ autify mobile test wait https://mobile-app.autify.com/projects/AAA/results/BBB
|
|
292
|
+
```
|
|
293
|
+
|
|
201
294
|
## `autify update [CHANNEL]`
|
|
202
295
|
|
|
203
296
|
update the autify CLI
|
|
@@ -482,8 +575,9 @@ Run a scenario or test plan.
|
|
|
482
575
|
|
|
483
576
|
```
|
|
484
577
|
USAGE
|
|
485
|
-
$ autify web test run [SCENARIO-OR-TEST-PLAN-URL] [-n <value>] [-r <value>] [--
|
|
486
|
-
<value>] [--browser <value>] [--device <value>] [--device-type <value>] [-w] [-t <value>]
|
|
578
|
+
$ autify web test run [SCENARIO-OR-TEST-PLAN-URL] [-n <value>] [-r <value>] [--autify-connect <value>] [--os
|
|
579
|
+
<value>] [--os-version <value>] [--browser <value>] [--device <value>] [--device-type <value>] [-w] [-t <value>]
|
|
580
|
+
[-v]
|
|
487
581
|
|
|
488
582
|
ARGUMENTS
|
|
489
583
|
SCENARIO-OR-TEST-PLAN-URL Scenario URL or Test plan URL e.g.
|
|
@@ -495,6 +589,7 @@ FLAGS
|
|
|
495
589
|
-t, --timeout=<value> [default: 300] Timeout seconds when waiting for the finish of the test execution.
|
|
496
590
|
-v, --verbose Verbose output
|
|
497
591
|
-w, --wait Wait until the test finishes.
|
|
592
|
+
--autify-connect=<value> Name of the Autify Connect Access Point (Only for test scenario execution.)
|
|
498
593
|
--browser=<value> Browser to run the test
|
|
499
594
|
--device=<value> Device to run the test
|
|
500
595
|
--device-type=<value> Device type to run the test
|
|
@@ -529,6 +624,10 @@ EXAMPLES
|
|
|
529
624
|
Run a test with specifying the execution name:
|
|
530
625
|
|
|
531
626
|
$ autify web test run https://app.autify.com/projects/0000/scenarios/0000 --name "Sample execution"
|
|
627
|
+
|
|
628
|
+
Run a test scenario with Autify Connect:
|
|
629
|
+
|
|
630
|
+
$ autify web test run https://app.autify.com/projects/0000/scenarios/0000 --autify-connect NAME
|
|
532
631
|
```
|
|
533
632
|
|
|
534
633
|
## `autify web test wait TEST-RESULT-URL`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getWaitIntervalSecond: (configDir: string) => number;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWaitIntervalSecond = void 0;
|
|
4
|
+
/* eslint-disable unicorn/filename-case */
|
|
5
|
+
const config_1 = require("../config");
|
|
6
|
+
const DEFAULT_INTERVAL_SECOND = 1;
|
|
7
|
+
const getWaitIntervalSecond = (configDir) => {
|
|
8
|
+
var _a;
|
|
9
|
+
const waitIntervalSecondString = (_a = (0, config_1.get)(configDir, "AUTIFY_TEST_WAIT_INTERVAL_SECOND")) !== null && _a !== void 0 ? _a : String(DEFAULT_INTERVAL_SECOND);
|
|
10
|
+
const waitIntervalSecond = Number.parseFloat(waitIntervalSecondString);
|
|
11
|
+
if (Number.isNaN(waitIntervalSecond))
|
|
12
|
+
return DEFAULT_INTERVAL_SECOND;
|
|
13
|
+
return waitIntervalSecond;
|
|
14
|
+
};
|
|
15
|
+
exports.getWaitIntervalSecond = getWaitIntervalSecond;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const createZip: (buildPath: string) => Promise<string>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable unicorn/filename-case */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.createZip = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const errors_1 = require("@oclif/errors");
|
|
7
|
+
const node_child_process_1 = require("node:child_process");
|
|
8
|
+
const node_fs_1 = require("node:fs");
|
|
9
|
+
const node_os_1 = require("node:os");
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
|
+
const which_1 = tslib_1.__importDefault(require("which"));
|
|
12
|
+
const tsimportlib_1 = require("tsimportlib");
|
|
13
|
+
const checkPlatform = () => {
|
|
14
|
+
const supportedPlatforms = ["linux", "darwin"];
|
|
15
|
+
const p = (0, node_os_1.platform)();
|
|
16
|
+
if (!supportedPlatforms.includes(p)) {
|
|
17
|
+
throw new errors_1.CLIError(`${p} is not supported to zip file. Only supports: ${supportedPlatforms}`);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const checkBuildPath = (buildPath) => {
|
|
21
|
+
if (!(0, node_fs_1.lstatSync)(buildPath).isDirectory()) {
|
|
22
|
+
throw new errors_1.CLIError(`Build path (${buildPath}) is expected to directory.`);
|
|
23
|
+
}
|
|
24
|
+
const parentPath = (0, node_path_1.resolve)((0, node_path_1.dirname)(buildPath));
|
|
25
|
+
const name = (0, node_path_1.basename)(buildPath);
|
|
26
|
+
return [parentPath, name];
|
|
27
|
+
};
|
|
28
|
+
const findZip = () => {
|
|
29
|
+
const zip = which_1.default.sync("zip", { nothrow: true });
|
|
30
|
+
if (!zip) {
|
|
31
|
+
throw new errors_1.CLIError("Can't find zip command in PATH.");
|
|
32
|
+
}
|
|
33
|
+
return zip;
|
|
34
|
+
};
|
|
35
|
+
const createZip = async (buildPath) => {
|
|
36
|
+
checkPlatform();
|
|
37
|
+
const [parentPath, name] = checkBuildPath(buildPath);
|
|
38
|
+
const zip = findZip();
|
|
39
|
+
const { temporaryFile } = (await (0, tsimportlib_1.dynamicImport)("tempy",
|
|
40
|
+
// eslint-disable-next-line unicorn/prefer-module
|
|
41
|
+
module));
|
|
42
|
+
const zipFile = temporaryFile({ name: "build.zip" });
|
|
43
|
+
// TODO: Use JSZip.
|
|
44
|
+
(0, node_child_process_1.execFileSync)(zip, ["-r", zipFile, name], { cwd: parentPath });
|
|
45
|
+
return zipFile;
|
|
46
|
+
};
|
|
47
|
+
exports.createZip = createZip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getBuildDetailUrl: (configDir: string, workspaceId: string, os: "ios" | "android", buildId: string) => string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBuildDetailUrl = void 0;
|
|
4
|
+
/* eslint-disable unicorn/filename-case */
|
|
5
|
+
const autify_sdk_1 = require("@autifyhq/autify-sdk");
|
|
6
|
+
const config_1 = require("../../config");
|
|
7
|
+
const getBuildDetailUrl = (configDir, workspaceId, os, buildId) => {
|
|
8
|
+
var _a;
|
|
9
|
+
// Currently, it's heuristic. We could provide a new API or include the URL in the response of the existing APIs.
|
|
10
|
+
let basePath = (_a = (0, config_1.get)(configDir, "AUTIFY_MOBILE_BASE_PATH")) !== null && _a !== void 0 ? _a : autify_sdk_1.MOBILE_BASE_PATH;
|
|
11
|
+
if (basePath.startsWith("http://localhost:"))
|
|
12
|
+
basePath = autify_sdk_1.MOBILE_BASE_PATH; // Override if it's running integration tests.
|
|
13
|
+
const endpoint = basePath.slice(0, Math.max(0, basePath.indexOf("/api/v1"))); // Assuming the UI endpoint is the same as API endpoint.
|
|
14
|
+
// Currently, there is no way to know the page number via API. We assume the latest build will be shown in page 1 now.
|
|
15
|
+
return `${endpoint}/projects/${workspaceId}/builds?os=${os}&selectedBuildId=${buildId}&page=1`;
|
|
16
|
+
};
|
|
17
|
+
exports.getBuildDetailUrl = getBuildDetailUrl;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getMobileTestResultUrl: (configDir: string, workspaceId: string, resultId: string) => string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMobileTestResultUrl = void 0;
|
|
4
|
+
/* eslint-disable unicorn/filename-case */
|
|
5
|
+
const autify_sdk_1 = require("@autifyhq/autify-sdk");
|
|
6
|
+
const config_1 = require("../../config");
|
|
7
|
+
const getMobileTestResultUrl = (configDir, workspaceId, resultId) => {
|
|
8
|
+
var _a;
|
|
9
|
+
// Currently, it's heuristic. We could provide a new API or include the URL in the response of the existing APIs.
|
|
10
|
+
let basePath = (_a = (0, config_1.get)(configDir, "AUTIFY_MOBILE_BASE_PATH")) !== null && _a !== void 0 ? _a : autify_sdk_1.MOBILE_BASE_PATH;
|
|
11
|
+
if (basePath.startsWith("http://localhost:"))
|
|
12
|
+
basePath = autify_sdk_1.MOBILE_BASE_PATH; // Override if it's running integration tests.
|
|
13
|
+
const endpoint = basePath.slice(0, Math.max(0, basePath.indexOf("/api/v1"))); // Assuming the UI endpoint is the same as API endpoint.
|
|
14
|
+
return `${endpoint}/projects/${workspaceId}/results/${resultId}`;
|
|
15
|
+
};
|
|
16
|
+
exports.getMobileTestResultUrl = getMobileTestResultUrl;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const inspectBuildFile: (buildPath: string) => Promise<[string, "ios" | "android"]>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inspectBuildFile = void 0;
|
|
4
|
+
/* eslint-disable unicorn/filename-case */
|
|
5
|
+
const errors_1 = require("@oclif/errors");
|
|
6
|
+
const node_fs_1 = require("node:fs");
|
|
7
|
+
const createZip_1 = require("./createZip");
|
|
8
|
+
const isIosApp = (buildPath) => {
|
|
9
|
+
return ((0, node_fs_1.lstatSync)(buildPath).isDirectory() &&
|
|
10
|
+
buildPath.replace(/\/$/, "").endsWith(".app"));
|
|
11
|
+
};
|
|
12
|
+
const isAndroidApp = (buildPath) => {
|
|
13
|
+
return (0, node_fs_1.lstatSync)(buildPath).isFile() && buildPath.endsWith(".apk");
|
|
14
|
+
};
|
|
15
|
+
const getOs = (buildPath) => {
|
|
16
|
+
if (isIosApp(buildPath))
|
|
17
|
+
return "ios";
|
|
18
|
+
if (isAndroidApp(buildPath))
|
|
19
|
+
return "android";
|
|
20
|
+
throw new errors_1.CLIError(`${buildPath} doesn't look like iOS app nor Android apk.`);
|
|
21
|
+
};
|
|
22
|
+
const getUploadPath = async (buildPath, os) => {
|
|
23
|
+
if (os === "ios")
|
|
24
|
+
return (0, createZip_1.createZip)(buildPath);
|
|
25
|
+
if (os === "android")
|
|
26
|
+
return buildPath;
|
|
27
|
+
throw new errors_1.CLIError(`Invalid os: ${os}`);
|
|
28
|
+
};
|
|
29
|
+
const inspectBuildFile = async (buildPath) => {
|
|
30
|
+
const os = getOs(buildPath);
|
|
31
|
+
const uploadPath = await getUploadPath(buildPath, os);
|
|
32
|
+
return [uploadPath, os];
|
|
33
|
+
};
|
|
34
|
+
exports.inspectBuildFile = inspectBuildFile;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseTestPlanUrl = void 0;
|
|
4
|
+
/* eslint-disable unicorn/filename-case */
|
|
5
|
+
const errors_1 = require("@oclif/errors");
|
|
6
|
+
const parseTestPlanUrl = (url) => {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
const { pathname } = new URL(url);
|
|
9
|
+
const testPlanUrlPathRegExp = /\/projects\/(?<workspaceId>[^/]+)\/test_plans\/(?<testPlanId>[^/]+)/;
|
|
10
|
+
const match = testPlanUrlPathRegExp.exec(pathname);
|
|
11
|
+
const workspaceId = (_a = match === null || match === void 0 ? void 0 : match.groups) === null || _a === void 0 ? void 0 : _a.workspaceId;
|
|
12
|
+
const testPlanId = (_b = match === null || match === void 0 ? void 0 : match.groups) === null || _b === void 0 ? void 0 : _b.testPlanId;
|
|
13
|
+
if (!workspaceId || !testPlanId)
|
|
14
|
+
throw new errors_1.CLIError(`Invalid URL: ${url}`);
|
|
15
|
+
return { workspaceId, testPlanId };
|
|
16
|
+
};
|
|
17
|
+
exports.parseTestPlanUrl = parseTestPlanUrl;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseTestResultUrl = void 0;
|
|
4
|
+
/* eslint-disable unicorn/filename-case */
|
|
5
|
+
const errors_1 = require("@oclif/errors");
|
|
6
|
+
const parseTestResultUrl = (url) => {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
const { pathname } = new URL(url);
|
|
9
|
+
const testResultUrlPathRegExp = /\/projects\/(?<workspaceId>[^/]+)\/results\/(?<resultId>[^/]+)/;
|
|
10
|
+
const match = testResultUrlPathRegExp.exec(pathname);
|
|
11
|
+
const workspaceId = (_a = match === null || match === void 0 ? void 0 : match.groups) === null || _a === void 0 ? void 0 : _a.workspaceId;
|
|
12
|
+
const resultId = (_b = match === null || match === void 0 ? void 0 : match.groups) === null || _b === void 0 ? void 0 : _b.resultId;
|
|
13
|
+
if (!workspaceId || !resultId)
|
|
14
|
+
throw new errors_1.CLIError(`Invalid URL: ${url}`);
|
|
15
|
+
return { workspaceId, resultId };
|
|
16
|
+
};
|
|
17
|
+
exports.parseTestResultUrl = parseTestResultUrl;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uploadBuild = void 0;
|
|
4
|
+
const errors_1 = require("@oclif/errors");
|
|
5
|
+
const inspectBuildFile_1 = require("./inspectBuildFile");
|
|
6
|
+
const uploadBuild = async (client, workspaceId, buildPath) => {
|
|
7
|
+
const [uploadPath, os] = await (0, inspectBuildFile_1.inspectBuildFile)(buildPath);
|
|
8
|
+
const res = await client.uploadBuild(workspaceId, uploadPath);
|
|
9
|
+
if (!res.data.id)
|
|
10
|
+
throw new errors_1.CLIError(`Failed to upload ${buildPath}.`);
|
|
11
|
+
return [res.data.id, os];
|
|
12
|
+
};
|
|
13
|
+
exports.uploadBuild = uploadBuild;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MobileClient } from "@autifyhq/autify-sdk";
|
|
2
|
+
export declare const waitTestResult: (client: MobileClient, workspaceId: string, resultId: string, options: {
|
|
3
|
+
timeoutSecond: number;
|
|
4
|
+
verbose: boolean;
|
|
5
|
+
intervalSecond: number;
|
|
6
|
+
}) => Promise<{
|
|
7
|
+
isPassed: boolean;
|
|
8
|
+
data: any;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.waitTestResult = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
/* eslint-disable unicorn/filename-case */
|
|
6
|
+
const errors_1 = require("@oclif/errors");
|
|
7
|
+
const listr_1 = tslib_1.__importDefault(require("listr"));
|
|
8
|
+
const promises_1 = require("node:timers/promises");
|
|
9
|
+
const node_emoji_1 = tslib_1.__importDefault(require("node-emoji"));
|
|
10
|
+
const waitUntil = async (callback, timeoutSecond, intervalSecond, verbose) => {
|
|
11
|
+
const task = new listr_1.default([
|
|
12
|
+
{
|
|
13
|
+
title: `Waiting... (timeout: ${timeoutSecond} s)`,
|
|
14
|
+
task: async (ctx, task) => {
|
|
15
|
+
for await (const startTime of (0, promises_1.setInterval)(intervalSecond * 1000, Date.now())) {
|
|
16
|
+
const now = Date.now();
|
|
17
|
+
if (now - startTime > timeoutSecond * 1000) {
|
|
18
|
+
throw new errors_1.CLIError(`Timeout after ${timeoutSecond} seconds.`);
|
|
19
|
+
}
|
|
20
|
+
const result = await callback(task);
|
|
21
|
+
if (result) {
|
|
22
|
+
ctx.result = result;
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
], {
|
|
29
|
+
renderer: verbose ? "verbose" : "default",
|
|
30
|
+
nonTTYRenderer: "verbose",
|
|
31
|
+
});
|
|
32
|
+
return (await task.run()).result;
|
|
33
|
+
};
|
|
34
|
+
const emojiStatus = (status) => {
|
|
35
|
+
if (status === "queuing")
|
|
36
|
+
return node_emoji_1.default.get("cyclone") + " Queuing";
|
|
37
|
+
if (status === "waiting")
|
|
38
|
+
return node_emoji_1.default.get("hourglass_flowing_sand") + " Waiting";
|
|
39
|
+
if (status === "running")
|
|
40
|
+
return node_emoji_1.default.get("car") + " Running";
|
|
41
|
+
if (status === "passed")
|
|
42
|
+
return node_emoji_1.default.get("+1") + " Passed ";
|
|
43
|
+
if (status === "failed")
|
|
44
|
+
return node_emoji_1.default.get("rotating_light") + " Failed ";
|
|
45
|
+
if (status === "skipped")
|
|
46
|
+
return node_emoji_1.default.get("zzz") + " Skipped";
|
|
47
|
+
return node_emoji_1.default.get("grey_question") + " None ";
|
|
48
|
+
};
|
|
49
|
+
const describeTestResult = (client, workspaceId, resultId) => async (task) => {
|
|
50
|
+
var _a;
|
|
51
|
+
const { data } = await client.describeTestResult(workspaceId, resultId);
|
|
52
|
+
const testPlanStatus = emojiStatus(data.status);
|
|
53
|
+
const testCaseStatus = [];
|
|
54
|
+
for (const testCaseResult of (_a = data.test_case_results) !== null && _a !== void 0 ? _a : []) {
|
|
55
|
+
testCaseStatus.push(emojiStatus(testCaseResult.status));
|
|
56
|
+
}
|
|
57
|
+
task.output = `TestPlan: ${testPlanStatus}, TestCases: ${testCaseStatus.join(" / ")}`;
|
|
58
|
+
if (data.finished_at)
|
|
59
|
+
return data;
|
|
60
|
+
};
|
|
61
|
+
const waitTestResult = async (client, workspaceId, resultId, options) => {
|
|
62
|
+
const data = await waitUntil(describeTestResult(client, workspaceId, resultId), options.timeoutSecond, options.intervalSecond, options.verbose);
|
|
63
|
+
const isPassed = (data === null || data === void 0 ? void 0 : data.status) === "passed";
|
|
64
|
+
return {
|
|
65
|
+
isPassed,
|
|
66
|
+
data,
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
exports.waitTestResult = waitTestResult;
|
|
@@ -5,8 +5,9 @@ declare type RunTestProps = Readonly<{
|
|
|
5
5
|
option: CapabilityOption;
|
|
6
6
|
name?: string;
|
|
7
7
|
urlReplacements: CreateUrlReplacementRequest[];
|
|
8
|
+
autifyConnect?: string;
|
|
8
9
|
}>;
|
|
9
|
-
export declare const runTest: (client: WebClient, url: string, { option, name, urlReplacements }: RunTestProps) => Promise<{
|
|
10
|
+
export declare const runTest: (client: WebClient, url: string, { option, name, urlReplacements, autifyConnect }: RunTestProps) => Promise<{
|
|
10
11
|
workspaceId: number;
|
|
11
12
|
resultId: number;
|
|
12
13
|
capability: string;
|
|
@@ -52,7 +52,7 @@ const capabilityToString = ({ os, os_version, browser, browser_version, device,
|
|
|
52
52
|
.filter((s) => Boolean(s))
|
|
53
53
|
.join(" ");
|
|
54
54
|
};
|
|
55
|
-
const runTest = async (client, url, { option, name, urlReplacements }) => {
|
|
55
|
+
const runTest = async (client, url, { option, name, urlReplacements, autifyConnect }) => {
|
|
56
56
|
const scenario = parseScenarioUrl(url);
|
|
57
57
|
const testPlan = parseTestPlanUrl(url);
|
|
58
58
|
if (scenario) {
|
|
@@ -64,6 +64,12 @@ const runTest = async (client, url, { option, name, urlReplacements }) => {
|
|
|
64
64
|
scenarios: [{ id: scenarioId }],
|
|
65
65
|
// eslint-disable-next-line camelcase
|
|
66
66
|
url_replacements: urlReplacements,
|
|
67
|
+
...(autifyConnect && {
|
|
68
|
+
// eslint-disable-next-line camelcase
|
|
69
|
+
autify_connect: {
|
|
70
|
+
name: autifyConnect,
|
|
71
|
+
},
|
|
72
|
+
}),
|
|
67
73
|
});
|
|
68
74
|
return {
|
|
69
75
|
workspaceId,
|
|
@@ -76,6 +82,8 @@ const runTest = async (client, url, { option, name, urlReplacements }) => {
|
|
|
76
82
|
throw new errors_1.CLIError(`Running TestPlan doesn't support capability override: ${JSON.stringify(option)}`);
|
|
77
83
|
if (name)
|
|
78
84
|
throw new errors_1.CLIError(`Running TestPlan doesn't support --name: ${name}`);
|
|
85
|
+
if (autifyConnect)
|
|
86
|
+
throw new errors_1.CLIError(`Running TestPlan doesn't support --autify-connect-key: ${autifyConnect}`);
|
|
79
87
|
const { workspaceId, testPlanId } = testPlan;
|
|
80
88
|
const urlReplacementIds = [];
|
|
81
89
|
for await (const urlReplacement of urlReplacements !== null && urlReplacements !== void 0 ? urlReplacements : []) {
|
|
@@ -2,6 +2,7 @@ import { WebClient } from "@autifyhq/autify-sdk";
|
|
|
2
2
|
export declare const waitTestResult: (client: WebClient, workspaceId: number, resultId: number, options: {
|
|
3
3
|
timeoutSecond: number;
|
|
4
4
|
verbose: boolean;
|
|
5
|
+
intervalSecond: number;
|
|
5
6
|
}) => Promise<{
|
|
6
7
|
isPassed: boolean;
|
|
7
8
|
data: any;
|
|
@@ -61,7 +61,7 @@ const describeResult = (client, workspaceId, resultId) => async (task) => {
|
|
|
61
61
|
return data;
|
|
62
62
|
};
|
|
63
63
|
const waitTestResult = async (client, workspaceId, resultId, options) => {
|
|
64
|
-
const data = await waitUntil(describeResult(client, workspaceId, resultId), options.timeoutSecond,
|
|
64
|
+
const data = await waitUntil(describeResult(client, workspaceId, resultId), options.timeoutSecond, options.intervalSecond, options.verbose);
|
|
65
65
|
const isPassed = (data === null || data === void 0 ? void 0 : data.status) === "passed";
|
|
66
66
|
return {
|
|
67
67
|
isPassed,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
export default class MobileBuildUpload extends Command {
|
|
3
|
+
static enableJsonFlag: boolean;
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static flags: {
|
|
7
|
+
"workspace-id": import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
8
|
+
};
|
|
9
|
+
static args: {
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
required: boolean;
|
|
13
|
+
}[];
|
|
14
|
+
run(): Promise<{
|
|
15
|
+
buildId: string;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const autify_sdk_1 = require("@autifyhq/autify-sdk");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const node_emoji_1 = tslib_1.__importDefault(require("node-emoji"));
|
|
7
|
+
const getBuildDetailUrl_1 = require("../../../autify/mobile/getBuildDetailUrl");
|
|
8
|
+
const uploadBuild_1 = require("../../../autify/mobile/uploadBuild");
|
|
9
|
+
const config_1 = require("../../../config");
|
|
10
|
+
class MobileBuildUpload extends core_1.Command {
|
|
11
|
+
async run() {
|
|
12
|
+
const { args, flags } = await this.parse(MobileBuildUpload);
|
|
13
|
+
const buildPath = args["build-path"];
|
|
14
|
+
const workspaceId = flags["workspace-id"];
|
|
15
|
+
const { configDir, userAgent } = this.config;
|
|
16
|
+
const accessToken = (0, config_1.getOrThrow)(configDir, "AUTIFY_MOBILE_ACCESS_TOKEN");
|
|
17
|
+
const basePath = (0, config_1.get)(configDir, "AUTIFY_MOBILE_BASE_PATH");
|
|
18
|
+
const client = new autify_sdk_1.MobileClient(accessToken, { basePath, userAgent });
|
|
19
|
+
const [buildId, os] = await (0, uploadBuild_1.uploadBuild)(client, workspaceId, buildPath);
|
|
20
|
+
const buildDetailUrl = (0, getBuildDetailUrl_1.getBuildDetailUrl)(configDir, workspaceId, os, buildId);
|
|
21
|
+
this.log(`${node_emoji_1.default.get("white_check_mark")} Successfully uploaded ${buildPath} (ID: ${buildId}). See ${buildDetailUrl}`);
|
|
22
|
+
return { buildId };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.default = MobileBuildUpload;
|
|
26
|
+
MobileBuildUpload.enableJsonFlag = true;
|
|
27
|
+
MobileBuildUpload.description = "Upload a build file";
|
|
28
|
+
MobileBuildUpload.examples = [
|
|
29
|
+
"<%= config.bin %> <%= command.id %>",
|
|
30
|
+
"Upload build file\n<%= config.bin %> <%= command.id %> --workspace-id AAA ./my.app",
|
|
31
|
+
"Upload build file (JSON output)\n<%= config.bin %> <%= command.id %> --workspace-id AAA ./my.app --json",
|
|
32
|
+
];
|
|
33
|
+
MobileBuildUpload.flags = {
|
|
34
|
+
"workspace-id": core_1.Flags.string({
|
|
35
|
+
char: "w",
|
|
36
|
+
description: "Workspace ID to upload the build file",
|
|
37
|
+
required: true,
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
MobileBuildUpload.args = [
|
|
41
|
+
{
|
|
42
|
+
name: "build-path",
|
|
43
|
+
description: "File path to the iOS app (*.app) or Android app (*.apk).",
|
|
44
|
+
required: true,
|
|
45
|
+
},
|
|
46
|
+
];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
export default class MobileTestRun extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
"build-id": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
|
+
"build-path": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
8
|
+
wait: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
10
|
+
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
};
|
|
12
|
+
static args: {
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
required: boolean;
|
|
16
|
+
}[];
|
|
17
|
+
run(): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const autify_sdk_1 = require("@autifyhq/autify-sdk");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const errors_1 = require("@oclif/errors");
|
|
7
|
+
const node_emoji_1 = tslib_1.__importDefault(require("node-emoji"));
|
|
8
|
+
const getTestResultUrl_1 = require("../../../autify/mobile/getTestResultUrl");
|
|
9
|
+
const parseTestPlanUrl_1 = require("../../../autify/mobile/parseTestPlanUrl");
|
|
10
|
+
const config_1 = require("../../../config");
|
|
11
|
+
const upload_1 = tslib_1.__importDefault(require("../build/upload"));
|
|
12
|
+
const wait_1 = tslib_1.__importDefault(require("./wait"));
|
|
13
|
+
class MobileTestRun extends core_1.Command {
|
|
14
|
+
async run() {
|
|
15
|
+
const { args, flags } = await this.parse(MobileTestRun);
|
|
16
|
+
let buildId = flags["build-id"];
|
|
17
|
+
const buildPath = flags["build-path"];
|
|
18
|
+
const { configDir, userAgent } = this.config;
|
|
19
|
+
const accessToken = (0, config_1.getOrThrow)(configDir, "AUTIFY_MOBILE_ACCESS_TOKEN");
|
|
20
|
+
const basePath = (0, config_1.get)(configDir, "AUTIFY_MOBILE_BASE_PATH");
|
|
21
|
+
const client = new autify_sdk_1.MobileClient(accessToken, { basePath, userAgent });
|
|
22
|
+
const { workspaceId, testPlanId } = (0, parseTestPlanUrl_1.parseTestPlanUrl)(args["test-plan-url"]);
|
|
23
|
+
if (buildPath) {
|
|
24
|
+
const uploadArgs = ["--workspace-id", workspaceId, buildPath];
|
|
25
|
+
const uploadCommand = new upload_1.default(uploadArgs, this.config);
|
|
26
|
+
buildId = (await uploadCommand.run()).buildId;
|
|
27
|
+
}
|
|
28
|
+
const res = await client.runTestPlan(testPlanId, {
|
|
29
|
+
// eslint-disable-next-line camelcase
|
|
30
|
+
build_id: buildId,
|
|
31
|
+
});
|
|
32
|
+
if (!res.data.id)
|
|
33
|
+
throw new errors_1.CLIError(`Failed to run a test plan.`);
|
|
34
|
+
const testResultUrl = (0, getTestResultUrl_1.getMobileTestResultUrl)(configDir, workspaceId, res.data.id);
|
|
35
|
+
this.log(`${node_emoji_1.default.get("white_check_mark")} Successfully started: ${testResultUrl}`);
|
|
36
|
+
if (flags.wait) {
|
|
37
|
+
const waitArgs = ["--timeout", flags.timeout.toString(), testResultUrl];
|
|
38
|
+
if (flags.verbose)
|
|
39
|
+
waitArgs.push("--verbose");
|
|
40
|
+
await wait_1.default.run(waitArgs);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
this.log("To wait for the test result, run the command below:");
|
|
44
|
+
this.log(`${node_emoji_1.default.get("computer")} $ autify mobile test wait ${testResultUrl}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.default = MobileTestRun;
|
|
49
|
+
MobileTestRun.description = "Run a test plan.";
|
|
50
|
+
MobileTestRun.examples = [
|
|
51
|
+
"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",
|
|
52
|
+
"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",
|
|
53
|
+
"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",
|
|
54
|
+
];
|
|
55
|
+
MobileTestRun.flags = {
|
|
56
|
+
"build-id": core_1.Flags.string({
|
|
57
|
+
description: "ID of the already uploaded build.",
|
|
58
|
+
exclusive: ["build-path"],
|
|
59
|
+
}),
|
|
60
|
+
"build-path": core_1.Flags.file({
|
|
61
|
+
description: "File path to the iOS app (*.app) or Android app (*.apk).",
|
|
62
|
+
exclusive: ["build-id"],
|
|
63
|
+
}),
|
|
64
|
+
wait: core_1.Flags.boolean({
|
|
65
|
+
char: "w",
|
|
66
|
+
description: "Wait until the test finishes.",
|
|
67
|
+
default: false,
|
|
68
|
+
}),
|
|
69
|
+
timeout: core_1.Flags.integer({
|
|
70
|
+
char: "t",
|
|
71
|
+
description: "Timeout seconds when waiting for the finish of the test execution.",
|
|
72
|
+
default: 300,
|
|
73
|
+
}),
|
|
74
|
+
verbose: core_1.Flags.boolean({
|
|
75
|
+
char: "v",
|
|
76
|
+
description: "Verbose output",
|
|
77
|
+
default: false,
|
|
78
|
+
}),
|
|
79
|
+
};
|
|
80
|
+
MobileTestRun.args = [
|
|
81
|
+
{
|
|
82
|
+
name: "test-plan-url",
|
|
83
|
+
description: "Test plan URL e.g. https://mobile-app.autify.com/projects/<ID>/test_plans/<ID>",
|
|
84
|
+
required: true,
|
|
85
|
+
},
|
|
86
|
+
];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
export default class MobileTestWait extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
+
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
};
|
|
9
|
+
static args: {
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
required: boolean;
|
|
13
|
+
}[];
|
|
14
|
+
run(): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const autify_sdk_1 = require("@autifyhq/autify-sdk");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const node_emoji_1 = tslib_1.__importDefault(require("node-emoji"));
|
|
7
|
+
const getWaitIntervalSecond_1 = require("../../../autify/getWaitIntervalSecond");
|
|
8
|
+
const getTestResultUrl_1 = require("../../../autify/mobile/getTestResultUrl");
|
|
9
|
+
const parseTestResultUrl_1 = require("../../../autify/mobile/parseTestResultUrl");
|
|
10
|
+
const waitTestResult_1 = require("../../../autify/mobile/waitTestResult");
|
|
11
|
+
const config_1 = require("../../../config");
|
|
12
|
+
class MobileTestWait extends core_1.Command {
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(MobileTestWait);
|
|
15
|
+
const { configDir, userAgent } = this.config;
|
|
16
|
+
const accessToken = (0, config_1.getOrThrow)(configDir, "AUTIFY_MOBILE_ACCESS_TOKEN");
|
|
17
|
+
const basePath = (0, config_1.get)(configDir, "AUTIFY_MOBILE_BASE_PATH");
|
|
18
|
+
const waitIntervalSecond = (0, getWaitIntervalSecond_1.getWaitIntervalSecond)(configDir);
|
|
19
|
+
const client = new autify_sdk_1.MobileClient(accessToken, { basePath, userAgent });
|
|
20
|
+
const { workspaceId, resultId } = (0, parseTestResultUrl_1.parseTestResultUrl)(args["test-result-url"]);
|
|
21
|
+
const testResultUrl = (0, getTestResultUrl_1.getMobileTestResultUrl)(configDir, workspaceId, resultId);
|
|
22
|
+
this.log(`${node_emoji_1.default.get("clock1")} Waiting for the test result: ${testResultUrl}`);
|
|
23
|
+
const { isPassed, data } = await (0, waitTestResult_1.waitTestResult)(client, workspaceId, resultId, {
|
|
24
|
+
timeoutSecond: flags.timeout,
|
|
25
|
+
verbose: flags.verbose,
|
|
26
|
+
intervalSecond: waitIntervalSecond,
|
|
27
|
+
});
|
|
28
|
+
if (isPassed) {
|
|
29
|
+
this.log(`${node_emoji_1.default.get("white_check_mark")} Test passed!: ${testResultUrl}`);
|
|
30
|
+
this.exit();
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
this.error(`${node_emoji_1.default.get("x")} Test didn't pass. See ${testResultUrl}: ${JSON.stringify(data)}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.default = MobileTestWait;
|
|
38
|
+
MobileTestWait.description = "Wait a test result until it finishes.";
|
|
39
|
+
MobileTestWait.examples = [
|
|
40
|
+
"<%= config.bin %> <%= command.id %> https://mobile-app.autify.com/projects/AAA/results/BBB",
|
|
41
|
+
];
|
|
42
|
+
MobileTestWait.flags = {
|
|
43
|
+
timeout: core_1.Flags.integer({
|
|
44
|
+
char: "t",
|
|
45
|
+
description: "Timeout seconds when waiting for the finish of the test execution.",
|
|
46
|
+
default: 300,
|
|
47
|
+
}),
|
|
48
|
+
verbose: core_1.Flags.boolean({
|
|
49
|
+
char: "v",
|
|
50
|
+
description: "Verbose output",
|
|
51
|
+
default: false,
|
|
52
|
+
}),
|
|
53
|
+
};
|
|
54
|
+
MobileTestWait.args = [
|
|
55
|
+
{
|
|
56
|
+
name: "test-result-url",
|
|
57
|
+
description: "Test result URL e.g. https://mobile-app.autify.com/projects/<ID>/results/<ID>",
|
|
58
|
+
required: true,
|
|
59
|
+
},
|
|
60
|
+
];
|
|
@@ -3,7 +3,7 @@ export default class WebApiCreateUrlReplacement extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number
|
|
6
|
+
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
7
|
"create-url-replacement-request": import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
@@ -3,8 +3,8 @@ export default class WebApiDeleteUrlReplacement extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number
|
|
7
|
-
"url-replacement-id": import("@oclif/core/lib/interfaces").OptionFlag<number
|
|
6
|
+
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
+
"url-replacement-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@ export default class WebApiDescribeResult extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number
|
|
7
|
-
"result-id": import("@oclif/core/lib/interfaces").OptionFlag<number
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
+
"result-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@ export default class WebApiDescribeScenario extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number
|
|
7
|
-
"scenario-id": import("@oclif/core/lib/interfaces").OptionFlag<number
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
+
"scenario-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -3,7 +3,7 @@ export default class WebApiExecuteScenarios extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
7
|
"execute-scenarios-request": import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
@@ -3,7 +3,7 @@ export default class WebApiExecuteSchedule extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"schedule-id": import("@oclif/core/lib/interfaces").OptionFlag<number
|
|
6
|
+
"schedule-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<void>;
|
|
9
9
|
}
|
|
@@ -3,7 +3,7 @@ export default class WebApiListCapabilities extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
7
|
os: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
8
8
|
browser: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
9
9
|
"device-type": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
@@ -3,7 +3,7 @@ export default class WebApiListResults extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
7
|
page: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
8
8
|
"per-page": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
9
9
|
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
@@ -3,7 +3,7 @@ export default class WebApiListScenarios extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
7
|
page: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
8
8
|
};
|
|
9
9
|
run(): Promise<void>;
|
|
@@ -3,7 +3,7 @@ export default class WebApiListUrlReplacements extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number
|
|
6
|
+
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<void>;
|
|
9
9
|
}
|
|
@@ -3,8 +3,8 @@ export default class WebApiUpdateUrlReplacement extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number
|
|
7
|
-
"url-replacement-id": import("@oclif/core/lib/interfaces").OptionFlag<number
|
|
6
|
+
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
|
+
"url-replacement-id": import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
8
8
|
"update-url-replacement-request": import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
9
9
|
};
|
|
10
10
|
run(): Promise<void>;
|
|
@@ -4,14 +4,15 @@ export default class WebTestRun extends Command {
|
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
6
|
name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
|
-
"url-replacements": import("@oclif/core/lib/interfaces").OptionFlag<string[]>;
|
|
7
|
+
"url-replacements": import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined>;
|
|
8
|
+
"autify-connect": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
8
9
|
os: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
9
10
|
"os-version": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
10
11
|
browser: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
11
12
|
device: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
12
13
|
"device-type": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
13
14
|
wait: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
-
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number
|
|
15
|
+
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
15
16
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
17
|
};
|
|
17
18
|
static args: {
|
|
@@ -41,6 +41,7 @@ class WebTestRun extends core_1.Command {
|
|
|
41
41
|
const urlReplacements = parseUrlReplacements((_a = flags["url-replacements"]) !== null && _a !== void 0 ? _a : []);
|
|
42
42
|
if (urlReplacements.length > 0)
|
|
43
43
|
this.log(`${node_emoji_1.default.get("memo")} Using URL replacements: ${urlReplacementsToString(urlReplacements)}`);
|
|
44
|
+
const autifyConnect = flags["autify-connect"];
|
|
44
45
|
const { configDir, userAgent } = this.config;
|
|
45
46
|
const accessToken = (0, config_1.getOrThrow)(configDir, "AUTIFY_WEB_ACCESS_TOKEN");
|
|
46
47
|
const basePath = (0, config_1.get)(configDir, "AUTIFY_WEB_BASE_PATH");
|
|
@@ -49,6 +50,7 @@ class WebTestRun extends core_1.Command {
|
|
|
49
50
|
option: capabilityOption,
|
|
50
51
|
name: flags.name,
|
|
51
52
|
urlReplacements,
|
|
53
|
+
autifyConnect,
|
|
52
54
|
});
|
|
53
55
|
const testResultUrl = (0, getTestResultUrl_1.getWebTestResultUrl)(configDir, workspaceId, resultId);
|
|
54
56
|
this.log(`${node_emoji_1.default.get("white_check_mark")} Successfully started: ${testResultUrl} (Capability is ${capability})`);
|
|
@@ -73,6 +75,7 @@ WebTestRun.examples = [
|
|
|
73
75
|
'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',
|
|
74
76
|
"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",
|
|
75
77
|
'Run a test with specifying the execution name:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --name "Sample execution"',
|
|
78
|
+
"Run a test scenario with Autify Connect:\n<%= config.bin %> <%= command.id %> https://app.autify.com/projects/0000/scenarios/0000 --autify-connect NAME",
|
|
76
79
|
];
|
|
77
80
|
WebTestRun.flags = {
|
|
78
81
|
name: core_1.Flags.string({
|
|
@@ -84,6 +87,9 @@ WebTestRun.flags = {
|
|
|
84
87
|
description: "URL replacements. Example: http://example.com=http://example.net",
|
|
85
88
|
multiple: true,
|
|
86
89
|
}),
|
|
90
|
+
"autify-connect": core_1.Flags.string({
|
|
91
|
+
description: "Name of the Autify Connect Access Point (Only for test scenario execution.)",
|
|
92
|
+
}),
|
|
87
93
|
os: core_1.Flags.string({ description: "OS to run the test" }),
|
|
88
94
|
"os-version": core_1.Flags.string({ description: "OS version to run the test" }),
|
|
89
95
|
browser: core_1.Flags.string({ description: "Browser to run the test" }),
|
|
@@ -3,7 +3,7 @@ export default class WebTestWait extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number
|
|
6
|
+
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
7
7
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
8
|
};
|
|
9
9
|
static args: {
|
|
@@ -8,17 +8,23 @@ const config_1 = require("../../../config");
|
|
|
8
8
|
const parseTestResultUrl_1 = require("../../../autify/web/parseTestResultUrl");
|
|
9
9
|
const waitTestResult_1 = require("../../../autify/web/waitTestResult");
|
|
10
10
|
const getTestResultUrl_1 = require("../../../autify/web/getTestResultUrl");
|
|
11
|
+
const getWaitIntervalSecond_1 = require("../../../autify/getWaitIntervalSecond");
|
|
11
12
|
class WebTestWait extends core_1.Command {
|
|
12
13
|
async run() {
|
|
13
14
|
const { args, flags } = await this.parse(WebTestWait);
|
|
14
15
|
const { configDir, userAgent } = this.config;
|
|
15
16
|
const accessToken = (0, config_1.getOrThrow)(configDir, "AUTIFY_WEB_ACCESS_TOKEN");
|
|
16
17
|
const basePath = (0, config_1.get)(configDir, "AUTIFY_WEB_BASE_PATH");
|
|
18
|
+
const waitIntervalSecond = (0, getWaitIntervalSecond_1.getWaitIntervalSecond)(configDir);
|
|
17
19
|
const client = new autify_sdk_1.WebClient(accessToken, { basePath, userAgent });
|
|
18
20
|
const { workspaceId, resultId } = (0, parseTestResultUrl_1.parseTestResultUrl)(args["test-result-url"]);
|
|
19
21
|
const testResultUrl = (0, getTestResultUrl_1.getWebTestResultUrl)(configDir, workspaceId, resultId);
|
|
20
22
|
this.log(`${node_emoji_1.default.get("clock1")} Waiting for the test result: ${testResultUrl}`);
|
|
21
|
-
const { isPassed, data } = await (0, waitTestResult_1.waitTestResult)(client, workspaceId, resultId, {
|
|
23
|
+
const { isPassed, data } = await (0, waitTestResult_1.waitTestResult)(client, workspaceId, resultId, {
|
|
24
|
+
timeoutSecond: flags.timeout,
|
|
25
|
+
verbose: flags.verbose,
|
|
26
|
+
intervalSecond: waitIntervalSecond,
|
|
27
|
+
});
|
|
22
28
|
if (isPassed) {
|
|
23
29
|
this.log(`${node_emoji_1.default.get("white_check_mark")} Test passed!: ${testResultUrl}`);
|
|
24
30
|
this.exit();
|
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";
|
|
1
|
+
declare type Variable = "AUTIFY_WEB_ACCESS_TOKEN" | "AUTIFY_WEB_BASE_PATH" | "AUTIFY_MOBILE_ACCESS_TOKEN" | "AUTIFY_MOBILE_BASE_PATH" | "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.5.0","commands":{"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":[]},"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\""],"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},"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.7.0","commands":{"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},"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}]}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autifyhq/autify-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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.3.0",
|
|
21
21
|
"@oclif/core": "^1",
|
|
22
22
|
"@oclif/errors": "^1.3.5",
|
|
23
23
|
"@oclif/plugin-help": "^5",
|
|
@@ -28,7 +28,10 @@
|
|
|
28
28
|
"inquirer": "^8.2.4",
|
|
29
29
|
"listr": "^0.14.3",
|
|
30
30
|
"node-emoji": "^1.11.0",
|
|
31
|
-
"per-env": "^1.0.2"
|
|
31
|
+
"per-env": "^1.0.2",
|
|
32
|
+
"tempy": "^3.0.0",
|
|
33
|
+
"tsimportlib": "^0.0.3",
|
|
34
|
+
"which": "^2.0.2"
|
|
32
35
|
},
|
|
33
36
|
"devDependencies": {
|
|
34
37
|
"@autifyhq/autify-cli-integration-test": "*",
|
|
@@ -37,7 +40,7 @@
|
|
|
37
40
|
"@types/inquirer": "^8.2.1",
|
|
38
41
|
"@types/listr": "^0.14.4",
|
|
39
42
|
"@types/mocha": "^9.1.1",
|
|
40
|
-
"@types/node": "^16.11.
|
|
43
|
+
"@types/node": "^16.11.52",
|
|
41
44
|
"@types/node-emoji": "^1.8.1",
|
|
42
45
|
"chai": "^4",
|
|
43
46
|
"eslint": "^7.32.0",
|
|
@@ -118,6 +121,7 @@
|
|
|
118
121
|
"release": "ts-node ./scripts/release.ts",
|
|
119
122
|
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
120
123
|
"test:integration": "npm run build -w integration-test && autify-cli-integration-test",
|
|
124
|
+
"test:integration:record": "npm run build -w integration-test && autify-cli-integration-test --record",
|
|
121
125
|
"version": "oclif readme && git add README.md",
|
|
122
126
|
"prepare": "per-env || true",
|
|
123
127
|
"prepare:development": "husky install",
|