|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.Task org.testng.TestNGAntTask
public class TestNGAntTask
TestNG settings:
Field Summary | |
---|---|
protected boolean |
m_assertEnabled
|
protected java.util.List<org.apache.tools.ant.types.FileSet> |
m_classFilesets
|
protected java.lang.String |
m_configFailurePolicy
|
protected java.lang.String |
m_dataproviderthreadCount
|
protected boolean |
m_dump
True if the temporary file created by the Ant Task for command line parameters to TestNG should be preserved after execution. |
protected org.apache.tools.ant.types.Environment |
m_environment
|
protected java.lang.String |
m_excludedGroups
|
protected java.lang.String |
m_failurePropertyName
|
protected java.lang.String |
m_fspPropertyName
|
protected boolean |
m_haltOnFailure
|
protected boolean |
m_haltOnFSP
|
protected boolean |
m_haltOnSkipped
|
protected java.lang.String |
m_includedGroups
|
protected java.lang.Boolean |
m_isJUnit
|
protected org.apache.tools.ant.types.CommandlineJava |
m_javaCommand
|
protected java.lang.String |
m_mainClass
The suite runner name (defaults to TestNG.class.getName(). |
protected java.lang.String |
m_onHaltTarget
|
protected java.io.File |
m_outputDir
|
protected java.lang.String |
m_parallelMode
|
protected java.lang.Boolean |
m_randomizeSuites
|
protected java.lang.String |
m_skippedPropertyName
|
protected java.io.File |
m_testjar
|
protected java.lang.String |
m_testRunnerFactory
|
protected java.lang.String |
m_threadCount
|
java.lang.String |
m_useDefaultListeners
|
protected java.io.File |
m_workingDir
|
protected java.util.List<org.apache.tools.ant.types.FileSet> |
m_xmlFilesets
|
Fields inherited from class org.apache.tools.ant.Task |
---|
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
project |
Constructor Summary | |
---|---|
TestNGAntTask()
|
Method Summary | |
---|---|
protected void |
actOnResult(int exitValue,
boolean wasKilled)
|
void |
addClassfileset(org.apache.tools.ant.types.FileSet fs)
|
void |
addConfiguredPropertySet(org.apache.tools.ant.types.PropertySet sysPropertySet)
Add the referenced property set as system properties for the TestNG JVM. |
void |
addConfiguredReporter(ReporterConfig reporterConfig)
|
void |
addEnv(org.apache.tools.ant.types.Environment.Variable var)
Adds an environment variable; used when forking. |
void |
addSysproperty(org.apache.tools.ant.types.Environment.Variable sysp)
|
void |
addXmlfileset(org.apache.tools.ant.types.FileSet fs)
|
org.apache.tools.ant.types.Path |
createBootclasspath()
Adds a path to the bootclasspath. |
org.apache.tools.ant.types.Path |
createClasspath()
Adds path to classpath used for tests. |
org.apache.tools.ant.types.Commandline.Argument |
createJvmarg()
|
protected org.apache.tools.ant.taskdefs.ExecuteWatchdog |
createWatchdog()
|
void |
execute()
Launches TestNG in a new JVM. |
protected int |
executeAsForked(org.apache.tools.ant.types.CommandlineJava cmd,
org.apache.tools.ant.taskdefs.ExecuteWatchdog watchdog)
Executes the command line as a new process. |
protected org.apache.tools.ant.types.CommandlineJava |
getJavaCommand()
Creates or returns the already created CommandlineJava . |
protected java.util.List<java.lang.String> |
getSuiteFileNames()
|
void |
setClassfilesetRef(org.apache.tools.ant.types.Reference ref)
|
void |
setClasspath(org.apache.tools.ant.types.Path s)
Set the classpath to be used when running the Java class |
void |
setClasspathRef(org.apache.tools.ant.types.Reference r)
Classpath to use, by reference. |
void |
setConfigFailurePolicy(java.lang.String failurePolicy)
|
void |
setDataProviderThreadCount(java.lang.String dataproviderthreadCount)
|
void |
setDelegateCommandSystemProperties(boolean value)
|
void |
setDumpCommand(boolean verbose)
Sets the flag to log the command line. |
void |
setDumpEnv(boolean verbose)
Sets the flag to write on System.out the Ant
Environment properties. |
void |
setDumpSys(boolean verbose)
Sets te flag to write on System.out the system properties. |
void |
setEnableAssert(boolean flag)
|
void |
setExcludedGroups(java.lang.String groups)
|
void |
setFailureProperty(java.lang.String propertyName)
|
void |
setFSPProperty(java.lang.String propertyName)
|
void |
setGroups(java.lang.String groups)
|
void |
setHaltonfailure(boolean value)
|
void |
setHaltonFSP(boolean value)
|
void |
setHaltonskipped(boolean value)
|
void |
setJUnit(boolean value)
|
void |
setJvm(java.lang.String jvm)
Sets a particular JVM to be used. |
void |
setListener(java.lang.String listener)
Deprecated. Use "listeners" |
void |
setListeners(java.lang.String listeners)
|
void |
setMethods(java.lang.String methods)
|
void |
setMethodSelectors(java.lang.String methodSelectors)
|
void |
setObjectFactory(java.lang.String className)
|
void |
setOnHaltTarget(java.lang.String targetName)
|
void |
setOutputDir(java.io.File dir)
Sets the test output directory |
void |
setParallel(java.lang.String parallel)
|
void |
setRandomizeSuites(java.lang.Boolean randomizeSuites)
|
void |
setReporter(java.lang.String listener)
|
void |
setSkipFailedInvocationCounts(boolean skip)
|
void |
setSkippedProperty(java.lang.String propertyName)
|
void |
setSuiteName(java.lang.String s)
Sets the suite name |
void |
setSuiteRunnerClass(java.lang.String s)
Sets the suite runner class to invoke |
void |
setSuiteThreadPoolSize(java.lang.Integer n)
|
void |
setTestJar(java.io.File s)
Sets the test jar |
void |
setTestName(java.lang.String s)
Sets the test name |
void |
setTestNames(java.lang.String testNames)
|
void |
setTestRunnerFactory(java.lang.String testRunnerFactory)
|
void |
setThreadCount(java.lang.String threadCount)
|
void |
setTimeout(java.lang.Integer value)
Set the timeout value (in milliseconds). |
void |
setUseDefaultListeners(java.lang.String f)
|
void |
setVerbose(java.lang.Integer verbose)
|
void |
setWorkingDir(java.io.File workingDir)
The directory to invoke the VM in. |
void |
setXmlfilesetRef(org.apache.tools.ant.types.Reference ref)
|
protected void |
validateOptions()
|
Methods inherited from class org.apache.tools.ant.Task |
---|
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
getProject, setProject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.apache.tools.ant.types.CommandlineJava m_javaCommand
protected java.util.List<org.apache.tools.ant.types.FileSet> m_xmlFilesets
protected java.util.List<org.apache.tools.ant.types.FileSet> m_classFilesets
protected java.io.File m_outputDir
protected java.io.File m_testjar
protected java.io.File m_workingDir
protected java.lang.Boolean m_isJUnit
protected java.lang.String m_testRunnerFactory
protected org.apache.tools.ant.types.Environment m_environment
protected java.lang.String m_mainClass
protected boolean m_dump
protected boolean m_assertEnabled
protected boolean m_haltOnFailure
protected java.lang.String m_onHaltTarget
protected java.lang.String m_failurePropertyName
protected boolean m_haltOnSkipped
protected java.lang.String m_skippedPropertyName
protected boolean m_haltOnFSP
protected java.lang.String m_fspPropertyName
protected java.lang.String m_includedGroups
protected java.lang.String m_excludedGroups
protected java.lang.String m_parallelMode
protected java.lang.String m_threadCount
protected java.lang.String m_dataproviderthreadCount
protected java.lang.String m_configFailurePolicy
protected java.lang.Boolean m_randomizeSuites
public java.lang.String m_useDefaultListeners
Constructor Detail |
---|
public TestNGAntTask()
Method Detail |
---|
public void setParallel(java.lang.String parallel)
public void setThreadCount(java.lang.String threadCount)
public void setDataProviderThreadCount(java.lang.String dataproviderthreadCount)
public void setUseDefaultListeners(java.lang.String f)
public void setHaltonfailure(boolean value)
public void setOnHaltTarget(java.lang.String targetName)
public void setFailureProperty(java.lang.String propertyName)
public void setHaltonskipped(boolean value)
public void setSkippedProperty(java.lang.String propertyName)
public void setHaltonFSP(boolean value)
public void setFSPProperty(java.lang.String propertyName)
public void setDelegateCommandSystemProperties(boolean value)
public void setDumpCommand(boolean verbose)
public void setDumpEnv(boolean verbose)
System.out
the Ant
Environment properties.
verbose
- true for printingpublic void setDumpSys(boolean verbose)
System.out
the system properties.
verbose
- true for dumping the infopublic void setEnableAssert(boolean flag)
public void setWorkingDir(java.io.File workingDir)
workingDir
- the directory to invoke the JVM from.public void setJvm(java.lang.String jvm)
Runtime.exec()
.
jvm
- the new jvmpublic void setTimeout(java.lang.Integer value)
If the tests are running for more than this value, the tests will be canceled.
value
- the maximum time (in milliseconds) allowed before declaring the test as 'timed-out'public org.apache.tools.ant.types.Commandline.Argument createJvmarg()
public void addSysproperty(org.apache.tools.ant.types.Environment.Variable sysp)
public void addEnv(org.apache.tools.ant.types.Environment.Variable var)
public org.apache.tools.ant.types.Path createClasspath()
public org.apache.tools.ant.types.Path createBootclasspath()
public void setClasspath(org.apache.tools.ant.types.Path s)
s
- an Ant Path object containing the classpath.public void setClasspathRef(org.apache.tools.ant.types.Reference r)
r
- a reference to an existing classpathpublic void addXmlfileset(org.apache.tools.ant.types.FileSet fs)
public void setXmlfilesetRef(org.apache.tools.ant.types.Reference ref)
public void addClassfileset(org.apache.tools.ant.types.FileSet fs)
public void setClassfilesetRef(org.apache.tools.ant.types.Reference ref)
public void setTestNames(java.lang.String testNames)
public void setSuiteRunnerClass(java.lang.String s)
s
- the name of the suite runner classpublic void setSuiteName(java.lang.String s)
s
- the name of the suitepublic void setTestName(java.lang.String s)
s
- the name of the testpublic void setJUnit(boolean value)
public void setOutputDir(java.io.File dir)
dir
- the name of directorypublic void setTestJar(java.io.File s)
s
- the name of test jarpublic void setGroups(java.lang.String groups)
public void setExcludedGroups(java.lang.String groups)
public void setVerbose(java.lang.Integer verbose)
public void setReporter(java.lang.String listener)
public void setObjectFactory(java.lang.String className)
public void setTestRunnerFactory(java.lang.String testRunnerFactory)
public void setSuiteThreadPoolSize(java.lang.Integer n)
@Deprecated public void setListener(java.lang.String listener)
public void setListeners(java.lang.String listeners)
public void setMethodSelectors(java.lang.String methodSelectors)
public void setConfigFailurePolicy(java.lang.String failurePolicy)
public void setRandomizeSuites(java.lang.Boolean randomizeSuites)
public void setMethods(java.lang.String methods)
public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
protected java.util.List<java.lang.String> getSuiteFileNames()
protected void actOnResult(int exitValue, boolean wasKilled)
protected int executeAsForked(org.apache.tools.ant.types.CommandlineJava cmd, org.apache.tools.ant.taskdefs.ExecuteWatchdog watchdog)
cmd
- the command to executewatchdog
-
protected org.apache.tools.ant.types.CommandlineJava getJavaCommand()
CommandlineJava
.
protected org.apache.tools.ant.taskdefs.ExecuteWatchdog createWatchdog()
org.apache.tools.ant.BuildException
- under unspecified circumstancesprotected void validateOptions() throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
public void addConfiguredReporter(ReporterConfig reporterConfig)
public void setSkipFailedInvocationCounts(boolean skip)
public void addConfiguredPropertySet(org.apache.tools.ant.types.PropertySet sysPropertySet)
sysPropertySet
- A PropertySet of system properties.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |