You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
Following this FAQ, we took screenshots of our test cases on version 1.8.0.
But on upgrading to the lastest version, the screenshot stopped to work on test cases which throw erros.
We used this to abort the test when one expectation can invalidate the complete test case, evicting a cascading failure.
To illustrate this scenario, I made a simple git project, with three test cases:
one wich fails a expectation and a screenshot is successfully taken;
one wich fails with an error, but no screenshot is taken, or an empty image is generated;
one wich is ignored, but if you enable it, the second case will have a correct screenshot taken.
The problem seems to be that the protractor process is closed before the file is completely saved, but I'm not sure.
The text was updated successfully, but these errors were encountered:
Yes, this is because the runner process has finished, so Protractor is cleaning up without knowing to wait. (See https://github.com/angular/protractor/blob/master/lib/launcher.js#L257). I'm not sure if this counts as a bug, or just an annoying side effect - usually, we do want to make sure that the process quits and doesn't hang unexpectedly. Additionally, when running in one process (which we do if there's no sharding requested, and which is desirable for debugging), we actually can't wait on the process to exit because we've got other waits and things we need to do.
The easy way around this is to have a onCleanUp or afterLaunch task which flushes all of your outputs and returns a promise when that's all done.
We should mention this in the FAQ example. Changing the type of this issue to 'docs'.
Following this FAQ, we took screenshots of our test cases on version 1.8.0.
But on upgrading to the lastest version, the screenshot stopped to work on test cases which throw erros.
We used this to abort the test when one expectation can invalidate the complete test case, evicting a cascading failure.
To illustrate this scenario, I made a simple git project, with three test cases:
The problem seems to be that the protractor process is closed before the file is completely saved, but I'm not sure.
The text was updated successfully, but these errors were encountered: