Full name:
org.apache.maven.plugins:maven-failsafe-plugin:2.16:integration-test
Description:
Attributes:
Name | Type | Since | Description |
---|---|---|---|
summaryFile | File | - | The summary file to write integration test results to. Default value is: ${project.build.directory}/failsafe-reports/failsafe-summary.xml. |
testSourceDirectory | File | 2.2 | The test source directory containing test class sources. Default value is: ${project.build.testSourceDirectory}. |
Name | Type | Since | Description |
---|---|---|---|
additionalClasspathElements | String[] | 2.4 | Additional elements to be appended to the classpath. User property is: maven.test.additionalClasspath. |
argLine | String | 2.1 | Arbitrary JVM options to set on the command line. User property is: argLine. |
basedir | File | - | The base directory of the project being tested. This can be
obtained in your integration test via
System.getProperty("basedir"). Default value is: ${basedir}. |
childDelegation | boolean | 2.1 | When false it makes tests run using the standard classloader
delegation instead of the default Maven isolated classloader. Only
used when forking (forkMode is not "none"). Setting it to false helps with some problems caused by conflicts between xml parsers in the classpath and the Java 5 provider parser. Default value is: false. User property is: childDelegation. |
classesDirectory | File | - | The directory containing generated classes of the project being
tested. This will be included after the test classes in the test
classpath. Default value is: ${project.build.outputDirectory}. |
classpathDependencyExcludes | String[] | 2.6 | List of dependencies to exclude from the test classpath. Each
dependency string must follow the format groupId:artifactId.
For example: org.acme:project-a User property is: maven.test.dependency.excludes. |
classpathDependencyScopeExclude | String | 2.6 | A dependency scope to exclude from the test classpath. The scope
should be one of the scopes defined by
org.apache.maven.artifact.Artifact. This includes the following:
|
debugForkedProcess | String | 2.4 | Attach a debugger to the forked JVM. If set to "true", the process
will suspend and wait for a debugger to attach on port 5005. If set
to some other string, that string will be appended to the argLine,
allowing you to configure arbitrary debuggability options (without
overwriting the other options specified through the
argLine parameter). User property is: maven.failsafe.debug. |
dependenciesToScan | String[] | 2.15 | List of dependencies to scan for test classes to include in the
test run. Each dependency string must follow the format
groupId:artifactId. For example: org.acme:project-a User property is: dependenciesToScan. |
disableXmlReport | boolean | 2.2 | Flag to disable the generation of report files in xml format. Default value is: false. User property is: disableXmlReport. |
enableAssertions | boolean | 2.3.1 | By default, Surefire enables JVM assertions for the execution of
your test cases. To disable the assertions, set this flag to
"false". Default value is: true. User property is: enableAssertions. |
encoding | String | - | The character encoding scheme to be applied. Default value is: ${project.reporting.outputEncoding}. User property is: encoding. |
environmentVariables | Map | 2.1.3 | Additional environment variables to set on the command line. |
excludedGroups | String | 2.2 | (TestNG/JUnit47 provider with JUnit4.8+ only) Excluded groups. Any
methods/classes/etc with one of the groups specified in this list
will specifically not be run. For JUnit, this parameter forces the use of the 4.7 provider This parameter is ignored if the suiteXmlFiles parameter is specified. User property is: excludedGroups. |
excludes | List | - | A list of <exclude> elements specifying the tests (by
pattern) that should be excluded in testing. When not specified and
when the test parameter is not specified, the default
excludes will be <excludes> <exclude>**/*$*</exclude> </excludes> (which excludes all inner classes). This parameter is ignored if the TestNG suiteXmlFiles parameter is specified. Each exclude item may also contain a comma-separated sublist of items, which will be treated as multiple <exclude> entries. |
excludesFile | File | - | A file containing exclude patterns. Blank lines, or lines starting
with # are ignored. If excludes are also specified
these patterns are appended. |
failIfNoSpecifiedTests | Boolean | 2.12 | Set this to "true" to cause a failure if the none of the tests
specified in -Dtest=... are run. Defaults to "true". User property is: it.failIfNoSpecifiedTests. |
failIfNoTests | Boolean | 2.4 | Set this to "true" to cause a failure if there are no tests to run.
Defaults to "false". User property is: failIfNoTests. |
forkCount | String | 2.14 | Option to specify the number of VMs to fork in parallel in order to
execute the tests. When terminated with "C", the number part is
multiplied with the number of CPU cores. Floating point value are
only accepted together with "C". If set to "0", no VM is forked and
all tests are executed within the main process. Example values: "1.5C", "4" The system properties and the argLine of the forked processes may contain the place holder string ${surefire.forkNumber}, which is replaced with a fixed number for each of the parallel forks, ranging from 1 to the effective value of forkCount times the maximum number of parallel Surefire executions in maven parallel builds, i.e. the effective value of the -T command line argument of maven core. Default value is: 1. User property is: forkCount. |
forkMode | String | 2.1 | DEPRECATED since version 2.14. Use
forkCount and reuseForks instead. Option to specify the forking mode. Can be "never", "once", "always", "perthread". "none" and "pertest" are also accepted for backwards compatibility. "always" forks for each test-class. "perthread" will create threadCount parallel forks, each executing one test-class. See also parameter reuseForks. Default value is: once. User property is: forkMode. |
forkedProcessTimeoutInSeconds | int | 2.4 | Kill the forked test process after a certain number of seconds. If
set to 0, wait forever for the process, never timing out. User property is: failsafe.timeout. |
groups | String | 2.2 | (TestNG/JUnit47 provider with JUnit4.8+ only) Groups for this test.
Only classes/methods/etc decorated with one of the groups specified
here will be included in test run, if specified. For JUnit, this parameter forces the use of the 4.7 provider This parameter is ignored if the suiteXmlFiles parameter is specified. User property is: groups. |
includes | List | - | A list of <include> elements specifying the tests (by
pattern) that should be included in testing. When not specified and
when the test parameter is not specified, the default
includes will be <includes> <include>**/IT*.java</include> <include>**/*IT.java</include> <include>**/*ITCase.java</include> </includes> Each include item may also contain a comma-separated sublist of items, which will be treated as multiple <include> entries. This parameter is ignored if the TestNG suiteXmlFiles parameter is specified. |
includesFile | File | - | A file containing include patterns. Blank lines, or lines starting
with # are ignored. If includes are also specified
these patterns are appended. |
junitArtifactName | String | 2.3.1 | Allows you to specify the name of the JUnit artifact. If not set,
junit:junit will be used. Default value is: junit:junit. User property is: junitArtifactName. |
jvm | String | 2.1 | Option to specify the jvm (or path to the java executable) to use
with the forking options. For the default, the jvm will be a new
instance of the same VM as the one used to run Maven. JVM settings
are not inherited from MAVEN_OPTS. User property is: jvm. |
objectFactory | String | 2.5 | (TestNG only) Define the factory class used to create all test
instances. User property is: objectFactory. |
parallel | String | 2.2 | (TestNG only) When you use the parallel attribute,
TestNG will try to run all your test methods in separate threads,
except for methods that depend on each other, which will be run in
the same thread in order to respect their order of execution.
(JUnit 4.7 provider) Supports values "classes"/"methods"/"both" to
run in separate threads, as controlled by
threadCount. Since version 2.16 (JUnit 4.7 provider), the value "both" is DEPRECATED. Use "classesAndMethods" instead. Since version 2.16 (JUnit 4.7 provider), additional vales are available "suites"/"suitesAndClasses"/"suitesAndMethods"/"classesAndMethods"/"all". User property is: parallel. |
parallelTestsTimeoutForcedInSeconds | int | 2.16 | Stop executing queued parallel JUnit tests and interrupt
currently running tests after a certain number of seconds. If set
to 0, wait forever, never timing out. Makes sense with specified
parallel different from "none". User property is: failsafe.parallel.forcedTimeout. |
parallelTestsTimeoutInSeconds | int | 2.16 | Stop executing queued parallel JUnit tests after a certain number
of seconds. If set to 0, wait forever, never timing out. Makes
sense with specified parallel different from "none". User property is: failsafe.parallel.timeout. |
perCoreThreadCount | boolean | 2.5 | (JUnit 4.7 provider) Indicates that threadCount is per cpu core. Default value is: true. User property is: perCoreThreadCount. |
printSummary | boolean | - | Option to print summary of test suites or just print the test cases
that have errors. Default value is: true. User property is: failsafe.printSummary. |
properties | Properties | 2.4 | List of properties for configuring all TestNG related
configurations. This is the new preferred method of configuring
TestNG. |
redirectTestOutputToFile | boolean | 2.3 | Set this to "true" to redirect the unit test standard output to a
file (found in reportsDirectory/testName-output.txt). Default value is: false. User property is: maven.test.redirectTestOutputToFile. |
remoteRepositories | List | 2.2 | The remote plugin repositories declared in the POM. Default value is: ${project.pluginArtifactRepositories}. |
reportFormat | String | - | Selects the formatting for the test report to be generated. Can be
set as "brief" or "plain". Only applies to the output format of the
output files (target/surefire-reports/testName.txt) Default value is: brief. User property is: failsafe.reportFormat. |
reportNameSuffix | String | - | Add custom text into report filename:
TEST-testClassName-reportNameSuffix.xml,
testClassName-reportNameSuffix.txt and
testClassName-reportNameSuffix-output.txt. File
TEST-testClassName-reportNameSuffix.xml has changed attributes
'testsuite'--'name' and 'testcase'--'classname' - reportNameSuffix
is added to the attribute value. User property is: surefire.reportNameSuffix. |
reportsDirectory | File | - | Base directory where all reports are written to. Default value is: ${project.build.directory}/failsafe-reports. |
reuseForks | boolean | 2.13 | Indicates if forked VMs can be reused. If set to "false", a new VM
is forked for each test class to be executed. If set to "true", up
to forkCount VMs will be forked and then reused to
execute all tests. Default value is: true. User property is: reuseForks. |
runOrder | String | 2.7 | Defines the order the tests will be run in. Supported values are
"alphabetical", "reversealphabetical", "random", "hourly"
(alphabetical on even hours, reverse alphabetical on odd hours),
"failedfirst", "balanced" and "filesystem". Odd/Even for hourly is
determined at the time the of scanning the classpath, meaning it
could change during a multi-module build. Failed first will run
tests that failed on previous run first, as well as new tests for
this run. Balanced is only relevant with parallel=classes, and will
try to optimize the run-order of the tests to make all tests
complete at the same time, reducing the overall execution time.
Note that the statistics are stored in a file named
.surefire-XXXXXXXXX beside pom.xml, and should not be checked into
version control. The "XXXXX" is the SHA1 checksum of the entire
surefire configuration, so different configurations will have
different statistics files, meaning if you change any config
settings you will re-run once before new statistics data can be
established. Default value is: filesystem. |
skip | boolean | - | Set this to "true" to bypass unit tests entirely. Its use is NOT
RECOMMENDED, especially if you enable it using the
"maven.test.skip" property, because maven.test.skip disables both
running the tests and compiling the tests. Consider using the
skipTests parameter instead. Default value is: false. User property is: maven.test.skip. |
skipExec | boolean | 2.3 | Deprecated. Use skipTests instead. User property is: maven.test.skip.exec. |
skipITs | boolean | 2.4.3-alpha-2 | Set this to "true" to skip running integration tests, but still
compile them. Its use is NOT RECOMMENDED, but quite convenient on
occasion. User property is: skipITs. |
skipTests | boolean | 2.4 | Set this to "true" to skip running tests, but still compile them.
Its use is NOT RECOMMENDED, but quite convenient on occasion. Default value is: false. User property is: skipTests. |
suiteXmlFiles | File[] | 2.2 | (TestNG) List of <suiteXmlFile> elements specifying TestNG
suite xml file locations. Note that suiteXmlFiles is
incompatible with several other parameters of this plugin, like
includes/excludes. This parameter is ignored if the test parameter is specified (allowing you to run a single test instead of an entire suite). |
systemProperties | Properties | - | Deprecated. Use systemPropertyVariables instead. |
systemPropertiesFile | File | 2.8.2 | List of System properties, loaded from a file, to pass to the JUnit
tests. |
systemPropertyVariables | Map | 2.5 | List of System properties to pass to the JUnit tests. |
test | String | - | Specify this parameter to run individual tests by file name,
overriding the includes/excludes parameters. Each
pattern you specify here will be used to create an include pattern
formatted like **/${test}.java, so you can just type
"-Dit.test=MyTest" to run a single test called
"foo/MyTest.java". This parameter overrides the includes/excludes parameters, and the TestNG suiteXmlFiles parameter. since 2.7.3 You can execute a limited number of method in the test with adding #myMethod or #my*ethod. Si type "-Dtest=MyTest#myMethod" supported for junit 4.x and testNg User property is: it.test. |
testClassesDirectory | File | - | The directory containing generated test classes of the project
being tested. This will be included at the beginning of the test
classpath. * Default value is: ${project.build.testOutputDirectory}. |
testNGArtifactName | String | 2.3.1 | Allows you to specify the name of the TestNG artifact. If not set,
org.testng:testng will be used. Default value is: org.testng:testng. User property is: testNGArtifactName. |
threadCount | int | 2.2 | (TestNG/JUnit 4.7 provider) The attribute thread-count allows you
to specify how many threads should be allocated for this execution.
Only makes sense to use in conjunction with the
parallel parameter. User property is: threadCount. |
threadCountClasses | int | 2.16 | (JUnit 4.7 provider) The attribute thread-count-classes allows you
to specify the concurrency in test classes, i.e.:
Default value is: 0. User property is: threadCountClasses. |
threadCountMethods | int | 2.16 | (JUnit 4.7 provider) The attribute thread-count-methods allows you
to specify the concurrency in test methods, i.e.:
Default value is: 0. User property is: threadCountMethods. |
threadCountSuites | int | 2.16 | (JUnit 4.7 provider) The attribute thread-count-suites allows you
to specify the concurrency in test suites, i.e.:
Default value is: 0. User property is: threadCountSuites. |
trimStackTrace | boolean | 2.2 | Whether to trim the stack trace in the reports to just the lines
within the test, or show the full trace. Default value is: true. User property is: trimStackTrace. |
useFile | boolean | - | Option to generate a file test report or just output the test
report to the console. Default value is: true. User property is: failsafe.useFile. |
useManifestOnlyJar | boolean | 2.4.3 | By default, Surefire forks your tests using a manifest-only JAR;
set this parameter to "false" to force it to launch your tests with
a plain old Java classpath. (See
http://maven.apache.org/plugins/maven-surefire-plugin/examples/class-loading.html
for a more detailed explanation of manifest-only JARs and their
benefits.) Beware, setting this to "false" may cause your tests to
fail on Windows if your classpath is too long. Default value is: true. User property is: failsafe.useManifestOnlyJar. |
useSystemClassLoader | boolean | 2.3 | Option to pass dependencies to the system's classloader instead of
using an isolated class loader when forking. Prevents problems with
JDKs which implement the service provider lookup mechanism by using
the system's classloader. Default value is: true. User property is: failsafe.useSystemClassLoader. |
useUnlimitedThreads | boolean | 2.5 | (JUnit 4.7 provider) Indicates that the thread pool will be
unlimited. The parallel parameter and the actual
number of classes/methods will decide. Setting this to "true"
effectively disables perCoreThreadCount and
threadCount. Defaults to "false". Default value is: false. User property is: useUnlimitedThreads. |
workingDirectory | File | 2.1.3 | Command line working directory. User property is: basedir. |
classpathDependencyScopeExclude:
forkedProcessTimeoutInSeconds:
jvm:
parallelTestsTimeoutForcedInSeconds:
parallelTestsTimeoutInSeconds:
skip:
test: