| Tim Quinn
This page describes a very early implementation of using TestNG to
drive developer tests. (This is in addition to the long-standing
ant-based testing framework that has been used in GlassFish for a
long time.) We have a limited – but growing – set of
tests working with TestNG. We invite you to look at what we've done,
run it, comment on it, and contribute to it. There are several areas
of GlassFish in which TestNG tests are working today. Because of
differences in the specific areas and those of us who have worked on
the TestNG tests so far, you'll see some differences in style and in
how to run the tests. Of course, one of our goals will be to unify
the approach to writing and running the tests. In the meantime,
please do the following:
Check out the GlassFish workspace
including the appserv-tests section - or update your workspace if
you already have one. Set your environment as described in
https://glassfish.dev.java.net/public/GuidelinesandConventions.html#Quicklook_Tests
Please note that the appserv-tests/lib/testng.jar file is a copy of testng-4.7-jdk15.jar downloaded from
http://www.testng.org.
TestNG tests currently work or are
under active development in following areas: admin,
connector, CORBA,
deployment, ejb,
and web.
Admin
Tests
Run
ant run-tests-ng in any of
these directories:
CORBA Tests Run ant all in any of these directories:
Deployment Tests Run ant -f
${APS_HOME}/devtests/deployment/build-ng.xml in any of these
directories:
Java Persistence API (JPA) Integration Tests Start bundled JavaDB?. Then run ant in any of these directories:
Web Tests Run ant -f build-ng.xml all in any of
these directories:
${APS_HOME}/devtests/web/jspResourceInjectionTagHandler
${APS_HOME}/devtests/web/sessionIdUrlRewrite
${APS_HOME}/devtests/web/tagPluginForEach
EJB Quicklook Tests Run ant -f build-ng.xml all in any of
these directories:
${APS_HOME}/sqetests/ejb/bmp/enroller
${APS_HOME}/sqetests/ejb/bmp/robean
${APS_HOME}/sqetests/ejb/cmp/roster
${APS_HOME}/sqetests/ejb/mdb/simple
${APS_HOME}/sqetests/ejb/ejb30/persistence/onetomany
${APS_HOME}/sqetests/ejb/ejb30/hello/session
This list will continue to expand.
For some of these new tests you will see output that is very
similar to the output from running the tests in the traditional way.
One difference you will see is that the ending results are displayed
by TestNG, which has managed the execution of the test from beginning
to end. TestNG places several output files in the test-output
subdirectory under the current default directory. Start by viewing
index.html with a browser and navigate using the left-hand panel for
more details.
Please keep in mind that this is an early
implementation. We welcome your feedback via the quality
alias and your participation. |