Details
Description
For selenium tests that keep the same browser / context throughout the story, there are countless things that can go wrong such as network latency, slow application, etc. Since a false positive can cause people to quickly lose trust in the tests, others advised that the story should restart "x" amount of times before failing the test.
There is a way to restart a single scenario, but it is possible it could cause additional errors such as expecting to be on a specific page when the scenario starts, context variables have been changed, being in an unknown state with data.
Activity
Mauro Talevi
made changes -
Field | Original Value | New Value |
---|---|---|
Fix Version/s | 3.9.6 [ 20672 ] |
I've created a branch for this issue with some the basics implemented:
https://github.com/bbarke/jbehave-core
https://github.com/bbarke/jbehave-core/commit/c6c7020f04ee247619d530e76f742c9e9d229aae
How it works is similar to the RestartingScenarioFailure, just throw RestartingStoryFailure somewhere within the jbehave framework and it will restart the story
Some questions/problems I have are:
reporter.get().restartedStory(story, e); does not get reported if running in multi-threaded mode (Story runner, line 254)
Also, I am not sure how to get reporting to report if a story was restarted or not.
Please advise how I can get the reporting to work correctly
Thanks in advance!