Package org.apache.maven.surefire.booter
Class BaseProviderFactory
java.lang.Object
org.apache.maven.surefire.booter.BaseProviderFactory
- All Implemented Interfaces:
DirectoryScannerParametersAware,FailFastAware,MainCliOptionsAware,ProviderPropertiesAware,ReporterConfigurationAware,RunOrderParametersAware,ShutdownAware,SurefireClassLoadersAware,TestArtifactInfoAware,TestRequestAware,ProviderParameters
public class BaseProviderFactory
extends Object
implements DirectoryScannerParametersAware, ReporterConfigurationAware, SurefireClassLoadersAware, TestRequestAware, ProviderPropertiesAware, ProviderParameters, TestArtifactInfoAware, RunOrderParametersAware, MainCliOptionsAware, FailFastAware, ShutdownAware
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DirectoryScannerParametersprivate ForkedChannelEncoderprivate final booleanprivate List<CommandLineOption>private ReporterConfigurationprivate final ReporterFactoryprivate RunOrderParametersprivate Shutdownprivate intprivate Integerprivate TestArtifactInfoprivate ClassLoaderprivate TestRequest -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets a logger intended for console output.Deprecated.The raw parameters used in creating the directory scannerThe per-provider specific properties that may come all the way from the plugin's properties setting.The raw parameters used in creating the ReporterManagerFactoryProvides features for creating reporting objectsProvides a service to calculate run order of tests.Provides the result of the directory scan performed in the pluginintArtifact info about the artifact used to autodetect providerThe class loader for the testsContains information about requested test suites or individual tests from the command line.private intbooleanvoidsetClassLoaders(ClassLoader testClassLoader) voidsetDirectoryScannerParameters(DirectoryScannerParameters directoryScannerParameters) voidsetForkedChannelEncoder(ForkedChannelEncoder forkedChannelEncoder) voidsetMainCliOptions(List<CommandLineOption> mainCliOptions) voidsetProviderProperties(Map<String, String> providerProperties) voidsetReporterConfiguration(ReporterConfiguration reporterConfiguration) voidsetRunOrderParameters(RunOrderParameters runOrderParameters) voidsetShutdown(Shutdown shutdown) voidsetSkipAfterFailureCount(int skipAfterFailureCount) voidsetSystemExitTimeout(Integer systemExitTimeout) voidsetTestArtifactInfo(TestArtifactInfo testArtifactInfo) voidsetTestRequest(TestRequest testRequest)
-
Field Details
-
reporterFactory
-
insideFork
private final boolean insideFork -
forkedChannelEncoder
-
mainCliOptions
-
providerProperties
-
directoryScannerParameters
-
reporterConfiguration
-
runOrderParameters
-
testClassLoader
-
testRequest
-
testArtifactInfo
-
skipAfterFailureCount
private int skipAfterFailureCount -
shutdown
-
systemExitTimeout
-
-
Constructor Details
-
BaseProviderFactory
-
-
Method Details
-
getDirectoryScanner
Deprecated.Description copied from interface:ProviderParametersProvides a directory scanner that enforces the includes/excludes parameters that were passed to surefire. See #getDirectoryScannerParameters for details- Specified by:
getDirectoryScannerin interfaceProviderParameters- Returns:
- The directory scanner
-
getScanResult
Description copied from interface:ProviderParametersProvides the result of the directory scan performed in the plugin- Specified by:
getScanResultin interfaceProviderParameters- Returns:
- The scan result
-
getThreadCount
private int getThreadCount() -
getRunOrderCalculator
Description copied from interface:ProviderParametersProvides a service to calculate run order of tests. Applied after directory scanning.- Specified by:
getRunOrderCalculatorin interfaceProviderParameters- Returns:
- A RunOrderCalculator
-
getReporterFactory
Description copied from interface:ProviderParametersProvides features for creating reporting objects- Specified by:
getReporterFactoryin interfaceProviderParameters- Returns:
- A ReporterFactory that allows the creation of one or more ReporterManagers
-
setDirectoryScannerParameters
- Specified by:
setDirectoryScannerParametersin interfaceDirectoryScannerParametersAware
-
setReporterConfiguration
- Specified by:
setReporterConfigurationin interfaceReporterConfigurationAware
-
setClassLoaders
- Specified by:
setClassLoadersin interfaceSurefireClassLoadersAware
-
getConsoleLogger
Description copied from interface:ProviderParametersGets a logger intended for console output.
This output is intended for provider-oriented messages that are not attached to a single test-set and will normally be written to something console-like immediately.- Specified by:
getConsoleLoggerin interfaceProviderParameters- Returns:
- A console stream logger
-
setTestRequest
- Specified by:
setTestRequestin interfaceTestRequestAware
-
getDirectoryScannerParameters
Description copied from interface:ProviderParametersThe raw parameters used in creating the directory scanner- Specified by:
getDirectoryScannerParametersin interfaceProviderParameters- Returns:
- The parameters
-
getReporterConfiguration
Description copied from interface:ProviderParametersThe raw parameters used in creating the ReporterManagerFactory- Specified by:
getReporterConfigurationin interfaceProviderParameters- Returns:
- The reporter configuration
-
getTestRequest
Description copied from interface:ProviderParametersContains information about requested test suites or individual tests from the command line.- Specified by:
getTestRequestin interfaceProviderParameters- Returns:
- The testRequest
-
getTestClassLoader
Description copied from interface:ProviderParametersThe class loader for the tests- Specified by:
getTestClassLoaderin interfaceProviderParameters- Returns:
- the classloader
-
setProviderProperties
- Specified by:
setProviderPropertiesin interfaceProviderPropertiesAware
-
getProviderProperties
Description copied from interface:ProviderParametersThe per-provider specific properties that may come all the way from the plugin's properties setting.- Specified by:
getProviderPropertiesin interfaceProviderParameters- Returns:
- the provider specific properties
-
getTestArtifactInfo
Description copied from interface:ProviderParametersArtifact info about the artifact used to autodetect provider- Specified by:
getTestArtifactInfoin interfaceProviderParameters- Returns:
- The artifactinfo, or null if autodetect was not used.
-
setTestArtifactInfo
- Specified by:
setTestArtifactInfoin interfaceTestArtifactInfoAware
-
setRunOrderParameters
- Specified by:
setRunOrderParametersin interfaceRunOrderParametersAware
-
getMainCliOptions
- Specified by:
getMainCliOptionsin interfaceProviderParameters
-
setMainCliOptions
- Specified by:
setMainCliOptionsin interfaceMainCliOptionsAware
-
getSkipAfterFailureCount
public int getSkipAfterFailureCount()- Specified by:
getSkipAfterFailureCountin interfaceProviderParameters- Returns:
- Defaults to 0. Configured with parameter
skipAfterFailureCountin POM.
-
setSkipAfterFailureCount
public void setSkipAfterFailureCount(int skipAfterFailureCount) - Specified by:
setSkipAfterFailureCountin interfaceFailFastAware
-
isInsideFork
public boolean isInsideFork()- Specified by:
isInsideForkin interfaceProviderParameters- Returns:
trueif test provider appears in forked jvm; Otherwisefalsemeans in-plugin provider.
-
getShutdown
- Specified by:
getShutdownin interfaceProviderParameters
-
setShutdown
- Specified by:
setShutdownin interfaceShutdownAware
-
getSystemExitTimeout
- Specified by:
getSystemExitTimeoutin interfaceProviderParameters
-
setSystemExitTimeout
-
getForkedChannelEncoder
- Specified by:
getForkedChannelEncoderin interfaceProviderParameters
-
setForkedChannelEncoder
-