You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Sebastian Celis <Se...@stellent.com> on 2007/02/06 21:29:57 UTC

Running the TCK

Hello,

I have recently begun work on writing a JSR-170 adapter.  During the development process, I would like to be able to use the TCK to test and make sure that I am complying with the spec.  However, after browsing through a number of readmes and websites, I have become quite confused as to where I should obtain and how to run the TCK.  From what I understand, the TCK is included in the Jackrabbit subversion repository, so I have checked out the jackrabbit source from http://svn.apache.org/repos/asf/jackrabbit/trunk

How do I now take the contents of this repository and run the TCK against my adapter?  Is there any documentation on how to do this?  I have had a lot of trouble finding any.

Many thanks,
Sebastian Celis


Re: Running the TCK

Posted by Stefan Guggisberg <st...@gmail.com>.
hi sebastian

On 2/6/07, Sebastian Celis <Se...@stellent.com> wrote:
> Hello,
>
> I have recently begun work on writing a JSR-170 adapter.

great to hear that :-) in case you haven't done so already you might want to
have a look at the current SPI efforts. it's still a work in progress
but it offers
interfaces that are much easier to implement than the jsr 170
javax.jcr interfaces.
for more details see
ttp://svn.apache.org/repos/asf/jackrabbit/trunk/contrib/spi/README.txt

cheers
stefan

> During the development process, I would like to be able to use the TCK to test and make sure that I am complying with the spec.  However, after browsing through a number of readmes and websites, I have become quite confused as to where I should obtain and how to run the TCK.  From what I understand, the TCK is included in the Jackrabbit subversion repository, so I have checked out the jackrabbit source from http://svn.apache.org/repos/asf/jackrabbit/trunk
>
> How do I now take the contents of this repository and run the TCK against my adapter?  Is there any documentation on how to do this?  I have had a lot of trouble finding any.
>
> Many thanks,
> Sebastian Celis
>
>

Re: Running the TCK

Posted by Marcel Reutegger <ma...@gmx.net>.

Sebastian Celis wrote:
> Now the User Guild talks a lot about JNDI.  Am I correct in understanding
> that if I want to use the TCK-webapp, that I don't implement a custom
> RepositoryStub class?  That instead I use the default one and register my
> repository via JNDI so that the JCR TCK Web Application can connect to it?

yes, that's correct. The default setup already does it that way. The reference 
implementation is registered via JNDI and the TCK web application looks up the 
repository using predefined JNDI settings.

> If so, how do I do this?  I have been reading about JNDI, but it is not clear
> to me how to use it to allow the provided RepositoryStub to find my
> repository.

There is a 'Test Config' tab in the TCK web application that contains the JNDI 
settings. The relevant parameters are:
- java.naming.provider.url
- java.naming.factory.initial

Once you saved your changes (the button at the very bottom of the page), the TCK 
will look up the repository with the new JNDI parameters.

> If I do decide to implement a custom RepositoryStub class, then how do I
> invoke the TCK so that it uses this class to connect to my JSR-170
> implementation?

That's a bit more difficult, because there's no parameter on the 'Test Config' 
tab. In that case you should use the default settings within the tck-webapp.war 
(/WEB-INF/classes/repositoryStubImpl.properties) as a basis for your own 
configuration and then provide the location of your file as a java system 
property: -Djavax.jcr.tck.properties=<location-of-your-file>

In there you can define the stub implementation:

# Stub implementation class
javax.jcr.tck.repository_stub_impl=org.apache.jackrabbit.test.JNDIRepositoryStub

The TCK web application will first check if the system property is set and load 
the configuration from there or otherwise use the default one, which is shipped 
with the TCK web application itself.

regards
  marcel

RE: Running the TCK

Posted by Sebastian Celis <Se...@stellent.com>.
Thanks for the help, Jukka.

So I have now read through the TCK User Guide, installed the TCK, and even run it (using the web app) against the default Jackrabbit repository.  However, I am now having trouble understanding how to run it against my own JSR-170 implementation.

