class
ScalaTestAntTask extends Task
Instance Constructors
-
new
ScalaTestAntTask()
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
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
addConfiguredStyle(style: StyleElement): Unit
-
def
addConfiguredSuite(suite: SuiteElement): Unit
-
def
addConfiguredTagsToExclude(tagsToExclude: TextElement): Unit
-
def
addConfiguredTagsToInclude(tagsToInclude: TextElement): Unit
-
def
addConfiguredTest(test: TestElement): Unit
-
def
addConfiguredTestNGSuites(testNGSuitePath: Path): Unit
-
def
addConfiguredTestsfile(testsfile: TestsfileElement): Unit
-
def
addConfiguredWildcard(wildcard: PackageElement): Unit
-
final
def
asInstanceOf[T0]: T0
-
final
def
bindToOwner(arg0: Task): Unit
-
def
buildArgsList: List[String]
-
def
clone(): AnyRef
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
execute(): Unit
-
def
finalize(): Unit
-
final
def
getClass(): 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
-
final
def
isInstanceOf[T0]: Boolean
-
final
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
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
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
setSortSuites(sortSuites: Boolean): Unit
-
def
setSpanScaleFactor(spanScaleFactor: Double): Unit
-
def
setStyle(style: String): Unit
-
def
setSuffixes(suffixes: String): Unit
-
def
setSuite(suite: SuiteElement): Unit
-
def
setTagsToExclude(tagsToExclude: String): Unit
-
def
setTagsToInclude(tagsToInclude: String): Unit
-
def
setTaskName(arg0: String): Unit
-
def
setTaskType(arg0: String): Unit
-
def
setTestNGSuites(testNGSuitePath: Path): Unit
-
def
setTestsfile(testsfile: String): Unit
-
def
setWildcard(packageName: String): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from Task
Value Members
-
final
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
-
final
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
-
final
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
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from Any
Value Members
-
final
def
asInstanceOf[T0]: T0
-
final
def
isInstanceOf[T0]: Boolean
Ungrouped
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
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
addConfiguredStyle(style: StyleElement): Unit
-
def
addConfiguredSuite(suite: SuiteElement): Unit
-
def
addConfiguredTagsToExclude(tagsToExclude: TextElement): Unit
-
def
addConfiguredTagsToInclude(tagsToInclude: TextElement): Unit
-
def
addConfiguredTest(test: TestElement): Unit
-
def
addConfiguredTestNGSuites(testNGSuitePath: Path): Unit
-
def
addConfiguredTestsfile(testsfile: TestsfileElement): Unit
-
def
addConfiguredWildcard(wildcard: PackageElement): Unit
-
final
def
asInstanceOf[T0]: T0
-
final
def
bindToOwner(arg0: Task): Unit
-
def
buildArgsList: List[String]
-
def
clone(): AnyRef
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
execute(): Unit
-
def
finalize(): Unit
-
final
def
getClass(): 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
-
final
def
isInstanceOf[T0]: Boolean
-
final
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
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
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
setSortSuites(sortSuites: Boolean): Unit
-
def
setSpanScaleFactor(spanScaleFactor: Double): Unit
-
def
setStyle(style: String): Unit
-
def
setSuffixes(suffixes: String): Unit
-
def
setSuite(suite: SuiteElement): Unit
-
def
setTagsToExclude(tagsToExclude: String): Unit
-
def
setTagsToInclude(tagsToInclude: String): Unit
-
def
setTaskName(arg0: String): Unit
-
def
setTaskType(arg0: String): Unit
-
def
setTestNGSuites(testNGSuitePath: Path): Unit
-
def
setTestsfile(testsfile: String): Unit
-
def
setWildcard(packageName: String): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
An ant task to run ScalaTest. Instructions on how to specify various options are below. See the main documentation for object
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:Note that you only need the
scala-actors.jar
if you are using ScalaTest version 1.9.1 or earlier with Scala 2.10 or later. Once defined, you use the task by specifying information in ascalatest
element:You can place key value pairs into the config map 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
memory
junitxml
html
stdout
stderr
reporterclass
Each may include a
config
attribute to specify the reporter configuration. Typesfile
,memory
,junitxml
,html
, andreporterclass
require additional attributes (the css attribute is optional for the html reporter):Specify tags to include and/or exclude using
<tagsToInclude>
and<tagsToExclude>
elements, like this:Tags to include or exclude can also be specified using attributes tagsToInclude and tagsToExclude, with arguments specified as whitespace- delimited lists.
To specify suites to run, use either a
suite
attribute or nested<suite>
elements:or
To specify tests to run, use nested
<test>
elements with either a 'name' or 'substring' attribute: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
suffixes="[pipe-delimited list of suffixes]"
to specify that only classes whose names end in one of the specified suffixes should be included in discovery searches for Suites to test. This can be used to improve discovery time or to limit the scope of a test. E.g.:Use attribute
testsfile="[file name]"
or nested <testsfile> elements to specify files containing a list of tests to be run. This is used to rerun failed/canceled tests listed in files written by the memory reporter. E.g.: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 optionalsortSuites
attribute to request that events be sorted on-the-fly so that events for the same suite are reported together, with a timeout, (e.g.,sortSuites="true"
), and 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: