TeamCity formatter for Nightwatch.js end-to-end testing framework.
npm install nightwatch-teamcity --save-dev
Add --reporter node_modules/nightwatch-teamcity/index.js
to your Nightwatch run command
In order to compose with another reporter (e.g. nightwatch-html-reporter), you'll need to create your custom reporter and import the formatter function from this package:
// nightwatch-reporter.js
var HtmlReporter = require("nightwatch-html-reporter");
var teamCityFormatter = require("nightwatch-teamcity").format;
var reporter = new HtmlReporter({
reportsDirectory: "./reports",
});
module.exports = {
write: function(results, options, done) {
teamCityFormatter(results);
reporter.fn(results, done);
}
};
Running Nightwatch:
$ nightwatch --reporter ./nightwatch-reporter.js