Skip to main content

Version: 17.10 (EOL)

app-test

The app-test task runs automated integration tests for a given application package.

Task Structure

The structure of the app-test task element is shown below.

<app-test ... >
<fileset dir=... >
<include name=... />
</fileset>
</app-test>

The fileset element is an Ant FileSet. For detailed information, see FileSet Type - Apache Ant.

Task Attributes

All attributes are optional unless otherwise indicated.

The app-test element recognises the following attributes.

AttributeDescription
appFileString

Required. The application package archive ZIP file.

logOnErrorBoolean

Whether to log output execution if a test failure occurs to the console. The default value is true.

consoleLoggingBoolean

Whether to log all test execution output to the console. The default value is false.

The fileset element recognises the following attributes.

AttributeDescription
dirString

Required. The directory containing the test suite JSON definition files.

The include element recognises the following attributes.

AttributeDescription
nameString

Required. A file name or file mask identifying the test suite JSON definition files.

The test suite files are located in the directory specified by the dir attribute of the containing fileset element.

Example

The example Ant task below runs the application package integration tests specified in the fileset element. If any tests fail, a BuildException is thrown.

<app-test appfile="${basedir}/${app.zip.file}"
logOnError="true"
consoleLogging="false" >
<fileset dir="${basedir}/src/tests/">
<include name="*test-suite-*.json"/>
</fileset>
</app-test>

Example Ant log output:

app-package-test:
[app-test] Completed Test: Form Page 1
[app-test] Completed Test: Submit Form
BUILD SUCCESSFUL
Total time: 2 seconds