Package org.apache.maven.surefire.booter
Class BaseProviderFactory
java.lang.Object
org.apache.maven.surefire.booter.BaseProviderFactory
- All Implemented Interfaces:
ShutdownAware
,ProviderParameters
- Author:
- Kristian Rosenvold
-
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 pluginint
Artifact 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.boolean
void
setClassLoaders
(ClassLoader testClassLoader) void
setDirectoryScannerParameters
(DirectoryScannerParameters directoryScannerParameters) void
setMainCliOptions
(List<CommandLineOption> mainCliOptions) void
setProviderProperties
(Map<String, String> providerProperties) void
setReporterConfiguration
(ReporterConfiguration reporterConfiguration) void
setRunOrderParameters
(RunOrderParameters runOrderParameters) void
setShutdown
(Shutdown shutdown) void
setSkipAfterFailureCount
(int skipAfterFailureCount) void
setSystemExitTimeout
(Integer systemExitTimeout) void
setTestArtifactInfo
(TestArtifactInfo testArtifactInfo) void
setTestRequest
(TestRequest testRequest)
-
Constructor Details
-
BaseProviderFactory
-
-
Method Details
-
getDirectoryScanner
Deprecated.Description copied from interface:ProviderParameters
Provides a directory scanner that enforces the includes/excludes parameters that were passed to surefire. See #getDirectoryScannerParameters for details- Specified by:
getDirectoryScanner
in interfaceProviderParameters
- Returns:
- The directory scanner
-
getScanResult
Description copied from interface:ProviderParameters
Provides the result of the directory scan performed in the plugin- Specified by:
getScanResult
in interfaceProviderParameters
- Returns:
- The scan result
-
getRunOrderCalculator
Description copied from interface:ProviderParameters
Provides a service to calculate run order of tests. Applied after directory scanning.- Specified by:
getRunOrderCalculator
in interfaceProviderParameters
- Returns:
- A RunOrderCalculator
-
getReporterFactory
Description copied from interface:ProviderParameters
Provides features for creating reporting objects- Specified by:
getReporterFactory
in interfaceProviderParameters
- Returns:
- A ReporterFactory that allows the creation of one or more ReporterManagers
-
setDirectoryScannerParameters
-
setReporterConfiguration
-
setClassLoaders
-
getConsoleLogger
Description copied from interface:ProviderParameters
Gets 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:
getConsoleLogger
in interfaceProviderParameters
- Returns:
- A console stream logger
-
setTestRequest
-
getDirectoryScannerParameters
Description copied from interface:ProviderParameters
The raw parameters used in creating the directory scanner- Specified by:
getDirectoryScannerParameters
in interfaceProviderParameters
- Returns:
- The parameters
-
getReporterConfiguration
Description copied from interface:ProviderParameters
The raw parameters used in creating the ReporterManagerFactory- Specified by:
getReporterConfiguration
in interfaceProviderParameters
- Returns:
- The reporter configuration
-
getTestRequest
Description copied from interface:ProviderParameters
Contains information about requested test suites or individual tests from the command line.- Specified by:
getTestRequest
in interfaceProviderParameters
- Returns:
- The testRequest
-
getTestClassLoader
Description copied from interface:ProviderParameters
The class loader for the tests- Specified by:
getTestClassLoader
in interfaceProviderParameters
- Returns:
- the classloader
-
setProviderProperties
-
getProviderProperties
Description copied from interface:ProviderParameters
The per-provider specific properties that may come all the way from the plugin's properties setting.- Specified by:
getProviderProperties
in interfaceProviderParameters
- Returns:
- the provider specific properties
-
getTestArtifactInfo
Description copied from interface:ProviderParameters
Artifact info about the artifact used to autodetect provider- Specified by:
getTestArtifactInfo
in interfaceProviderParameters
- Returns:
- The artifactinfo, or null if autodetect was not used.
-
setTestArtifactInfo
-
setRunOrderParameters
-
getMainCliOptions
- Specified by:
getMainCliOptions
in interfaceProviderParameters
-
setMainCliOptions
-
getSkipAfterFailureCount
public int getSkipAfterFailureCount()- Specified by:
getSkipAfterFailureCount
in interfaceProviderParameters
- Returns:
- Defaults to 0. Configured with parameter
skipAfterFailureCount
in POM.
-
setSkipAfterFailureCount
public void setSkipAfterFailureCount(int skipAfterFailureCount) -
isInsideFork
public boolean isInsideFork()- Specified by:
isInsideFork
in interfaceProviderParameters
- Returns:
true
if test provider appears in forked jvm; Otherwisefalse
means in-plugin provider.
-
getShutdown
- Specified by:
getShutdown
in interfaceProviderParameters
-
setShutdown
- Specified by:
setShutdown
in interfaceShutdownAware
-
getSystemExitTimeout
- Specified by:
getSystemExitTimeout
in interfaceProviderParameters
-
setSystemExitTimeout
-