Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
putermancer committed Jun 17, 2016
1 parent 2c9b875 commit 069e723
Showing 1 changed file with 35 additions and 3 deletions.
38 changes: 35 additions & 3 deletions README.markdown
Expand Up @@ -61,8 +61,8 @@ look for the Jasmine core library.
bower install

# run any of the examples
bin/phantomjs.runner.sh test/tap_reporter.html
bin/phantomjs.runner.sh test/junit_xml_reporter.html
bin/phantomjs.runner.sh examples/tap_reporter.html
bin/phantomjs.runner.sh examples/junit_xml_reporter.html
```

### NodeJS
Expand All @@ -80,7 +80,7 @@ var junitReporter = new reporters.JUnitXmlReporter({

### More examples

An example for each reporter is available in the `test` directory.
An example for each reporter is available in the `examples` directory.

# Changes in jasmine-reporters@2.0

Expand Down Expand Up @@ -161,3 +161,35 @@ onPrepare: function() {
});
}
```

You can also use the `modifyReportFileName` option to generate distinct
filenames when `consolidateAll` is `false`.

```javascript
multiCapabilities: [
{browserName: 'firefox'},
{browserName: 'chrome'}
],
framework: 'jasmine2',
onPrepare: function() {
var jasmineReporters = require('jasmine-reporters');

// returning the promise makes protractor wait for the reporter config before executing tests
return browser.getProcessedConfig().then(function(config) {
// you could use other properties here if you want, such as platform and version
var browserName = config.capabilities.browserName;

var junitReporter = new jasmineReporters.JUnitXmlReporter({
consolidateAll: false,
savePath: 'testresults',
modifyReportFileName: function(generatedFileName, suite) {
// this will produce distinct suite names for each capability,
// e.g. 'firefox.SuiteName' and 'chrome.SuiteName'
return browserName + '.' + generatedFileName;
}
});
jasmine.getEnv().addReporter(junitReporter);
});
}
```

0 comments on commit 069e723

Please sign in to comment.