@testrigor/testrigor-cli 2.0.0 → 2.0.2
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 +8 -181
- package/appium-server/package-lock.json +4148 -0
- package/appium-server/package.json +11 -0
- package/bin/dev +2 -8
- package/bin/run +1 -3
- package/dist/command-base.d.ts +4 -4
- package/dist/commands/authenticate.d.ts +3 -5
- package/dist/commands/authenticate.js +14 -12
- package/dist/commands/test-suite/config.d.ts +3 -3
- package/dist/commands/test-suite/config.js +12 -12
- package/dist/commands/test-suite/run.d.ts +23 -23
- package/dist/commands/test-suite/run.js +6 -2
- package/dist/commands/test-suite/validate-syntax.d.ts +6 -6
- package/dist/commands/test-suite/validate-syntax.js +4 -4
- package/dist/flags/chrome-extension.d.ts +5 -2
- package/dist/util/appium.d.ts +9 -0
- package/dist/util/appium.js +98 -20
- package/npm-shrinkwrap.json +1056 -10220
- package/oclif.manifest.json +5 -1
- package/package.json +14 -9
- package/scripts/check-node.js +22 -0
package/README.md
CHANGED
|
@@ -72,7 +72,8 @@ testrigor test-suite run <test-suite-id> --token <token> --localhost --local-tes
|
|
|
72
72
|
The CLI will:
|
|
73
73
|
|
|
74
74
|
- Detect it's a mobile suite
|
|
75
|
-
-
|
|
75
|
+
- Install the mobile server (Appium) on the first mobile run, into `~/.testrigor/appium-server` (needs `npm` and registry access once)
|
|
76
|
+
- Start the mobile server automatically
|
|
76
77
|
- Open a tunnel to TestRigor cloud
|
|
77
78
|
- Run the test on your local device
|
|
78
79
|
- Stop everything when done
|
|
@@ -102,6 +103,11 @@ This overrides the device config stored in the test suite and forces mobile mode
|
|
|
102
103
|
|
|
103
104
|
Every push to `master` runs the CircleCI `publish` workflow. It builds the tarballs, then publishes the package to npm under the `latest` tag. npm refuses to republish an existing version, so a change is only released when it bumps the version.
|
|
104
105
|
|
|
106
|
+
Pull requests to `master` must pass two CircleCI checks before they can be merged:
|
|
107
|
+
|
|
108
|
+
- `ci/circleci: test` runs the unit tests and the linter (`npm test`).
|
|
109
|
+
- `ci/circleci: check-version` fails unless the version in `package.json` is higher than every version on npm and matches `package-lock.json`. Every PR needs a version bump, including ones that only change docs or CI. Run the same check locally with `npx ts-node scripts/check-version.ts`.
|
|
110
|
+
|
|
105
111
|
1. Pick the [semver](https://semver.org) bump: `patch` for fixes, `minor` for new flags or commands, `major` for breaking changes.
|
|
106
112
|
2. Bump the version with npm (don't edit `package.json` by hand):
|
|
107
113
|
|
|
@@ -110,186 +116,7 @@ Every push to `master` runs the CircleCI `publish` workflow. It builds the tarba
|
|
|
110
116
|
npm version patch --no-git-tag-version
|
|
111
117
|
```
|
|
112
118
|
|
|
113
|
-
This updates the version in `package.json` and in both root entries of `package-lock.json` (`version` and `packages[""].version`). `--no-git-tag-version` stops npm from creating its own commit and `v*` tag. npm also runs the `version` script (`oclif readme && git add README.md`). That script loads the commands from `dist`, which is why you build first. It only rewrites README sections between oclif markers
|
|
114
|
-
* [`testrigor authenticate`](#testrigor-authenticate)
|
|
115
|
-
* [`testrigor help [COMMANDS]`](#testrigor-help-commands)
|
|
116
|
-
* [`testrigor test-suite config`](#testrigor-test-suite-config)
|
|
117
|
-
* [`testrigor test-suite run [TESTSUITEID]`](#testrigor-test-suite-run-testsuiteid)
|
|
118
|
-
* [`testrigor test-suite validate-syntax [TESTSUITEID]`](#testrigor-test-suite-validate-syntax-testsuiteid)
|
|
119
|
-
|
|
120
|
-
## `testrigor authenticate`
|
|
121
|
-
|
|
122
|
-
Set your testRigor authentication token
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
USAGE
|
|
126
|
-
$ testrigor authenticate [--token <value>]
|
|
127
|
-
|
|
128
|
-
FLAGS
|
|
129
|
-
--token=<value> API authentication token to store, instead of prompting for it
|
|
130
|
-
|
|
131
|
-
DESCRIPTION
|
|
132
|
-
Set your testRigor authentication token
|
|
133
|
-
|
|
134
|
-
EXAMPLES
|
|
135
|
-
$ testrigor authenticate
|
|
136
|
-
|
|
137
|
-
Prompts for your API authentication token
|
|
138
|
-
|
|
139
|
-
$ testrigor authenticate --token YOUR_TOKEN
|
|
140
|
-
|
|
141
|
-
Sets the token without prompting (for CI and scripts)
|
|
142
|
-
|
|
143
|
-
Use 'testrigor test-suite config' to set default test suite ID separately
|
|
144
|
-
|
|
145
|
-
Config will be stored in ~/.testrigor/testrigor.yml
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
_See code: [src/commands/authenticate.ts](https://github.com/TestRigor/testrigor-cli/blob/v2.0.0/src/commands/authenticate.ts)_
|
|
149
|
-
|
|
150
|
-
## `testrigor help [COMMANDS]`
|
|
151
|
-
|
|
152
|
-
Display help for testrigor.
|
|
153
|
-
|
|
154
|
-
```
|
|
155
|
-
USAGE
|
|
156
|
-
$ testrigor help [COMMANDS...] [-n]
|
|
157
|
-
|
|
158
|
-
ARGUMENTS
|
|
159
|
-
[COMMANDS...] Command to show help for.
|
|
160
|
-
|
|
161
|
-
FLAGS
|
|
162
|
-
-n, --nested-commands Include all nested commands in the output.
|
|
163
|
-
|
|
164
|
-
DESCRIPTION
|
|
165
|
-
Display help for testrigor.
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.20/src/commands/help.ts)_
|
|
169
|
-
|
|
170
|
-
## `testrigor test-suite config`
|
|
171
|
-
|
|
172
|
-
Configure test suite settings and default test suite ID
|
|
173
|
-
|
|
174
|
-
```
|
|
175
|
-
USAGE
|
|
176
|
-
$ testrigor test-suite config [--default <value> | --delete | --show]
|
|
177
|
-
|
|
178
|
-
FLAGS
|
|
179
|
-
--default=<value> Set the default test suite ID
|
|
180
|
-
--delete Remove the default test suite ID
|
|
181
|
-
--show Show current configuration
|
|
182
|
-
|
|
183
|
-
DESCRIPTION
|
|
184
|
-
Configure test suite settings and default test suite ID
|
|
185
|
-
|
|
186
|
-
EXAMPLES
|
|
187
|
-
$ testrigor test-suite config --default TEST-SUITE-ID
|
|
188
|
-
|
|
189
|
-
$ testrigor test-suite config --show
|
|
190
|
-
|
|
191
|
-
$ testrigor test-suite config --delete
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
_See code: [src/commands/test-suite/config.ts](https://github.com/TestRigor/testrigor-cli/blob/v2.0.0/src/commands/test-suite/config.ts)_
|
|
195
|
-
|
|
196
|
-
## `testrigor test-suite run [TESTSUITEID]`
|
|
197
|
-
|
|
198
|
-
Run all tests of a Test Suite
|
|
199
|
-
|
|
200
|
-
```
|
|
201
|
-
USAGE
|
|
202
|
-
$ testrigor test-suite run [TESTSUITEID] [--auth-token <value>] [-t <value>] [--min-port <value>] [--max-port
|
|
203
|
-
<value>] [--verbose] [-w] [--branch <value> --commit <value>] [--localhost] [--url <value>]
|
|
204
|
-
[--junit-report-save-path <value>] [--variables-path <value>] [--test-cases-path <value>] [--rules-path <value>]
|
|
205
|
-
[--settings-path <value>] [--local-test-nodes-path <value>] [--test-case-uuid <value>...] [--auto-create-ai-rules]
|
|
206
|
-
[--explicit-mutations] [--labels <value>...] [--excluded-labels <value>...] [--base-url-web <value>] [--base-url-api
|
|
207
|
-
<value>] [--chrome-extension <value>... | --file-path <value>] [--xray-execution-key <value>]
|
|
208
|
-
|
|
209
|
-
ARGUMENTS
|
|
210
|
-
[TESTSUITEID] The test suite id (optional if set in config)
|
|
211
|
-
|
|
212
|
-
FLAGS
|
|
213
|
-
-w, --async Don't wait for the test suite to finish
|
|
214
|
-
--auto-create-ai-rules Enable auto create AI based rules
|
|
215
|
-
--base-url-api=<value> Base URL for API2 (e.g., https://api2.testrigor.com)
|
|
216
|
-
--base-url-web=<value> Base URL for web interface (e.g., https://app.testrigor.com)
|
|
217
|
-
--branch=<value> [env: TR_BRANCH] The branch name
|
|
218
|
-
--chrome-extension=<value>... Chrome extension: "name=EXT_NAME file=PATH_TO_CRX"
|
|
219
|
-
--commit=<value> [env: TR_COMMIT] The commit
|
|
220
|
-
--excluded-labels=<value>... Not run tests of specific labels
|
|
221
|
-
--explicit-mutations In cases where you are always using mutations, such as storing test cases in
|
|
222
|
-
your own repository, and you always send us the set of test cases you have
|
|
223
|
-
through our API you should send "--explicit-mutations"
|
|
224
|
-
--file-path=<value> Path to the file stored locally. It will upload the new file to be used. File
|
|
225
|
-
type should be according to the file type accepted for the Test Suite type of
|
|
226
|
-
testing. If the parameter --url is used, this parameter will be ignored.
|
|
227
|
-
--junit-report-save-path=<value> JUnit report save path
|
|
228
|
-
--labels=<value>... Run tests of specific labels
|
|
229
|
-
--local-test-nodes-path=<value> Path to a YAML or JSON file with local test nodes configuration
|
|
230
|
-
--localhost Localhost run (auto-detects web vs mobile)
|
|
231
|
-
--max-port=<value> [default: 50000] Max port for tunnel
|
|
232
|
-
--min-port=<value> [default: 40000] Min port for tunnel
|
|
233
|
-
--rules-path=<value> Rules path
|
|
234
|
-
--settings-path=<value> Settings path
|
|
235
|
-
--test-case-uuid=<value>... Test case uuid (can be repeated). Requires --url (web) or --file-path (mobile
|
|
236
|
-
app upload).
|
|
237
|
-
--test-cases-path=<value> Test cases files
|
|
238
|
-
--url=<value> The url
|
|
239
|
-
--variables-path=<value> Variables path
|
|
240
|
-
--xray-execution-key=<value> Reuse an existing Xray Cloud Test Execution by key (e.g. XR-123) instead of
|
|
241
|
-
creating a new one. Optional; leave blank to create a new execution.
|
|
242
|
-
|
|
243
|
-
GLOBAL FLAGS
|
|
244
|
-
-t, --token=<value> Suite authentication token
|
|
245
|
-
--auth-token=<value> Personal authentication token
|
|
246
|
-
--verbose Verbose output
|
|
247
|
-
|
|
248
|
-
DESCRIPTION
|
|
249
|
-
Run all tests of a Test Suite
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
_See code: [src/commands/test-suite/run.ts](https://github.com/TestRigor/testrigor-cli/blob/v2.0.0/src/commands/test-suite/run.ts)_
|
|
253
|
-
|
|
254
|
-
## `testrigor test-suite validate-syntax [TESTSUITEID]`
|
|
255
|
-
|
|
256
|
-
Validate step syntax against a test suite's reusable rules, without running the steps
|
|
257
|
-
|
|
258
|
-
```
|
|
259
|
-
USAGE
|
|
260
|
-
$ testrigor test-suite validate-syntax [TESTSUITEID] [--auth-token <value>] [-t <value>] [--min-port <value>] [--max-port
|
|
261
|
-
<value>] [--verbose] [--steps <value> | --test-cases-path <value>] [--base-url-api <value>] [--rules-path <value>]
|
|
262
|
-
[--explicit-mutations]
|
|
263
|
-
|
|
264
|
-
ARGUMENTS
|
|
265
|
-
[TESTSUITEID] The test suite id (optional if set in config)
|
|
266
|
-
|
|
267
|
-
FLAGS
|
|
268
|
-
--base-url-api=<value> Base URL for API2 (e.g., https://api2.testrigor.com)
|
|
269
|
-
--explicit-mutations Validate using only the supplied rules instead of merging them with the suite's saved rules
|
|
270
|
-
--max-port=<value> [default: 50000] Max port for tunnel
|
|
271
|
-
--min-port=<value> [default: 40000] Min port for tunnel
|
|
272
|
-
--rules-path=<value> Ad hoc reusable rules to validate against, for rules not yet saved to this suite (same glob
|
|
273
|
-
format as `test-suite run --rules-path`)
|
|
274
|
-
--steps=<value> Raw step text to validate directly
|
|
275
|
-
--test-cases-path=<value> Test case files to validate (same glob format as `test-suite run --test-cases-path`)
|
|
276
|
-
|
|
277
|
-
GLOBAL FLAGS
|
|
278
|
-
-t, --token=<value> Suite authentication token
|
|
279
|
-
--auth-token=<value> Personal authentication token
|
|
280
|
-
--verbose Verbose output
|
|
281
|
-
|
|
282
|
-
DESCRIPTION
|
|
283
|
-
Validate step syntax against a test suite's reusable rules, without running the steps
|
|
284
|
-
|
|
285
|
-
EXAMPLES
|
|
286
|
-
$ testrigor test-suite validate-syntax <test-suite-id> --steps "click \"Login\""
|
|
287
|
-
|
|
288
|
-
$ testrigor test-suite validate-syntax <test-suite-id> --test-cases-path "test_cases/**/*.{yaml,txt}"
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
_See code: [src/commands/test-suite/validate-syntax.ts](https://github.com/TestRigor/testrigor-cli/blob/v2.0.0/src/commands/test-suite/validate-syntax.ts)_
|
|
292
|
-
<!-- commandsstop -->`, so this README currently stays unchanged.
|
|
119
|
+
This updates the version in `package.json` and in both root entries of `package-lock.json` (`version` and `packages[""].version`). `--no-git-tag-version` stops npm from creating its own commit and `v*` tag. npm also runs the `version` script (`oclif readme && git add README.md`). That script loads the commands from `dist`, which is why you build first. It only rewrites README sections between oclif's marker comments (`commands`, `usage`, `toc`). This README has none, so it stays unchanged. Don't write those markers literally anywhere in the README, not even in code spans: `oclif readme` also runs on every publish and would insert the command docs there.
|
|
293
120
|
3. Check that the diff only touches the version fields, then build and test from the lockfile:
|
|
294
121
|
|
|
295
122
|
```
|