Sets values from nested element config.
Sets value from nested element jvmarg.
Sets value from nested element membersonly.
Sets value from nested element reporter.
Sets value from nested element runpath.
Sets value from nested element runpathurl.
Sets value from nested element suite.
Sets value from nested element excludes.
Sets value from nested element tagsToInclude.
Sets value from nested element testngsuites.
Sets value from nested element wildcard.
Executes the task.
Executes the task.
Sets value of the fork attribute.
Sets value of the haltonfailure attribute.
Sets value of the maxmemory attribute.
Sets value of membersonly attribute.
Sets value of the numthreads attribute.
Sets value of the parallel attribute.
Sets value of the runpath attribute.
Sets value of the spanScaleFactor attribute.
Sets value of style attribute.
Sets value of the suffixes attribute.
Sets value of suite attribute.
Sets value of the testngsuites attribute.
Sets value of wildcard attribute.
Sets value from nested element excludes.
Sets value from nested element excludes.
The excludes attribute has been deprecated and will be removed in a future version of ScalaTest.
Please use the tagsToExclude attribute instead.
Please use tagsToExclude instead
Sets value from nested element includes.
Sets value from nested element includes.
The includes attribute has been deprecated and will be removed in a future version of ScalaTest.
Please use the tagsToInclude attribute instead.
Please use tagsToInclude instead
Sets values from nested element property.
Sets values from nested element property.
The property attribute has been deprecated and will be removed in a future version of ScalaTest.
Please use the config attribute instead.
Please use config instead
Sets value of the concurrent attribute.
Sets value of the concurrent attribute.
Note: The concurrent attribute has been deprecated and will be removed in a future version of ScalaTest.
Please use the parallel attribute instead.
Please use parallel instead
An ant task to run ScalaTest. Instructions on how to specify various options are below. See the scaladocs for the
Runnerclass 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:<path id="scalatest.classpath"> <pathelement location="${lib}/scalatest.jar"/> <pathelement location="${lib}/scala-library.jar"/> </path><target name="main" depends="dist"> <taskdef name="scalatest" classname="org.scalatest.tools.ScalaTestAntTask"> <classpath refid="scalatest.classpath"/> </taskdef>
<scalatest ... </target>
Once defined, you use the task by specifying information in a
scalatestelement:<scalatest ...> ... </scalatest>You can place key value pairs into the
configMapusing nested<config>elements, like this:<scalatest> <config name="dbname" value="testdb"/> <config name="server" value="192.168.1.188"/>You can specify a runpath using either a
runpathattribute and/or nested<runpath>elements, using standard ant path notation:or
<scalatest> <runpath> <pathelement location="serviceuitest-1.1beta4.jar"/> <pathelement location="myjini"/> </runpath>To add a URL to your runpath, use a
<runpathurl>element (since ant paths don't support URLs):<scalatest> <runpathurl url="http://foo.com/bar.jar"/>You can specify reporters using nested
<reporter>elements, where thetypeattribute must be one of the following:graphicfilejunitxmlstdoutstderrreporterclassEach may include a
configattribute to specify the reporter configuration. Typesfile,junitxmlandreporterclassrequire additional attributesfilename,directory, andclassname, respectively:<scalatest> <reporter type="stdout" config="FAB"/> <reporter type="file" filename="test.out"/> <reporter type="junitxml" directory="target"/> <reporter type="reporterclass" classname="my.ReporterClass"/>Specify tags to include and/or exclude using
<tagsToInclude>and<tagsToExclude>elements, like this:<scalatest> <tagsToInclude> CheckinTests FunctionalTests </tagsToInclude><tagsToExclude> SlowTests NetworkTests </tagsToExclude>
To specify suites to run, use either a
suiteattribute or nested<suite>elements:or
<scalatest> <suite classname="com.artima.serviceuitest.ServiceUITestkit"/>To specify suites using members-only or wildcard package names, use either the
membersonlyorwildcardattributes, or nested<membersonly>or<wildcard>elements:or
or
<scalatest> <membersonly package="com.artima.serviceuitest"/> <wildcard package="com.artima.joker"/>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
parallel="true"to specify parallel execution of suites. (If theparallelattribute is left out or set to false, suites will be executed sequentially by one thread.) Whenparallelis true, you can include an optionalnumthreadsattribute 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
forkistrue, attributemaxmemorymay 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
forkis 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 followingjvmargto bump up the JVM'sMaxPermSizevalue: