Skip to content

Commit 61b910c

Browse files
authored
Merge pull request #1264 from surishubham/main
PR- 1251,60,62,63
2 parents faf3945 + 297b556 commit 61b910c

File tree

7 files changed

+570
-171
lines changed

7 files changed

+570
-171
lines changed

docs/cypress-cli-commands.md

Lines changed: 87 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,80 @@
11
---
22
id: cypress-cli-commands
33
title: List of LambdaTest Cypress CLI Commands
4-
hide_title: true
4+
hide_title: false
55
sidebar_label: Cypress CLI Commands
66
description: List of all the commands and arguments supported by LambdaTest-Cypress CLI.
77
keywords:
88
- cypress cli commands
99
- lambdatest cypress cli commands
1010
- lambdatest cypress cli flags
1111
- lambdatest cypress cli arguments
12-
1312
url: https://www.lambdatest.com/support/docs/cypress-cli-commands/
1413
site_name: LambdaTest
1514
slug: cypress-cli-commands/
1615
---
1716

18-
# List of LambdaTest Cypress CLI Commands
19-
---
20-
21-
22-
Check out the list of all the commands supported by LambdaTest-Cypress CLI.
23-
24-
Following is the syntax for using the LambdaTest-Cypress CLI commands.
25-
17+
<script type="application/ld+json"
18+
dangerouslySetInnerHTML={{ __html: JSON.stringify({
19+
"@context": "https://schema.org",
20+
"@type": "BreadcrumbList",
21+
"itemListElement": [{
22+
"@type": "ListItem",
23+
"position": 1,
24+
"name": "Home",
25+
"item": "https://www.lambdatest.com"
26+
},{
27+
"@type": "ListItem",
28+
"position": 2,
29+
"name": "Cypress",
30+
"item": "https://www.lambdatest.com/support/docs/"
31+
},{
32+
"@type": "ListItem",
33+
"position": 3,
34+
"name": "CLI Commands",
35+
"item": "https://www.lambdatest.com/support/docs/cypress-cli-commands/"
36+
}]
37+
})
38+
}}
39+
></script>
40+
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:
2644
```bash
2745
lambdatest-cypress <command> [options]
2846
```
2947

3048
| Command / Arg | Purpose |
3149
| -------------- | ------------------------------------------------------ |
32-
| **--help** | To get information of all the commands that can be run |
33-
| **init** | To create an initial config file |
34-
| **run** | To run tests on LambdaTest |
35-
| **build-info** | To get information about the build |
36-
| **build-stop** | To stop all the tests in the build |
37-
| **generate-report** | To generate the test session report |
38-
39-
## init command
40-
---
41-
42-
The init command to generate a initial lambdatest configuration file.
50+
| `--help` | To get information of all the commands that can be run |
51+
| `init` | To create an initial config file |
52+
| `run` | To run tests on LambdaTest |
53+
| `build-info` | To get information about the build |
54+
| `build-stop` | To stop all the tests in the build |
55+
| `generate-report` | To generate the test session report |
56+
| `--vip, --vi-project` | To set the smart ui project name. <br /> The acceptable data type is `string` |
57+
| `--vib , --vi-build` | To set the smart ui build name. <br /> The acceptable data type is `string` |
58+
| `--vibase , --vi-base` | To set that build as baseline for smart ui. <br /> The acceptable data type is `boolean` |
59+
60+
## `init` command
61+
The `init` command to generate a initial lambdatest configuration file.
4362

4463
```
4564
lambdatest-cypress init
4665
```
4766

48-
**Example:**
67+
<img loading="lazy" src={require('../assets/images/cypressten/1.PNG').default} alt="Image" className="doc_img"/><br/><br/>
4968

50-
<img loading="lazy" src={require('../assets/images/cypressten/1.PNG').default} alt="Image" width="703" height="220" className="doc_img"/><br/><br/>
69+
On running the above command, it will generate `base_reporter_config.json`,`custom_support_file.js` and `lambdatest-config.json` files.
5170

52-
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.
5372

54-
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.
5574

56-
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.
5776

58-
3. `lambdatest-config.json` - This file contains configurations like LambdaTest credentials, capabilities, run settings etc., that are required to run the test.
59-
60-
## Run command
61-
---
77+
## `run` command
6278

