Thank you! I was indeed missing both the org.apache.felix.framework and @RunWith(PaxExam.class)
Now my tests fail because of bundle wiring according to the log … target/failsafe-reports/org.apache.sling.auth.saml2.impl.SamlHandlerIT-output.txt my configuration looks like this @Configuration public Option[] configuration() { // Patch versions of features provided by SlingOptions HTTP_PORT = findFreePort(); DEST_HTTP_PORT = findFreePort(); SlingOptions.versionResolver.setVersionFromProject("org.apache.sling", "org.apache.sling.auth.saml2"); SlingOptions.versionResolver.setVersion("commons-codec", "commons-codec", "1.14"); SlingOptions.versionResolver.setVersion("org.apache.jackrabbit", "oak-jackrabbit-api", "1.32.0"); SlingOptions.versionResolver.setVersion("org.apache.jackrabbit", "oak-api", "1.32.0"); SlingOptions.versionResolver.setVersion("org.apache.jackrabbit", "oak-core", "1.32.0"); SlingOptions.versionResolver.setVersion("org.apache.jackrabbit", "oak-commons", "1.32.0"); SlingOptions.versionResolver.setVersion("org.apache.jackrabbit", "oak-blob", "1.32.0"); return new Option[]{ systemProperty("org.osgi.service.http.port").value(String.valueOf(HTTP_PORT)), baseConfiguration(), slingQuickstart(), CoreOptions.mavenBundle("org.apache.felix", "org.apache.felix.webconsole.plugins.ds", "2.0.8"), junitBundles(), logback(), // build artifact testBundle("bundle.filename"), // from TestSupport }; } But I’m still seeing a lot of Bundle Wiring problems related to Oak ERROR: Bundle org.apache.jackrabbit.oak-blob [102] Error starting file:/Users/cmrockwe/Documents/a3workspace/sling-whiteboard/saml-handler/target/paxexam/SamlHandlerIT/c0ccc2e3-e466-4472-bf32-2ad1edf4756e/pax-exam-downloads/org.apache.jackrabbit.oak-blob_1.32.0.jar (org.osgi.framework.BundleException: Unable to resolve org.apache.jackrabbit.oak-blob [102](R 102.0): missing requirement [org.apache.jackrabbit.oak-blob [102](R 102.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.jackrabbit.oak.commons.cache)(version>=1.0.0)(!(version>=2.0.0))) [caused by: Unable to resolve org.apache.jackrabbit.oak-commons [104](R 104.0): missing requirement [org.apache.jackrabbit.oak-commons [104](R 104.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.jackrabbit.util)(version>=2.5.0)(!(version>=3.0.0)))] Unresolved requirements: [[org.apache.jackrabbit.oak-blob [102](R 102.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.jackrabbit.oak.commons.cache)(version>=1.0.0)(!(version>=2.0.0)))]) org.osgi.framework.BundleException: Unable to resolve org.apache.jackrabbit.oak-blob [102](R 102.0): missing requirement [org.apache.jackrabbit.oak-blob [102](R 102.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.jackrabbit.oak.commons.cache)(version>=1.0.0)(!(version>=2.0.0))) [caused by: Unable to resolve org.apache.jackrabbit.oak-commons [104](R 104.0): missing requirement [org.apache.jackrabbit.oak-commons [104](R 104.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.jackrabbit.util)(version>=2.5.0)(!(version>=3.0.0)))] Unresolved requirements: [[org.apache.jackrabbit.oak-blob [102](R 102.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.jackrabbit.oak.commons.cache)(version>=1.0.0)(!(version>=2.0.0)))] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4368) at org.apache.felix.framework.Felix.startBundle(Felix.java:2281) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1539) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308) at java.base/java.lang.Thread.run(Thread.java:834) ERROR: Bundle org.apache.jackrabbit.oak-blob-plugins [103] Error starting file:/Users/cmrockwe/Documents/a3workspace/sling-whiteboard/saml-handler/target/paxexam/SamlHandlerIT/c0ccc2e3-e466-4472-bf32-2ad1edf4756e/pax-exam-downloads/org.apache.jackrabbit.oak-blob-plugins_1.12.0.jar (org.osgi.framework.BundleException: Unable to resolve org.apache.jackrabbit.oak-blob-plugins [103](R 103.0): missing requirement [org.apache.jackrabbit.oak-blob-plugins [103](R 103.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.jackrabbit.oak.api.blob)(version>=1.0.0)(!(version>=1.1.0))) Unresolved requirements: [[org.apache.jackrabbit.oak-blob-plugins [103](R 103.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.jackrabbit.oak.api.blob)(version>=1.0.0)(!(version>=1.1.0)))]) org.osgi.framework.BundleException: Unable to resolve org.apache.jackrabbit.oak-blob-plugins [103](R 103.0): missing requirement [org.apache.jackrabbit.oak-blob-plugins [103](R 103.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.jackrabbit.oak.api.blob)(version>=1.0.0)(!(version>=1.1.0))) Unresolved requirements: [[org.apache.jackrabbit.oak-blob-plugins [103](R 103.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.jackrabbit.oak.api.blob)(version>=1.0.0)(!(version>=1.1.0)))] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4368) at org.apache.felix.framework.Felix.startBundle(Felix.java:2281) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1539) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308) at java.base/java.lang.Thread.run(Thread.java:834) ERROR: Bundle org.apache.jackrabbit.oak-commons [104] Error starting file:/Users/cmrockwe/Documents/a3workspace/sling-whiteboard/saml-handler/target/paxexam/SamlHandlerIT/c0ccc2e3-e466-4472-bf32-2ad1edf4756e/pax-exam-downloads/org.apache.jackrabbit.oak-commons_1.32.0.jar (org.osgi.framework.BundleException: Unable to resolve org.apache.jackrabbit.oak-commons [104](R 104.0): missing requirement [org.apache.jackrabbit.oak-commons [104](R 104.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.jackrabbit.util)(version>=2.5.0)(!(version>=3.0.0))) Unresolved requirements: [[org.apache.jackrabbit.oak-commons [104](R 104.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.jackrabbit.util)(version>=2.5.0)(!(version>=3.0.0)))]) org.osgi.framework.BundleException: Unable to resolve org.apache.jackrabbit.oak-commons [104](R 104.0): missing requirement [org.apache.jackrabbit.oak-commons [104](R 104.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.jackrabbit.util)(version>=2.5.0)(!(version>=3.0.0))) Unresolved requirements: [[org.apache.jackrabbit.oak-commons [104](R 104.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.jackrabbit.util)(version>=2.5.0)(!(version>=3.0.0)))] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4368) at org.apache.felix.framework.Felix.startBundle(Felix.java:2281) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1539) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308) at java.base/java.lang.Thread.run(Thread.java:834) (and several more) Any other thoughts? Cris > On Feb 25, 2021, at 6:41 PM, Eric Norman <enor...@apache.org> wrote: > > Also, you'll need to add a version of the felix framework as a dependency > with something like this: > > <!-- Apache Felix --> > <dependency> > <groupId>org.apache.felix</groupId> > <artifactId>org.apache.felix.framework</artifactId> > <version>6.0.3</version> > <scope>test</scope> > </dependency> > > On Thu, Feb 25, 2021 at 3:18 PM Eric Norman <enor...@apache.org> wrote: > >> Hi, >> I think you might be missing the annotation declaring that you want to use >> the PaxExam test runner for the test class. >> >> For example, something like this may get you further: >> >> import org.ops4j.pax.exam.junit.PaxExam; >> import org.junit.runner.RunWith; >> >> @RunWith(PaxExam.class) >> >> >> On Thu, Feb 25, 2021 at 3:09 PM Cris Rockwell <cmroc...@umich.edu> wrote: >> >>> Hello it’s me again >>> >>> I was wondering if someone knowledgable about PAX testing in Sling could >>> help me out with my Sling Whiteboard project (saml-handler) [1] on branch >>> SLING-9397/improve-test-coverage >>> >>> The project uses Java 11, but I think that’s supported and should be >>> fine. The pom [2] should be straight according to this docs [3] >>> >>> The IT test [4] doesn’t do much yet, because I’m trying to validate >>> whether it’s working or not. >>> >>> >>> if I run "mvn clean install", then I expect there to be something under >>> target/paxexam according this >>> >>> https://github.com/apache/sling-org-apache-sling-testing-paxexam/blob/master/src/main/java/org/apache/sling/testing/paxexam/TestSupport.java >>> < >>> https://github.com/apache/sling-org-apache-sling-testing-paxexam/blob/master/src/main/java/org/apache/sling/testing/paxexam/TestSupport.java> >>> >>> >>> >>> But its not there >>> ➜ saml-handler git:(SLING-9397/improve-test-coverage) ls target/ >>> classes/ >>> generated-test-sources/ maven-status/ >>> rat.txt >>> failsafe-reports/ maven-archiver/ >>> >>> org.apache.sling.auth.saml2-0.2.0-SNAPSHOT-sources.jar surefire-reports/ >>> generated-sources/ >>> maven-shared-archive-resources/ >>> org.apache.sling.auth.saml2-0.2.0-SNAPSHOT.jar test-classes/ >>> >>> >>> So I don’t think I’m doing this right. But I’m spending several days and >>> getting nowhere close to improving test coverage of this bundle. Any help >>> getting this setup properly would be muy apreciado! >>> >>> Regards >>> Cris >>> >>> >>> [1] >>> https://github.com/apache/sling-whiteboard/tree/SLING-9397/improve-test-coverage/saml-handler >>> < >>> https://github.com/apache/sling-whiteboard/tree/SLING-9397/improve-test-coverage/saml-handler >>>> >>> [2] >>> https://github.com/apache/sling-whiteboard/blob/SLING-9397/improve-test-coverage/saml-handler/pom.xml >>> < >>> https://github.com/apache/sling-whiteboard/blob/SLING-9397/improve-test-coverage/saml-handler/pom.xml >>>> >>> [3] >>> https://sling.apache.org/documentation/development/testing-paxexam.html < >>> https://sling.apache.org/documentation/development/testing-paxexam.html> >>> [4] >>> https://github.com/apache/sling-whiteboard/blob/SLING-9397/improve-test-coverage/saml-handler/src/test/java/org/apache/sling/auth/saml2/impl/SamlHandlerIT.java >>> < >>> https://github.com/apache/sling-whiteboard/blob/SLING-9397/improve-test-coverage/saml-handler/src/test/java/org/apache/sling/auth/saml2/impl/SamlHandlerIT.java >>>> >> >>