Skip to content

Commit d0ca726

Browse files
authored
Merge pull request #10 from Sreyanth/custom_commands
Update README.md to reflect custom command support
2 parents a15a093 + e5cd039 commit d0ca726

File tree

1 file changed

+31
-28
lines changed

1 file changed

+31
-28
lines changed

README.md

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
- [License](#license)
1010

1111
# 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:
1313

1414

1515
| Windows 10 | OS X Mojave | OS X Catalina |
16-
|---------------------|:---------------------:|--------------------:|
17-
| chrome 66.0 to 79.0 | chrome 66.0 to 79.0 | chrome 66.0 to 79.0 |
18-
| edge 80.0 | edge 80.0 | edge 80.0 |
19-
| firefox 60.0 to 72.0| firefox 60.0 to 72.0 | firefox 60.0 to 72.0|
16+
|:---------------------:|:---------------------:|:--------------------:|
17+
| Chrome 66.0 to 79.0 | Chrome 66.0 to 79.0 | Chrome 66.0 to 79.0 |
18+
| Edge 80.0 | Edge 80.0 | Edge 80.0 |
19+
| Firefox 60.0 to 72.0| Firefox 60.0 to 72.0 | Firefox 60.0 to 72.0|
2020

2121

2222
We are actively working on supporting other browsers and will start adding other browsers to this list.
@@ -26,24 +26,26 @@ We are actively working on supporting other browsers and will start adding other
2626

2727
### Installing browserstack-cypress
2828
```bash
29-
# Install cypress(ignore if already done)
29+
# Install cypress (ignore if already done)
3030
$ npm install -g [email protected]
31-
# Install dependencies
31+
32+
# Install the BrowserStack Cypress CLI
3233
$ npm install -g browserstack-cypress-cli
3334
```
3435

3536
### Configuring your tests
3637
```bash
37-
# create a sample configuration file for configurations and capabiltiies
38+
# create a sample configuration file for configurations and capabilities
3839
$ browserstack-cypress init
3940
```
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.
4143

4244
```json
4345
{
4446
"auth": {
45-
"username": "<username>",
46-
"access_key": "<access-key>"
47+
"username": "<your-browserstack-username>",
48+
"access_key": "<your-browserstack-access-key>"
4749
},
4850
"browsers": [
4951
{
@@ -53,30 +55,31 @@ This will create a sample browserstack.json file. This file can be used to confi
5355
}
5456
],
5557
"run_settings": {
56-
"cypress": "/path/to/directory-of-<cypress.json>-file",
57-
"project": "test",
58-
"customBuildName": "cypress build"
58+
"cypress_proj_dir": "/path/to/directory-that-contains-<cypress.json>-file",
59+
"project": "my first project",
60+
"customBuildName": "build 1"
5961
},
6062
"connection_settings": {
6163
"local": false
6264
}
6365
}
6466
```
6567

66-
The following table provides a reference for all the options that can be provided in browserstack.json shown above.
68+
The following table provides a reference for all the options that can be provided in `browserstack.json` shown above.
6769

6870

6971
| Option | Description | Possible values |
7072
|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
71-
| 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-
| cypress | Path to the folder which contains `cypress.json` file. This path will be considered as the root path of the project. |- |
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. |
8083

8184
### Running the tests
8285
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.
8588
$ browserstack-cypress run
8689
```
8790

88-
Output :
91+
Sample output :
8992

9093
```bash
9194
[2/20/2020, 2:58:31 PM] Reading browserstack.json from /browserstack.json
@@ -177,12 +180,12 @@ Output:
177180
}
178181
```
179182

180-
**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.
181184

182185
### Limitations
183186

184187
- `exec` and `task` are not allowed.
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.
186189
- Installing custom npm packages are not supported at this moment.
187190

188191
# Accessing test results
@@ -191,4 +194,4 @@ You can access your test results in [BrowserStack Automate dashboard](https://au
191194

192195
# License
193196

194-
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

Comments
 (0)