6379
:::info Note
6480
For detailed examples of each Cypress flag, please visit our guide [Configuring Cypress Test Execution](https://www.lambdatest.com/support/docs/run-settings/).
@@ -72,40 +88,38 @@ lambdatest-cypress run
7288

7389
Given below are the additional flags available with the `run` command.
7490

75-
| Flag | Purpose | Type |
76-
| ---------------------------------- | ------------------------------------------------------ | -----|
77-
| **--version** | Show version number |Boolean|
78-
| **--help** | Show help |Boolean|
79-
| **--ccf, --cypress-config-file** | Path of the config file |String |
80-
| **--lcf, –lambdatest-config-file** | Path of the LambdaTest config file |String |
81-
| **-s, --specs** | Path of the spec file or directory or pattern |String |
82-
| **--bn, --build-name** | Build name |String |
83-
| **-t, --tags** | Test tags |String |
84-
| **-p, --parallels** | No of parallel sessions |String |
85-
| **--envs, --env-variables** (For Cypress 9) | Set environment variables to configure before your test runs |String |
86-
| **--envs, --environment** ( For Cypress 10) | Set environment variables to configure before your test runs |String |
87-
| **--tun, --tunnel** | Configure LambdaTest tunnel |String |
88-
| **--tname, --tunnel_name** | Set the name of LambdaTest tunnel name |String |
89-
| **--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 |
90-
| **--bi, --build-identifier** | Build identifier or build counter |String |
91-
| **--if, --ignore_files** | Files to ignore in the zip project |String |
92-
| **--sync, --sync-mode** | Wait on terminal to get the status of the tests |String |
93-
| **--autostart, --tat** | LambdaTest Tunnel auto Start |String |
94-
| **--headless, --headless-mode** | Run in Headless mode |Boolean |
95-
| **--net, --network** | To capture Network logs |String |
96-
| **--eof, --exit-on-failure** | Exit with Code 1 on failure |String |
97-
| **--cy, --cypress_settings** | Pass Cypress settings |String |
98-
| **--geo, --geo_location** | Pass Geo country code |String |
99-
| **--sof, --stop_on_failure** | Stop other tests if any test in session gets errored out |String |
100-
| **--ra, --reject_unauthorized** | Default rejects self signed certificates in external requests |String |
101-
| **--bt, --build-tags** | Build tags | String |
102-
| **--sys-envs, --sys-env-variables** | To set system variables during test run time |String |
103-
| **--npm-lpd=true, --legacy-peer-deps=true** | Ignore peer dependencies and proceed with the NPM installation | String |
104-
| **--npm-f=true, --npm-force=true** | Fetch remote resources even if a local copy already exists |String |
105-
106-
## Build info command
107-
---
108-
91+
| Flag | Purpose | Type |
92+
| ----------------------------------------- | ------------------------------------------------------ | -----|
93+
| `--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
109123
You can use the `build-info` command to get information on the build.
110124

111125
```bash
@@ -116,17 +130,13 @@ Given below are the additional arguments available with the `build-info` command
116130

117131
| Flag | Purpose | Type |
118132
| --------| -----------| -----|
119-
| **--id, --build-id** | Build Identifier | String, Required |
120-
| **--user, --username** | Your LambdaTest username | String |
121-
| **--ak, --access_key** | Your LambdaTest access key | String |
122-
123-
**Example:**
133+
| `--id, --build-id` | Build Identifier | String, Required |
134+
| `--user, --username` | Your LambdaTest username | String |
135+
| `--ak, --access_key` | Your LambdaTest access key | String |
124136

125137
<img loading="lazy" src={require('../assets/images/cypressten/2.png').default} alt="Image" width="710" height="224" className="doc_img"/>
126138

127-
## Build stop command
128-
---
129-
139+
## `build-stop` command
130140
You can use the `build-stop` command to stop all the test in the build.
131141

132142
```bash
@@ -137,36 +147,13 @@ Given below are the additional arguments available with the `build-stop` command
137147

138148
| Flag | Purpose |
139149
| -------------------- | --------- |
140-
| **--id, --session_id** | Identifies the session |
141-
| **--sls, --stop_last_session** | Stop the last test session |
150+
| `--id, --session_id` | Identifies the session |
151+
| `--sls, --stop_last_session` | Stop the last test session |
142152

143-
**Example**: `--stop_last_session`
153+
- `--stop_last_session`
144154

145155
<img loading="lazy" src={require('../assets/images/cypressten/build_stop.png').default} alt="Image" width="710" height="224" className="doc_img"/>
146156

147-
**Example**: `--session_id`
148-
149-
<img loading="lazy" src={require('../assets/images/cypressten/id_build_stop.png').default} alt="Image" width="710" height="224" className="doc_img"/>
150-
151-
152-
153-
<nav aria-label="breadcrumbs">
154-
<ul className="breadcrumbs">
155-
<li className="breadcrumbs__item">
156-
<a className="breadcrumbs__link" href="https://www.lambdatest.com">
157-
Home
158-
</a>
159-
</li>
160-
<li className="breadcrumbs__item">
161-
<a className="breadcrumbs__link" target="_self" href="https://www.lambdatest.com/support/docs/">
162-
Support
163-
</a>
164-
</li>
165-
<li className="breadcrumbs__item breadcrumbs__item--active">
166-
<span className="breadcrumbs__link">
167-
Cypress CLI Commands
168-
</span>
169-
</li>
170-
</ul>
171-
</nav>
157+
- `--session_id`
172158

159+
<img loading="lazy" src={require('../assets/images/cypressten/id_build_stop.png').default} alt="Image" width="710" height="224" className="doc_img"/>

docs/lambdatest-public-ip.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,10 @@ These are the list of the IP ranges that you need to whitelist with respect to t
9393
- **23.82.88.184**
9494
- **23.106.34.219**
9595
- **23.106.54.77**
96-
97-
>Below are IPs that will be deprecated soon
98-
> - 3.214.241.254
99-
> - 52.36.84.247
100-
> - 13.126.37.58
101-
> - 3.66.78.89
96+
- **3.214.241.254**
97+
- **52.36.84.247**
98+
- **13.126.37.58**
99+
- **3.66.78.89**
102100

103101
## LambdaTest Integration Tools
104-
- **3.208.126.109**
102+
- **3.208.126.109**

0 commit comments

Comments
 (0)