You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Jukka Zitting <ju...@gmail.com> on 2007/09/20 14:29:21 UTC

Integration tests in Jackrabbit (Was: [jira] Commented: (JCR-940) add db connection autoConnect for BundleDbPersistenceManager.)

Hi,

On 9/20/07, Thomas Mueller <th...@gmail.com> wrote:
> I have multiple configurations (copies of the applications/test
> directory). Before running the build I just replace the files with the
> configuration (simple db, bundle db, data store) I want to test. I
> think it would be great if the unit test could be run against each
> configurations one after the other - but I don't know how this can be
> automated using JUnit / Maven.

The current test suite in jackrabbit-core is an integration test suite
rather than a unit test suite, and would really require more support
than what Maven currently has for normal unit tests. The complex
plugin rules in pom.xml and configuration files in applications/test
are a symptom of this mismatch.

I'd like to leave only real unit tests (i.e. that test just a single
class or component in isolation) as is, and move the
jackrabbit-jcr-tests and other similar test cases to be run as  a part
of the Maven integration test lifecycle phases. Then we could probably
have multiple different test configurations that could be easily
enabled/disabled. I'm not yet sure how this would work in practice, as
there doesn't seem to be much of a best practice for integration tests
with Maven.

BR,

Jukka Zitting