OSS/J TCK |
OSS/J Technology Compatibility Kit (TCK)
This document describes how to utilize the OSS/J TCK in conjunction with the Application Server.
This application document contains the following sections:
Overview
The following instructions describe how to run the TCK.
Note: In the following, no file name extension for the scripts will be named. UNIX scripts will have extension '.sh', Windows scripts have the extension '.bat'. The scripts themselves are named identically for Windows and UNIX.
Setting up the environment
In order to successfully run the TCK, the <install_dir>/scripts/env_j2eesdk script has to be configured:
Property
Description
Windows Default
Unix Default
AS_HOME
The installation directory of the J2EESDK.
C:\Sun\Appserver
~/SUNWappserver
HOSTNAME
The hostname of the server
localhost
localhost
PORTNUMBER
The port of the application server
3700
3700
INTEGRATION_PROFILE
The integration profile of the applicaition to test
java|xml
java|xml
Download and copy (and rename) junit.jar (v 3.8.1 or later) into the <install_dir>/lib/junit-3.8.1.jar directory from JUnit
Note: if another version than 3.8.1 of Junit is used, the variable JUNIT needs also to be updated accordingly.
The client library for the deployed application shall be created using the following instructions:
- Goto the library directory of the tck bundle: cd lib
- Create a temporary directory: mkdir tmp and cd tmp
- Retrieve the archive containing the client files:
- Generate the password file needed for the command line:
> cd %AS_HOME%\samples\quickstart > asant setpassword- return to the lib\tmp directory: cd E:\oss_common_javaeesdk-1_4-tck\lib\tmp
- Execute: asadmin get-client-stubs --user admin --passwordfile E:\Sun\AppServer\samples\password.txt --appname common_ex .
- Extract and repackage the client jar:
- jar xvf common_exClient.jar
- jar xvf common_ex_EJB.jar
- jar xvf common_ex_WS.jar
- jar xvf common_ex_vpn_WS.jar
- del /S /Q *.jar *.dbschema META-INF
- rmdir /S /Q META-INF
- jar cvf ..\common_exClient.jar com javax org ossj
- cd ..
- rmdir /S /Q tmp
TCK Properties Setting :
The <install_dir>/scripts directory contains property files with parameters used by the TCK during testing.The property file is named tck_properties.txt. Edit this file and change the properties accordingly to the implementation to be tested. The files, named *_tck_properties.txt are provided as example to test other OSS/J implementations than the OSS Common RI.
The script generate_jvtSessionList_j2eesdk.* can be run first to help in the customization of the section "JVT information" in the tck_properties.txt. It will introspect your <jar_name> file and produce for example the following lines:
# --------- Customization begin--------- # from jar_name = ../lib/common_exClient.jar # For each following Home, you have to provided, its JNDI name. ossj.common.ex.VpnServiceRemote_HOME="<class name of the corresponding home interface>" ossj.common.ex.VpnServiceRemote_JNDINAME="<JNDI name>" # --------- Customization end ---------
Runing the TCK
From <install_dir>/scripts
directory, select one of the following aproaches to run the TCK:
tck_complete_j2eesdk
runs the TCK in blackbox mode and generates a test report file name tckResult.txt and tcklog.txt
tck_func_*_j2eesdk
runs the functional tests of the TCK.The two following scripts can use different JUnit starters
*_gui_j2eesdk
invokes the SWING GUI of JUnit. This is easier to use, especially to repeat single test cases, but has some classloading problems under some circumstances.*_text_j2eesdk
invokes the text ui of JUnit: simple and straight-forward to use.Additional Information
For more information how to use the TCK and how it is designed, take a look at the documentation for the earlier versions of the TCK:
Note: To run the TCK from a remote machine, the following needs to be checked:
- the remote machine (TCK) shall have similar version of the installed Application Server
- the server host name shall be customized in the env_j2eesdk.* scripts and tck_properties.txt
- the *Client.jar client archive generated at deployment shall be copied from the server location to the TCK location and the env_j2eesdk.* shall be updated accordingly.
Copyright © 2002-2006 The Members of the OSS through JavaTM Initiative. All Rights Reserved. Use is subject to license terms.