@@ -48,6 +48,9 @@ tests. Refer to the [configuration options](#configuration-options) to learn
48
48
more about all the options you can use in ` browserstack.json ` and the possible
49
49
values.
50
50
51
+ Make sure you specify the npm packages that your tests need to run using the
52
+ ` npm_dependencies ` option in ` run_settings ` .
53
+
51
54
Then, run your tests on BrowserStack:
52
55
53
56
``` bash
@@ -75,14 +78,18 @@ specified folder.
75
78
"browsers" : [
76
79
{
77
80
"browser" : " chrome" ,
78
- "os" : " OS X Catalina " ,
79
- "versions" : [" 69 " ," 66 " ]
81
+ "os" : " Windows 10 " ,
82
+ "versions" : [" 79 " ," 78 " ]
80
83
}
81
84
],
82
85
"run_settings" : {
83
86
"cypress_proj_dir" : " /path/to/directory-that-contains-<cypress.json>-file" ,
84
87
"project_name" : " my first project" ,
85
- "build_name" : " build 1"
88
+ "build_name" : " build 1" ,
89
+ "npm_dependencies" : {
90
+ "npm-package-you-need-to-run-tests-1" : " ^1.2.1" ,
91
+ "npm-package-you-need-to-run-tests-2" : " ^7.1.6-beta.13" ,
92
+ }
86
93
},
87
94
"connection_settings" : {
88
95
"local" : false ,
@@ -120,11 +127,11 @@ Example:
120
127
You can use the ` browsers ` option to specify the list of OS, browser and browser
121
128
versions. Each browser combination should contain the following details:
122
129
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 ` |
130
+ | Option | Description | Possible values |
131
+ | ---------- | ---------------------------------------------- | --------------------------------------------------------------------- |
132
+ | ` os ` | Operating system you want to run the tests on. | ` Windows 10 ` |
133
+ | ` browser ` | Browser you want to run the tests on. | ` chrome ` , ` firefox ` and ` edge ` |
134
+ | ` versions ` | A list of supported browser versions. | Chrome: ` 66 ` to ` 81 ` <br />Firefox: ` 60 ` to ` 75 ` <br />Edge: ` 80 ` & ` 81 ` |
128
135
129
136
Example:
130
137
@@ -133,10 +140,10 @@ Example:
133
140
"browsers" : [{
134
141
"os" : " Windows 10" ,
135
142
"browser" : " chrome" ,
136
- "versions" : [" 69 " , " 66 " ]
143
+ "versions" : [" 79 " , " 78 " ]
137
144
},
138
145
{
139
- "os" : " OS X Mojave " ,
146
+ "os" : " Windows 10 " ,
140
147
"browser" : " firefox" ,
141
148
"versions" : [" 69" , " 66" ]
142
149
}
@@ -154,6 +161,7 @@ BrowserStack.
154
161
| ` cypress_proj_dir ` | Path to the folder which contains ` cypress.json ` file. | - |
155
162
| ` project_name ` | Name of your project. You'll be able to search & filter your tests on the dashboard using this. | - |
156
163
| ` build_name ` | Name of your build / CI run. You'll be able to search & filter your tests on the dashboard using this. username. | - |
164
+ | ` npm_dependencies ` | A list of NPM packages that are required to run your Cypress tests along with their version numbers. | - |
157
165
158
166
Example:
159
167
@@ -162,7 +170,11 @@ Example:
162
170
"run_settings" : {
163
171
"cypress_proj_dir" : " /path/to/directory-that-contains-<cypress.json>-file" ,
164
172
"project_name" : " my first project" ,
165
- "build_name" : " build 1"
173
+ "build_name" : " build 1" ,
174
+ "npm_dependencies" : {
175
+ "npm-package-you-need-to-run-tests-1" : " ^1.2.1" ,
176
+ "npm-package-you-need-to-run-tests-2" : " ^7.1.6-beta.13" ,
177
+ }
166
178
}
167
179
}
168
180
```
@@ -412,8 +424,8 @@ $ browserstack-cypress --disable-usage-reporting <your-commands>
412
424
- While using local, please make sure to create ` /etc/hosts ` entry pointing to
413
425
some URL, and use that URL in the tests. The ` localhost ` URI doesn't work at
414
426
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 .
427
+ - Installing npm packages using ` npm_dependencies ` is not supported for tests
428
+ running on macOS .
417
429
418
430
## License
419
431
0 commit comments