Package edu.berkeley.cs.jqf.fuzz.spi
Interface ResultClassifier
- All Known Implementing Classes:
Junit4ResultClassifier,Junit5ResultClassifier
public interface ResultClassifier
Classifies a throwable raised by a trial into an engine-level outcome.
The engine must distinguish an unmet assumption (discard this input as
invalid) from a genuine failure, but it cannot depend on a test framework's
assumption type. Each adapter supplies its own predicate instead: JUnit 4
recognises org.junit.AssumptionViolatedException, JUnit 5 recognises
org.opentest4j.TestAbortedException. This keeps the engine free of any
test-framework dependency.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReports whether the throwable signals an unmet assumption.default booleanReports whether the throwable is a fuzzing timeout.
-
Method Details
-
isAssumptionViolation
Reports whether the throwable signals an unmet assumption.An unmet assumption means the generated input did not satisfy the test's preconditions, so the engine discards it as invalid rather than recording a failure.
- Parameters:
t- a throwable raised by a trial- Returns:
trueif the input should be treated as invalid
-
isTimeout
Reports whether the throwable is a fuzzing timeout.The default recognises the engine's own
TimeoutException, which is framework-independent.- Parameters:
t- a throwable raised by a trial- Returns:
trueif the trial timed out
-