Protractor Test - Better Console Reports

One of the reasons that I love to use Protractor Test for web automation is that it supports a lot of open-source “plugins” that improve what Protractor can do. I will be going over one of my favorite plugins that I use to supplement my Protractor Test framework that will give us better console reports. Follow along to get the most out the Protractor Test Framework.

Note this post contains affiliate links. It doesn’t cost you anything extra to use these links, but it helps to support this blog.

Web Hosting

Jasmine Spec Reporter

The first plugin that I will add is the Jasmine Spec Reporter. This plugin will improve the report that is displayed in the console window after your test has run. Here is an example of the report without this plugin. Run your test, the results are displayed in the console like this.

The default format for the test reporter in Protractor is a dot for a passing test and an “F” for a failing test. The problem with this is you don’t have an easy way to know what tests passed. And you have to look into the failure logs to see which tests failed. This makes it hard to report on what the status of a test run was.

Better Console Reports

Let’s make things better with the Jasmine Spec Reporter. Open up a console window and enter the command:

Open up the conf.js file and enter this code:

Run your test again and you should see the new output.

You are now able to see the name of the test suites and which tests passed or failed within each suite.

Visit the npm page for the Jasmine Spec Reporter to get more info here

These posts are an introduction to Protractor for Automated Testing. To learn more with a full hands-on guide, grab our course on Udemy for only $9.99 when you use my link. Website Automation for Beginners with Protractor