protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Feature Request: add `closeOnFail` or equivalent option to config file

Open T3KT4K opened this issue 10 years ago • 4 comments

Feature Request: Would it be possible to add an option you can set in your config file that would allow for you to choose whether or not the browser being run got closed when a failed test is run? This feature request is like #1433 however, if this option were to be set to false, only the tests that fail would stay open. Example config file

exports.config = {
    //other settings skipped for clarity
    closeOnFail = false
};
  • Reasons for adopting new feature: This would be incredibly useful for debugging both the tests and the actual applications when a result is not as was expected.
  • Is this a breaking change? I cannot imagine it would be as it would probably use the same functionality of browser.pause() but only call it at a failed test

T3KT4K avatar Feb 28 '16 07:02 T3KT4K

Could you please update your request with the information for feature requests in the issue template?

NickTomlin avatar Feb 28 '16 15:02 NickTomlin

bump

T3KT4K avatar Mar 01 '16 07:03 T3KT4K

I'm not sure how we'd handle this, since tests run one after another. Orchestration would get very complex since we'd need to do the following on test failure

  1. Keep the existing protractor session over
  2. Start an entirely new one at the point where the other failed (skipping over the failed test)
  3. Leave the failed windows open.

Seems like this is better covered by https://github.com/angular/protractor/issues/2568

NickTomlin avatar Mar 05 '16 14:03 NickTomlin

Dupe of https://github.com/angular/protractor/issues/1433

juliemr avatar Jul 14 '16 20:07 juliemr