I'm afraid you've hit a point where Learn-PaxExam and recent Pax Exam
releases have slightly gone out of synch.
If you replace "junitBundles()" by "new JUnitBundlesOption()", the
problem should be gone.
Reason: junitBundles() by default enables the JUnitProbeInvoker which is
required for the JUnit driver, but not for the plumbing API.
By the way, is there any particular reason you're trying to use the
plumbing API?
In general, it should be easier getting started with the JUnit driver,
and there are plenty of examples in Pax Exam's own regression tests, see
https://github.com/ops4j/org.ops4j.pax.exam2/tree/master/itest/src/it/regression-multi
Best regards,
Harald
Am 15.08.2012 11:51, schrieb Mohamed Nufail:
Hi,
I'm trying out Pax Exam plumbing API. I'm following the Learn-PaxExam
lesson at [1]. I'm having almost the exact code. The probe methods does
only a System.out.print. Configuration has only junitBundles(). But I am
getting the following error.
testOSGi(org.psample.PlumbingOSGiTest)org.ops4j.pax.exam.TestContainerException:
[initializationError(org.psample.Probe): No runnable methods]
at
org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.invokeViaJUnit(JUnitProbeInvoker.java:128)
at
org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.findAndInvoke(JUnitProbeInvoker.java:94)
at
org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.call(JUnitProbeInvoker.java:77)
at
org.ops4j.pax.exam.nat.internal.NativeTestContainer.call(NativeTestContainer.java:95)
at
org.ops4j.pax.exam.spi.reactors.EagerSingleStagedReactor.invoke(EagerSingleStagedReactor.java:85)
at org.psample.PlumbingOSGiTest.testOSGi(PlumbingOSGiTest.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Caused by: java.lang.Exception: No runnable methods
at
org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.java:157)
at
org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:102)
at org.junit.runners.ParentRunner.validate(ParentRunner.java:336)
at org.junit.runners.ParentRunner.<init>(ParentRunner.java:74)
at
org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:56)
at
org.ops4j.pax.exam.invoker.junit.internal.ContainerTestRunner.<init>(ContainerTestRunner.java:53)
at
org.ops4j.pax.exam.invoker.junit.internal.ContainerTestRunnerBuilder.runnerForClass(ContainerTestRunnerBuilder.java:46)
at
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
at
org.ops4j.pax.exam.invoker.junit.internal.ContainerTestRunnerClassRequest.getRunner(ContainerTestRunnerClassRequest.java:60)
at
org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:33)
at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
at
org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.invokeViaJUnit(JUnitProbeInvoker.java:124)
... 20 more
Any help would be appreciated.
Thanks,
Nufail.
[1]
https://github.com/tonit/Learn-PaxExam/blob/master/lesson-porcelain/src/test/java/org/ops4j/pax/exam/lesson2/
--
Mohamed Nufail
Undergraduate,
Department of Computer Science & Engineering,
University of Moratuwa.
Blog: http://www.nufailm.blogspot.com/
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general