@testrigor/testrigor-cli 2.0.4 → 2.0.6
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 +10 -8
- package/dist/commands/test-suite/run.js +6 -6
- package/dist/util/appium.js +2 -1
- package/dist/util/utils.d.ts +1 -0
- package/dist/util/utils.js +12 -0
- package/npm-shrinkwrap.json +2 -2
- package/oclif.manifest.json +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,8 +48,8 @@ Or skip stored credentials entirely and set `TESTRIGOR_API_KEY`, or pass
|
|
|
48
48
|
14. Run with explicit mutations enabled `testrigor test-suite run <test-suite-id> --token <token> --test-cases-path test_cases/**/*.{yaml,txt} --explicit-mutations`
|
|
49
49
|
15. With all options `testrigor test-suite run <test-suite-id> --token <token> --url <url> --branch <branch> --commit <commit> --variables-path file.json --localhost --test-cases-path test_cases/**/*.{yaml,txt} --rules-path rules/**/*.{yaml,txt} --auto-create-ai-rules --explicit-mutations`
|
|
50
50
|
16. Save JUnit report to `./junit-report.xml` (works only in sync mode): `testrigor test-suite run <test-suite-id> --token <token> --junit-report-save-path ./report.xml`
|
|
51
|
-
17. With
|
|
52
|
-
18. Excluding
|
|
51
|
+
17. With labels separated by commas (or by repeating the flag) `testrigor test-suite run <test-suite-id> --token <token> --labels label1,label2`. Only commas separate labels: `--labels "label1;label2"` is a single label named `label1;label2`.
|
|
52
|
+
18. Excluding labels separated by commas (or by repeating the flag) `testrigor test-suite run <test-suite-id> --token <token> --excluded-labels label1,label2`
|
|
53
53
|
19. With different WEB and API URLs `testrigor test-suite run <test-suite-id> --token <token> --base-url-web=<base-web-url> --base-url-api=<base_api_url>`
|
|
54
54
|
20. Set the default test suite ID: `testrigor test-suite config --default <test-suite-id>`
|
|
55
55
|
21. Remove the default test suite ID: `testrigor test-suite config --delete`
|
|
@@ -167,7 +167,7 @@ EXAMPLES
|
|
|
167
167
|
Config will be stored in ~/.testrigor/testrigor.yml
|
|
168
168
|
```
|
|
169
169
|
|
|
170
|
-
_See code: [src/commands/authenticate.ts](https://github.com/TestRigor/testrigor-cli/blob/v2.0.
|
|
170
|
+
_See code: [src/commands/authenticate.ts](https://github.com/TestRigor/testrigor-cli/blob/v2.0.6/src/commands/authenticate.ts)_
|
|
171
171
|
|
|
172
172
|
## `testrigor help [COMMAND]`
|
|
173
173
|
|
|
@@ -213,7 +213,7 @@ EXAMPLES
|
|
|
213
213
|
$ testrigor test-suite config --delete
|
|
214
214
|
```
|
|
215
215
|
|
|
216
|
-
_See code: [src/commands/test-suite/config.ts](https://github.com/TestRigor/testrigor-cli/blob/v2.0.
|
|
216
|
+
_See code: [src/commands/test-suite/config.ts](https://github.com/TestRigor/testrigor-cli/blob/v2.0.6/src/commands/test-suite/config.ts)_
|
|
217
217
|
|
|
218
218
|
## `testrigor test-suite run [TESTSUITEID]`
|
|
219
219
|
|
|
@@ -239,7 +239,8 @@ FLAGS
|
|
|
239
239
|
--branch=<value> [env: TR_BRANCH] The branch name
|
|
240
240
|
--chrome-extension=<value>... Chrome extension: "name=EXT_NAME file=PATH_TO_CRX"
|
|
241
241
|
--commit=<value> [env: TR_COMMIT] The commit
|
|
242
|
-
--excluded-labels=<value>... Not run tests of specific labels
|
|
242
|
+
--excluded-labels=<value>... Not run tests of specific labels. Separate multiple labels with commas only
|
|
243
|
+
(e.g. "smoke,login"), or repeat the flag
|
|
243
244
|
--explicit-mutations In cases where you are always using mutations, such as storing test cases in
|
|
244
245
|
your own repository, and you always send us the set of test cases you have
|
|
245
246
|
through our API you should send "--explicit-mutations"
|
|
@@ -247,7 +248,8 @@ FLAGS
|
|
|
247
248
|
type should be according to the file type accepted for the Test Suite type of
|
|
248
249
|
testing. If the parameter --url is used, this parameter will be ignored.
|
|
249
250
|
--junit-report-save-path=<value> JUnit report save path
|
|
250
|
-
--labels=<value>... Run tests of specific labels
|
|
251
|
+
--labels=<value>... Run tests of specific labels. Separate multiple labels with commas only (e.g.
|
|
252
|
+
"smoke,login"), or repeat the flag
|
|
251
253
|
--local-test-nodes-path=<value> Path to a YAML or JSON file with local test nodes configuration
|
|
252
254
|
--localhost Localhost run (auto-detects web vs mobile)
|
|
253
255
|
--max-port=<value> [default: 50000] Max port for tunnel
|
|
@@ -271,7 +273,7 @@ DESCRIPTION
|
|
|
271
273
|
Run all tests of a Test Suite
|
|
272
274
|
```
|
|
273
275
|
|
|
274
|
-
_See code: [src/commands/test-suite/run.ts](https://github.com/TestRigor/testrigor-cli/blob/v2.0.
|
|
276
|
+
_See code: [src/commands/test-suite/run.ts](https://github.com/TestRigor/testrigor-cli/blob/v2.0.6/src/commands/test-suite/run.ts)_
|
|
275
277
|
|
|
276
278
|
## `testrigor test-suite validate-syntax [TESTSUITEID]`
|
|
277
279
|
|
|
@@ -311,7 +313,7 @@ EXAMPLES
|
|
|
311
313
|
$ testrigor test-suite validate-syntax <test-suite-id> --test-cases-path "test_cases/**/*.{yaml,txt}"
|
|
312
314
|
```
|
|
313
315
|
|
|
314
|
-
_See code: [src/commands/test-suite/validate-syntax.ts](https://github.com/TestRigor/testrigor-cli/blob/v2.0.
|
|
316
|
+
_See code: [src/commands/test-suite/validate-syntax.ts](https://github.com/TestRigor/testrigor-cli/blob/v2.0.6/src/commands/test-suite/validate-syntax.ts)_
|
|
315
317
|
<!-- commandsstop -->`, so this README currently stays unchanged.
|
|
316
318
|
|
|
317
319
|
3. Check that the diff only touches the version fields, then build and test from the lockfile:
|
|
@@ -83,8 +83,8 @@ class Run extends command_base_1.CommandBase {
|
|
|
83
83
|
const testCaseUuids = flags["test-case-uuid"];
|
|
84
84
|
const isAutoCreateAIBasedRulesEnabled = flags["auto-create-ai-rules"];
|
|
85
85
|
const explicitMutations = flags["explicit-mutations"];
|
|
86
|
-
const labels = flags["labels"];
|
|
87
|
-
const excludedLabels = flags["excluded-labels"];
|
|
86
|
+
const labels = (0, utils_1.splitLabels)(flags["labels"]);
|
|
87
|
+
const excludedLabels = (0, utils_1.splitLabels)(flags["excluded-labels"]);
|
|
88
88
|
const xrayExecutionKey = flags["xray-execution-key"];
|
|
89
89
|
const chromeExtensions = flags["chrome-extension"];
|
|
90
90
|
const context = {
|
|
@@ -97,10 +97,10 @@ class Run extends command_base_1.CommandBase {
|
|
|
97
97
|
isMobile: false,
|
|
98
98
|
appiumStartedByUs: false,
|
|
99
99
|
};
|
|
100
|
-
if (labels) {
|
|
100
|
+
if (labels.length > 0) {
|
|
101
101
|
context.configuration.labels = labels;
|
|
102
102
|
}
|
|
103
|
-
if (excludedLabels) {
|
|
103
|
+
if (excludedLabels.length > 0) {
|
|
104
104
|
context.configuration.excludedLabels = excludedLabels;
|
|
105
105
|
}
|
|
106
106
|
if (xrayExecutionKey) {
|
|
@@ -938,11 +938,11 @@ Run.flags = {
|
|
|
938
938
|
default: false,
|
|
939
939
|
}),
|
|
940
940
|
labels: core_1.Flags.string({
|
|
941
|
-
description:
|
|
941
|
+
description: 'Run tests of specific labels. Separate multiple labels with commas only (e.g. "smoke,login"), or repeat the flag',
|
|
942
942
|
multiple: true,
|
|
943
943
|
}),
|
|
944
944
|
"excluded-labels": core_1.Flags.string({
|
|
945
|
-
description:
|
|
945
|
+
description: 'Not run tests of specific labels. Separate multiple labels with commas only (e.g. "smoke,login"), or repeat the flag',
|
|
946
946
|
multiple: true,
|
|
947
947
|
}),
|
|
948
948
|
"base-url-web": core_1.Flags.string({
|
package/dist/util/appium.js
CHANGED
|
@@ -284,8 +284,9 @@ async function startAppium(port = DEFAULT_PORT, logLevel = "debug") {
|
|
|
284
284
|
String(port),
|
|
285
285
|
"--base-path",
|
|
286
286
|
DEFAULT_BASE_PATH,
|
|
287
|
+
// Appium 3 refuses unscoped insecure features: "<driver>:<feature>" or "*:<feature>".
|
|
287
288
|
"--allow-insecure",
|
|
288
|
-
"chromedriver_autodownload",
|
|
289
|
+
"*:chromedriver_autodownload",
|
|
289
290
|
"--log-level",
|
|
290
291
|
logLevel,
|
|
291
292
|
]);
|
package/dist/util/utils.d.ts
CHANGED
|
@@ -14,3 +14,4 @@ export declare function removeExtension(fileName: string): string;
|
|
|
14
14
|
export declare function extractUrlWithoutQueryParams(urlString: string): string;
|
|
15
15
|
export declare function extractRunIdFromDetailsUrl(detailsUrl: string | undefined): string;
|
|
16
16
|
export declare function isValidUrl(url: string): boolean;
|
|
17
|
+
export declare function splitLabels(values: string[] | undefined): string[];
|
package/dist/util/utils.js
CHANGED
|
@@ -15,6 +15,7 @@ exports.removeExtension = removeExtension;
|
|
|
15
15
|
exports.extractUrlWithoutQueryParams = extractUrlWithoutQueryParams;
|
|
16
16
|
exports.extractRunIdFromDetailsUrl = extractRunIdFromDetailsUrl;
|
|
17
17
|
exports.isValidUrl = isValidUrl;
|
|
18
|
+
exports.splitLabels = splitLabels;
|
|
18
19
|
const tslib_1 = require("tslib");
|
|
19
20
|
const fs_1 = tslib_1.__importDefault(require("@supercharge/fs"));
|
|
20
21
|
const path = tslib_1.__importStar(require("path"));
|
|
@@ -95,3 +96,14 @@ function isValidUrl(url) {
|
|
|
95
96
|
return false;
|
|
96
97
|
}
|
|
97
98
|
}
|
|
99
|
+
// Splits label flag values on "," so "a,b", repeated flags and space-separated
|
|
100
|
+
// values all produce the same list. Empty entries are dropped.
|
|
101
|
+
function splitLabels(values) {
|
|
102
|
+
if (!values) {
|
|
103
|
+
return [];
|
|
104
|
+
}
|
|
105
|
+
return values
|
|
106
|
+
.flatMap((value) => value.split(","))
|
|
107
|
+
.map((label) => label.trim())
|
|
108
|
+
.filter((label) => label.length > 0);
|
|
109
|
+
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testrigor/testrigor-cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@testrigor/testrigor-cli",
|
|
9
|
-
"version": "2.0.
|
|
9
|
+
"version": "2.0.6",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
package/oclif.manifest.json
CHANGED
|
@@ -274,14 +274,14 @@
|
|
|
274
274
|
"type": "boolean"
|
|
275
275
|
},
|
|
276
276
|
"labels": {
|
|
277
|
-
"description": "Run tests of specific labels",
|
|
277
|
+
"description": "Run tests of specific labels. Separate multiple labels with commas only (e.g. \"smoke,login\"), or repeat the flag",
|
|
278
278
|
"name": "labels",
|
|
279
279
|
"hasDynamicHelp": false,
|
|
280
280
|
"multiple": true,
|
|
281
281
|
"type": "option"
|
|
282
282
|
},
|
|
283
283
|
"excluded-labels": {
|
|
284
|
-
"description": "Not run tests of specific labels",
|
|
284
|
+
"description": "Not run tests of specific labels. Separate multiple labels with commas only (e.g. \"smoke,login\"), or repeat the flag",
|
|
285
285
|
"name": "excluded-labels",
|
|
286
286
|
"hasDynamicHelp": false,
|
|
287
287
|
"multiple": true,
|
|
@@ -456,5 +456,5 @@
|
|
|
456
456
|
]
|
|
457
457
|
}
|
|
458
458
|
},
|
|
459
|
-
"version": "2.0.
|
|
459
|
+
"version": "2.0.6"
|
|
460
460
|
}
|