> >
> > 1. My understanding is that normally test clases for an
> Eclipse plugin
> > should be separated into a separate test bundle. But why
> so? What are the
> > advantages of this over just placing them into a separate
> directory/test
> > package following the Maven convention? I read that the downside of
> > following Maven convention is that you will then need to
> include your test
> > code in your deployable plug-ins. But as I understand it,
> couldn't you just
> > use 'mvn package assembly:assembly' to build it to filter
> out the test
> > classes in the end? So it is not very clear to me as to
> why putting test
> > classes into a separate fragment is more beneficial in this case.
>
> This is not Tycho specific, but rather how Eclipse/PDE JUnit support
> works, so PDE newsgroup is probably a better place to get definitive
> answer to why exactly this is the case. The way I understand it,
> separating production and test code into individual plugins
> allows PDE
> to use proper compile classpath with all dependencies and classpath
> visibility configured the same way as at runtime.
>
On the other hand, deploying the test cases in different plug-ins
has several drawbacks:
- Use can't test protected members.
- You won't see the code coverage (at least when using the eclipse
test framework, I don't know how this is handled in tycho)
So we ended up to put unit tests into the same plug-in and use mvn
package assembly:assembly to strip of the unit tests from the jar.
(The only drawback is the remaining dependency of junit...)
Ulli
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email