blob: e526b6b95461bb988a2be56f7bddab86aef02cd9 [file] [log] [blame]
The tests under jdbc/v3 are run only on web profile (v3/distributions/web/target/web.zip).
Set environment :
export APS_HOME=<appserv-tests> directory
export S1AS_HOME=<GlassFish Installation> directory
$S1AS_HOME/bin/asadmin start-domain domain1
cd $APS_HOME/devtests/jdbc/v3
Execute the script : setup-jdbc-dev-tests.sh
Description of Components:
SetDerbyAuthentication.java
----------------------------
This is a Java class that executes a Callable Statement for enabling authentication for the database used in
JDBC devtests pools for Embedded Derby mode. Since the Devtests run using the Embedded Derby, executing this
file is necessary. Some of the tests require only some users to be authenticated and some others not. Another
Callable Statement is also executed in this file for this purpose.
Some properties might need a change in this file, in the initializeDataSource() method, like databaseName,
userName and password. They should correspond to the pool properties. "sun-appserv-samples" is the databaseName
used in this file and in the pool configuration. Th requireAuthentication property would be specified inside this
database.
Make sure that the database (path/directory) specified in this .java file is the one that will be used by appserver
setup-jdbc-dev-tests.sh
-----------------------
Script used to run the devtests manually. The script does jobs like starting domain, creating
required pools for various tests, creating JDBC resources for the various tests, deploying the
war that contains the tests and generating the output html file.
Embedded Derby is used for all the tests. This script assumes that "firefox", "javac", "java", "GET" and
"wget" are on the system path.
Before running this script, a "build" is required to be done on the project "v3_jdbc_dev_tests" to generate a war.
unsetup-jdbc-dev-tests.sh
-------------------------
Script used to unset the configurations created for the JDBC devtests. Jobs like undeploying the war file, deleting
the connection pools and jdbc resources and stopping the domain are done in this script.
Before running this script, make sure the domain is up and running.
Overall description
-------------------
The JDBC devtests included in the project named "v3_jdbc_dev_tests" include the following tests:
- Application Authentication Test
- Connection Leak Tracing Test
- Connection Sharing Test
- Container Authentication Test
- Leak Test
- Mark Connection as bad Test
- Max Connection Usage Test
- Multiple Connection Close Test
- Multiple User Credentials Test
- NoTx Connection Test
- Statement Timeout Test
- UserTx Test
- Associate with thread connection pool test
- Reconfig tests for JDBC Connection Pool/ JDBC Resource
TestResultServlet.java is responsible for listing the test results on a html page.
HtmlUtil.java prints the exceptions (if any) on the result page.
TablesUtil.java creates/deletes tables necessary for the devtests.
This module does not need the startup of Derby manually since it is used in Embedded mode.