Ryan Gross
Ryan Gross

Reputation: 6515

AngularJS Protractor: Step-by-step progress logs

In the (now deprecated) angular scenario test runner, there was an option to create a runner.html page that would run the tests in an iFrame while reporting the progress, step-by-step, in the main page.

Screenshot of scenario runner

Is there any way to get a similar step-by-step log for protractor tests? It does not need to be in an html page (console or log file would be fine).

Upvotes: 6

Views: 2064

Answers (2)

Jscti
Jscti

Reputation: 14440

For that you can use the jasmine-spec-reporter for protractor. You'll have a visual feedback of all your passing and non-passing tests :

enter image description here

Easy to configure and looks really good in the console.

Hope this helps.

Upvotes: 5

glepretre
glepretre

Reputation: 8167

Since v1.0.0-rc2 you can see failures in real time:

In your protractor config, add a jasmineNodeOpts object with realtimeFailure option to true:

exports.config = {
  seleniumAddress: 'http://127.0.0.1:4444/wd/hub',

  specs: [
    'e2e/**/*.js'
  ],

  multiCapabilities: [
    {'browserName': 'firefox'},
    {'browserName': 'chrome'}
  ],

  baseUrl: 'http://localhost:8000',

  onPrepare: function() {},

  jasmineNodeOpts: {
    realtimeFailure: true
  }
};

The full list of jasmine options is here: minijasminenode

And the well detailed reference config file for protractor here: referenceConf.js

Upvotes: 2

Related Questions