You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by ju...@apache.org on 2012/04/11 17:54:37 UTC

svn commit: r1324827 - /jackrabbit/oak/trunk/oak-it/mk/README.md

Author: jukka
Date: Wed Apr 11 15:54:37 2012
New Revision: 1324827

URL: http://svn.apache.org/viewvc?rev=1324827&view=rev
Log:
OAK-12: Implement a test suite for the MicroKernel

Add a README with basic instructions on how to run the test suite

Added:
    jackrabbit/oak/trunk/oak-it/mk/README.md

Added: jackrabbit/oak/trunk/oak-it/mk/README.md
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-it/mk/README.md?rev=1324827&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-it/mk/README.md (added)
+++ jackrabbit/oak/trunk/oak-it/mk/README.md Wed Apr 11 15:54:37 2012
@@ -0,0 +1,52 @@
+MicroKernel integration tests
+=============================
+
+This component contains integration tests for the `MicroKernel` interface
+as defined in the `oak-mk` component. The test suite is by default executed
+against the default MicroKernel implementation included in that same
+component, but you can also use this test suite against any other
+implementations as described below.
+
+Testing a MicroKernel implementation
+------------------------------------
+
+Follow these four steps to to set up this integration test suite against
+a particular MicroKernel implementation.
+
+First, you need to add this `oak-it-mk` component as a test dependency
+in the component that contains your MicroKernel implementation:
+
+    <dependency>
+      <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>oak-it-mk</artifactId>
+      <version>...</version>
+      <scope>test</scope>
+    </dependency>
+
+Second, you need a JUnit test class that runs the full suite of MicroKernel
+tests included in this component:
+
+    import org.junit.runner.RunWith;
+    import org.junit.runners.Suite;
+
+    @RunWith(Suite.class)
+    @Suite.SuiteClasses({
+        MicroKernelIT.class
+    })
+    public class EverythingIT {
+    }
+
+Third, you need to implement the `MicroKernelFixture` interface in a class
+with a public default constructor:
+
+    package my.package;
+    public class MyCustomMicroKernelFixture implements MicroKernelFixture {
+        ...
+    }
+
+Fourth, and finally, you need to list this fixture class in a
+`org.apache.jackrabbit.mk.test.MicroKernelFixture` file within the
+`META-INF/services/` folder inside your test classpath:
+
+    my.package.MyCustomMicroKernelFixture
+