Package org.apache.maven.plugin.failsafe
Class IntegrationTestMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugin.surefire.AbstractSurefireMojo
org.apache.maven.plugin.failsafe.IntegrationTestMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
,org.apache.maven.plugin.surefire.SurefireExecutionParameters
@Mojo(name="integration-test",
requiresProject=true,
requiresDependencyResolution=TEST,
defaultPhase=INTEGRATION_TEST,
threadSafe=true)
public class IntegrationTestMojo
extends org.apache.maven.plugin.surefire.AbstractSurefireMojo
Run integration tests using Surefire.
- Author:
- Jason van Zyl, Stephen Connolly
-
Field Summary
Fields inherited from class org.apache.maven.plugin.surefire.AbstractSurefireMojo
basedir, FORK_NUMBER_PLACEHOLDER, skip, skipExec, skipTests, testClassesDirectory, THREAD_NUMBER_PLACEHOLDER
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addPluginSpecificChecksumItems
(org.apache.maven.plugin.surefire.booterclient.ChecksumCalculator checksum) protected String[]
int
int
protected org.apache.maven.artifact.Artifact
double
double
protected String
protected String
protected int
int
File[]
getTest()
protected void
handleSummary
(org.apache.maven.surefire.suite.RunResult summary, Exception firstForkException) protected final boolean
boolean
boolean
isSkip()
boolean
Deprecated.protected boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
setBasedir
(File basedir) void
setClassesDirectory
(File classesDirectory) void
setDebugForkedProcess
(String debugForkedProcess) void
setDefaultClassesDirectory
(File defaultClassesDirectory) void
setEncoding
(String encoding) void
setFailIfNoSpecifiedTests
(boolean failIfNoSpecifiedTests) void
setForkedProcessExitTimeoutInSeconds
(int forkedProcessExitTimeoutInSeconds) void
setForkedProcessTimeoutInSeconds
(int forkedProcessTimeoutInSeconds) void
setIncludes
(List<String> includes) void
setParallelTestsTimeoutForcedInSeconds
(double parallelTestsTimeoutForcedInSeconds) void
setParallelTestsTimeoutInSeconds
(double parallelTestsTimeoutInSeconds) void
setPrintSummary
(boolean printSummary) void
setReportFormat
(String reportFormat) void
setReportsDirectory
(File reportsDirectory) void
setRunOrder
(String runOrder) void
setSkip
(boolean skip) void
setSkipExec
(boolean skipExec) Deprecated.void
setSkipITs
(boolean skipITs) void
setSkipTests
(boolean skipTests) void
setSuiteXmlFiles
(File[] suiteXmlFiles) void
setSummaryFile
(File summaryFile) void
void
setTestClassesDirectory
(File testClassesDirectory) void
setTestFailureIgnore
(boolean testFailureIgnore) void
setUseFile
(boolean useFile) void
setUseManifestOnlyJar
(boolean useManifestOnlyJar) void
setUseSystemClassLoader
(boolean useSystemClassLoader) Methods inherited from class org.apache.maven.plugin.surefire.AbstractSurefireMojo
cleanupForkConfiguration, convertWithCoreCount, createCopyAndReplaceForkNumPlaceholder, createProviders, effectiveIsEnableAssertions, execute, getAdditionalClasspathElements, getArgLine, getArtifactFactory, getArtifactResolver, getClassLoaderConfiguration, getClasspathDependencyExcludes, getClasspathDependencyScopeExclude, getConsoleLogger, getDependenciesToScan, getEffectiveForkCount, getEnvironmentVariables, getExcludedGroups, getExcludes, getFailIfNoTests, getForkCount, getForkMode, getGroups, getJunitArtifactName, getJunitPlatformArtifactName, getJvm, getLocalRepository, getMetadataSource, getObjectFactory, getParallel, getPerCoreThreadCount, getPluginArtifactMap, getPluginDescriptor, getProject, getProjectArtifactMap, getProjectBuildDirectory, getRemoteRepositories, getReportNameSuffix, getSession, getSpecificTests, getStatisticsFile, getSystemProperties, getSystemPropertiesFile, getSystemPropertyVariables, getTempDir, getTestNGArtifactName, getTestSourceDirectory, getThreadCount, getThreadCountClasses, getThreadCountMethods, getThreadCountSuites, getToolchainManager, getUseUnlimitedThreads, getWorkingDirectory, hasExecutedBefore, isAnyConcurrencySelected, isAnyGroupsSelected, isChildDelegation, isDisableXmlReport, isEnableAssertions, isForking, isMavenParallel, isParallelOptimized, isRedirectTestOutputToFile, isReuseForks, isTrimStackTrace, logDebugOrCliShowErrors, logReportsDirectory, setAdditionalClasspathElements, setArgLine, setArtifactFactory, setArtifactResolver, setChildDelegation, setClasspathDependencyExcludes, setClasspathDependencyScopeExclude, setDependenciesToScan, setDisableXmlReport, setEnableAssertions, setEnvironmentVariables, setExcludedGroups, setExcludes, setFailIfNoTests, setForkMode, setGroups, setJunitArtifactName, setJunitPlatformArtifactName, setLocalRepository, setMetadataSource, setObjectFactory, setParallel, setParallelOptimized, setPerCoreThreadCount, setPluginArtifactMap, setProject, setProjectArtifactMap, setProjectBuildDirectory, setProperties, setRedirectTestOutputToFile, setRemoteRepositories, setReportNameSuffix, setSession, setSystemProperties, setSystemPropertiesFile, setSystemPropertyVariables, setTempDir, setTestNGArtifactName, setTestSourceDirectory, setThreadCount, setThreadCountClasses, setThreadCountMethods, setThreadCountSuites, setToolchainManager, setTrimStackTrace, setUseUnlimitedThreads, setWorkingDirectory
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
IntegrationTestMojo
public IntegrationTestMojo()
-
-
Method Details
-
getRerunFailingTestsCount
protected int getRerunFailingTestsCount()- Specified by:
getRerunFailingTestsCount
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
-
handleSummary
protected void handleSummary(org.apache.maven.surefire.suite.RunResult summary, Exception firstForkException) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException - Specified by:
handleSummary
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
isSkipExecution
protected boolean isSkipExecution()- Specified by:
isSkipExecution
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
-
getPluginName
- Specified by:
getPluginName
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
-
getDefaultIncludes
- Specified by:
getDefaultIncludes
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
-
getReportSchemaLocation
- Specified by:
getReportSchemaLocation
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
-
getMojoArtifact
protected org.apache.maven.artifact.Artifact getMojoArtifact()- Specified by:
getMojoArtifact
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
-
isSkipTests
public boolean isSkipTests() -
setSkipTests
public void setSkipTests(boolean skipTests) -
isSkipITs
public boolean isSkipITs() -
setSkipITs
public void setSkipITs(boolean skipITs) -
isSkipExec
Deprecated. -
setSkipExec
Deprecated. -
isSkip
public boolean isSkip() -
setSkip
public void setSkip(boolean skip) -
getBasedir
-
setBasedir
-
getTestClassesDirectory
-
setTestClassesDirectory
-
getClassesDirectory
- Returns:
- Output directory, or artifact file if artifact type is "jar". If not forking the JVM, parameter
useSystemClassLoader
is ignored and theIsolatedClassLoader
is used instead. See the resolution ofClassLoaderConfiguration
.
-
setClassesDirectory
-
setDefaultClassesDirectory
-
getReportsDirectory
-
setReportsDirectory
-
getTest
-
setTest
-
getSummaryFile
-
setSummaryFile
-
isPrintSummary
public boolean isPrintSummary() -
setPrintSummary
public void setPrintSummary(boolean printSummary) -
getReportFormat
-
setReportFormat
-
isUseFile
public boolean isUseFile() -
setUseFile
public void setUseFile(boolean useFile) -
getDebugForkedProcess
-
setDebugForkedProcess
-
getForkedProcessTimeoutInSeconds
public int getForkedProcessTimeoutInSeconds() -
setForkedProcessTimeoutInSeconds
public void setForkedProcessTimeoutInSeconds(int forkedProcessTimeoutInSeconds) -
getForkedProcessExitTimeoutInSeconds
public int getForkedProcessExitTimeoutInSeconds() -
setForkedProcessExitTimeoutInSeconds
public void setForkedProcessExitTimeoutInSeconds(int forkedProcessExitTimeoutInSeconds) -
getParallelTestsTimeoutInSeconds
public double getParallelTestsTimeoutInSeconds() -
setParallelTestsTimeoutInSeconds
public void setParallelTestsTimeoutInSeconds(double parallelTestsTimeoutInSeconds) -
getParallelTestsTimeoutForcedInSeconds
public double getParallelTestsTimeoutForcedInSeconds() -
setParallelTestsTimeoutForcedInSeconds
public void setParallelTestsTimeoutForcedInSeconds(double parallelTestsTimeoutForcedInSeconds) -
isUseSystemClassLoader
public boolean isUseSystemClassLoader() -
setUseSystemClassLoader
public void setUseSystemClassLoader(boolean useSystemClassLoader) -
isUseManifestOnlyJar
public boolean isUseManifestOnlyJar() -
setUseManifestOnlyJar
public void setUseManifestOnlyJar(boolean useManifestOnlyJar) -
getEncoding
-
setEncoding
-
isTestFailureIgnore
public boolean isTestFailureIgnore() -
setTestFailureIgnore
public void setTestFailureIgnore(boolean testFailureIgnore) -
addPluginSpecificChecksumItems
protected void addPluginSpecificChecksumItems(org.apache.maven.plugin.surefire.booterclient.ChecksumCalculator checksum) - Overrides:
addPluginSpecificChecksumItems
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
-
getFailIfNoSpecifiedTests
-
setFailIfNoSpecifiedTests
public void setFailIfNoSpecifiedTests(boolean failIfNoSpecifiedTests) -
getSkipAfterFailureCount
public int getSkipAfterFailureCount() -
getShutdown
-
getIncludes
- Specified by:
getIncludes
in interfaceorg.apache.maven.plugin.surefire.SurefireExecutionParameters
- Specified by:
getIncludes
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
-
setIncludes
- Specified by:
setIncludes
in interfaceorg.apache.maven.plugin.surefire.SurefireExecutionParameters
- Specified by:
setIncludes
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
-
getSuiteXmlFiles
- Specified by:
getSuiteXmlFiles
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
-
setSuiteXmlFiles
- Specified by:
setSuiteXmlFiles
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
-
getRunOrder
- Specified by:
getRunOrder
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
-
setRunOrder
- Specified by:
setRunOrder
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
-
getIncludesFile
- Specified by:
getIncludesFile
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
-
getExcludesFile
- Specified by:
getExcludesFile
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
-
suiteXmlFiles
- Specified by:
suiteXmlFiles
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
-
hasSuiteXmlFiles
protected final boolean hasSuiteXmlFiles()- Specified by:
hasSuiteXmlFiles
in classorg.apache.maven.plugin.surefire.AbstractSurefireMojo
-