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
Copy file name to clipboardExpand all lines: README.md
+34-30Lines changed: 34 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -9,14 +9,14 @@
9
9
-[License](#license)
10
10
11
11
# BrowserStack Cypress CLI
12
-
You can now run your Cypress tests in BrowserStack using our browserstack-cypress-cli. BrowserStack currently supports Cypress 4 and you can start testing on the following browser combinations.
12
+
You can now run your Cypress tests in BrowserStack using our `browserstack-cypress-cli`. BrowserStack currently supports Cypress 4 and you can start testing on the following browser combinations:
# create a sample configuration file for configurations and capabiltiies
38
+
# create a sample configuration file for configurations and capabilities
38
39
$ browserstack-cypress init
39
40
```
40
-
This will create a sample browserstack.json file. This file can be used to configure your tests on BrowserStack. Below is the sample file that is generated for your reference.
41
+
42
+
This will create a sample `browserstack.json` file. This file can be used to configure your test runs on BrowserStack. Below is the sample file that is generated for your reference.
41
43
42
44
```json
43
45
{
44
46
"auth": {
45
-
"username": "<username>",
46
-
"access_key": "<access-key>"
47
+
"username": "<your-browserstack-username>",
48
+
"access_key": "<your-browserstack-access-key>"
47
49
},
48
50
"browsers": [
49
51
{
@@ -53,30 +55,31 @@ This will create a sample browserstack.json file. This file can be used to confi
| username | These are the BrowserStack credentials that need to be provided to run a test on BrowserStack. You can find this in your [automate dashboard](https://automate.browserstack.com/)| - |
72
-
| access_key | These are the BrowserStack credentials that need to be provided to run a test on BrowserStack. You can find this in your [automate dashboard](https://automate.browserstack.com/)| - |
73
-
| os (case-sensitive) | The operating system in which you want to run your test. | The following three strings are supported."OS X Mojave" , "OS X Catalina", "Windows 10" |
74
-
| browser (case-sensitive) | The browser in which you want to run your tests on. | Right now only "chrome", "firefox", and "edge" are supported. We are actively working on supporting other browsers. |
75
-
| versions | A list of browser versions that you need to run your tests on | Example: To run on versions 69, 67 and 65 provide ["69", "67", "65"]. Right now edge 80 and all chrome versions from 66 to 78 are supported |
76
-
| specs | The path to the spec files that need to be run on BrowserStack | Takes a list of strings that point to location of the spec files |
77
-
| project | Name of the project | A string providing the name of the project |
78
-
| customBuildName | Helps in providing a custom name for the build | A string providing the name of the build |
79
-
| local(boolean: true/false) | Helps in testing websites that cannot be accessed in public network | Set this to true if you need to test a local website. Set this to false if the website is accessible publically. |
73
+
|`username`| This is your BrowserStack username. You can find this in your [Automate dashboard](https://automate.browserstack.com/)| - |
74
+
|`access_key`| This is your BrowserStack access key. You can find this in your [Automate dashboard](https://automate.browserstack.com/)| - |
75
+
|`os` <br/> (_case-sensitive_) | The operating system on which you want to run your test. |`OS X Mojave`, <br/> `OS X Catalina`, and <br/> `Windows 10`|
76
+
|`browser` <br/> (case-sensitive) | The browser on which you want to run your tests. |`chrome`, <br/> `firefox`, and <br/> `edge`|
77
+
|`versions`| A list of browser versions that you want to run your tests on. <br/><br/> **Example:** To run on versions 69, 67 and 65 provide `["69", "67", "65"]`| Right now edge 80 and all chrome versions from 66 to 78 are supported |
78
+
|`specs` <br/> (_deprecated_) | This param is deprecated in favour of a more complete `cypress_proj_dir` param. The path to the spec files that need to be run on BrowserStack | Takes a list of strings that point to location of the spec files |
79
+
|`cypress_proj_dir`| Path to the folder which contains `cypress.json` file. This path will be considered as the root path of the project. |- |
80
+
|`project`| Name of your project. This will be displayed in your Automate dashboard, and you'll be able to search & filter your tests based on the project name. | A string providing the name of the project |
81
+
|`customBuildName`| Helps in providing a custom name for the build. This will be displayed in your Automate dashboard, and you'll be able to search & filter your tests based on the build name. | A string providing the name of the build |
82
+
|`local`| Helps in testing websites that cannot be accessed in public network. If you set this to `true`, please download the Local binary and establish a local connection first (you can learn how to do so [here](https://www.browserstack.com/local-testing/automate#command-line)) | Boolean: `true` / `false`. Set this to `true` if you need to test a local website. Set this to `false` if the website is accessible publicly. |
80
83
81
84
### Running the tests
82
85
You can start running your test build using the following command.
@@ -85,7 +88,7 @@ You can start running your test build using the following command.
85
88
$ browserstack-cypress run
86
89
```
87
90
88
-
Output :
91
+
Sample output :
89
92
90
93
```bash
91
94
[2/20/2020, 2:58:31 PM] Reading browserstack.json from /browserstack.json
@@ -97,7 +100,9 @@ Output :
97
100
[2/20/2020, 2:58:34 PM] Test suite: bs://15f90b540b8cbc47929782f35bb7db20fe1c4709
98
101
[2/20/2020, 2:58:34 PM] Local is set to: false
99
102
[2/20/2020, 2:58:34 PM] Build name is: cypress build
103
+
[2/20/2020, 2:58:34 PM] Success
100
104
[2/20/2020, 2:58:36 PM] Build created with build id: 06f28ce423d10314b32e98bb6f68e10b0d02a49a
**Note**that individual version represents a session. It is advised to validate your account's parallel before running multiple versions.
183
+
**Note:**Each browser version represents a session. It is advised to validate your account's parallel limit before running multiple versions.
179
184
180
185
### Limitations
181
186
182
187
-`exec` and `task` are not allowed.
183
-
-`baseUrl` is not supported at the moment.
184
-
- Environment variables and configuration files are not supported yet.
185
-
- While using local, please make sure to create /etc/hosts entry pointing to a URL. The `localhost` is not working at the moment.
188
+
- While using local, please make sure to create `/etc/hosts` entry pointing to some URL, and use that URL in the tests. The `localhost` URI doesn't work at the moment.
189
+
- Installing custom npm packages are not supported at this moment.
186
190
187
191
# Accessing test results
188
192
189
193
You can access your test results in [BrowserStack Automate dashboard](https://automate.browserstack.com/). The dashboard provides test details along with video, console logs and screenshots to help you debug any issues.
190
194
191
195
# License
192
196
193
-
This project is released under MIT License. Please refer the [LICENSE.md](LICENSE.md) for more detail.
197
+
This project is released under MIT License. Please refer the [LICENSE.md](LICENSE.md) for more details.
0 commit comments