You said:

> To run the TCK on your adapter you need to implement a custom
> RepositoryStub class and configure the TCK accordingly. You can check
> the existing repositoryStubImpl.properties for an example on how
> Jackrabbit is configured for the TCK.

Now the User Guild talks a lot about JNDI.  Am I correct in understanding that if I want to use the TCK-webapp, that I don't implement a custom RepositoryStub class?  That instead I use the default one and register my repository via JNDI so that the JCR TCK Web Application can connect to it?  If so, how do I do this?  I have been reading about JNDI, but it is not clear to me how to use it to allow the provided RepositoryStub to find my repository.

If I do decide to implement a custom RepositoryStub class, then how do I invoke the TCK so that it uses this class to connect to my JSR-170 implementation?  I am only able to find information on using the web app.

Thanks again,
Sebastian Celis


-----Original Message-----
From: Jukka Zitting [mailto:jukka.zitting@gmail.com]
Sent: Tuesday, February 06, 2007 3:07 PM
To: users@jackrabbit.apache.org
Subject: Re: Running the TCK


Hi,

On 2/6/07, Sebastian Celis <Se...@stellent.com> wrote:
> I have recently begun work on writing a JSR-170 adapter.  During the
> development process, I would like to be able to use the TCK to test and
> make sure that I am complying with the spec.  However, after browsing
> through a number of readmes and websites, I have become quite confused
> as to where I should obtain and how to run the TCK.

Check out the TCK download link
http://www.day.com/content/en/product/jsr_170/tck/tckform.html that
you can find from the Final Release download page of the official JSR
170 page http://jcp.org/en/jsr/detail?id=170.

Note also the exclude list available at
http://www.day.com/site/en/index/related/downloads/technology_compatibility.html
that lists the test cases with known issues.

> From what I understand, the TCK is included in the Jackrabbit subversion
> repository, so I have checked out the jackrabbit source from
> http://svn.apache.org/repos/asf/jackrabbit/trunk

The TCK sources are included in the Jackrabbit codebase, but for
official certification you should be using the version available from
the above download link.

> How do I now take the contents of this repository and run the TCK against my
> adapter?  Is there any documentation on how to do this?  I have had a lot of
> trouble finding any.

To run the TCK on your adapter you need to implement a custom
RepositoryStub class and configure the TCK accordingly. You can check
the existing repositoryStubImpl.properties for an example on how
Jackrabbit is configured for the TCK.

BR,

Jukka Zitting

Re: Running the TCK

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 2/6/07, Sebastian Celis <Se...@stellent.com> wrote:
> I have recently begun work on writing a JSR-170 adapter.  During the
> development process, I would like to be able to use the TCK to test and
> make sure that I am complying with the spec.  However, after browsing
> through a number of readmes and websites, I have become quite confused
> as to where I should obtain and how to run the TCK.

Check out the TCK download link
http://www.day.com/content/en/product/jsr_170/tck/tckform.html that
you can find from the Final Release download page of the official JSR
170 page http://jcp.org/en/jsr/detail?id=170.

Note also the exclude list available at
http://www.day.com/site/en/index/related/downloads/technology_compatibility.html
that lists the test cases with known issues.

> From what I understand, the TCK is included in the Jackrabbit subversion
> repository, so I have checked out the jackrabbit source from
> http://svn.apache.org/repos/asf/jackrabbit/trunk

The TCK sources are included in the Jackrabbit codebase, but for
official certification you should be using the version available from
the above download link.

> How do I now take the contents of this repository and run the TCK against my
> adapter?  Is there any documentation on how to do this?  I have had a lot of
> trouble finding any.

To run the TCK on your adapter you need to implement a custom
RepositoryStub class and configure the TCK accordingly. You can check
the existing repositoryStubImpl.properties for an example on how
Jackrabbit is configured for the TCK.

BR,

Jukka Zitting