O'Reilly logo

Continuous Integration, Delivery, and Deployment by Sander Rossel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Customizing reporters

Running your tests from the console gives you a pretty crappy overview of what tests failed and succeeded. It works, but I prefer a less verbose overview. Later, we will also want to publish our test results in a different format, such as JUnit. Luckily, this is not very hard. First, we will need to install the jasmine-reports package:

npm install jasmine-reporters --save-dev

Now, we need to add a reporter to Jasmine in the Protractor configuration. Let's start with JUnit. We can use the onPrepare function for this task:

onPrepare: function() { var jasmineReporters = require('jasmine-reporters'); var junitReporter = new jasmineReporters.JUnitXmlReporter({ savePath: 'selenium-junit/', consolidateAll: false }); jasmine.getEnv().addReporter(junitReporter); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required