GlassFish Developer TestingThe GlassFish project provides several frameworks for implementing developer-level tests:
These frameworks (plus a few others) have been used to implement many developer-level tests, as listed in this dashboard. Build-time TestsThe Junit framework is used to implement tests that are run at compile time. Build-time tests generally perform quick testing of a relatively independent class. These are classical "unit tests". Any hk2-jar or jar maven module importing hk2 can use dependency injection in the Junit tests. TBD - need a good example of how to implement build-time tests. A "mvn install" command runs the build-time tests by default. To skip the build-time tests, the "-Dmaven.test.skip=true" option can be added to the command line. QuickLookThe QuickLook tests can and should be run after a complete build before checking in any changes. These tests operate on an installation of GlassFish. Instructions for running the QuickLook tests are in the workspace at tests/quicklook/QuickLook_Test_Instructions.html. DevtestsThe Devtests are a more in depth set of tests that are typically run by a hudson job, but they can be run manually as well. These tests exercise more of the system than the QuickLook tests. Here is some information about Devtests:
The Devtests are based on an ant and Java framework. Actual tests are written in Java and ant is used to control the running of the tests. |