Last updated June 26, 2009 19:35, by Jørgen Austvik
JET
Contents
Introduction
JET is a command line tool for running a simple test (consisting of test cases and test setups).
Parameters
$ java -jar jet/target/jet-1.0-SNAPSHOT.jar Usage: JET <xmlfile> [options] Options: -b <property_file> -c -v -runner <JETTestRunner class name>
| Option | Description |
|---|---|
| -b <property_file> | Give default properties to JET |
| -c | Just check the XML file for errors (normally illegal binding values) |
| -v | Verbose output |
| -runner <JETTestRunner class name> |
Running your first test
This example describes how you run your first JET test, which is one of the simple examples in the jet-examples module.
Preparations
First you must build the JET framework, see e.g. BuildOpenSolaris for instructions on how to build it.
Starting the test
Now you are ready to run the test.
$ cd jet~framework/jet-example
$ java -cp "../jet/target/jet-1.0-SNAPSHOT.jar:target/jet-examples-1.0-SNAPSHOT.jar" \
com.sun.jet.framework.engine.JET src/test/jet/example_test.xml
This starts Java with both jet.jar (for the JET engine) and jet-examples.jar (for the example tests) in the classpath, and runs com.sun.jet.framework.engine.JET with src/test/jet/example_test.xml as parameter (the test name).
Analyzing the output
In the console where you started JET you should now see something like:
2 subtests succeeded: 1) testHelloWorld(com.sun.jet.examples.SimpleJetTestCase): 0 min 0 sec 2) com.sun.jet.framework.TestSetup: 0 min 0 sec Total time: 0,265 s Success
You should also have some .log files:
- jet0.0.log should contain the most detailed output from JET, for this test it should contain something like:
23/06 22:57:29.843 INFO Thr{0012} SimpleJetTestCase.testHelloWorld: Hello Log!
- jetINFO0.0.log contains less verbose output
- jetLOAD0.0.log should not contain anything, but will contain output from load tests when you run them





