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 Type
    Method
    Description
    boolean
    Reports whether the throwable signals an unmet assumption.
    default boolean
    Reports whether the throwable is a fuzzing timeout.
  • Method Details

    • isAssumptionViolation

      boolean isAssumptionViolation(Throwable t)
      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:
      true if the input should be treated as invalid
    • isTimeout

      default boolean isTimeout(Throwable t)
      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:
      true if the trial timed out