Class BaseProviderFactory
- java.lang.Object
-
- org.apache.maven.surefire.api.booter.BaseProviderFactory
-
- All Implemented Interfaces:
ProviderParameters
public class BaseProviderFactory extends Object implements ProviderParameters
- Author:
- Kristian Rosenvold
-
-
Constructor Summary
Constructors Constructor Description BaseProviderFactory(boolean insideFork)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CommandChainReader
getCommandReader()
DirectoryScanner
getDirectoryScanner()
Deprecated.DirectoryScannerParameters
getDirectoryScannerParameters()
The raw parameters used in creating the directory scannerList<CommandLineOption>
getMainCliOptions()
Map<String,String>
getProviderProperties()
The per-provider specific properties that may come all the way from the plugin's properties setting.ReporterConfiguration
getReporterConfiguration()
The raw parameters used in creating the ReporterManagerFactoryReporterFactory
getReporterFactory()
Provides features for creating reporting objectsRunOrderCalculator
getRunOrderCalculator()
Provides a service to calculate run order of tests.ScanResult
getScanResult()
Provides the result of the directory scan performed in the pluginint
getSkipAfterFailureCount()
Integer
getSystemExitTimeout()
TestArtifactInfo
getTestArtifactInfo()
Artifact info about the artifact used to autodetect providerClassLoader
getTestClassLoader()
The class loader for the testsTestRequest
getTestRequest()
Contains information about requested test suites or individual tests from the command line.boolean
isInsideFork()
void
setClassLoaders(ClassLoader testClassLoader)
void
setCommandReader(CommandChainReader commandReader)
void
setDirectoryScannerParameters(DirectoryScannerParameters directoryScannerParameters)
void
setMainCliOptions(List<CommandLineOption> mainCliOptions)
CLI options in plugin (main) JVM process.void
setProviderProperties(Map<String,String> providerProperties)
void
setReporterConfiguration(ReporterConfiguration reporterConfiguration)
void
setReporterFactory(ReporterFactory reporterFactory)
void
setRunOrderParameters(RunOrderParameters runOrderParameters)
void
setSkipAfterFailureCount(int skipAfterFailureCount)
See the plugin configuration parameter "skipAfterFailureCount".void
setSystemExitTimeout(Integer systemExitTimeout)
void
setTestArtifactInfo(TestArtifactInfo testArtifactInfo)
void
setTestRequest(TestRequest testRequest)
-
-
-
Method Detail
-
getCommandReader
public CommandChainReader getCommandReader()
- Specified by:
getCommandReader
in interfaceProviderParameters
-
setCommandReader
public void setCommandReader(CommandChainReader commandReader)
-
getDirectoryScanner
@Deprecated public DirectoryScanner 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
public ScanResult 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
public RunOrderCalculator 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
-
setReporterFactory
public void setReporterFactory(ReporterFactory reporterFactory)
-
getReporterFactory
public ReporterFactory 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
public void setDirectoryScannerParameters(DirectoryScannerParameters directoryScannerParameters)
-
setReporterConfiguration
public void setReporterConfiguration(ReporterConfiguration reporterConfiguration)
-
setClassLoaders
public void setClassLoaders(ClassLoader testClassLoader)
-
setTestRequest
public void setTestRequest(TestRequest testRequest)
-
getDirectoryScannerParameters
public DirectoryScannerParameters getDirectoryScannerParameters()
Description copied from interface:ProviderParameters
The raw parameters used in creating the directory scanner- Specified by:
getDirectoryScannerParameters
in interfaceProviderParameters
- Returns:
- The parameters
-
getReporterConfiguration
public ReporterConfiguration getReporterConfiguration()
Description copied from interface:ProviderParameters
The raw parameters used in creating the ReporterManagerFactory- Specified by:
getReporterConfiguration
in interfaceProviderParameters
- Returns:
- The reporter configuration
-
getTestRequest
public TestRequest 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
public ClassLoader getTestClassLoader()
Description copied from interface:ProviderParameters
The class loader for the tests- Specified by:
getTestClassLoader
in interfaceProviderParameters
- Returns:
- the classloader
-
getProviderProperties
public Map<String,String> 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
public TestArtifactInfo 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
public void setTestArtifactInfo(TestArtifactInfo testArtifactInfo)
-
setRunOrderParameters
public void setRunOrderParameters(RunOrderParameters runOrderParameters)
-
getMainCliOptions
public List<CommandLineOption> getMainCliOptions()
- Specified by:
getMainCliOptions
in interfaceProviderParameters
-
setMainCliOptions
public void setMainCliOptions(List<CommandLineOption> mainCliOptions)
CLI options in plugin (main) JVM process.- Parameters:
mainCliOptions
- options
-
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)
See the plugin configuration parameter "skipAfterFailureCount".- Parameters:
skipAfterFailureCount
- the value in config parameter "skipAfterFailureCount"
-
isInsideFork
public boolean isInsideFork()
- Specified by:
isInsideFork
in interfaceProviderParameters
- Returns:
true
if test provider appears in forked jvm; Otherwisefalse
means in-plugin provider.
-
getSystemExitTimeout
public Integer getSystemExitTimeout()
- Specified by:
getSystemExitTimeout
in interfaceProviderParameters
-
setSystemExitTimeout
public void setSystemExitTimeout(Integer systemExitTimeout)
-
-