Skip to content

micsta/jsr107tck

 
 

Repository files navigation

TCK

cache-tests contains the sources of the TCK

implementation-tester uses the TCK to test the RI

For a test outside the jsr107 depot look here

##Building the domain and tests

To build all modules but not run any tests:

mvn -DskipTests clean install

This command is required before running tests to install test dependencies.

Running the tests against an implementation

The implementation-tester module wires up tests and an implementation. This is done by specifying the coordinates for the implementation from the command line.

All the following examples specify the RI. Change the coordinates in the examples to your own implementation to test it instead.

The following commands should be run from the implementation-tester directory:

To run basic tests on the RI:

mvn \
    -Dimplementation-groupId=javax.cache.implementation \
    -Dimplementation-artifactId=cache-ri \
    -Dimplementation-version=0.2 \
    -P test-basic-cache \
    test

The optional features are JTA and Annotations. To run optional tests:

mvn \
    -Dimplementation-groupId=javax.cache.implementation \
    -Dimplementation-artifactId=cache-ri \
    -Dimplementation-version=0.2 \
    -P test-optional-cache \
    test

Finally, to run a single test class:

mvn \
    -Dimplementation-groupId=javax.cache.implementation \
    -Dimplementation-artifactId=cache-ri \
    -Dimplementation-version=0.2 \
    -Dtest=CacheManagerFactoryTest \
    test

An example for something other than the RI, a cache implementation by the fictional Acme company, illustrates Acme cache failing to pass the TCK:

mvn \
    -Dimplementation-groupId=acme.cache \
    -Dimplementation-artifactId=acme-cache \
    -Dimplementation-version=0.1 \
    test

The single class CacheManagerFactoryTest passes for Acme cache

mvn \
    -Dimplementation-groupId=acme.cache \
    -Dimplementation-artifactId=acme-cache \
    -Dimplementation-version=0.1 \
    -Dtest=CacheManagerFactoryTest \
    test

About

JSR107 Technology Compability Kit

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%