@autifyhq/autify-cli 0.3.1 → 0.4.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 +44 -1
- package/dist/commands/mobile/api/describe-test-result.d.ts +10 -0
- package/dist/commands/mobile/api/describe-test-result.js +26 -0
- package/dist/commands/mobile/api/list-test-results.d.ts +12 -0
- package/dist/commands/mobile/api/list-test-results.js +37 -0
- package/oclif.manifest.json +1 -1
- package/package.json +10 -7
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.4.0 linux-x64 node-v16.15.1
|
|
24
24
|
$ autify --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ autify COMMAND
|
|
@@ -57,6 +57,8 @@ After the installation, you can always get the latest update on `stable` channel
|
|
|
57
57
|
|
|
58
58
|
<!-- commands -->
|
|
59
59
|
* [`autify help [COMMAND]`](#autify-help-command)
|
|
60
|
+
* [`autify mobile api describe-test-result`](#autify-mobile-api-describe-test-result)
|
|
61
|
+
* [`autify mobile api list-test-results`](#autify-mobile-api-list-test-results)
|
|
60
62
|
* [`autify mobile api run-test-plan`](#autify-mobile-api-run-test-plan)
|
|
61
63
|
* [`autify mobile api upload-build`](#autify-mobile-api-upload-build)
|
|
62
64
|
* [`autify mobile auth login`](#autify-mobile-auth-login)
|
|
@@ -96,6 +98,47 @@ DESCRIPTION
|
|
|
96
98
|
|
|
97
99
|
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.12/src/commands/help.ts)_
|
|
98
100
|
|
|
101
|
+
## `autify mobile api describe-test-result`
|
|
102
|
+
|
|
103
|
+
Get a test result.
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
USAGE
|
|
107
|
+
$ autify mobile api describe-test-result --project-id <value> --id <value>
|
|
108
|
+
|
|
109
|
+
FLAGS
|
|
110
|
+
--id=<value> (required) Test Result ID.
|
|
111
|
+
--project-id=<value> (required) ID of the project from which the test results will be obtained.
|
|
112
|
+
|
|
113
|
+
DESCRIPTION
|
|
114
|
+
Get a test result.
|
|
115
|
+
|
|
116
|
+
EXAMPLES
|
|
117
|
+
$ autify mobile api describe-test-result
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## `autify mobile api list-test-results`
|
|
121
|
+
|
|
122
|
+
List test results.
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
USAGE
|
|
126
|
+
$ autify mobile api list-test-results --project-id <value> [--page <value>] [--per-page <value>] [--test-plan-id
|
|
127
|
+
<value>]
|
|
128
|
+
|
|
129
|
+
FLAGS
|
|
130
|
+
--page=<value> Page number to be retrieved.
|
|
131
|
+
--per-page=<value> Number of test results per page.
|
|
132
|
+
--project-id=<value> (required) ID of the project from which the list of test results will be retrieved.
|
|
133
|
+
--test-plan-id=<value> ID of the test plan.
|
|
134
|
+
|
|
135
|
+
DESCRIPTION
|
|
136
|
+
List test results.
|
|
137
|
+
|
|
138
|
+
EXAMPLES
|
|
139
|
+
$ autify mobile api list-test-results
|
|
140
|
+
```
|
|
141
|
+
|
|
99
142
|
## `autify mobile api run-test-plan`
|
|
100
143
|
|
|
101
144
|
Run a test plan
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
export default class MobileApiDescribeTestResult extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
|
+
id: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
8
|
+
};
|
|
9
|
+
run(): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const autify_sdk_1 = require("@autifyhq/autify-sdk");
|
|
5
|
+
const config_1 = require("../../../config");
|
|
6
|
+
class MobileApiDescribeTestResult extends core_1.Command {
|
|
7
|
+
async run() {
|
|
8
|
+
const { flags } = await this.parse(MobileApiDescribeTestResult);
|
|
9
|
+
const { configDir, userAgent } = this.config;
|
|
10
|
+
const accessToken = (0, config_1.getOrThrow)(configDir, "AUTIFY_MOBILE_ACCESS_TOKEN");
|
|
11
|
+
const basePath = (0, config_1.get)(configDir, "AUTIFY_MOBILE_BASE_PATH");
|
|
12
|
+
const client = new autify_sdk_1.MobileClient(accessToken, { basePath, userAgent });
|
|
13
|
+
const res = await client.describeTestResult(flags["project-id"], flags.id);
|
|
14
|
+
console.log(JSON.stringify(res.data, null, 2));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.default = MobileApiDescribeTestResult;
|
|
18
|
+
MobileApiDescribeTestResult.description = "Get a test result.";
|
|
19
|
+
MobileApiDescribeTestResult.examples = ["<%= config.bin %> <%= command.id %>"];
|
|
20
|
+
MobileApiDescribeTestResult.flags = {
|
|
21
|
+
"project-id": core_1.Flags.string({
|
|
22
|
+
description: "ID of the project from which the test results will be obtained.",
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
id: core_1.Flags.string({ description: "Test Result ID.", required: true }),
|
|
26
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
export default class MobileApiListTestResults extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
|
+
page: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
8
|
+
"per-page": import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
9
|
+
"test-plan-id": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const autify_sdk_1 = require("@autifyhq/autify-sdk");
|
|
5
|
+
const config_1 = require("../../../config");
|
|
6
|
+
class MobileApiListTestResults extends core_1.Command {
|
|
7
|
+
async run() {
|
|
8
|
+
const { flags } = await this.parse(MobileApiListTestResults);
|
|
9
|
+
const { configDir, userAgent } = this.config;
|
|
10
|
+
const accessToken = (0, config_1.getOrThrow)(configDir, "AUTIFY_MOBILE_ACCESS_TOKEN");
|
|
11
|
+
const basePath = (0, config_1.get)(configDir, "AUTIFY_MOBILE_BASE_PATH");
|
|
12
|
+
const client = new autify_sdk_1.MobileClient(accessToken, { basePath, userAgent });
|
|
13
|
+
const res = await client.listTestResults(flags["project-id"], flags.page, flags["per-page"], flags["test-plan-id"]);
|
|
14
|
+
console.log(JSON.stringify(res.data, null, 2));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.default = MobileApiListTestResults;
|
|
18
|
+
MobileApiListTestResults.description = "List test results.";
|
|
19
|
+
MobileApiListTestResults.examples = ["<%= config.bin %> <%= command.id %>"];
|
|
20
|
+
MobileApiListTestResults.flags = {
|
|
21
|
+
"project-id": core_1.Flags.string({
|
|
22
|
+
description: "ID of the project from which the list of test results will be retrieved.",
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
page: core_1.Flags.integer({
|
|
26
|
+
description: "Page number to be retrieved.",
|
|
27
|
+
required: false,
|
|
28
|
+
}),
|
|
29
|
+
"per-page": core_1.Flags.integer({
|
|
30
|
+
description: "Number of test results per page.",
|
|
31
|
+
required: false,
|
|
32
|
+
}),
|
|
33
|
+
"test-plan-id": core_1.Flags.string({
|
|
34
|
+
description: "ID of the test plan.",
|
|
35
|
+
required: false,
|
|
36
|
+
}),
|
|
37
|
+
};
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.3.1","commands":{"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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}],"_globalFlags":{}},"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}],"_globalFlags":{}}}}
|
|
1
|
+
{"version":"0.4.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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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":[],"_globalFlags":{}},"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}],"_globalFlags":{}},"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}],"_globalFlags":{}}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autifyhq/autify-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.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.2.0",
|
|
21
21
|
"@oclif/core": "^1",
|
|
22
22
|
"@oclif/errors": "^1.3.5",
|
|
23
23
|
"@oclif/plugin-help": "^5",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@types/inquirer": "^8.2.1",
|
|
38
38
|
"@types/listr": "^0.14.4",
|
|
39
39
|
"@types/mocha": "^9.1.1",
|
|
40
|
-
"@types/node": "^16.11.
|
|
40
|
+
"@types/node": "^16.11.41",
|
|
41
41
|
"@types/node-emoji": "^1.8.1",
|
|
42
42
|
"chai": "^4",
|
|
43
43
|
"eslint": "^7.32.0",
|
|
@@ -45,16 +45,16 @@
|
|
|
45
45
|
"eslint-config-oclif-typescript": "^1.0.2",
|
|
46
46
|
"eslint-config-prettier": "^8.5.0",
|
|
47
47
|
"husky": "^8.0.1",
|
|
48
|
-
"lint-staged": "^13.0.
|
|
48
|
+
"lint-staged": "^13.0.2",
|
|
49
49
|
"mocha": "^9",
|
|
50
50
|
"oclif": "^3",
|
|
51
51
|
"patch-package": "^6.4.7",
|
|
52
|
-
"prettier": "^2.
|
|
52
|
+
"prettier": "^2.7.1",
|
|
53
53
|
"shx": "^0.3.4",
|
|
54
54
|
"ts-morph": "^14.0.0",
|
|
55
55
|
"ts-node": "^10.8.1",
|
|
56
56
|
"tslib": "^2.4.0",
|
|
57
|
-
"typescript": "^4.7.
|
|
57
|
+
"typescript": "^4.7.4"
|
|
58
58
|
},
|
|
59
59
|
"oclif": {
|
|
60
60
|
"bin": "autify",
|
|
@@ -105,10 +105,13 @@
|
|
|
105
105
|
"postinstall:development": "patch-package",
|
|
106
106
|
"postinstall:production": "true",
|
|
107
107
|
"generate:api-commands": "ts-node scripts/generate-api-commands.ts",
|
|
108
|
-
"generate": "npm run generate:api-commands web && npm run generate:api-commands mobile",
|
|
108
|
+
"generate": "npm run generate:api-commands web && npm run generate:api-commands mobile && npm run format-lint-api-commands",
|
|
109
109
|
"build": "shx rm -rf dist && tsc -b",
|
|
110
110
|
"lint": "eslint . --ext .ts --config .eslintrc",
|
|
111
111
|
"format": "prettier . --write",
|
|
112
|
+
"format-api-commands": "prettier --write src/commands/web/api src/commands/mobile/api",
|
|
113
|
+
"lint-api-commands": "eslint --fix src/commands/web/api src/commands/mobile/api",
|
|
114
|
+
"format-lint-api-commands": "npm run format-api-commands && npm run lint-api-commands",
|
|
112
115
|
"postpack": "shx rm -f oclif.manifest.json",
|
|
113
116
|
"posttest": "npm run lint",
|
|
114
117
|
"prepack": "npm run build && oclif manifest && oclif readme",
|