Closed saadtazi closed 9 years ago
I got it working, it only requires minor changes to mocha-runner.js
:
//browserTitle means we're on a SL test
if (browser.browserTitle) {
if (!opts.customReporter) { // <--- added an if statement (and a new option)
// if not phantom and no customReporter is specified
opts.reporter = generateSauceReporter(browser);
} else {
// custom reporter when running
opts.reporter = require(opts.customReporter)(browser);
}
}
I will submit a PR.
Hey, sorry for the delay on this. I really like this idea. Awesome work.
The idea is to be able to specify custom reporter when test are run in saucelabs or selenium mode. For example, I would like to create a teamcity reporter, similar to this, but I will probably have to adapt it so it works with grunt-mocha-webdriver:
if (suite.root)
then outputtest suite started on browserName
.That team-city reporter doesn't have to live in grunt-mocha-webdriver. Please let me know your preference... I think outside is better...
Once the first one is done, then it would be easy for anyone to create other reporters (jenkins...).
I can give it a try but I would like to have your input first. any thoughts/limitations/concerns?