[jbosstools-dev] Eclipse plugins testing structure

Max Rydahl Andersen manderse at redhat.com
Wed Jan 27 07:26:58 EST 2016


On 27 Jan 2016, at 10:28, Aurelien Pupier wrote:

> Hi,
>
> I'm currently trying to improve test structure for Jboss Fuse Tooling
> project (https://github.com/fusesource/fuseide).
>
> On Max recommendation, I take a look at jbosstools-devdoc
> https://github.com/jbosstools/jbosstools-devdoc/blob/master/source/how_to_add_a_test_plugin_or_feature.adoc
>
> When i take a look to
> https://github.com/jbosstools/jbosstools-server/blob/master/as/tests/org.jboss.tools.as.test.core/pom.xml
> . This project is in tests folder but it launches 
> tycho-surefire-plugin.
> As far as I understand Tycho, it means that it is launching an OSGi
> platform. From my point of view, it means that these tests are already
> integration tests and the only difference between tests and itests
> currently is more fast vs slow tests.

I disagree launching in osgi means it is an integration test.

You can run fast tests with tyco-surefire-plugin or rater from eclipse - 
just don't launch with the workbench.

If you run with the plain maven surefire plugin you will have to handle 
dependency management on your own afaics -
i.e. you cannot depend on anything in the osgi or in p2 repos for that 
matter.

Meaning any work done for Target platform will have to be done twice - 
one for existing target platform, another
for your pure maven setup.

> What I wanted to achieve is to have really fast unit test, so I 
> created
> a fragment and so use maven-surefire-plugin. You can see the fragment
> https://github.com/fusesource/fuseide/tree/master/editor/tests/org.fusesource.ide.camel.editor.tests

so this will have to not rely on *any* eclipse osgi dependent api's.

That is doable, but super limited. As long as you are aware of that and 
the need to maintain two "target platforms"
that is fine.

Need to find a different name than test or itest then though ;)

Does it really make that big difference wether you use tyco-surefire vs 
plain maven-surefire speed wise ? (remember to not start the workbench 
;)

/max
http://about.me/maxandersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jbosstools-dev/attachments/20160127/3fffaab5/attachment.html 


More information about the jbosstools-dev mailing list