Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Overview

This document refers to the demo that ships with XHarness. When you download XHarness, you can find the demo in the "demo" subdirectory.

The XHarness task definitions

In order to use any of the XHarness tasks and types in your ant build file, you have to declare their names and the classes that implement them. For this, the xharness.jar ships with two properties files, that do this for you. To load the properties files ad the following to your build.xml:

Code Block
xml
<project name="foo" default="build">
    <path id="xharness.lib">
        <fileset>
          <include name="path/to/xharness*.jar"/>
        </fileset>
        <pathelement path="${java.class.path}"/>
    </path>

    <taskdef resource="xharnesstasks.properties" classpathref="xharness.lib" loaderref="xharness.loader"/>
    <typedef resource="xharnesstypes.properties" classpathref="xharness.lib" loaderref="xharness.loader"/>

     <!-- ... -->

</project>

Alteratively, you can copy the xharness.jar into the lib directory of your ant installation and then include the task definitions like this:

Code Block
xml
<project name="foo" default="build">
    <taskdef resource="xharnesstasks.properties"/>
    <typedef resource="xharnesstypes.properties"/>

    <!-- ... -->

</project>

Or you include the file etc/xharness.xml as an XML entity:

Code Block
xml
<?xml version="1.0"?>
<!DOCTYPE project [
  <!ENTITY xharness SYSTEM "file:/path/to/etc/xharness.xml">
]>

<project name="foo" default="build">

    &xharness;

    <!-- ... -->

</project>

The XHarness test descriptors

...coming soon...

Running the demo

To run the demo, simply run the ant build file:

Code Block
ant demo

The result

Once you've run the demo, the aggegated HTML result is located in the directory demo/results/latest/html.

It will look look like this.