class
ScalaTestAntTask
extends Task
Instance Constructors
-
new
ScalaTestAntTask
()
Value Members
-
def
!=
(arg0: AnyRef): Boolean
-
def
!=
(arg0: Any): Boolean
-
def
##
(): Int
-
def
==
(arg0: AnyRef): Boolean
-
def
==
(arg0: Any): Boolean
-
def
addConfiguredConfig
(config: NameValuePair): Unit
-
def
addConfiguredJvmArg
(arg: JvmArg): Unit
-
def
addConfiguredMembersOnly
(membersonly: PackageElement): Unit
-
def
addConfiguredReporter
(reporter: ReporterElement): Unit
-
def
addConfiguredRunpath
(runpath: Path): Unit
-
def
addConfiguredRunpathUrl
(runpathurl: RunpathUrl): Unit
-
def
addConfiguredSuite
(suite: SuiteElement): Unit
-
def
addConfiguredTagsToExclude
(tagsToExclude: TextElement): Unit
-
def
addConfiguredTagsToInclude
(tagsToInclude: TextElement): Unit
-
def
addConfiguredTestNGSuites
(testNGSuitePath: Path): Unit
-
def
addConfiguredWildcard
(wildcard: PackageElement): Unit
-
def
asInstanceOf
[T0]
: T0
-
def
bindToOwner
(arg0: Task): Unit
-
def
clone
(): AnyRef
-
def
eq
(arg0: AnyRef): Boolean
-
def
equals
(arg0: Any): Boolean
-
def
execute
(): Unit
-
def
finalize
(): Unit
-
def
getClass
(): java.lang.Class[_]
-
def
getDescription
(): String
-
def
getLocation
(): Location
-
def
getOwningTarget
(): Target
-
def
getProject
(): Project
-
def
getRuntimeConfigurableWrapper
(): RuntimeConfigurable
-
def
getTaskName
(): String
-
def
getTaskType
(): String
-
def
getWrapper
(): RuntimeConfigurable
-
def
handleErrorFlush
(arg0: String): Unit
-
def
handleErrorOutput
(arg0: String): Unit
-
def
handleFlush
(arg0: String): Unit
-
def
handleInput
(arg0: Array[Byte], arg1: Int, arg2: Int): Int
-
def
handleOutput
(arg0: String): Unit
-
def
hashCode
(): Int
-
def
init
(): Unit
-
def
isInstanceOf
[T0]
: Boolean
-
def
isInvalid
(): Boolean
-
def
log
(arg0: String, arg1: Throwable, arg2: Int): Unit
-
def
log
(arg0: Throwable, arg1: Int): Unit
-
def
log
(arg0: String, arg1: Int): Unit
-
def
log
(arg0: String): Unit
-
def
maybeConfigure
(): Unit
-
def
ne
(arg0: AnyRef): Boolean
-
def
notify
(): Unit
-
def
notifyAll
(): Unit
-
def
perform
(): Unit
-
def
reconfigure
(): Unit
-
def
setDescription
(arg0: String): Unit
-
def
setFork
(fork: Boolean): Unit
-
def
setHaltonfailure
(haltonfailure: Boolean): Unit
-
def
setLocation
(arg0: Location): Unit
-
def
setMaxmemory
(max: String): Unit
-
def
setMembersonly
(packageName: String): Unit
-
def
setNumthreads
(numthreads: Int): Unit
-
def
setOwningTarget
(arg0: Target): Unit
-
def
setParallel
(parallel: Boolean): Unit
-
def
setProject
(arg0: Project): Unit
-
def
setRunpath
(runpath: Path): Unit
-
def
setRuntimeConfigurableWrapper
(arg0: RuntimeConfigurable): Unit
-
def
setSuite
(suite: String): Unit
-
def
setTaskName
(arg0: String): Unit
-
def
setTaskType
(arg0: String): Unit
-
def
setTestNGSuites
(testNGSuitePath: Path): Unit
-
def
setWildcard
(packageName: String): Unit
-
def
synchronized
[T0]
(arg0: ⇒ T0): T0
-
def
toString
(): String
-
def
wait
(): Unit
-
def
wait
(arg0: Long, arg1: Int): Unit
-
def
wait
(arg0: Long): Unit
-
def
addConfiguredExcludes
(excludes: TextElement): Unit
-
def
addConfiguredIncludes
(includes: TextElement): Unit
-
def
addConfiguredProperty
(property: NameValuePair): Unit
-
def
setConcurrent
(concurrent: Boolean): Unit
Inherited from Task
Value Members
-
def
bindToOwner
(arg0: Task): Unit
-
def
getOwningTarget
(): Target
-
def
getRuntimeConfigurableWrapper
(): RuntimeConfigurable
-
def
getTaskName
(): String
-
def
getTaskType
(): String
-
def
getWrapper
(): RuntimeConfigurable
-
def
handleErrorFlush
(arg0: String): Unit
-
def
handleErrorOutput
(arg0: String): Unit
-
def
handleFlush
(arg0: String): Unit
-
def
handleInput
(arg0: Array[Byte], arg1: Int, arg2: Int): Int
-
def
handleOutput
(arg0: String): Unit
-
def
init
(): Unit
-
def
isInvalid
(): Boolean
-
def
log
(arg0: String, arg1: Throwable, arg2: Int): Unit
-
def
log
(arg0: Throwable, arg1: Int): Unit
-
def
log
(arg0: String, arg1: Int): Unit
-
def
log
(arg0: String): Unit
-
def
maybeConfigure
(): Unit
-
def
perform
(): Unit
-
def
reconfigure
(): Unit
-
def
setOwningTarget
(arg0: Target): Unit
-
def
setRuntimeConfigurableWrapper
(arg0: RuntimeConfigurable): Unit
-
def
setTaskName
(arg0: String): Unit
-
def
setTaskType
(arg0: String): Unit
Inherited from ProjectComponent
Value Members
-
def
clone
(): AnyRef
-
def
getDescription
(): String
-
def
getLocation
(): Location
-
def
getProject
(): Project
-
def
setDescription
(arg0: String): Unit
-
def
setLocation
(arg0: Location): Unit
-
def
setProject
(arg0: Project): Unit
Inherited from AnyRef
Value Members
-
def
!=
(arg0: AnyRef): Boolean
-
def
##
(): Int
-
def
==
(arg0: AnyRef): Boolean
-
def
eq
(arg0: AnyRef): Boolean
-
def
equals
(arg0: Any): Boolean
-
def
finalize
(): Unit
-
def
getClass
(): java.lang.Class[_]
-
def
hashCode
(): Int
-
def
ne
(arg0: AnyRef): Boolean
-
def
notify
(): Unit
-
def
notifyAll
(): Unit
-
def
synchronized
[T0]
(arg0: ⇒ T0): T0
-
def
toString
(): String
-
def
wait
(): Unit
-
def
wait
(arg0: Long, arg1: Int): Unit
-
def
wait
(arg0: Long): Unit
Inherited from Any
Value Members
-
def
!=
(arg0: Any): Boolean
-
def
==
(arg0: Any): Boolean
-
def
asInstanceOf
[T0]
: T0
-
def
isInstanceOf
[T0]
: Boolean
An ant task to run ScalaTest. Instructions on how to specify various options are below. See the scaladocs for the
Runner
class for a description of what each of the options does.To use the ScalaTest ant task, you must first define it in your ant file using
taskdef
. Here's an example:Once defined, you use the task by specifying information in a
scalatest
element:You can place key value pairs into the
configMap
using nested<config>
elements, like this:You can specify a runpath using either a
runpath
attribute and/or nested<runpath>
elements, using standard ant path notation:or
To add a URL to your runpath, use a
<runpathurl>
element (since ant paths don't support URLs):You can specify reporters using nested
<reporter>
elements, where thetype
attribute must be one of the following:graphic
file
junitxml
stdout
stderr
reporterclass
Each may include a
config
attribute to specify the reporter configuration. Typesfile
,junitxml
andreporterclass
require additional attributesfilename
,directory
, andclassname
, respectively:Specify tags to include and/or exclude using
<tagsToInclude>
and<tagsToExclude>
elements, like this:To specify suites to run, use either a
suite
attribute or nested<suite>
elements:or
To specify suites using members-only or wildcard package names, use either the
membersonly
orwildcard
attributes, or nested<membersonly>
or<wildcard>
elements:or
or
Use attribute
parallel="true"
to specify parallel execution of suites. (If theparallel
attribute is left out or set to false, suites will be executed sequentially by one thread.) Whenparallel
is true, you can include an optionalnumthreads
attribute to specify the number of threads to be created in thread pool (e.g.,numthreads="10"
).Use attribute
haltonfailure="true"
to cause ant to fail the build if there's a test failure.Use attribute
fork="true"
to cause ant to run the tests in a separate process.When
fork
istrue
, attributemaxmemory
may be used to specify the maximum memory size that will be passed to the forked jvm. For example, the following setting will cause"-Xmx1280M"
to be passed to the java command used to run the tests.When
fork
is true, nested<jvmarg>
elements may be used to pass additional arguments to the forked jvm. For example, if you are running into 'PermGen space' memory errors, you could add the followingjvmarg
to bump up the JVM'sMaxPermSize
value: