2
2
3
3
[ ![ npm version] ( https://badge.fury.io/js/browserstack-cypress-cli.svg )] ( https://badge.fury.io/js/browserstack-cypress-cli )
4
4
5
+ > ** Note** : Running Cypress tests on BrowserStack is in private alpha. We will be launching a public beta very soon.
6
+ >
7
+ > As such, if you don't have an email from us confirming your access to the Cypress integration, you won't be able to run your Cypress tests on our platform just yet.
8
+ >
9
+ > We are actively working on including more users in the private alpha. If you are an existing Automate user, please write to your BrowserStack account manager or to [email protected] to get early access to the platform before the public beta.
10
+
5
11
The ` browserstack-cypress-cli ` is BrowserStack's command-line interface (CLI) which
6
12
allows you to run your Cypress tests on BrowserStack.
7
13
@@ -48,6 +54,9 @@ tests. Refer to the [configuration options](#configuration-options) to learn
48
54
more about all the options you can use in ` browserstack.json ` and the possible
49
55
values.
50
56
57
+ Make sure you specify the npm packages that your tests need to run using the
58
+ ` npm_dependencies ` option in ` run_settings ` .
59
+
51
60
Then, run your tests on BrowserStack:
52
61
53
62
``` bash
@@ -75,14 +84,18 @@ specified folder.
75
84
"browsers" : [
76
85
{
77
86
"browser" : " chrome" ,
78
- "os" : " OS X Catalina " ,
79
- "versions" : [" 69 " ," 66 " ]
87
+ "os" : " Windows 10 " ,
88
+ "versions" : [" 79 " ," 78 " ]
80
89
}
81
90
],
82
91
"run_settings" : {
83
92
"cypress_proj_dir" : " /path/to/directory-that-contains-<cypress.json>-file" ,
84
93
"project_name" : " my first project" ,
85
- "build_name" : " build 1"
94
+ "build_name" : " build 1" ,
95
+ "npm_dependencies" : {
96
+ "npm-package-you-need-to-run-tests-1" : " ^1.2.1" ,
97
+ "npm-package-you-need-to-run-tests-2" : " ^7.1.6-beta.13" ,
98
+ }
86
99
},
87
100
"connection_settings" : {
88
101
"local" : false ,
@@ -97,7 +110,7 @@ Here are all the options that you can provide in the `browserstack.json`:
97
110
### Authentication
98
111
99
112
You can use the ` auth ` option to specify your username and access keys. You
100
- can find them in your [ Automate dashboard] ( https://automate.browserstack.com/ )
113
+ can find them in your [ Automate dashboard] ( https://automate.browserstack.com/ )
101
114
102
115
| Option | Description | Possible values |
103
116
| ------------ | ----------------------------- | --------------- |
@@ -120,11 +133,11 @@ Example:
120
133
You can use the ` browsers ` option to specify the list of OS, browser and browser
121
134
versions. Each browser combination should contain the following details:
122
135
123
- | Option | Description | Possible values |
124
- | ---------- | ---------------------------------------------- | -------------------------------------------------------------- |
125
- | ` os ` | Operating system you want to run the tests on. | ` Windows 10 ` , ` OS X Mojave ` and ` OS X Catalina ` |
126
- | ` browser ` | Browser you want to run the tests on. | ` chrome ` , ` firefox ` and ` edge ` |
127
- | ` versions ` | A list of supported browser versions. | Chrome: ` 66 ` to ` 80 ` <br />Firefox: ` 60 ` to ` 72 ` <br />Edge: ` 80 ` |
136
+ | Option | Description | Possible values |
137
+ | ---------- | ---------------------------------------------- | --------------------------------------------------------------------- |
138
+ | ` os ` | Operating system you want to run the tests on. | ` Windows 10 ` |
139
+ | ` browser ` | Browser you want to run the tests on. | ` chrome ` , ` firefox ` and ` edge ` |
140
+ | ` versions ` | A list of supported browser versions. | Chrome: ` 66 ` to ` 81 ` <br />Firefox: ` 60 ` to ` 75 ` <br />Edge: ` 80 ` & ` 81 ` |
128
141
129
142
Example:
130
143
@@ -133,10 +146,10 @@ Example:
133
146
"browsers" : [{
134
147
"os" : " Windows 10" ,
135
148
"browser" : " chrome" ,
136
- "versions" : [" 69 " , " 66 " ]
149
+ "versions" : [" 79 " , " 78 " ]
137
150
},
138
151
{
139
- "os" : " OS X Mojave " ,
152
+ "os" : " Windows 10 " ,
140
153
"browser" : " firefox" ,
141
154
"versions" : [" 69" , " 66" ]
142
155
}
@@ -154,6 +167,7 @@ BrowserStack.
154
167
| ` cypress_proj_dir ` | Path to the folder which contains ` cypress.json ` file. | - |
155
168
| ` project_name ` | Name of your project. You'll be able to search & filter your tests on the dashboard using this. | - |
156
169
| ` build_name ` | Name of your build / CI run. You'll be able to search & filter your tests on the dashboard using this. username. | - |
170
+ | ` npm_dependencies ` | A list of NPM packages that are required to run your Cypress tests along with their version numbers. | - |
157
171
158
172
Example:
159
173
@@ -162,7 +176,11 @@ Example:
162
176
"run_settings" : {
163
177
"cypress_proj_dir" : " /path/to/directory-that-contains-<cypress.json>-file" ,
164
178
"project_name" : " my first project" ,
165
- "build_name" : " build 1"
179
+ "build_name" : " build 1" ,
180
+ "npm_dependencies" : {
181
+ "npm-package-you-need-to-run-tests-1" : " ^1.2.1" ,
182
+ "npm-package-you-need-to-run-tests-2" : " ^7.1.6-beta.13" ,
183
+ }
166
184
}
167
185
}
168
186
```
@@ -412,8 +430,8 @@ $ browserstack-cypress --disable-usage-reporting <your-commands>
412
430
- While using local, please make sure to create ` /etc/hosts ` entry pointing to
413
431
some URL, and use that URL in the tests. The ` localhost ` URI doesn't work at
414
432
the moment. You can use ` http://bs-local.com ` instead, to replace ` localhost `
415
- - Installing npm packages that your tests might require to run the tests are
416
- not supported at this moment .
433
+ - Installing npm packages using ` npm_dependencies ` is not supported for tests
434
+ running on macOS .
417
435
418
436
## License
419
437
0 commit comments