|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
com.sun.maven.junit.TestMojo
public class TestMojo
Runs tests
| Field Summary | |
|---|---|
protected String |
argLine
Arbitrary JVM options to set on the command line. |
protected List<String> |
classpathElements
The classpath elements of the project being tested. |
protected int |
concurrency
Number of concurrent executions. |
protected String |
debugForkedProcess
Attach a debugger to the forked JVM. |
protected boolean |
fork
Option to specify the forking behavior. |
protected org.apache.maven.project.MavenProject |
project
|
protected boolean |
quiet
If true, the stdout/stderr from tests will not be copied to the console. |
protected boolean |
skipTests
Set this to 'true' to skip running tests, but still compile them. |
protected Properties |
systemProperties
List of System properties to pass to the JUnit tests. |
protected String |
test
Specify this parameter to run individual tests by file name, overriding the includes/excludes
parameters. |
protected boolean |
testFailureIgnore
Set this to true to ignore a failure during testing. |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
TestMojo()
|
|
| Method Summary | |
|---|---|
protected LocalTestCaseRunner |
createTestCaseRunner()
|
void |
execute()
|
void |
executeForked()
Executes tests in several child JVMs concurrently. |
void |
executeLocal()
|
hudson.remoting.Channel |
fork(OutputStream output,
ExecutorService executors)
Forks a new JVM and pumps its output to the given OutputStream |
| Methods inherited from class org.apache.maven.plugin.AbstractMojo |
|---|
getLog, getPluginContext, setLog, setPluginContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.apache.maven.project.MavenProject project
protected List<String> classpathElements
protected boolean testFailureIgnore
protected boolean fork
protected int concurrency
protected String debugForkedProcess
protected String test
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 "-Dtest=MyTest"
to run a single test called "foo/MyTest.java". This parameter will override the TestNG suiteXmlFiles
parameter.
since 1.7 you can now use "-Dtest=MyTest#method" to execute only one method of the unit tests.
Note * is supported too "-Dtest=MyTest#method*" to execute only method starting with method
protected boolean quiet
protected String argLine
protected Properties systemProperties
protected boolean skipTests
| Constructor Detail |
|---|
public TestMojo()
| Method Detail |
|---|
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
public void executeLocal()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected LocalTestCaseRunner createTestCaseRunner()
public void executeForked()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
public hudson.remoting.Channel fork(OutputStream output,
ExecutorService executors)
throws IOException
OutputStream
output - The stream will be closed upon the completion of the process.executors - Executes the remote requests.
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||