Skip to content

Commit 80aa886

Browse files
authored
Merge pull request #2650 from saucelabs/DEVX-2749-part2
docs: Fix incorrect and outdated saucectl cli content
2 parents 1b044ea + 9a327c9 commit 80aa886

File tree

7 files changed

+246
-57
lines changed

7 files changed

+246
-57
lines changed

docs/api-testing/integrations/apitesting-saucectl-integration.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ To utilize `saucectl` functionalities, you'll need to generate a webhook for you
2626
To generate a webhook:
2727

2828
1. Log in to Sauce Labs, then click **API Testing**.
29-
1. Navigate to your Project and select the **WebHooks** tab.<br/>
29+
2. Navigate to your Project and select the **WebHooks** tab.<br/>
3030
<img src={useBaseUrl('img/api-testing/webhook_tab.png')} alt="webhook screenshot" width="200"/>
31-
1. Select **Create Hook**.<br/><img src={useBaseUrl('img/api-testing/createHook.png')} alt="Create New WebHook" width="300"/>
32-
1. Enter a **Hook Name** for your webhook (**Description** is optional), then click **Save**.<br/>
31+
3. Select **Create Hook**.<br/><img src={useBaseUrl('img/api-testing/createHook.png')} alt="Create New WebHook" width="300"/>
32+
4. Enter a **Hook Name** for your webhook (**Description** is optional), then click **Save**.<br/>
3333
<img src={useBaseUrl('img/api-testing/sampleHook.png')} alt="sample webhook details" width="300" />
34-
1. The generated **Hook URL** will then appear.
34+
5. The generated **Hook URL** will then appear.
3535

3636
### Step 2: Install `saucectl`
3737

docs/dev/cli/saucectl/run.md

+192-23
Original file line numberDiff line numberDiff line change
@@ -88,25 +88,70 @@ Execute tests according to the environment, framework, and test suite specificat
8888
<td>Usage information for the <code>run</code> command.</td>
8989
</tr>
9090
<tr>
91-
<td><span className="t-cli"><a href="#--help">--live-logs</a></span></td>
91+
<td><span className="t-cli"><a href="#--launch-order">--launch-order</a></span></td>
92+
<td></td>
93+
<td>Modify the execution order of suites.</td>
94+
</tr>
95+
<tr>
96+
<td><span className="t-cli"><a href="#--live-logs">--live-logs</a></span></td>
9297
<td></td>
9398
<td>Tail the live log output from a running Sauce Orchestrate container.</td>
9499
</tr>
95100
<tr>
96-
<td><span className="t-cli"><a href="#--no-color">--no-color</a></span></td>
101+
<td><span className="t-cli"><a href="#--no-auto-tagging">--no-auto-tagging</a></span></td>
97102
<td></td>
98-
<td>Disable colored console output.</td>
103+
<td>Disable the automatic tagging of jobs with metadata, such as CI or Git information.</td>
99104
</tr>
105+
<tr>
106+
<td><span className="t-cli"><a href="#--no-color">--no-color</a></span></td>
107+
<td></td>
108+
<td>Disable colored console output.</td>
109+
</tr>
100110
<tr>
101111
<td><span className="t-cli"><a href="#--region">--region</a></span></td>
102112
<td><span className="t-cli">-r</span></td>
103113
<td>Sauce Labs target data center.</td>
104114
</tr>
115+
<tr>
116+
<td><span className="t-cli"><a href="#--reportersjsonenabled">--reporters.json.enabled</a></span></td>
117+
<td></td>
118+
<td>Toggles saucectl's JSON test result reporting on/off.</td>
119+
</tr>
120+
<tr>
121+
<td><span className="t-cli"><a href="#--reportersjsonfilename">--reporters.json.filename</a></span></td>
122+
<td></td>
123+
<td>Specifies the report filename. (default "saucectl-report.json").</td>
124+
</tr>
125+
<tr>
126+
<td><span className="t-cli"><a href="#--reportersjsonwebhookurl">--reporters.json.webhookURL</a></span></td>
127+
<td></td>
128+
<td>Specifies the webhook URL. When saucectl test is finished, it'll send a HTTP POST payload to the configured webhook URL.</td>
129+
</tr>
130+
<tr>
131+
<td><span className="t-cli"><a href="#--reportersjunitenabled">--reporters.junit.enabled</a></span></td>
132+
<td></td>
133+
<td>Toggles saucectl's own junit reporting on/off.</td>
134+
</tr>
135+
<tr>
136+
<td><span className="t-cli"><a href="#--reportersjunitfilename">--reporters.junit.filename</a></span></td>
137+
<td></td>
138+
<td>Specifies the report filename. (default "saucectl-report.xml").</td>
139+
</tr>
105140
<tr>
106141
<td><span className="t-cli"><a href="#--retries">--retries</a></span></td>
107142
<td></td>
108143
<td>Number of times to rerun a failed test suite.</td>
109144
</tr>
145+
<tr>
146+
<td><span className="t-cli"><a href="#--root-dir">--root-dir</a></span></td>
147+
<td></td>
148+
<td>Specifies the project directory. Not applicable to mobile frameworks. (default ".")</td>
149+
</tr>
150+
<tr>
151+
<td><span className="t-cli"><a href="#--sauceignore">--sauceignore</a></span></td>
152+
<td></td>
153+
<td>Specifies the path to the .sauceignore file. (default ".sauceignore")</td>
154+
</tr>
110155
<tr>
111156
<td><span className="t-cli"><a href="#--select-suite">--select-suite</a></span></td>
112157
<td></td>
@@ -124,13 +169,8 @@ Execute tests according to the environment, framework, and test suite specificat
124169
</tr>
125170
<tr>
126171
<td><span className="t-cli"><a href="#--timeout">--timeout</a></span></td>
127-
<td></td>
128-
<td>Set a max test duration.</td>
129-
</tr>
130-
<tr>
131-
<td><span className="t-cli"><a href="#--uploadTimeout">--uploadTimeout</a></span></td>
132-
<td></td>
133-
<td>Set a max upload duration.</td>
172+
<td><span className="t-cli">-t</span></td>
173+
<td>Global timeout that limits how long saucectl can run in total. Supports duration values like '10s', '30m' etc. (default: no timeout).</td>
134174
</tr>
135175
<tr>
136176
<td><span className="t-cli"><a href="#--tunnel-name">--tunnel-name</a></span></td>
@@ -142,6 +182,11 @@ Execute tests according to the environment, framework, and test suite specificat
142182
<td></td>
143183
<td>The tunnel owner, if it is not the testing account.</td>
144184
</tr>
185+
<tr>
186+
<td><span className="t-cli"><a href="#--upload-timeout">--upload-timeout</a></span></td>
187+
<td></td>
188+
<td>Set a max upload duration.</td>
189+
</tr>
145190
<tr>
146191
<td><span className="t-cli"><a href="#--verbose">--verbose</a></span></td>
147192
<td></td>
@@ -168,7 +213,7 @@ saucectl run --artifacts.cleanup true
168213
### <span className="cli">--artifacts.download.directory</span>
169214

170215
<div className="cli-desc">
171-
<p><small>| OPTIONAL | PATH | <span className="sauceGreen">RDC Only</span> |</small></p>
216+
<p><small>| OPTIONAL | PATH |</small></p>
172217

173218
Specifies the path to the folder location in which to download artifacts. A separate subdirectory is generated in this location for each suite for which artifacts are downloaded. Must be set in conjunction with `--artifacts.download.match` and `--artifacts.download.when`.
174219

@@ -223,9 +268,9 @@ Allows you to launch tests without waiting for results of the preceding tests. T
223268
### <span className="cli">--build</span>
224269

225270
<div className="cli-desc">
226-
<p><small>| OPTIONAL | STRING | <span className="sauceGreen">VDC Only</span> |</small></p>
271+
<p><small>| OPTIONAL | STRING |</small></p>
227272

228-
Associates the tests with a build to support easy filtering of related test results in the Sauce Labs UI. This option is not yet supported for mobile real device tests.
273+
Associates the tests with a build to support easy filtering of related test results in the Sauce Labs UI.
229274

230275
```bash
231276
saucectl run --build myBuildID
@@ -371,10 +416,25 @@ Usage information for the `run` command.
371416

372417
</div>
373418

419+
### <span className="cli">--launch-order</span>
420+
421+
<div className="cli-desc">
422+
<p><small>| OPTIONAL | STRING |</small></p>
423+
424+
Modify the execution order of suites.
425+
426+
Supported value `fail rate`: Jobs with the highest failure rate are prioritized for launch.
427+
428+
```bash
429+
saucectl run --launch-order="fail rate"
430+
```
431+
432+
</div>
433+
374434
### <span className="cli">--live-logs</span>
375435

376436
<div className="cli-desc">
377-
<p><small>| OPTIONAL | BOOLEAN | <span className="sauceGreen">Sauce Orchestrate Only</span></small></p>
437+
<p><small>| OPTIONAL | BOOLEAN | <span className="sauceGreen">Sauce Orchestrate Only</span> |</small></p>
378438

379439
Tail the live log output from a running Sauce Orchestrate container.
380440

@@ -384,6 +444,19 @@ saucectl run --live-logs
384444

385445
</div>
386446

447+
### <span className="cli">--no-auto-tagging</span>
448+
449+
<div className="cli-desc">
450+
<p><small>| OPTIONAL | BOOLEAN |</small></p>
451+
452+
Disables the automatic tagging of jobs with metadata, such as CI or Git information.
453+
454+
```bash
455+
saucectl run --no-auto-tagging
456+
```
457+
458+
</div>
459+
387460
### <span className="cli">--no-color</span>
388461

389462
<div className="cli-desc">
@@ -402,7 +475,7 @@ saucectl run --no-color
402475
<div className="cli-desc">
403476
<p><small>| REQUIRED | STRING |</small></p>
404477

405-
Specifies the Sauce Labs data center through which tests will run. Valid values are: `us-west-1` (default) or `eu-central-1`.
478+
Specifies the Sauce Labs data center through which tests will run. Valid values are: `us-west-1`, `us-east-4` or `eu-central-1`.
406479

407480
**Shorthand:** `-r`
408481

@@ -412,10 +485,80 @@ saucectl run --region us-west-1
412485

413486
</div>
414487

488+
### <span className="cli">--reporters.json.enabled</span>
489+
490+
<div className="cli-desc">
491+
<p><small>| OPTIONAL | BOOLEAN |</small></p>
492+
493+
Toggles saucectl's JSON test result reporting on/off. This only affects the reports that saucectl itself generates as a summary of your tests.
494+
495+
```bash
496+
saucectl run --reporters.json.enabled=true
497+
```
498+
499+
</div>
500+
501+
### <span className="cli">--reporters.json.filename</span>
502+
503+
<div className="cli-desc">
504+
<p><small>| OPTIONAL | FILEPATH |</small></p>
505+
506+
Sets the report filename, with the default being `saucectl-report.json`.
507+
508+
To use this option, make sure to activate the JSON reporter by including `--reporters.json.enabled=true`.
509+
510+
```bash
511+
saucectl run --reporters.json.enabled=true --reporters.json.filename="path/to/my_report.json"
512+
```
513+
514+
</div>
515+
516+
### <span className="cli">--reporters.json.webhookURL</span>
517+
518+
<div className="cli-desc">
519+
<p><small>| OPTIONAL | URL |</small></p>
520+
521+
Specifies the webhook URL. When saucectl test is finished, it'll send an HTTP POST payload to the configured webhook URL.
522+
523+
To use this option, make sure to activate the JSON reporter by including `--reporters.json.enabled=true`.
524+
525+
```bash
526+
saucectl run --reporters.json.enabled=true --reporters.json.webhookURL="my_webhook_url"
527+
```
528+
529+
</div>
530+
531+
### <span className="cli">--reporters.junit.enabled</span>
532+
533+
<div className="cli-desc">
534+
<p><small>| OPTIONAL | BOOLEAN |</small></p>
535+
536+
Toggles saucectl's own junit reporting on/off. This only affects the reports that saucectl itself generates as a summary of your tests. Each Job in Sauce Labs has an independent report regardless.
537+
538+
```bash
539+
saucectl run --reporters.junit.enabled=true
540+
```
541+
</div>
542+
543+
### <span className="cli">--reporters.junit.filename</span>
544+
545+
<div className="cli-desc">
546+
<p><small>| OPTIONAL | FILEPATH |</small></p>
547+
548+
Sets the report filename, with the default being `saucectl-report.xml`.
549+
550+
To use this option, make sure to activate the JUnit reporter by including `--reporters.junit.enabled=true`.
551+
552+
```bash
553+
saucectl run --reporters.junit.enabled=true --reporters.junit.filename="path/to/my_report.xml"
554+
```
555+
556+
</div>
557+
415558
### <span className="cli">--retries</span>
416559

417560
<div className="cli-desc">
418-
<p><small>| REQUIRED | INTEGER |</small></p>
561+
<p><small>| OPTIONAL | INTEGER |</small></p>
419562

420563
Instructs `saucectl` to rerun failed tests this many times.
421564

@@ -425,6 +568,32 @@ saucectl run --retries 2
425568

426569
</div>
427570

571+
### <span className="cli">--root-dir</span>
572+
573+
<div className="cli-desc">
574+
<p><small>| OPTIONAL | FILEPATH |</small></p>
575+
576+
Specifies the project directory. Not applicable to mobile frameworks. Default: `.`.
577+
578+
```bash
579+
saucectl run --root-dir="path/to/my/root_dir"
580+
```
581+
582+
</div>
583+
584+
### <span className="cli">--sauceignore</span>
585+
586+
<div className="cli-desc">
587+
<p><small>| OPTIONAL | FILEPATH |</small></p>
588+
589+
Specifies the path to the .sauceignore file. Default: `.sauceignore`.
590+
591+
```bash
592+
saucectl run --sauceignore="path/to/my/.sauceignore"
593+
```
594+
595+
</div>
596+
428597
### <span className="cli">--select-suite</span>
429598

430599
<div className="cli-desc">
@@ -458,9 +627,9 @@ saucectl run --show-console-log
458627
### <span className="cli">--tags</span>
459628

460629
<div className="cli-desc">
461-
<p><small>| OPTIONAL | LIST | <span className="sauceGreen">VDC Only</span> |</small></p>
630+
<p><small>| OPTIONAL | LIST |</small></p>
462631

463-
A keyword that may help you distinguish the test in Sauce Labs, and also helps you apply filters to easily isolate tests based on metrics that are meaningful to you. This option is not yet supported for mobile real device tests.
632+
Keywords that may help you distinguish the test in Sauce Labs, and also help you apply filters to easily isolate tests based on metrics that are meaningful to you.
464633

465634
```bash
466635
saucectl run --tags e2e,team2
@@ -486,16 +655,16 @@ saucectl run --timeout 30m
486655

487656
</div>
488657

489-
### <span className="cli">--uploadTimeout</span>
658+
### <span className="cli">--upload-timeout</span>
490659

491660
<div className="cli-desc">
492661
<p><small>| OPTIONAL | DURATION |</small></p>
493662

494-
Upload timeout that limits how long saucectl will wait for an upload to finish. Supports duration values like '10s' '30m' etc. (default: 5m)
663+
Uploads timeout that limits how long saucectl will wait for an upload to finish. Supports duration values like '10s' '30m' etc. (default: 5m)
495664

496665
```bash
497-
saucectl run --uploadTimeout 10s
498-
saucectl run --uploadTimeout 30m
666+
saucectl run --upload-timeout 10s
667+
saucectl run --upload-timeout 30m
499668
```
500669

501670
</div>
@@ -505,7 +674,7 @@ saucectl run --uploadTimeout 30m
505674
<div className="cli-desc">
506675
<p><small>| OPTIONAL | STRING |</small></p>
507676

508-
Specifies an active [Sauce Connect](/secure-connections/sauce-connect/proxy-tunnels/) tunnel to establish a secure connection to run this test on Sauce Labs.
677+
Specifies an active [Sauce Connect](/secure-connections) tunnel to establish a secure connection to run this test on Sauce Labs.
509678

510679
:::note
511680
Replaces the former `--tunnel_id` option, which is deprecated.

docs/dev/cli/saucectl/usage/ci/azure.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ These examples can apply to virtually any Azure DevOps deployment, provided that
2121
To run tests on Sauce Labs from Azure DevOps, you need to make your Sauce Labs credentials available to your Pipelines. We'll set a secret variable in the UI.
2222

2323
1. Log in to Azure DevOps.
24-
1. Go to the **Pipelines** page, select a pipeline, then **Edit**.
25-
1. Click on **Variables**, then **New Variable**.
26-
1. Enter the name `sauceUsername` and set the value to your Sauce Labs username and click **OK**.
27-
1. Add another variable, this time named `sauceAccessKey`, set it to your Sauce Labs access key, select the `Keep this value secret` option, and click **OK**.
28-
1. Click **Save**.
24+
2. Go to the **Pipelines** page, select a pipeline, then **Edit**.
25+
3. Click on **Variables**, then **New Variable**.
26+
4. Enter the name `sauceUsername` and set the value to your Sauce Labs username and click **OK**.
27+
5. Add another variable, this time named `sauceAccessKey`, set it to your Sauce Labs access key, select the `Keep this value secret` option, and click **OK**.
28+
6. Click **Save**.
2929

3030
## Add Azure Pipeline Configuration
3131

0 commit comments

Comments
 (0)