protractor-jasmine2-screenshot-reporter
protractor-jasmine2-screenshot-reporter copied to clipboard
No screenshots on bail
If you bail ("quit") the test runner, no screenshots are taken (or no screenshots are saved).
The screenshots only appear to be saved when all the specs have finished running. I understand why this makes sense for the html report, but I think it is bad for the screenshots.
For example: say you have a very large suite of tests, you see one failure on the screen. You kill the tests. You go to see the screenshot to see what happened. No screenshot because the reporter hasn't finished up and move the screenshots into the directory yet.
Actually screenshots should be written when spec is finished (when the runner calls .specDone method of the reporter), but the report itself is only generated when the whole run is finished.
Interesting. Perhaps this is a bug then?
Yep I'll have to check it out. Will get back to you.
I am noticing the final screenshot for a test is taken properly, but the report has "undefined" in the link; regardless of the pass/fail status of the test. Does that sound related or perhaps a new issue?
@psufoxman that sounds more like it's related to #10
@F1LT3R I've tried replicating this multiple times, but can't seem to reproduce it. If you're still having this problem, could you please provide some additional details about the environment you're running in? Node version, platform and such.
Thanks for trying this Michal. Are you saying that if the whole test run is not finished, that you still see the screenshot from the last test that failed? You could try a process.exit()
in your test to force a similar behavior.
My environment is:
- OSX
- Node v4.2.5
If it helps, I created a custom reporter to work around this behavior:
https://github.com/F1LT3R/protractor-jasmine2-fail-whale