TCK7Guide
Information provided in this document will guide you on how to set up and run the TCK 7 with WildFly 8.
(for TCK5, see instead TCK5Guide)
(for TCK6, see instead TCK6Guide)
Setting Up the Environment
Obtaining TCK and JavaEE 7 RI
Java EE 7 CTS and Reference Implementation zip distributions have been commited to the internal SVN repository accessible through the JBoss LDAP UserId/Pwd.
The official releases of the drops can be found in the following repo:
- August 2013 Release:
- Java EE 7 CTS
- Java EE 7 Reference Implementation
- Full Profile Binary
- Web Profile Binary
- RI Source:
- Checkout TCK7 bundle
The Java EE 7 CTS has been unpacked and can be obtained by performing a svn checkout. This repository includes the CTS porting package to run against WildFly in addition to any patches received for our test challenges. Using this repository will guarantee you are running the latest updates.
- svn co https://svn.devel.redhat.com/repos/jboss-tck/tck7/trunk/
- Alternatively, you can obtain a built zip of the EE 7 TCK package from here.
Obtaining WildFly 8
WildFly 8 is an implementation of the Java EE 7 Platform Specification.- Set up WildFly 8 as outlined in Hacking on WildFly
- ./build.sh install
Environmental Configuration Considerations
- Configure /etc/hosts (linux users)
- Make sure your /etc/hosts contain the following record:
- 127.0.0.1 localhost localhost.localdomain
- Set Local Environment Variables
- Set TS_HOME environment variable to the directory where the tck7 has been checked out
- Set JBOSS_HOME to the WildFly installation selected above
- Set JAVAEE_HOME to $JBOSS_HOME
- Set JAVAEE_HOME_RI to Java EE 6 RI (e.g., /opt/glassfishv4/glassfish)
- Set JAVA_HOME to your JDK 7 installation.
- Set DERBY_HOME $JAVAEE_HOME_RI/../javadb
- Set ANT_HOME $TS_HOME/tools/ant.
- Configure /etc/hosts (linux users)
Configure WildFly to run the CTS
- Build the porting package
- cd $TS_HOME/jee7tck-mods
- Do step 1 or step 2
- Step 1
- Copy ant.properties.example to ant.properties.
- Edit ant.properties to provide the correct settings for your environment.
- Or Step 2 (this should be easier)
- Step 1
The EE 7 TCK has two modes of certification which is determined by the ts.jte property: javaee.level. This determines the level of Java EE support for the implementation under test and is relevant to archive deployments - whether EARs are supported. The values for this property are:
- full - for full Java EE Platform support (all required tests exclusive of optional technology tests)
- web - for Java EE Web Profile
To set up the TCK environment for JavaEE full profile certification:
- ant -Dprofile=full
For Web profile certification:
- ant -Dprofile=web
If no argument is specified, the default is 'full'. If you need to switch javaee.level, this property can be manually edited in the ts.jte file after the TCK configuration is performed.
To clean jee7tck-mods environment, execute: ant clean. Reissue commands above for appropriate certification level to rebuild the porting package and pick up any changes to be applied to the server.
- Copy the CTS configuration files to WildFly
- cd $TS_HOME/bin
- ant config.vi
- Start JavaDB
- cd $DERBY_HOME/bin
- ./setNetworkServerCP
- ./startNetworkServer -noSecurityManager &
- cd $DERBY_HOME/bin
- Initialize the Tables needed for the CTS
- cd $TS_HOME/bin
- ant init.derby
- ant init.derby
- cd $TS_HOME/bin
Build the ejb30 special cases
- cd $TS_HOME/bin
- ant configure.datasource.tests
- Build reverse tests
JAXWS and JWS tests require that the reverse tests are built prior to execution.- cd $TS_HOME/src/com/sun/ts/tests/jaxws
- ant -Dts.home=$TS_HOME -Dbuild.vi=true clean build
- cd $TS_HOME/src/com/sun/ts/tests/jws
- ant -Dts.home=$TS_HOME -Dbuild.vi=true clean build
- cd $TS_HOME/src/com/sun/ts/tests/jaxws
- Build webservice special cases
Some tests in webservices12 module require an additional build phase:
- cd $TS_HOME/bin
- ant -Dbuild.vi=true build.special.webservices.clients
- Preparing to run JavaMail tests
- Optionally stop other local processes that use mail server port
- systemctl stop sendmail.service
- Clone s1as.xml configuration from RI
- cp bin/xml/impl/glassfish/s1as.xml bin/xml/impl/wildfly/s1as.xml
- cp bin/xml/impl/glassfish/common.xml bin/xml/impl/wildfly/common.xml
- cp bin/xml/impl/glassfish/deploy.xml bin/xml/impl/wildfly/deploy.xml
- Set mail server settings in ts.jte
- mailHost=localhost
- mailuser1=nobody
- mailFrom=nobody@localhost
- javamail.password="password"
- Build porting package
- cd $TS_HOME/jee7tck-mods
- ant clean
- ant
- Start mail server
- sudo java -jar target/jbcts-greenmail-1.0-SNAPSHOT-jar-with-dependencies.jar
- cd $TS_HOME/bin
- ant clearMailbox
- ant populateMailbox
- Optionally stop other local processes that use mail server port
- Preparing to run JAX-RS tests
- cd $TS_HOME/bin
- ant update.jaxrs.wars
Start RI (required for Interop tests only)
- cd $TS_HOME/bin
- ant config.ri
NOTE: WildFly should be started after the RI. The config.ri command updates the RI configuration and will result in port conflicts till those changes are applied.
Start WildFly using the CTS configuration
- cd $JBOSS_HOME/bin
- ./standalone.sh
Make sure you actually cd into the bin/ folder before starting the server. Failure to do so will give you a bunch of FileNotFoundExceptions trying to resolve paths starting with ../standalone!
Running the TCK Tests
- Full Profile Certification
It is recommended to run the tests from the top-level of the technology area under test as shown in the example below.
- cd $TS_HOME/src/com/sun/ts/tests/technology-to-test
- ant -Dkeywords="(javaee) & !(ejbembed_vehicle)" runclient
NOTE: The use of the keyword "javaee" indicates to run all the "required" tests for EE 7 certification. Otherwise, some optional tests may be run as well.
NOTE: If this fails with "[javatest.batch] bad value for "timeoutFactor" command (1.0)", do export LC_ALL=en_US.
- Web Profile Certification
If you have set up your TCK environment to run with the web profile (javee.level=web) , you must also execute the tests using the keywords javaee_web_profile. The runclient command would be:
- ant -Dkeywords="(javaee_web_profile) & !(ejbembed_vehicle)" runclient
NOTE: There have been some issues running some test directories using the above keywords as the keyword.properties file is not correct in all cases.
Specifically, do not use any keywords when running tests for the following directories:
- CTS-168 - src/com/ibm/jbatch/tck/tests
- Running Individual Tests
cd $TS_HOME/src/com/sun/ts/tests/technology-to-test/package to test
- ant runclient -Dtest=testName_from_<transport> -Dtest.client=<ClassName|Client>
- EXAMPLE:
cd $TS_HOME/src/com/sun/ts/tests/jms/core/appclient/closedQueueConnection
ant runclient -Dtest=closedQueueConnectionAckTest_from_appclient -Dtest.client=ClosedQueueConnectionTests
NOTE: Notice that you wouldn't need to specify -Dtest.client if the class name was "Client"
- Re-running failed tests
ant -DpriorStatus=fail,error runclient
- Deploying Common Resource Adapters
- To deploy the resource adapters needed for connector and XA tests, execute the following command prior to running the tests:
- cd $TS_HOME/bin
- ant -f xml/impl/wildfly/deploy.xml deploy.Tsr.ear // needed for XA TransactionSynchronizationRegistry test only
- ant -f xml/impl/wildfly/deploy.xml deploy.all.rars
- cd $TS_HOME/bin
- To deploy the resource adapters needed for connector and XA tests, execute the following command prior to running the tests:
TCK Configuration Information
Modifying CTS Configuration Files for Full or Web Profile
The configuration files used for the CTS reside in the jee7tck-mods/etc directory.
- standalone-full.xml - Full Profile
- standalone-web.xml - Web Profile
Configuration information required by the TCK should be added to these files. Changes may not be relevant to both depending on the profile specification requirements . The profile used during the build of the porting package determines which file will be used for testing.
Adding JBoss-specific Runtime Information
If the test package requires JBoss-specific information to be provided along with the test deployment (ejb-ref, resource-ref), the files should be placed in $TS_HOME/jee7tck-mods/resources/<test.dir>.
The runtime file names should consist of the archive name followed by the runtime file name.
As an example, for tests located in:
$TS_HOME/src/com/sun/ts/tests/package
With the archive name: test_package.ear the runtime files would be:
- test_package_client.jar.jboss-client.xml
- test_package_ejb.jar.jboss-ejb3.xml
- test_package_web.war.jboss-web.xml
These files need to be placed in the directory $TS_HOME/jee7tck-mods/resources/com/sun/ts/tests/package noting the path is consistent with the path of the tests source location.
Choosing the Deployment Option
The javaee7tck-mods porting package now allows the option to use the CLI for deploying the test archives in addition to retaining the option of FileSystem deployment. The ts.jte property, porting.ts.deploy.class.1, defines which deployment option is used.
###############################################################
# CLI deployment option
#porting.ts.deploy.class.1=org.jboss.ts.lib.implementation.jboss.javaee.JBossCLIDeployment
# Filesystem deployment (default)
porting.ts.deploy.class.1=org.jboss.ts.lib.implementation.jboss.javaee.JBossAutoDeployment
porting.ts.deploy.class.2=com.sun.ts.lib.implementation.sun.javaee.glassfish.AutoDeployment
NOTE: porting.ts.deploy.class.2 is for RI deployment and this should not be changed.
JIRA Categories
JBCTS - category to file compatiblity issues uncovered in implementations
CTS - category to file CTS test challenges. The following information should be included.
- Licensee Name:
- CTS version: (from $TS_HOME/bin, execute 'ant version')
- Exclude list date: ( $TS_HOME/bin/ts.jtx file )
- Specification Reference:
- Spec Name:
- Spec version:
- Spec date:
- Page/Section to reference:
- Problem Description and attached the .jtr from the failed test.
DEBUGGING
To debug TCK7 porting layer patch $TS_HOME/bin/xml/ts.top.import.xml in section <presetdef name="javatest.batch">
and add <jvmarg value="-Xrunjdwp:transport=dt_socket,address=5006,server=y,suspend=y"/> there.
Comments