Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Is there a way to run OSGi tests from inside an eclipse-plugin project?

2011/6/10 TK Gospodinov <tk@xxxxxxxxxxxxxx>
I have an eclipse-test-plugin where I keep my JUnit tests for the eclipse-plugin project that I am developing. However, I also need to be able to run tests on code that resides in internal packages within my eclipse-plugin project. Is there a way to run OSGi-enabled tests from inside my eclipse-plugin (in src/test/java)?

you may use a fragment to host the tests, look at egit core tests if you need an example:

http://egit.eclipse.org/w/?p=egit.git;a=tree;f=org.eclipse.egit.core.test;h=6be0a6fa8b955d69860a8eecde8cfe14e2497b2e;hb=HEAD 
here the corresponding manifest of the test fragment extending the egit core bundle for
testing, put the test class in the same package as the class under test but host it in the test fragment
this way it has full access to all internals
http://egit.eclipse.org/w/?p=egit.git;a=blob;f=org.eclipse.egit.core.test/META-INF/MANIFEST.MF;h=9ddb8660cc122a70007e9b039beed35c60f6ecc6;hb=HEAD

--
Matthias

Back to the top