Testing Speedo with the JDO TCK


Back to the Speedo documentation


Introduction

The objective of this document is to describe how to test speedo with the Java Data Objects Technology Compatibility Kit (JDOTCK).

The distribution of the JDOTCK incudes the JDO Reference Impementation (jdori.jar) and the launcher of the test suite (javatest.jar) but does not include the required tools:

Installing the JDO TCK

1. Create the jdotck directory and place the jdotck.zip ant the antlr-2.7.0.zip files into it.

2. Modify the properties in the file speedo/test/tck/build.properties (define your jdotck.dir and systemname).

3. Ensure that ant and JDK are in $PATH

4. Run the ant task "install_tck".

ant install_tck


Testing the JDO RI (Reference Implementation)

Ant is used to invoke JavaTest and the JavaTest Agent which build and execute the JDOTCK tests. Words and phrases in Italic in this section refer to User Interface elements.
For information on JavaTest, please see jdotck/README-javatest.

ant javatest
  • Once the JavaTest is up running:

  • From the JavaTest Configuration Editor window:

  • Open another console window, and type:


    ant runagent

    This will start the JavaTest Agent

  • Now go back to the JavaTest window, select Run Tests ->Start

  • Click ok to confirm configuration. The tests will now run until all tests have been attempted.



    Testing the Speedo Implementation

    1. Modify the properties in the file jdotck/speedo.properties. Configure the data source type with the jdbc driver and the jdo options:

    2. Copy the jdbc driver in the jdotck/iut_jars directory (pg74jdbc3.jar).

    3. Choose a type of object identity (datastore or application).

    To run the JDOTCK with test classes enhanced for application identity:

    ant useapplicationidentity

    To run the JDOTCK with test classes enhanced for datastore identity:

    ant usedatastoreidentity

    4. Run the ant task "enhance_speedo".

    ant enhance_speedo


    If you get OutOfMemory error then try this with ant 1.5

    java -Xms128MB -Xmx256MB -cp %JAVA_HOME%\lib\tools.jar;%ANT_HOME%\lib\ant.jar;%ANT_HOME%\lib\xercesImpl.jar;..\..\output\dist\speedo.jar org.apache.tools.ant.Main enhance_speedo
    

    If you get OutOfMemory error then try this with ant 1.6

    java -Xms128MB -Xmx256MB -cp %JAVA_HOME%\lib\tools.jar;%ANT_HOME%\lib\ant.jar;%ANT_HOME%\lib\xercesImpl.jar;..\..\output\dist\speedo.jar org.apache.tools.ant.launch.Launcher  enhance_speedo
    

    If you use a jdk 1.4.2 replace 128MB and 256MB with 128M and 256M