-
Bug
-
Resolution: Fixed
-
Minor
-
3.5.13, 3.7.7, 3.8.4, 3.9.1
-
MOODLE_35_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
-
MOODLE_35_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
-
MDL-69278-master -
-
1
-
International 4.0 - Sprint 2
When Selenium does fail in the BeforeScenario step it means that the exit code is non-zero, causing a re-run, but it also causes the Scenario to be skipped rather than to fail.
If no other scenario step fails then the rerun.txt is empty.
Because the Suite returned non-zero, the Suite is rerun, but the lack of a rerun.txt means that the entire Suite reruns ad not just the failed test.
You can see that in the following job:
This happens because an Exception in a BeforeScenario hook leads to the Skip rather than Fail.
To resolve it we can apply the same approach as taken in the BeforeStep setup where a BeforeStep failure stores the exception in a statically defined var, and then the "I look for exceptions" step finds it and fails the test.
This may require an additional change to the behat extension to look for stored exceptions before the step runs.
- has been marked as being related by
-
MDL-69455 BeforeScenario hook failure leads to skipped test and rerun (take #2)
- Open