NickTomlin / protractor-flake

Rerun potentially flakey protractor tests before failing.
MIT License
80 stars 51 forks source link

screenshots of retries overwrite the original run #87

Closed rasjani closed 6 years ago

rasjani commented 6 years ago

Im not 100% if this is true but..

when flake reruns the tests, screenshots (atleast the index.html) gets overwritten consecutive retries. Would be nice to have some way to retain the logs/screenshots for each iteration.

NickTomlin commented 6 years ago

I think this is definitely an issue. The only indication we give is the retry param but that isn't a hit of how many runs have ocurred.

Off the top of my head, you could work around this by:

But those definitely create more work for you 😄

I'd be very happy to accept a PR that passed the number of retries instead of just a retry Boolean as that would probably be an easier solve. You could then access those params in your test or in the onPrepare step and and use that to prefix your screenshot directory/file names.

I don't have any plans to work on this actively but i'd be happy to collaborate on a pull request!

rasjani commented 6 years ago

No promises but since i do "need" this, i might end up actually addressing this in one form or an another.

NickTomlin commented 6 years ago

Sure, no pressure 😄

If it's all right with you, i'm going to close this issue for now. Feel free to PR whenever or post back if you have a workaround.

rasjani commented 6 years ago

Np problemo. Possible solution to my issue in pr now. And kudos for really helpful first comment - saved me a lot of grunt work.