Regression Test Harness for the OpenJDK platform: jtreg
jtreg
is the test harness used by the OpenJDK test
framework. This framework is intended primarily for regression
tests. It can also be used for unit tests, functional tests, and
even simple product tests -- in other words, just about any type of
test except a conformance test, which belong in a TCK.
Bundles
See the jtreg download page to download the jtreg source or binary bundles.
Documentation
- Installing the jtreg harness
- Download the binary bundle for the jtreg harness and unzip it, or you can build jtreg from source.
- Running the unit and regression tests
- Add the appropriate
jtreg-dir
/
platform/bin
directory to your execution path. - Make sure that you have JDK version 5 or greater on your execution path. Alternatively, you can set the environment variable JT_JAVA to a location containing JDK version 5 or later. This will be used to run jtreg, and need not be the same as the version of JDK you wish to test.
- To execute one or more tests for a particular build of JDK, you
can go
% jtreg -jdk:test-jdk test-or-folder...
If you have built a component of JDK such as the compiler (javac), you may be able to test it in conjunction with a complete JDK by putting the new component on the bootstrap classpath:% jtreg -jdk:jdk -Xbootclasspath/p:component.jar test-or-folder...
For info on the available options, use the-help
option. To read the online help, use the-onlineHelp
command line option, or start jtreg with the-gui
option, and use theHelp
menu. - Instead of using the startup scripts provided, you can also
execute the
jtreg.jar
file directly, or you can run jtreg from Ant. See the online help for details.
- Add the appropriate
jtreg-dir
- Tag specification
- jtreg FAQ
Community
- Mailing Lists
- jtreg Bloggers