-
-
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.
Collect stats in SummaryPrinter and AndroidLogcatReporter
- Loading branch information
1 parent
05774ef
commit 118e732
Showing
18 changed files
with
188 additions
and
279 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
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
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
31 changes: 0 additions & 31 deletions
31
core/src/main/java/cucumber/api/SummaryPrintingInterface.java
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package cucumber.runtime; | ||
|
||
import cucumber.api.Result; | ||
import cucumber.api.event.EventHandler; | ||
import cucumber.api.event.EventListener; | ||
import cucumber.api.event.EventPublisher; | ||
import cucumber.api.event.TestCaseFinished; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import static cucumber.api.Result.SEVERITY; | ||
import static java.util.Collections.max; | ||
|
||
class ExitStatus implements EventListener { | ||
private static final byte ERRORS = 0x1; | ||
|
||
private final List<Result> results = new ArrayList<Result>(); | ||
|
||
private final EventHandler<TestCaseFinished> testCaseFinishedHandler = new EventHandler<TestCaseFinished>() { | ||
@Override | ||
public void receive(TestCaseFinished event) { | ||
results.add(event.result); | ||
} | ||
}; | ||
|
||
ExitStatus() { | ||
} | ||
|
||
|
||
@Override | ||
public void setEventPublisher(EventPublisher publisher) { | ||
publisher.registerHandlerFor(TestCaseFinished.class, testCaseFinishedHandler); | ||
} | ||
|
||
public byte exitStatus(boolean isStrict) { | ||
return results.isEmpty() || max(results, SEVERITY).isOk(isStrict) ? 0x0 : ERRORS; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
package cucumber.runtime; | ||
|
||
import cucumber.api.SummaryPrinter; | ||
import cucumber.api.SummaryPrintingInterface; | ||
|
||
public class NullSummaryPrinter implements SummaryPrinter { | ||
|
||
@Override | ||
public void print(SummaryPrintingInterface summaryPrinting) { | ||
// Do nothing | ||
} | ||
|
||
} |
Oops, something went wrong.