Skip to content

Commit 89a7733

Browse files
authored
Merge pull request #4 from browserstack/fix_overwriting_reports
fixes reports overwriting when multicaps is passed
2 parents 1b0c425 + 0919442 commit 89a7733

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,12 @@ var myReporter = {
2929

3030
onSingleFileOutput: function (suites) {
3131
const xml = this.prepareXml(suites)
32-
let filename = `REPORT-browserstack.all.xml`
33-
this.write(filename, xml)
32+
var write = this.write;
33+
browser.getProcessedConfig().then(function(config) {
34+
var browserName = config.capabilities.browserName;
35+
let filename = `REPORT-browserstack.${browserName}.xml`
36+
write(filename, xml)
37+
});
3438
},
3539

3640
prepareName: function(name = 'Skipped test') {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "protractor-browserstack-reporter",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "A Protractor plugin which enables BrowserStack reports on CI",
55
"main": "index.js",
66
"keywords": [

0 commit comments

Comments
 (0)