...
Technology | Where to Get It | Notes |
---|---|---|
Ant version 1.6.1 or later | http://ant.apache.org/ | Ant must Java 6 or later. Use the ant -diagnostics command to verify the version. |
ASM Java bytecode manipulation framework v3.1 | http://asm.objectweb.org/ | Required for compilation only and is not required at run time. |
JavaHelp software version 2.0_02 or later | http://javahelp.java.net | Specify a build variable in the JavaHelp software version 2.0_02 may be used, with the following minor limitation. On systems that have two separate displays (typically on X11 systems), the help viewer may default to the first screen, which may not be the screen on which you are running the harness. For example, if the harness is on screen :0.1, the help viewer appears on screen :0.0. |
Java SE version 6 or later | http://java.sun.com/javase/index.jsp | |
Java Communications 3.0 API | http://java.sun.com/products/javacomm/index.jsp | Currently, implementations are only available for Solaris SPARC, Solaris x86, and Linux x86. Required Optional for compilation only and is not required at run time. |
JUnit 4.4 library | http://junit.org | JUnit 4.5 has not been tested with JT harness and is therefore not supported. Required for compilation only and is not required at run time. |
Servlet libraries (javax.servlet ) | https://glassfish.dev.java.net | Required for compilation only and is not required at run time. Used for the compilation of include servlet.
|
...
- Set up and configure the Ant software.
- Download and install the Ant software.
- Set your execution path so that it contains the
ant
command. For example: ANT-dist-path/bin/ant
- Download and extract the remainder of the software listed in the Requirements section.
- Make
JTHarness/build
the current directory. - Edit the
JTHarness/build/local.properties
file.
- The
BUILD_DIR
property specifies where the build distribution is generated. You may change this as appropriate. If you leave the value undefined, a default location is created under the same parent directory as your working copy.Set a property namedjhalljar
that contains the path to the JavaHelp software jhall.jar library. - Set a property named
jhjar
that contains the path to the JavaHelp softwarejh.jar
library.Set a property namedjcommjar
to point to the Java Communications API JAR file (typically,comm.jar
). This is required for compilation even only if you are not using serial communications in your test suite. - Set a property named
servletjar
to point to the Java EE JAR file (javaee.jar
). This is required for compilation but is not required at run time. Alternate sources of thejavax.servlet
package can also be used. - Set a property named
bytecodelib
to include both path/asm-3.1.jar
and path/asm-commons-3.1.jar
. The paths are separated by a colon. This library is used for runtime identification of JUnit tests if required. This is a compile-time requirement, and is not needed at runtime unless you are using that section of the JT harness JUnit libraries. - Set a property named
junitlib
to point tojunit-4.4.jar
. This library is used to compile the JT harness JUnit library classes packaged injt-junit.jar
, not injavatest.jar
. It is a compile-time requirement, and is not needed at runtime unless you are using that section of the JT Harness JUnit libraries.Note: When assigning paths to the properties described in this section, use absolute path names and separate multiple items with a colon.
- Execute the
ant
command (see Additional Build Targets).
bundles/
-- Contains the generatedjtharness.zip
archive. This Zip archive contains the entire JT harness distribution including documentation, examples, and sample code. Note that the contents of the Zip bundle is extracted into the current directory.binaries/
-- Contains the entire unbundled distribution. It includes the binary and documentation files required to execute the JT harness. The JT harness binary (javatest.jar
) is generated into the following location:../../JTHarness-build/binaries/lib/javatest.jar
Run the JT Harness
You can run the JT Harness in the following ways:
- Specify the "run" target in the Ant build. For more information see Additional Build Targets.
- Run it from the command line:
% java -jar
path/javatest.jar
Refer to the sample test suites in the examples
directory to see how JT harness can be used in a test suite.
Additional Build Targets
The following additional targets are available. You might wish to identify these targets to your IDE (for example, NetBeans).
Build Target | Description |
---|---|
clean | Removes the entire build distribution directory. |
build | Creates and tests the build distribution. |
build-examples | Builds the example test suites packaged with the source. This target automatically builds the core harness first. |
javadoc | Creates the API documentation. |
test | Tests an existing build distribution. |
run | Runs the JT harness. |