-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JUnit] Report failures that occur prior to pickle execution
An exception may be thrown while the `PickleRunner` is setting up the `Runner` class due to, for example, duplicate step definitions, glue scanning failures, ect. These failures do not clearly show up in IDEA or Eclipse because Cucumber does not emit the right events to JUnit. And it is not possible to emit these events from the `JUnitReporter`. These exceptions happen before the system is ready to report. ```java @OverRide public void run(final RunNotifier notifier) { // Possibly invoked by a thread other then the creating thread Runner runner = runnerSupplier.get(); // <---- Exception is thrown here JUnitReporter jUnitReporter = new JUnitReporter(runner.getBus(), jUnitOptions); jUnitReporter.startExecutionUnit(this, notifier); runner.runPickle(pickleEvent); jUnitReporter.finishExecutionUnit(); } ``` As such the `FeatureRunner` should catch any exceptions thrown while executing its children and request JUnit to stop execution in case of a failure. This will allow IDEA and Eclipse to properly report on the test failure.
- Loading branch information
1 parent
f2eeac1
commit 0e41a1a
Showing
2 changed files
with
55 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters