Interface TrialExecutor
- All Known Implementing Classes:
DiffTrialExecutor,Junit4TrialExecutor,Junit5TrialExecutor
This is the seam between the engine's fuzzing loop and a test framework.
An implementation creates a fresh test instance per trial and honours that
framework's per-method lifecycle (for example @Before/@After
under JUnit 4, or @BeforeEach/@AfterEach under JUnit 5). The
engine never references framework types; it only calls runTrial(java.lang.Object[]).
An instance is bound to a single test method and reused across trials.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault ObjectReturns the value returned by the most recent trial's test method.voidRuns one trial with the given arguments.
-
Method Details
-
runTrial
Runs one trial with the given arguments.Throwables raised by the test body propagate unchanged so the engine can classify them (failure, unmet assumption, timeout). Implementations must not swallow them.
- Parameters:
args- the arguments for this trial- Throws:
Throwable- whatever the test body raises
-
getLastOutput
Returns the value returned by the most recent trial's test method.Differential fuzzing compares these return values across runs; ordinary test runners discard them. The default returns
nullfor executors that do not capture the return value.- Returns:
- the most recent return value, or
null
-