AngularJS Protractor: Step-by-step progress logs
Asked Answered
J

2

6

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).

Jacquettajacquette answered 14/7, 2014 at 14:36 Comment(1)
jasmine-spec-reporter doesn't suit your needs ?Constrained
C
5

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.

Constrained answered 25/9, 2014 at 12:50 Comment(0)
A
2

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

Amphibolous answered 16/7, 2014 at 10:0 Comment(1)
Thanks for your reply. This is a step in the right direction, but I was looking for something that reported each steap, even those that passed. I'll add a screenshot so the question is more clear.Jacquettajacquette

© 2022 - 2024 — McMap. All rights reserved.