You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by David Caruana <da...@caruana.co.uk> on 2005/09/07 12:23:32 UTC
TCK Test Data
I would like to bootstrap my implementation of JCR with the test data
required for the TCK. However, it's taking more time than necessary to
determine what the test data should be. Is there any documentation that
tells me the nodes, properties, values etc I should create for the TCK
tests. For now, I only have level 1 api support, but can easily create
the data through my own means, if I knew what it should it be.
Thanks,
David Caruana
www.alfresco.org
Re: TCK Test Data
Posted by Marcel Reutegger <ma...@gmx.net>.
David Caruana wrote:
> Thanks Marcel,
>
> Yes, I have found the JackRabbit test init code and am using that as a
> basis - as well as stepping through the api tests to see what
> interaction is taking place with the JCR api.
>
> It seems a little odd that the property tests (e.g. BooleanPropertyTest,
> DatePropertyTest) all pass when the repository does not contain a
> property of the expected type - is that correct? I'm executing within
> Eclipse, not the tck webapp. Of course, every implementation will have
> varying support but if I understand correctly, you could essentially
> pass a host of property tests without a single call to the repository to
> get a value.
Yes, that's more or less correct. The reason for that is basically that
the specification only mandates certain property types depending on the
compliance level and the optional features that the repository supports.
An extremly simple level 1 repository could only consist of one node,
the root node. so, it only needs to expose the properties of nt:base.
That is, the properties jcr:primaryType and jcr:mixinTypes, both of type
Name.
But not all test cases follow this strict view of a level 1 repository.
Most test cases require at least a couple of nodes and some string
properties.
regards
marcel
Re: TCK Test Data
Posted by David Caruana <da...@caruana.co.uk>.
Thanks Marcel,
Yes, I have found the JackRabbit test init code and am using that as a
basis - as well as stepping through the api tests to see what
interaction is taking place with the JCR api.
It seems a little odd that the property tests (e.g. BooleanPropertyTest,
DatePropertyTest) all pass when the repository does not contain a
property of the expected type - is that correct? I'm executing within
Eclipse, not the tck webapp. Of course, every implementation will have
varying support but if I understand correctly, you could essentially
pass a host of property tests without a single call to the repository to
get a value.
Dave
Marcel Reutegger wrote:
> Hi David,
>
> If you look at the default configuration of the tck-webapp, which
> basically targets test runs on jackrabbit, you can see that level 1
> tests are all performed on the /testdata tree. Of course you can
> change this configuration to something that better suits your
> repository or make sure that /testdata contains enough nodes in order
> to run the test cases.
>
> What data you have to place under that node is actually quite simple.
> Whatever your repository supports should be made visible. E.g. if your
> implementation supports same name siblings, create a node with same
> name siblings somewhere under /testdata.
>
> You may also look at the init test cases in jackrabbit as a starting
> point. That's in: core/src/test/org/apache/jackrabbit/init
>
> Jackrabbit executes those test cases first to prefill the repository
> before any other test cases run.
>
> regards
> marcel
>
> David Caruana wrote:
>
>> I would like to bootstrap my implementation of JCR with the test data
>> required for the TCK. However, it's taking more time than necessary
>> to determine what the test data should be. Is there any
>> documentation that tells me the nodes, properties, values etc I
>> should create for the TCK tests. For now, I only have level 1 api
>> support, but can easily create the data through my own means, if I
>> knew what it should it be.
>
>
>
>
Re: TCK Test Data
Posted by Marcel Reutegger <ma...@gmx.net>.
Hi David,
If you look at the default configuration of the tck-webapp, which
basically targets test runs on jackrabbit, you can see that level 1
tests are all performed on the /testdata tree. Of course you can change
this configuration to something that better suits your repository or
make sure that /testdata contains enough nodes in order to run the test
cases.
What data you have to place under that node is actually quite simple.
Whatever your repository supports should be made visible. E.g. if your
implementation supports same name siblings, create a node with same name
siblings somewhere under /testdata.
You may also look at the init test cases in jackrabbit as a starting
point. That's in: core/src/test/org/apache/jackrabbit/init
Jackrabbit executes those test cases first to prefill the repository
before any other test cases run.
regards
marcel
David Caruana wrote:
> I would like to bootstrap my implementation of JCR with the test data
> required for the TCK. However, it's taking more time than necessary to
> determine what the test data should be. Is there any documentation that
> tells me the nodes, properties, values etc I should create for the TCK
> tests. For now, I only have level 1 api support, but can easily create
> the data through my own means, if I knew what it should it be.