git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@629682 13f79535-47bb-0310-9956-ffa450edef68
357 lines
13 KiB
XML
357 lines
13 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<!--
|
|
/*
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
* this work for additional information regarding copyright ownership.
|
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
* (the "License"); you may not use this file except in compliance with
|
|
* the License. You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
-->
|
|
<document>
|
|
<properties>
|
|
<title>Test Properties</title>
|
|
<author email="smor@apache.org">Stéphane MOR</author>
|
|
</properties>
|
|
<body>
|
|
<section name="Test Settings">
|
|
<table>
|
|
<tr>
|
|
<th>Property</th>
|
|
<th>Optional?</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.junit.dir</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
The directory to invoke the VM in. (ignored if fork is disabled).
|
|
The default value is <code>${basedir}</code>.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.junit.envvars</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
If fork is enabled, additional environment variables may be passed to the new VM.
|
|
You can specify some variable separated by a space.
|
|
Each variable is describe in sub properties.
|
|
Sample :
|
|
<source><![CDATA[
|
|
maven.junit.envvars=LD_LIBRARY_PATH
|
|
LD_LIBRARY_PATH=/usr/local/lib]]></source>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.junit.jvm</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
If this property is set it is used as the JVM for the junit tests
|
|
to run in. This is passed to the Ant junit task in the jvm property.
|
|
If maven.junit.fork is not true, this is ignored.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.junit.jvmargs</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
If fork is enabled, additional parameters may be passed to the new VM.
|
|
You can specify some args separated by a space.
|
|
Sample :
|
|
<source><![CDATA[
|
|
maven.junit.jvmargs=-Xmx160m -verbose]]></source>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.junit.fork</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
When using Java 1.4, it may be necessary to fork the JUnit
|
|
tests to prevent XML parser issues. The default value is
|
|
<code>no</code>.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.junit.forkmode</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
NOTE: Ignored in maven < 1.1.
|
|
Controls how many Java Virtual Machines get created if you want
|
|
to fork some tests. Possible values are "perTest" (the default),
|
|
and "once". "once" creates only a single Java VM for
|
|
all tests while "perTest" creates a new VM for each TestCase class.
|
|
Note that only tests with the same settings of
|
|
filtertrace, haltonerror, haltonfailure, errorproperty and failureproperty
|
|
can share a VM, so even if you set forkmode to "once", Ant may have
|
|
to create more than a single Java VM. This attribute is ignored for
|
|
tests that don't get forked into a new Java VM.
|
|
Defaults to <code>perTest</code>.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.junit.format</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Specifies the formatter to use for output to the console.
|
|
Can be <code>xml</code>, <code>brief</code> or <code>plain</code>.
|
|
Defaults to <code>brief</code>.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.junit.printSummary</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
If this value is set to false, JUnit test run details will not
|
|
include test summary information for a suite. Default value is
|
|
<code>true</code>. This parameter corresponds to the JUnit Ant
|
|
task <code>printSummary</code> attribute.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.junit.timeout</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Cancel the individual tests if they don't finish in the given time
|
|
(measured in milliseconds). Ignored if fork is disabled.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.junit.usefile</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
If this value is set to false, JUnit test run details will appear on
|
|
the console as the tests are executed. If not, they are stored in
|
|
a file in the <code>test-reports</code> directory. The default value
|
|
is <code>true</code>.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.compile.compilerargs</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Specifies compiler arguments to be used for tests compilation. Requires
|
|
maven.test.compile.fork to bet set to true.
|
|
Defaults to ${maven.compile.compilerargs}.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.compile.encoding</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Specifies source encoding to be used for tests compilation.
|
|
Defaults to ${maven.compile.encoding}.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.compile.executable</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Names the program to be invoked as the java compiler for test classes.
|
|
Defaults to ${maven.compile.executable}.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.compile.fork</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Runs the test classes compiler in a separate process.
|
|
Defaults to ${maven.compile.fork}.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.compile.memoryMaximumSize</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
<p>
|
|
Sets the maximum memory size value passed to the VM when fork is set to true.
|
|
Has no effect if fork is false.
|
|
Defaults to ${maven.compile.memoryMaximumSize}.
|
|
</p>
|
|
<p>
|
|
Corresponds to the <code>memoryMaximumSize</code> attribute for the ant
|
|
<a href="http://ant.apache.org/manual/CoreTasks/javac.html">javac</a>
|
|
task.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.compile.source</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Specifies the source version for the Java compiler for test classes.
|
|
Defaults to ${maven.compile.source}.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.compile.target</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Generate class files for test classes for a specific JVM version.
|
|
Defaults to ${maven.compile.target}.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.compile.verbose</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Asks the compiler for verbose output.
|
|
Defaults to ${maven.compile.verbose}.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.classpath</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Specifies one or more locations that will be added to
|
|
the classpath when the tests are run. Multiple values
|
|
can be used; the rules of the ant <pathelement path="...">
|
|
directive apply.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.compile.src.set</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
The source directories Maven uses to compile test code.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.dest</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Specifies the unit test classes directory. This is the
|
|
location where the java classes for the test source
|
|
code will be generated to. The default value is
|
|
<code>${maven.build.dir}/test-classes</code>.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.error.ignore</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Set this to <code>true</code> to ignore errors during testing.
|
|
Its use is <b>NOT RECOMMENDED</b>, but quite convenient on occasion.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.excludeXmlApis</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
If set to yes, the XML APIs will not be added to the list of libraries used for your test cases
|
|
when forked. This should be used when you provide your own XML APIs library. By default, it is
|
|
<code>no</code>.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.failure.ignore</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Set this to <code>true</code> to ignore a failure during testing.
|
|
Its use is <b>NOT RECOMMENDED</b>, but quite convenient on occasion.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.haltafterfailure</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Set this to <code>true</code> to halt the build on any test failures
|
|
<strong>after</strong> all tests have run.
|
|
maven.test.haltafterfailure is only obeyed if
|
|
maven.test.failure.ignore=true, so you have to use them together.
|
|
To also halt the build on any test errors after
|
|
all tests have run, set maven.test.error.ignore=true too.
|
|
Default value is <code>false</code>.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.reportsDirectory</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Directory to write the reports to.
|
|
Defaults to <code>${maven.build.dir}/test-reports</code>.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.skip</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Set this to 'true' to bypass unit tests entirely. Its use
|
|
is <b>NOT RECOMMENDED</b>, but quite convenient on occasion.
|
|
Ignored by <code>test:single</code>.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.source</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
<p>
|
|
Provide source compatibility with a specific release
|
|
</p>
|
|
<p>
|
|
Corresponds to the <code>source</code> attribute for the ant
|
|
<a href="http://ant.apache.org/manual/CoreTasks/javac.html">javac</a>
|
|
task.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.junit.sysproperties</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Use this property elements to specify system properties required
|
|
by the class. These properties will be made available to the VM during
|
|
the execution of the test (either Maven's VM or the forked VM, if fork is enabled).
|
|
You can specify system properties separate by space.
|
|
Each properties is describe in sub properties.
|
|
Sample :
|
|
<source><![CDATA[
|
|
maven.junit.sysproperties=prop1 basedir
|
|
prop1=your value
|
|
basedir=${basedir}]]></source>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>maven.test.search.classdir</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
Use this property to specify that JUnit should search the
|
|
test classes directory (<code>${maven.test.dest}</code>)
|
|
rather than the source directory (<code>${pom.build.unitTestSourceDirectory}</code>).
|
|
This allows for test cases to be written in other
|
|
languages such as Groovy which generate bytecode that can then be used by this plugin.
|
|
It might also be necessary to specify this property if you
|
|
use <code><sourceModifications></code> in your pom.
|
|
Sample :
|
|
<source><![CDATA[maven.test.search.classdir=true]]></source>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>testmatchpattern</td>
|
|
<td>Yes (required in test:match)</td>
|
|
<td>
|
|
List of ant patterns (spared by commas) used in test:match goal to specify the
|
|
tests that should run
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>testnotmatchpattern</td>
|
|
<td>Yes</td>
|
|
<td>
|
|
List of ant patterns (spared by commas) used in test:match goal to specify the
|
|
tests that shouldn't run
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</section>
|
|
</body>
|
|
</document>
|