. However, the problem I'm running into is a little different. I keep seeing this error message:
java.lang.Exception: Cannot load class org.example.tests.ExampleTest, was it included in the test bundle?
I would guess this to mean that either (a) the test is not in Test-Classes or (b) the JUnit3 test runner is being invoked. I am using JUnit4 annotations in my test. I've been stumped for a while though. Here is the full trace output of a sample run. If I can provide any further information, please ask. Thanks for the help!
# properties {
launch.name=TestBundle3, launch.noreferences=false, tester.port=54621, tester.dir=C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle3\target\test-reports, launch.trace=true, tester.names=org.example.tests.ExampleTest, launch.services=true, launch.activators=aQute.junit.Activator, launch.system.packages=sun.reflect,org.osgi.framework.startlevel;uses:="org.osgi.framework";version="1.0",org.osgi.framework.wiring;uses:="org.osgi.resource,org.osgi.framework";version="1.1",org.osgi.framework.hooks.bundle;uses:="org.osgi.framework";version="1.1",org.osgi.framework.hooks.service;uses:="org.osgi.framework";version="1.1",org.osgi.framework.hooks.resolver;uses:="org.osgi.framework.wiring";version="1.0",org.osgi.framework.namespace;uses:="org.osgi.resource";version="1.0",org.osgi.framework.launch;uses:="org.osgi.framework";version="1.1",org.osgi.framework;version="1.7",org.osgi.framework.hooks.weaving;uses:="org.osgi.framework.wiring";version="1.0",org.osgi.resource;version="1.0",org.osgi.service.url;version="1.0",org.osgi.service.packageadmin;uses:="org.osgi.framework";version="1.2",org.osgi.service.startlevel;uses:="org.osgi.framework";version="1.1",org.osgi.util.tracker;uses:="org.osgi.framework";version="1.5.1",junit.framework;version="3.8";uses:="org.junit.runner,org.junit.runner.manipulation,org.junit.runner.notification",org.junit;version="4.10";uses:="org.hamcrest,org.junit.internal",org.junit.experimental;version="4.10";uses:="org.junit.runner,org.junit.runners.model",org.junit.experimental.categories;version="4.10";uses:="org.junit.runner,org.junit.runner.manipulation,org.junit.runners,org.junit.runners.model",org.junit.experimental.max;version="4.10";uses:="org.junit.runner,org.junit.runner.notification",org.junit.experimental.results;version="4.10";uses:="org.hamcrest,org.junit.runner,org.junit.runner.notification",org.junit.experimental.runners;version="4.10";uses:="org.junit.runners,org.junit.runners.model",org.junit.experimental.theories;version="4.10";uses:="org.junit.experimental.theories.internal,org.junit.internal,org.junit.runners,org.junit.runners.model",org.junit.experimental.theories.internal;version="4.10";uses:="org.junit.experimental.theories,org.junit.runners.model",org.junit.experimental.theories.suppliers;version="4.10";uses:="org.junit.experimental.theories",org.junit.internal;version="4.10";uses:="org.hamcrest,org.junit.runner,org.junit.runner.notification",org.junit.internal.builders;version="4.10";uses:="org.junit.runner,org.junit.runner.notification,org.junit.runners.model",org.junit.internal.matchers;version="4.10";uses:="org.hamcrest",org.junit.internal.requests;version="4.10";uses:="org.junit.runner,org.junit.runner.manipulation",org.junit.internal.runners;version="4.10";uses:="junit.framework,org.junit.runner,org.junit.runner.manipulation,org.junit.runner.notification",org.junit.internal.runners.model;version="4.10";uses:="org.junit.internal,org.junit.runner,org.junit.runner.notification,org.junit.runners.model",org.junit.internal.runners.rules;version="4.10";uses:="org.junit.runners.model",org.junit.internal.runners.statements;version="4.10";uses:="org.junit.runners.model",org.junit.matchers;version="4.10";uses:="org.hamcrest,org.junit.internal.matchers",org.junit.rules;version="4.10";uses:="org.hamcrest,org.junit.runner,org.junit.runners.model",org.junit.runner;version="4.10";uses:="junit.framework,org.junit.internal,org.junit.runner.manipulation,org.junit.runner.notification,org.junit.runners.model",org.junit.runner.manipulation;version="4.10";uses:="org.junit.runner",org.junit.runner.notification;version="4.10";uses:="org.junit.runner",org.junit.runners;version="4.10";uses:="org.junit.internal.runners,org.junit.rules,org.junit.runner,org.junit.runner.manipulation,org.junit.runner.notification,org.junit.runners.model",org.junit.runners.model;version="4.10";uses:="org.junit.runner",org.hamcrest;version="1.0.0",org.hamcrest.core;version="1.0.0";uses:="org.hamcrest",org.hamcrest.internal;version="1.0.0";uses:="org.hamcrest", launch.timeout=0, launch.embedded=false, tester.continuous=false, launch.storage.dir=C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle3\target\fw, launch.bundles=C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle2\target\TestBundle2-1.0.0-SNAPSHOT.jar,C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle3\target\TestBundle3-1.0.0-SNAPSHOT.jar, launch.keep=false, tester.trace=true}
# inited runbundles=[C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle2\target\TestBundle2-1.0.0-SNAPSHOT.jar, C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle3\target\TestBundle3-1.0.0-SNAPSHOT.jar] activators=[aQute.junit.Activator] timeout=0 properties=<no more arguments>
# version org.apache.felix.framework;version=4.4.0, biz.aQute.launcher;version=1.3.0.201404110949, biz.aQute.junit;version=1.2.0.20130927-173427
# using working dir: C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle3\target\fw
# deleting working dir C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle3\target\fw because not kept
# system packages used: sun.reflect,org.osgi.framework.startlevel;uses:="org.osgi.framework";version="1.0",org.osgi.framework.wiring;uses:="org.osgi.resource,org.osgi.framework";version="1.1",org.osgi.framework.hooks.bundle;uses:="org.osgi.framework";version="1.1",org.osgi.framework.hooks.service;uses:="org.osgi.framework";version="1.1",org.osgi.framework.hooks.resolver;uses:="org.osgi.framework.wiring";version="1.0",org.osgi.framework.namespace;uses:="org.osgi.resource";version="1.0",org.osgi.framework.launch;uses:="org.osgi.framework";version="1.1",org.osgi.framework;version="1.7",org.osgi.framework.hooks.weaving;uses:="org.osgi.framework.wiring";version="1.0",org.osgi.resource;version="1.0",org.osgi.service.url;version="1.0",org.osgi.service.packageadmin;uses:="org.osgi.framework";version="1.2",org.osgi.service.startlevel;uses:="org.osgi.framework";version="1.1",org.osgi.util.tracker;uses:="org.osgi.framework";version="1.5.1",junit.framework;version="3.8";uses:="org.junit.runner,org.junit.runner.manipulation,org.junit.runner.notification",org.junit;version="4.10";uses:="org.hamcrest,org.junit.internal",org.junit.experimental;version="4.10";uses:="org.junit.runner,org.junit.runners.model",org.junit.experimental.categories;version="4.10";uses:="org.junit.runner,org.junit.runner.manipulation,org.junit.runners,org.junit.runners.model",org.junit.experimental.max;version="4.10";uses:="org.junit.runner,org.junit.runner.notification",org.junit.experimental.results;version="4.10";uses:="org.hamcrest,org.junit.runner,org.junit.runner.notification",org.junit.experimental.runners;version="4.10";uses:="org.junit.runners,org.junit.runners.model",org.junit.experimental.theories;version="4.10";uses:="org.junit.experimental.theories.internal,org.junit.internal,org.junit.runners,org.junit.runners.model",org.junit.experimental.theories.internal;version="4.10";uses:="org.junit.experimental.theories,org.junit.runners.model",org.junit.experimental.theories.suppliers;version="4.10";uses:="org.junit.experimental.theories",org.junit.internal;version="4.10";uses:="org.hamcrest,org.junit.runner,org.junit.runner.notification",org.junit.internal.builders;version="4.10";uses:="org.junit.runner,org.junit.runner.notification,org.junit.runners.model",org.junit.internal.matchers;version="4.10";uses:="org.hamcrest",org.junit.internal.requests;version="4.10";uses:="org.junit.runner,org.junit.runner.manipulation",org.junit.internal.runners;version="4.10";uses:="junit.framework,org.junit.runner,org.junit.runner.manipulation,org.junit.runner.notification",org.junit.internal.runners.model;version="4.10";uses:="org.junit.internal,org.junit.runner,org.junit.runner.notification,org.junit.runners.model",org.junit.internal.runners.rules;version="4.10";uses:="org.junit.runners.model",org.junit.internal.runners.statements;version="4.10";uses:="org.junit.runners.model",org.junit.matchers;version="4.10";uses:="org.hamcrest,org.junit.internal.matchers",org.junit.rules;version="4.10";uses:="org.hamcrest,org.junit.runner,org.junit.runners.model",org.junit.runner;version="4.10";uses:="junit.framework,org.junit.internal,org.junit.runner.manipulation,org.junit.runner.notification,org.junit.runners.model",org.junit.runner.manipulation;version="4.10";uses:="org.junit.runner",org.junit.runner.notification;version="4.10";uses:="org.junit.runner",org.junit.runners;version="4.10";uses:="org.junit.internal.runners,org.junit.rules,org.junit.runner,org.junit.runner.manipulation,org.junit.runner.notification,org.junit.runners.model",org.junit.runners.model;version="4.10";uses:="org.junit.runner",org.hamcrest;version="1.0.0",org.hamcrest.core;version="1.0.0";uses:="org.hamcrest",org.hamcrest.internal;version="1.0.0";uses:="org.hamcrest"
# using META-INF/services
# found META-INF/services in jar:file:/C:/Users/tbull/.bnd/cache/https%253A%252F%252Fgithub.com%252Fbndtools%252Fbundle-hub%252Fraw%252Fmaster%252Forg.apache.felix.framework/org.apache.felix.framework-4.4.0.jar!/META-INF/services/org.osgi.framework.launch.FrameworkFactory
# org.apache.felix.framework.FrameworkFactory
# Framework factory org.apache.felix.framework.FrameworkFactory@27c170f0
# framework instance org.apache.felix.framework [0]
# inited system bundle org.apache.felix.framework [0]
# system bundle started ok
# start embedded activators
# adding activator aQute.junit.Activator@67117f44
# Updating framework with [C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle2\target\TestBundle2-1.0.0-SNAPSHOT.jar, C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle3\target\TestBundle3-1.0.0-SNAPSHOT.jar]
# installing C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle2\target\TestBundle2-1.0.0-SNAPSHOT.jar
# no reference: url false
# installing C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle3\target\TestBundle3-1.0.0-SNAPSHOT.jar
# no reference: url false
# Waiting for refresh to finish
# refresh ended
# bundles administered [C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle2\target\TestBundle2-1.0.0-SNAPSHOT.jar, C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle3\target\TestBundle3-1.0.0-SNAPSHOT.jar]
# Will start bundles: [TestBundle2 [1], TestBundle3 [2]]
# starting TestBundle2
# started TestBundle2
# starting TestBundle3
### Starting Zar
# started TestBundle3
------------------------------- REPORT --------------------------
Framework class org.apache.felix.framework.Felix
Framework type META-INF/services
Storage C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle3\target\fw
Keep false
Security false
Run bundles C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle2\target\TestBundle2-1.0.0-SNAPSHOT.jar
C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle3\target\TestBundle3-1.0.0-SNAPSHOT.jar
Classpath C:\Users\tbull\.bnd\cache\https%3A%2F%2Fgithub.com%2Fbndtools%2Fbundle-hub%2Fraw%2Fmaster%2Forg.apache.felix.framework\org.apache.felix.framework-4.4.0.jar
C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\cnf\buildrepo\biz.aQute.launcher\biz.aQute.launcher-latest.jar
C:\Users\tbull\.bnd\cache\https%3A%2F%2Fgithub.com%2Fbndtools%2Fbundle-hub%2Fraw%2Fmaster%2Fbiz.aQute.junit\biz.aQute.junit-1.2.0.jar
System Packages sun.reflect
org.osgi.framework.startlevel;uses:="org.osgi.framework";version="1.0"
org.osgi.framework.wiring;uses:="org.osgi.resource
org.osgi.framework";version="1.1"
org.osgi.framework.hooks.bundle;uses:="org.osgi.framework";version="1.1"
org.osgi.framework.hooks.service;uses:="org.osgi.framework";version="1.1"
org.osgi.framework.hooks.resolver;uses:="org.osgi.framework.wiring";version="1.0"
org.osgi.framework.namespace;uses:="org.osgi.resource";version="1.0"
org.osgi.framework.launch;uses:="org.osgi.framework";version="1.1"
org.osgi.framework;version="1.7"
org.osgi.framework.hooks.weaving;uses:="org.osgi.framework.wiring";version="1.0"
org.osgi.resource;version="1.0"
org.osgi.service.url;version="1.0"
org.osgi.service.packageadmin;uses:="org.osgi.framework";version="1.2"
org.osgi.service.startlevel;uses:="org.osgi.framework";version="1.1"
org.osgi.util.tracker;uses:="org.osgi.framework";version="1.5.1"
junit.framework;version="3.8";uses:="org.junit.runner
org.junit.runner.manipulation
org.junit.runner.notification"
org.junit;version="4.10";uses:="org.hamcrest
org.junit.internal"
org.junit.experimental;version="4.10";uses:="org.junit.runner
org.junit.runners.model"
org.junit.experimental.categories;version="4.10";uses:="org.junit.runner
org.junit.runner.manipulation
org.junit.runners
org.junit.runners.model"
org.junit.experimental.max;version="4.10";uses:="org.junit.runner
org.junit.runner.notification"
org.junit.experimental.results;version="4.10";uses:="org.hamcrest
org.junit.runner
org.junit.runner.notification"
org.junit.experimental.runners;version="4.10";uses:="org.junit.runners
org.junit.runners.model"
org.junit.experimental.theories;version="4.10";uses:="org.junit.experimental.theories.internal
org.junit.internal
org.junit.runners
org.junit.runners.model"
org.junit.experimental.theories.internal;version="4.10";uses:="org.junit.experimental.theories
org.junit.runners.model"
org.junit.experimental.theories.suppliers;version="4.10";uses:="org.junit.experimental.theories"
org.junit.internal;version="4.10";uses:="org.hamcrest
org.junit.runner
org.junit.runner.notification"
org.junit.internal.builders;version="4.10";uses:="org.junit.runner
org.junit.runner.notification
org.junit.runners.model"
org.junit.internal.matchers;version="4.10";uses:="org.hamcrest"
org.junit.internal.requests;version="4.10";uses:="org.junit.runner
org.junit.runner.manipulation"
org.junit.internal.runners;version="4.10";uses:="junit.framework
org.junit.runner
org.junit.runner.manipulation
org.junit.runner.notification"
org.junit.internal.runners.model;version="4.10";uses:="org.junit.internal
org.junit.runner
org.junit.runner.notification
org.junit.runners.model"
org.junit.internal.runners.rules;version="4.10";uses:="org.junit.runners.model"
org.junit.internal.runners.statements;version="4.10";uses:="org.junit.runners.model"
org.junit.matchers;version="4.10";uses:="org.hamcrest
org.junit.internal.matchers"
org.junit.rules;version="4.10";uses:="org.hamcrest
org.junit.runner
org.junit.runners.model"
org.junit.runner;version="4.10";uses:="junit.framework
org.junit.internal
org.junit.runner.manipulation
org.junit.runner.notification
org.junit.runners.model"
org.junit.runner.manipulation;version="4.10";uses:="org.junit.runner"
org.junit.runner.notification;version="4.10";uses:="org.junit.runner"
org.junit.runners;version="4.10";uses:="org.junit.internal.runners
org.junit.rules
org.junit.runner
org.junit.runner.manipulation
org.junit.runner.notification
org.junit.runners.model"
org.junit.runners.model;version="4.10";uses:="org.junit.runner"
org.hamcrest;version="1.0.0"
org.hamcrest.core;version="1.0.0";uses:="org.hamcrest"
org.hamcrest.internal;version="1.0.0";uses:="org.hamcrest"
Properties
launch.noreferences false
tester.port 54621
tester.dir C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle3\target\test-reports
launch.trace true
tester.names org.example.tests.ExampleTest
launch.services true
launch.activators aQute.junit.Activator
launch.system.packages sun.reflect,org.osgi.framework.startlevel;uses:="org.osgi.framework";version="1.0",org.osgi.framework.wiring;uses:="org.osgi.resource,org.osgi.framework";version="1.1",org.osgi.framework.hooks.bundle;uses:="org.osgi.framework";version="1.1",org.osgi.framework.hooks.service;uses:="org.osgi.framework";version="1.1",org.osgi.framework.hooks.resolver;uses:="org.osgi.framework.wiring";version="1.0",org.osgi.framework.namespace;uses:="org.osgi.resource";version="1.0",org.osgi.framework.launch;uses:="org.osgi.framework";version="1.1",org.osgi.framework;version="1.7",org.osgi.framework.hooks.weaving;uses:="org.osgi.framework.wiring";version="1.0",org.osgi.resource;version="1.0",org.osgi.service.url;version="1.0",org.osgi.service.packageadmin;uses:="org.osgi.framework";version="1.2",org.osgi.service.startlevel;uses:="org.osgi.framework";version="1.1",org.osgi.util.tracker;uses:="org.osgi.framework";version="1.5.1",junit.framework;version="3.8";uses:="org.junit.runner,org.junit.runner.manipulation,org.junit.runner.notification",org.junit;version="4.10";uses:="org.hamcrest,org.junit.internal",org.junit.experimental;version="4.10";uses:="org.junit.runner,org.junit.runners.model",org.junit.experimental.categories;version="4.10";uses:="org.junit.runner,org.junit.runner.manipulation,org.junit.runners,org.junit.runners.model",org.junit.experimental.max;version="4.10";uses:="org.junit.runner,org.junit.runner.notification",org.junit.experimental.results;version="4.10";uses:="org.hamcrest,org.junit.runner,org.junit.runner.notification",org.junit.experimental.runners;version="4.10";uses:="org.junit.runners,org.junit.runners.model",org.junit.experimental.theories;version="4.10";uses:="org.junit.experimental.theories.internal,org.junit.internal,org.junit.runners,org.junit.runners.model",org.junit.experimental.theories.internal;version="4.10";uses:="org.junit.experimental.theories,org.junit.runners.model",org.junit.experimental.theories.suppliers;version="4.10";uses:="org.junit.experimental.theories",org.junit.internal;version="4.10";uses:="org.hamcrest,org.junit.runner,org.junit.runner.notification",org.junit.internal.builders;version="4.10";uses:="org.junit.runner,org.junit.runner.notification,org.junit.runners.model",org.junit.internal.matchers;version="4.10";uses:="org.hamcrest",org.junit.internal.requests;version="4.10";uses:="org.junit.runner,org.junit.runner.manipulation",org.junit.internal.runners;version="4.10";uses:="junit.framework,org.junit.runner,org.junit.runner.manipulation,org.junit.runner.notification",org.junit.internal.runners.model;version="4.10";uses:="org.junit.internal,org.junit.runner,org.junit.runner.notification,org.junit.runners.model",org.junit.internal.runners.rules;version="4.10";uses:="org.junit.runners.model",org.junit.internal.runners.statements;version="4.10";uses:="org.junit.runners.model",org.junit.matchers;version="4.10";uses:="org.hamcrest,org.junit.internal.matchers",org.junit.rules;version="4.10";uses:="org.hamcrest,org.junit.runner,org.junit.runners.model",org.junit.runner;version="4.10";uses:="junit.framework,org.junit.internal,org.junit.runner.manipulation,org.junit.runner.notification,org.junit.runners.model",org.junit.runner.manipulation;version="4.10";uses:="org.junit.runner",org.junit.runner.notification;version="4.10";uses:="org.junit.runner",org.junit.runners;version="4.10";uses:="org.junit.internal.runners,org.junit.rules,org.junit.runner,org.junit.runner.manipulation,org.junit.runner.notification,org.junit.runners.model",org.junit.runners.model;version="4.10";uses:="org.junit.runner",org.hamcrest;version="1.0.0",org.hamcrest.core;version="1.0.0";uses:="org.hamcrest",org.hamcrest.internal;version="1.0.0";uses:="org.hamcrest"
launch.timeout 0
launch.embedded false
tester.continuous false
launch.storage.dir C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle3\target\fw
launch.bundles C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle2\target\TestBundle2-1.0.0-SNAPSHOT.jar,C:\dev\git\bnd\bnd-maven-plugin-parent\samples\sample-projects\TestBundle3\target\TestBundle3-1.0.0-SNAPSHOT.jar
launch.keep false
tester.trace true
Id State Modified Location
0 ACTIV <> System Bundle
1 ACTIV <> file:/C:/dev/git/bnd/bnd-maven-plugin-parent/samples/sample-projects/TestBundle2/target/TestBundle2-1.0.0-SNAPSHOT.jar
2 ACTIV <> file:/C:/dev/git/bnd/bnd-maven-plugin-parent/samples/sample-projects/TestBundle3/target/TestBundle3-1.0.0-SNAPSHOT.jar
# starting activator aQute.junit.Activator@67117f44
# framework=org.apache.felix.framework [0]
# registered launcher with arguments for syncing
# will call main
# running in main thread
# test cases org.example.tests.ExampleTest
# using port 54621
# receivednames of classes to test org.example.tests.ExampleTest
# testing bundle null with org.example.tests.ExampleTest
# changed streams
! No class found: org.example.tests.ExampleTest, target bundle: null
# Installed bundles:
# System Bundle ACTIVE false
# file:/C:/dev/git/bnd/bnd-maven-plugin-parent/samples/sample-projects/TestBundle2/target/TestBundle2-1.0.0-SNAPSHOT.jar ACTIVE false
# file:/C:/dev/git/bnd/bnd-maven-plugin-parent/samples/sample-projects/TestBundle3/target/TestBundle3-1.0.0-SNAPSHOT.jar ACTIVE false
# add error to junit.framework.TestSuite@4ec6a292 : Cannot load class org.example.tests.ExampleTest, was it included in the test bundle?
java.lang.Exception: Cannot load class org.example.tests.ExampleTest, was it included in the test bundle?
at aQute.junit.Activator.addTest(Activator.java:322)
at aQute.junit.Activator.createSuite(Activator.java:296)
at aQute.junit.Activator.test(Activator.java:249)
at aQute.junit.Activator.run(Activator.java:91)
at aQute.launcher.Launcher$4.call(Launcher.java:1107)
at aQute.launcher.Launcher$4.call(Launcher.java:1105)
at aQute.launcher.Launcher.run(Launcher.java:239)
at aQute.launcher.Launcher.main(Launcher.java:90)
# created suite junit.framework.TestSuite@4ec6a292
# >>>> null, tests []
# running suite junit.framework.TestSuite@4ec6a292
# <<<<
# unset streams
Tests run : 0
Passed : -1
Errors : 1
Failures : 0