> -----Original Message----- > From: Brad Cox [mailto:[EMAIL PROTECTED] > Sent: dimanche 7 décembre 2008 18:36 > To: [email protected] > Subject: Re: JUnit4OSGi dependencies? > > > Be aware that project containing integration tests is not the > project under test. It's a separate project (creating a separate > bundle). > > I think I'm good there; soakit.test is my integration test bundle. But > I also have unit tests scattered around, esp in soakit.core. > > Can't I use junit4osgi for both?
Yes and No. In fact your (real) unit tests are in the src/main/test folder of the project under test and are executed when you launch the 'mvn test' command on your project. You use the regular junit test case API. Tests aren't executed inside an OSGi environment. Integration tests are in a separate project. You use the junit API or the junit4osgi API. Indeed, you can have pure-junit tests executed by junit4osgi (just extend TestCase as the SimpleTestCase class on http://felix.apache.org/site/apache-felix-ipojo-junit4osgi.html). They will be executed in the OSGi environment. > > PS: I think the NPE was because I put the junit4osgi stuff in the root > pom so I wouldn't have to track down every pom with unit tests. Where > that's supposed to go wasn't clear in your instructions. And reporting > such mistakes with a generic NPE didn't help! ;) I agree. I will improve the error handling, as well as deploy the current artifact only if enable and if it's a valid bundle. Thanks for your feedback. Regards, Clement > > >>> [INFO] soakit ................................................ > >>> SUCCESS [3.304s] [INFO] soakit.core > >>> ........................................... SUCCESS [1:01.841s] > >>> [INFO] soakit.port ........................................... > >>> SUCCESS [1.106s] [INFO] soakit.port.file > >>> ...................................... SUCCESS [1:27.271s] [INFO] > >>> soakit.port.http ...................................... SUCCESS > >>> [1:24.200s] [INFO] soakit.port.jms > >>> ....................................... SUCCESS [1:22.599s] [INFO] > >>> soakit.transform ...................................... SUCCESS > >>> [1.074s] [INFO] soakit.transform.identity > >>> ............................. SUCCESS [1:22.983s] [INFO] > >>> soakit.transform.log .................................. SUCCESS > >>> [1:22.013s] [INFO] soakit.transform.pep > >>> .................................. SUCCESS [1:39.860s] [INFO] > >>> soakit.transform.xsl .................................. SUCCESS > >>> [1:23.397s] [INFO] soakit.test > >>> ........................................... SUCCESS [1:22.758s] > >>> [INFO] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

