Skip to content

Commit 81c66e1

Browse files
committed
Merge branch 'master' of github.com:browserstack/browserstack-cypress-cli
2 parents f64ee85 + ee3be8e commit 81c66e1

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ This will create a sample `browserstack.json` file. This file can be used to con
6060
"customBuildName": "build 1"
6161
},
6262
"connection_settings": {
63-
"local": false
63+
"local": false,
64+
"localIdentifier": null
6465
}
6566
}
6667
```
@@ -80,6 +81,7 @@ The following table provides a reference for all the options that can be provide
8081
| `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 |
8182
| `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 |
8283
| `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. |
84+
| `localIdentifier` | The BrowserStack Local tunnel that should be used to resolve requests. This is applicable only when you start a Local binary with a local identifier. Your tests might fail if you use an invalid local identifier. This option will be ignored if `local` option is set to `false`. | A string if a tunnel identified by the Local identifier should be used (should be same as the one used to start the Local binary). Set this to `null` (default value) to resolve requests using Local without a Local identifier. |
8385

8486
### Running the tests
8587
You can start running your test build using the following command.

bin/helpers/capabilityHelper.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ const caps = (bsConfig, zip) => {
3333
if (bsConfig.connection_settings.local === true) obj.local = true;
3434
logger.log(`Local is set to: ${obj.local}`);
3535

36+
// Local Identifier
37+
obj.localIdentifier = null;
38+
if (obj.local === true && bsConfig.connection_settings.localIdentifier)
39+
{
40+
obj.localIdentifier = bsConfig.connection_settings.localIdentifier;
41+
logger.log(`Local Identifier is set to: ${obj.localIdentifier}`);
42+
}
43+
3644
// Project name
3745
obj.project = bsConfig.run_settings.project
3846
if (!obj.project) logger.log(`Project name is: ${obj.project}`);

bin/templates/configTemplate.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ module.exports = function () {
1717
"customBuildName": "build-name"
1818
},
1919
"connection_settings": {
20-
"local": false
20+
"local": false,
21+
"localIdentifier": null
2122
}
2223
}
2324
var EOL = require('os').EOL

0 commit comments

Comments
 (0)