Setup > Ant Task

The following three steps are required to use Ekstazi Ant task in a project's build.xml file.

Add namespace definitions to project element:

<project ... xmlns:ekstazi="antlib:org.ekstazi.ant">

Add new Ekstazi task definition:

<taskdef uri="antlib:org.ekstazi.ant" resource="org/ekstazi/ant/antlib.xml">
  <classpath path="org.ekstazi.core-5.2.0.jar"/> 
  <classpath path="org.ekstazi.ant-5.2.0.jar"/> 
</taskdef>

Wrap existing junit target elements in Ekstazi select:

<ekstazi:select>
  <junit fork="true" ...>
  ...
  </junit>
</ekstazi:select>

Note that JUnit task has to declare "fork" to be true, otherwise the build will fail. This is required, as Ekstazi needs to pass additional options to JVM. However, "forkmode" can be set to any value (see JUnit Ant task), e.g., "once".

Ekstazi Ant task currently supports "fileset" and "multirootfileset" resource collection inside "batchtest", which are the most common cases.

Optional Attributes

AttributeDescriptionSinceDefault
forcefailing If true, tests that were failing in their latest runs will be run even if not affected by changes 4.1.0 false
skipme If true, tests will run without Ekstazi 4.1.0 false