You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The LambdaTest-Cypress CLI provides a set of commands to streamline and enhance your testing workflows on the LambdaTest platform. Below is a comprehensive list of supported commands and their usage.
41
+
42
+
## General Syntax
43
+
To use any command in the LambdaTest-Cypress CLI, follow this basic syntax:
On running the above command, it will generate `base_reporter_config.json`,`custom_support_file.js` and `lambdatest-config.json` files.
55
70
56
-
On running the above command, it will generate `base_reporter_config.json`,`custom_support_file.js` and `lambdatest-config.json ` files.
71
+
-**`base_reporter_config.json`**: This is the configuration file for mochawesome reporter, that LambdaTest uses to generate mochawesome reports which in turn is used to generate the commands section on the LambdaTest dashboard. For Cypress 10, the absence of this file may lead to the commands section not being visible on the dashboard.
57
72
58
-
1.`base_reporter_config.json` - It is the configuration file for mochawesome reporter, that LambdaTest uses to generate mochawesome reports which in turn is used to generate the commands section on the LambdaTest dashboard. For Cypress 10, the absence of this file may lead to the commands section not being visible on the dashboard.
73
+
-**`custom_support_file.js`**: By default, Cypress automatically captures screenshots when a test fails. For Cypress 10, in order to make the screenshot visible with the failed tests on our dashboard, we recommend you move and import this file as recommended.
59
74
60
-
2.`custom_support_file.js` - By default, Cypress automatically captures screenshots when a test fails. For Cypress 10, in order to make the screenshot visible with the failed tests on our dashboard, we recommend you move and import this file as recommended.
75
+
-**`lambdatest-config.json`**: This file contains configurations like LambdaTest credentials, capabilities, run settings etc., that are required to run the test.
61
76
62
-
3.`lambdatest-config.json` - This file contains configurations like LambdaTest credentials, capabilities, run settings etc., that are required to run the test.
63
-
64
-
## Run command
65
-
---
77
+
## `run` command
66
78
67
79
:::info Note
68
80
For detailed examples of each Cypress flag, please visit our guide [Configuring Cypress Test Execution](https://www.lambdatest.com/support/docs/run-settings/).
@@ -76,40 +88,38 @@ lambdatest-cypress run
76
88
77
89
Given below are the additional flags available with the `run` command.
|**--tname, --tunnel_name**| Set the name of LambdaTest tunnel name |String |
93
-
|**--brs, --browsers**| Test will be run on the specified browsers<br/> in the format: `platform:browser:version` <br /><br /> e.g. **`--brs="MacOS Catalina:chrome:latest"`** <br /><br /> **`--brs="MacOS Catalina:chrome:112.0,MacOS mojave:firefox:111.0"`**|String |
94
-
|**--bi, --build-identifier**| Build identifier or build counter |String |
95
-
|**--if, --ignore_files**| Files to ignore in the zip project |String |
96
-
|**--sync, --sync-mode**| Wait on terminal to get the status of the tests |String |
97
-
|**--autostart, --tat**| LambdaTest Tunnel auto Start |String |
98
-
|**--headless, --headless-mode**| Run in Headless mode |Boolean |
99
-
|**--net, --network**| To capture Network logs |String |
100
-
|**--eof, --exit-on-failure**| Exit with Code 1 on failure |String |
|`--version`| Show version number <br /> e.g. `lambdatest-cypress run -–version`|NA|
94
+
|`--help`| Show help <br /> e.g. `lambdatest-cypress run -–help`|NA|
95
+
|`--ccf, --cypress-config-file`| Path of the config file <br /> e.g. `lambdatest-cypress run --ccf="base_reporter_config.json"`|String |
96
+
|`--lcf, –lambdatest-config-file`| Path of the LambdaTest config file <br /> e.g. `lambdatest-cypress run --lcf="lambdatest-config.json"`|String |
97
+
|`-s, --specs`| Path of the spec file or directory or pattern <br /> e.g. `lambdatest-cypress run --s=”path_from_content_root"`|String |
98
+
|`--bn, --build-name`| Build name |String |
99
+
|`-t, --tags`| Test tags |String |
100
+
|`-p, --parallels`| No of parallel sessions |String |
101
+
|`--envs, --env-variables` (Cypress 9) | Set environment variables to configure before your test runs |String |
102
+
|`--envs, --environment` (Cypress 10) | Set environment variables to configure before your test runs |String |
103
+
|`--tun, --tunnel`| Configure LambdaTest tunnel <br /> e.g. `lambdatest-cypress run --tun="true" –tname="v3"`|String |
104
+
|`--tname, --tunnel_name`| Set the name of LambdaTest tunnel name <br /> e.g. `lambdatest-cypress run --tun="true" –tname="v3"`|String |
105
+
|`--brs, --browsers`| Test will be run on the specified browsers <br/> in the format: `platform:browser:version` <br /><br /> e.g. `--brs="MacOS Catalina:chrome:latest"` <br /><br /> `--brs="MacOS Catalina:chrome:112.0,MacOS mojave:firefox:111.0"`|String |
106
+
|`--bi, --build-identifier`| Build identifier or build counter |String |
107
+
|`--if, --ignore_files`| Files to ignore in the zip project <br /> e.g. `lambdatest-cypress run --if="cypress/e2e/1-getting-started/actions.cy.js"`|String |
108
+
|`--sync, --sync-mode`| Wait on terminal to get the status of the tests <br /> e.g. `lambdatest-cypress run --sync=true`|String |
109
+
|`--autostart, --tat`| LambdaTest Tunnel auto Start <br /> e.g. `lambdatest-cypress run --autostart=true`|String |
110
+
|`--headless, --headless-mode`| Run in Headless mode <br /> e.g. `lambdatest-cypress run --headless=true`|Boolean |
111
+
|`--net, --network`| To capture Network logs <br /> e.g. `lambdatest-cypress run --net="true"`|String |
112
+
|`--eof, --exit-on-failure`| Exit with Code 1 on failure <br /> e.g. `lambdatest-cypress run ---exit-on-failure=”true”`|String |
113
+
|`--cy, --cypress_settings`| Pass Cypress settings <br /> e.g. `lambdatest-cypress run --cy=viewportWidth=1000;viewportHeight=660;`|String |
114
+
|`--geo, --geo_location`| Pass Geo country code <br /> e.g. `lambdatest-cypress run ---geo_location=AU` <br /> Check all the available Geolocations. |String |
115
+
|`--sof, --stop_on_failure`| Stop other tests if any test in session gets errored out <br /> e.g. `lambdatest-cypress run --stop_on_failure=true`|String |
116
+
|`--ra, --reject_unauthorized`| Default rejects self signed certificates in external requests <br /> e.g. `lambdatest-cypress run --reject_unauthorized=true`|String |
117
+
|`--bt, --build-tags`| Build tags <br /> e.g. `lambdatest-cypress run --build-tags=tag1`| String |
118
+
|`--sys-envs, --sys-env-variables`| To set system variables during test run time <br /> e.g. `lambdatest-cypress run --sys-envs="BASE_URL=https://lambdatest.com;"`|String |
119
+
|`--npm-lpd=true, --legacy-peer-deps=true`| Ignore peer dependencies and proceed with the NPM installation | String |
120
+
|`--npm-f=true, --npm-force=true`| Fetch remote resources even if a local copy already exists <br /> e.g. `lambdatest-cypress run --npm-force=true`|String |
121
+
122
+
## `build-info` command
113
123
You can use the `build-info` command to get information on the build.
114
124
115
125
```bash
@@ -120,17 +130,13 @@ Given below are the additional arguments available with the `build-info` command
0 commit comments