Java(TM) Portlet Technology Compatibility Kit, Version 1.0
Release Notes-1.0


Kit Contents

The Java(TM) Portlet Technology Compatibility Kit (TCK) 1.0 includes the following items:

Platform Notes

The PORTLET TCK tests have been built and tested with the Reference Implementation Pluto 1.0 running on the JavaTM2 Platform, Standard Edition SDK, Version 1.3.1_02. If you are using a different implementation, you will need to make adjustments to the procedures outlined in this document.

The PORTLET TCK tests run on the following platforms:

Variables in angle brackets need to be expanded for each platform. For example, <TS_HOME> becomes $TS_HOME on Solaris/Linux and %TS_HOME% on Windows. In addition, the forward slashes (/) used in all of the examples need to be replaced with backslashes (\) for Windows.

Installing, Setting Up, and Running the PORTLET TCK

The following sections explain how to:

Installing the Required Software

Before you can run the PORTLET TCK tests, you must install and set up the following software components: Complete the following steps to install the required software:
    Install the J2SE 1.3.1_02 software or later
    Download and install the J2SE  software from the Java Software Web site (http://java.sun.com/products). Refer to the installation instructions that accompany the software for additional information.

    Install the Pluto Reference Implementation 1.0.

    Download and install the Reference Implementation Pluto 1.0 from the pluto website http://jakarta.apache.org/pluto. Refer to the documentation included with Pluto 1.0 for specific installation instructions.

    Install the PORTLET TCK software.
     

    Install Java[tm] 2 Platform, Enterprise Edition (J2EE[tm]) SDK Version 1.3
        Download and install this from http://java.sun.com/products

Setting Up your Environment

Complete the following steps to set up your client environment for running the JavaTest harness:

      # Set the following environment variables in your shell environment:
 
 
 JAVA_HOME Set the JAVA_HOME variable to the directory where the Java[tm] 2 Platform, 
Standard Edition (J2SE[tm]) software has been installed.
TS_HOME Set the TS_HOME variable to the directory where the Portlet TCK software has been installed.
PATH Set the PATH variable to include the <TS_HOME>/bin directory.

  1. Edit your <TS_HOME>/bin/ts.jte file and modify the following properties, for getting the correct portal URL.
    1. Look at description in ts.jte file or in the PortletTCK User's guide for complete description.

       
      Name Description Pluto Reference Implementation
      portalURLFetcherMode Set this value to 0, if vendor is using Declarative Configuration to let TCK to obtain URL for each test. If this value is 0, you would need to set the vendorTestsToURLMappingFile property.  Content of this file are explained in details in Chapter 22 of the JSR168 Spec. 
      Set this value to 1, if vendor is using Programmatic Configuration to let TCK to obtain URL for each test. For this you would need to set the property vendorPortalURL
      1
      vendorPortalURL Set this property only if portalURLFetcherMode=1 (Programmatic Configuration) http://<pluto-host-name:8080>/pluto/tck
      vendorTestsToURLMappingFile Set this property only if portalURLFetcherMode=0 (Declarative Configuration.) 
      Set this to the name of file containing URLs for each test. Test cases are available in file <TS_HOME>/bin/portletTCKTestCases.xml.
       not used
    2. Edit your <TS_HOME>/bin/ts.jte file and modify the following properties, ONLY if there are tests identified that need authentication support. Such tests should be specified in the ${TS_HOME}/bin/authTestList.txt.
    3. Look at description in ts.jte file or in the PortletTCK User's guide for complete description.

       
      Property Name Description Pluto Reference Implementation
      authConfigType  0 -- if no authentication needed for any test at all. 
      1 -- if using the Basic Authentication for authUser/authpassword for tests specified by the vendor in ${TS_HOME}/bin/authTestList.txt 
      2 -- if using a vendor specific implementation of 
      TSPortletAuthCookieInterface.java that returns a cookie to be used for all tests specified by vendor in ${TS_HOME}/bin/authTestList.txt
      0
      authuser 
      authpassword
      Need to be set both these properties only if authConfigType is other than 0. n/a
      porting.ts.portletAuthCookie.class Need to be set only if authConfigType=2 
      Set this property to implementation of com.sun.ts.lib.porting.TSPortletAuthCookieInterface. 
      You would need to append the classpath to this file to  current value of local.classes property in build.properties.
      n/a
  2. Edit the <TS_HOME>/bin/build.properties file and modify the following  properties ( Look at the description of these in build.properties or in the PortletTCK User's guide for the description.)

  3.  
    Name Description For pluto Reference Implementation
    webapp.dir This property is used by tsant to copy all of the Portlet TCK web applications to a single directory. 
    Vendors would need to deploy these applications using their implementation specific tools.
    <PLUTO_HOME>/portlets
    portlet.classes The classes for the Portlet api's 
    This property is set to work for Reference Implementation.Vendors should set this to the jar file containing the Portlet api. This is used for signature testing.
    <TS_HOME>/lib/portlet.jar
    j2ee.home.ri The jars/classes needed for building/packaging 
    You would need to set this property only if you are building the TCK or the TCK web applications. 
    Download j2ee 1.3 SDK from Java site
    You would need to set it, no default.

Deploying the Portlet TCK Web Applications in Pluto Reference Implementation.

        Skip this step if you are  not working on Pluto Reference Implementation.
     
    1. set webapp.dir in <TS_HOME>/bin/build.properties to <PLUTO_HOME>/portlets
    2. Change to  <TS_HOME>/bin directory, the following command would copy all the TCK portlet wars in location specified by webapp.dir.
    3.            tsant deploy.all
    4. Change to the <PLUTO_HOME>/build
    5.  Run the following command::
      1. build.bat deploy_portlets
    6. Restart tomcat
    7. Try to point browser at the following URLs to make sure, portlets are deployed correctly.

Deploying the Portlet TCK Web Applications in a Vendor  Implementation

    Skip this step if you are working on Pluto Reference Implementation.

    1. set webapp.dir in <TS_HOME>/bin/build.properties to an existing directory where all TCK test web applications need to be copied.
    2. Change to the <TS_HOME>/bin directory, the following command would copy all the TCK portlet wars in location specified by webapp.dir.
    3.            tsant deploy.all
    4. Change to the directory specified by webapp.dir

    5.  Deploy all the portlet wars to the vendor implementation using implementation specific deployment tools.

Configuring the JavaTest Harness and Running the Portlet TCK Tests

To run the Portlet TCK tests, complete the following steps. Note that you only need to complete steps 2-10 the first time you start the JavaTestTM test harness. After you complete these steps, you can either run all of the tests by completing Step 11 or run a subset of the tests by completing the steps in the section that follows this one.
  1. Change to the <TS_HOME>/bin directory and start the JavaTest test harness:
  2. cd <TS_HOME>/bin
    tsant gui
  3. The Welcome screen displays. Click on the Create Work Directory button, enter the name of the directory to which the JavaTest test harness will write temporary files (/tmp/JTwork, for example), and press the New Work Dirbutton when you are done. After running the test, for debugging purposes you can look at files created in this directory for each test case.
  4. Pull down Configuration and select Edit Configuration. The Welcome screen displays. Press the Next Question button (right arrow).
  5. You are prompted for the location of the environment files. Accept the default file location and press the Next Question button.
  6. You are prompted to specify a test environment. Select either ts_unix or ts_win32 and press the Next Question button.
  7. You are prompted to select which tests to run. Accept the default setting and press the Next Question button.
  8. You are asked if you want to specify an exclude list. Accept the default (yes) and press the Next Question button.
  9. Verify the default location of the exclude list and press the Next Question button.
  10. You are prompted for where you want to save this configuration file. Give a location.
  11. The Congratulations screen displays. Press the Finished button (check mark).
  12. Select Run then Start. The tests in the {TS_HOME}/src/com/sun/ts/tests/portlet directory will be executed.
NOTE: Do not run the Parameter Editor before you run the Configuration Editor or you will lose all the default settings.
 

Debugging

Running a Subset of the Portlet TCK Tests

To run a subset of the Portlet TCK tests, complete the following steps:
    Pull down Configuration and select Configuration Editor.

    The Welcome screen displays. Click Tests to Run.

    The default set of tests for the TCK is displayed in the window. To select another area, click on the area or areas that you do not want to run, then press Remove.

    Click Add, select the new subdirectory or test that you want to run, and click Add File.

    Click the Finished button when you are done.

    Click Run and select Start to run the test.

Build/Deploy/Run the Portlet TCK Tests using Ant

Complete the following steps to set up your environment to build, deploy, and run the Portlet TCK tests using tsant. The following example is for the Solaris platform:
    Set the following environment variables in your shell environment to use the build infrastructure that comes with the TCK:         Change to directory TS_HOME/bin and edit the build.properties file to set the required properties needed for using TCK build environment.
To build the Portlet TCK tests using tsant, complete the following steps:
    To build a single test directory, type the following:
    cd <TS_HOME>/src/com/sun/ts/tests/portlet/api/javax_portlet/RenderRequest
    tsant clean build
    This will clean and build the tests in the RenderRequest test directory.

    To list the classes directory for this test that was built, type the following:

     tsant lc or tsant llc
    To list the distribution directory of archives for this test that was built, type the following:
     tsant ld or tsant lld
    To build a subset of test directories, type the following:
    cd <TS_HOME>/src/com/sun/ts/tests/portlet/api
    tsant clean build
    This will clean and build all the test directories under the api directory.
To deploy the Portlet TCK tests using tsant, complete the following steps:
    To deploy a single test directory, type the following:
    cd <TS_HOME>/src/com/sun/ts/tests/portlet/api/javax_portlet/PortletSession
    tsant deploy
    This will deploy the WAR file built for the PortletSession test directory to the webapps.dir directory.

    To deploy a subset of test directories, type the following:

    cd <TS_HOME>/src/com/sun/ts/tests/portlet/api
    tsant deploy
    This will deploy all the test WAR files for the api directory.
To run the Portlet TCK tests using tsant, complete the following steps:
    To run a single test directory, type the following:
    cd <TS_HOME>/src/com/sun/ts/tests/portlet/api/javax_portlet/PortletSession
    tsant runclient
    This will run all tests in the PortletSession test directory.

    To run a single test within a test directory, type the following:

    cd <TS_HOME>/src/com/sun/ts/tests/jaxrpc/api/javax_portlet/RenderRequest
    tsant runclient -Dtest=GetAttributeTest
    This will run only the GetAttributeTest in the RenderRequest test directory. You select the test name to run by looking at the testName tags in the URLClient.java file.

    If the test is in SpecURLClient.java, you would need to give an addtional paramter -Dtest.client=SpecURLClient.java

    To run a subset of test directories type the following:

    cd <TS_HOME>/src/com/sun/ts/tests/portlet/api
    tsant runclient
    This will run all the test directories under the api directory.

Source Directory Structure

Java source is distributed in 3 directories