Skip to content
This repository was archived by the owner on Jul 28, 2023. It is now read-only.

Commit 9c77a96

Browse files
krotscheckdignifiedquire
authored andcommitted
feat: permit overriding name, build, and project on a per-browser basis
Browserstack uses the `name` property in the browser configuration to uniquely name sessions within a specific build. If these sessions do not have a unique name, and are executed sequentially (or with a concurrency < total # of browsers), browserstack's UI will overwrite previous results with new ones. In cases where a karma test run is executed on multiple browsers, this isn't really desirable. While I was at it, I also incorporated changes from #71, and updated the README to also include documentation for that change. With this patch, `name`, `project`, and `build`, may all be overridden on a per browser basis.
1 parent 110ecf2 commit 9c77a96

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ module.exports = function(config) {
8080
- `browser_version` version of the browser
8181
- `os` which platform ?
8282
- `os_version` version of the platform
83+
- `build` the BS worker build name (optional, defaults to global)
84+
- `name` the BS worker name (optional, defaults to global)
85+
- `project` the BS worker project name (optional, defaults to global)
8386

8487
### BrowserStack reporter
8588

index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ var BrowserStackBrowser = function (
181181
url: url + '?id=' + id,
182182
'browserstack.tunnel': true,
183183
timeout: bsConfig.timeout || 300,
184-
project: bsConfig.project,
185-
name: bsConfig.name || 'Karma test',
186-
build: bsConfig.build ||
184+
project: args.project || bsConfig.project,
185+
name: args.name || bsConfig.name || 'Karma test',
186+
build: args.build || bsConfig.build ||
187187
process.env.BUILD_NUMBER ||
188188
process.env.BUILD_TAG ||
189189
process.env.CI_BUILD_NUMBER ||

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"eslint-config-standard": "^4.0.0",
2929
"eslint-plugin-standard": "^1.2.0",
3030
"grunt": "~0.4.5",
31-
"grunt-auto-release": "~0.0.2",
31+
"grunt-auto-release": "0.0.6",
3232
"grunt-bump": "~0.5.0",
3333
"grunt-conventional-changelog": "^4.1.0",
3434
"grunt-conventional-github-releaser": "^0.4.0",

0 commit comments

Comments
 (0)