best approach for unit testing [message #56458] |
Tue, 10 January 2006 09:01  |
Eclipse User |
|
|
|
Originally posted by: morova.bol.com.br
Hello,
We are starting our development using osgi, what would you suggest as a
best approach for unit testing? I see three approaches:
- In normal java development we create parallel source trees in the same
project, one for code and one for tests.
- The eclipse project uses separate plugins for testing.
- I was thinking about using fragments, so I don't need to put junit
dependencies in the main bundle but could deploy the test code as I wish.
Comments anyone?
Gustavo
|
|
|
|
|
|
|
Solution found ? best approach for unit testing [message #100843 is a reply to message #61156] |
Thu, 01 November 2007 13:01  |
Eclipse User |
|
|
|
Originally posted by: Stefan-Isele.gmx.de
Did you find a solution ?
could you please give me a tip ?
Can I use the JUint PlugIn Test Runner to test OSGI-Bundle ?
Thanks
Stefan Isele
Gustavo Morozowski schrieb:
> I am trying right now with two approaches -
>
> - Junit and JUnitRunner Knoplerfish bundles
> (http://www.knopflerfish.org/repo/index.html) where I can register a unit
> test to be run by the runner bundle, more details in
> https://www.knopflerfish.org/svn/knopflerfish.org/trunk/osgi /bundles_opt/junit/readme.txt
>
> - Markus Barchfeld article about plug-in test automation, available in
> http://www.eclipse.org/articles/Article-PDE-Automation/autom ation.html
>
> I will report my progress here.
>
> Gustavo
>
> On Thu, 09 Feb 2006 11:38:50 -0500, Jeff McAffer wrote:
>
>> you may have to set Eclipse-LazyStart: true or contrive to have your bundle
>> started by default. If you are launching as an Equinox framework you
>> can do this. Alternatively we are looking at putting in a switch to
>> have Update.configurator start all bundles as they are installed. That
>> capability is not in yet.
>>
>> Jeff
>>
>> "Gustavo Morozowski" <morova@bol.com.br> wrote in message
>> news:pan.2006.02.01.12.41.04.836824@bol.com.br...
>>> I created a separate test bundle with dependencies on junit and tried
>>> to run it as Junit plug-in test, but I'm having trouble getting the
>>> reference to bundle context. My bundle test Activator class saves a
>>> BundleContext reference on a static field so I can access it from the
>>> test case, but it seems it's not being called before unit test
>>> execution.
>
|
|
|
Powered by
FUDForum. Page generated in 0.03054 seconds