public class JUnit4Provider extends AbstractProvider
Modifier and Type | Field and Description |
---|---|
private CommandReader |
commandsReader |
private java.util.Collection<org.junit.runner.notification.RunListener> |
customRunListeners |
private JUnit4TestChecker |
jUnit4TestChecker |
private ProviderParameters |
providerParameters |
private int |
rerunFailingTestsCount |
private RunOrderCalculator |
runOrderCalculator |
private ScanResult |
scanResult |
private java.lang.ClassLoader |
testClassLoader |
private TestListResolver |
testResolver |
private TestsToRun |
testsToRun |
private static java.lang.String |
UNDETERMINED_TESTS_DESCRIPTION |
Constructor and Description |
---|
JUnit4Provider(ProviderParameters bootParams) |
Modifier and Type | Method and Description |
---|---|
private static int |
countTestsInRunner(org.junit.runner.Description description)
JUnit error: test count includes one test-class as a suite which has filtered out all children.
|
private org.junit.runner.manipulation.Filter |
createMethodFilter() |
(package private) static org.junit.runner.Description |
createTestsDescription(java.lang.Iterable<java.lang.Class<?>> classes) |
private static void |
execute(java.lang.Class<?> testClass,
Notifier notifier,
org.junit.runner.manipulation.Filter filter) |
private void |
executeFailedMethod(org.junit.runner.notification.RunNotifier notifier,
java.util.Set<ClassMethod> failedMethods) |
private void |
executeTestSet(java.lang.Class<?> clazz,
RunListener reporter,
Notifier notifier) |
private void |
executeWithRerun(java.lang.Class<?> clazz,
Notifier notifier) |
private int |
getSkipAfterFailureCount() |
java.lang.Iterable<java.lang.Class<?>> |
getSuites()
Determines the number of forks.
|
private static boolean |
hasFilteredOutAllChildren(org.junit.runner.Description description) |
RunResult |
invoke(java.lang.Object forkTestSet)
Runs a forked test
|
private boolean |
isFailFast() |
private static boolean |
isJUnit4UpgradeCheck() |
private boolean |
isRerunFailingTests() |
private void |
registerPleaseStopJUnitListener(Notifier notifier) |
private void |
registerShutdownListener(TestsToRun testsToRun) |
private TestsToRun |
scanClassPath() |
private void |
setTestsToRun(java.lang.Object forkTestSet) |
private void |
upgradeCheck() |
cancel
private static final java.lang.String UNDETERMINED_TESTS_DESCRIPTION
private final java.lang.ClassLoader testClassLoader
private final java.util.Collection<org.junit.runner.notification.RunListener> customRunListeners
private final JUnit4TestChecker jUnit4TestChecker
private final TestListResolver testResolver
private final ProviderParameters providerParameters
private final RunOrderCalculator runOrderCalculator
private final ScanResult scanResult
private final int rerunFailingTestsCount
private final CommandReader commandsReader
private TestsToRun testsToRun
public JUnit4Provider(ProviderParameters bootParams)
public RunResult invoke(java.lang.Object forkTestSet) throws TestSetFailedException
SurefireProvider
forkTestSet
- An item from the iterator in #getSuites. Will be null for forkmode never or always.
When this is non-null, the forked process will run only that test
and probably not scan the classpathTestSetFailedException
- When testset failsprivate void setTestsToRun(java.lang.Object forkTestSet) throws TestSetFailedException
TestSetFailedException
private boolean isRerunFailingTests()
private boolean isFailFast()
private int getSkipAfterFailureCount()
private void registerShutdownListener(TestsToRun testsToRun)
private void registerPleaseStopJUnitListener(Notifier notifier)
private void executeTestSet(java.lang.Class<?> clazz, RunListener reporter, Notifier notifier)
private void executeWithRerun(java.lang.Class<?> clazz, Notifier notifier) throws TestSetFailedException
TestSetFailedException
public java.lang.Iterable<java.lang.Class<?>> getSuites()
SurefireProvider
private TestsToRun scanClassPath()
private void upgradeCheck() throws TestSetFailedException
TestSetFailedException
static org.junit.runner.Description createTestsDescription(java.lang.Iterable<java.lang.Class<?>> classes)
private static boolean isJUnit4UpgradeCheck()
private static void execute(java.lang.Class<?> testClass, Notifier notifier, org.junit.runner.manipulation.Filter filter)
private void executeFailedMethod(org.junit.runner.notification.RunNotifier notifier, java.util.Set<ClassMethod> failedMethods) throws TestSetFailedException
TestSetFailedException
private static int countTestsInRunner(org.junit.runner.Description description)
private static boolean hasFilteredOutAllChildren(org.junit.runner.Description description)
private org.junit.runner.manipulation.Filter createMethodFilter()