The branch contains reporter for WebdriverIO 5 and later versions. For earlier versions please refer to wdio-browserstack-reporter/wdio4
Add wdio-browserstack-reporter
as a dependency in your package.json
.
{
"dependencies": {
"wdio-browserstack-reporter": "1.0.1"
}
}
Add browserstack
as a reporter in your conf file.
// wdio.conf.js
module.exports = {
// ...
reporters: ["browserstack"],
reporterOptions: {
browserstack: {
outputDir: "./"
}
}
// ...
};
The following options are supported(optional):
Define a directory where your browserstack report files should get stored.
Type: String
You will have to configure your Jenkins CI server to embed all the BrowserStack Selenium reports and logs in Jenkins.
- Click on Add post-build action in Post-build Actions.
- Click on Publish JUnit test result report
- In the Test report XMLs, enter */*browserstack-reports/REPORT-*.xml
- In the Additional test report features section, add Embed BrowserStack Report.
This is how your configuration should look like
Guide to running Selenium Webdriver tests with NodeJS on BrowserStack