Package edu.berkeley.cs.jqf.fuzz.junit
Class Junit4TrialExecutor
java.lang.Object
edu.berkeley.cs.jqf.fuzz.junit.Junit4TrialExecutor
- All Implemented Interfaces:
TrialExecutor
Runs trials through a JUnit 4
TrialRunner.
A fresh TrialRunner per trial gives each one a new test instance and
the standard @Before/@After lifecycle. It also captures the test
method's return value, which differential fuzzing needs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value returned by the most recent trial's test method.voidRuns one trial with the given arguments.
-
Constructor Details
-
Junit4TrialExecutor
-
-
Method Details
-
runTrial
Description copied from interface:TrialExecutorRuns 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.
- Specified by:
runTrialin interfaceTrialExecutor- Parameters:
args- the arguments for this trial- Throws:
Throwable- whatever the test body raises
-
getLastOutput
Description copied from interface:TrialExecutorReturns 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.- Specified by:
getLastOutputin interfaceTrialExecutor- Returns:
- the most recent return value, or
null
-