makis
makis

Reputation: 11

How to stop a spec execution in protractor on first expect failure

I want to stop spec execution on first expect failure and continue with the rest specs execution

Upvotes: 1

Views: 101

Answers (1)

Kuba Lubas
Kuba Lubas

Reputation: 91

To stop test execution of first expect failure I'm using jasmine-fail-fast please have a look here.

To use it, you just need to add:

onPrepare: function() {
  ...
  var failFast = require('jasmine-fail-fast');
  jasmine.getEnv().addReporter(failFast.init());
  ...
}

to your protractor.conf.js file.

I'm not sure about

..and continue with the rest specs execution

this part of your question. Protractor is doing this by default without any external libraries or tricks.

Upvotes: 0

Related Questions