Skip to content

Commit 48f6da0

Browse files
committed
Addressing Issue#263: Eclipse JUnit reports inaccurate run count
fireTestStarted should not occur when a test might be ignored.
1 parent 78cc1d9 commit 48f6da0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

junit/src/main/java/cucumber/junit/JUnitReporter.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public void finishExecutionUnit() {
5151
public void match(Match match) {
5252
Description description = executionUnitRunner.describeChild(steps.remove(0));
5353
stepNotifier = new EachTestNotifier(runNotifier, description);
54-
stepNotifier.fireTestStarted();
5554
reporter.match(match);
5655
}
5756

@@ -71,6 +70,8 @@ public void result(Result result) {
7170
stepNotifier.fireTestIgnored();
7271
} else {
7372
if (stepNotifier != null) {
73+
//Should only fireTestStarted if not ignored
74+
stepNotifier.fireTestStarted();
7475
if (error != null) {
7576
stepNotifier.addFailure(error);
7677
}

0 commit comments

Comments
 (0)