comments inlined.

Le 1/27/2016 1:26 PM, Max Rydahl Andersen a écrit :

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


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

When i take a look to
. 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.

I don't really have to handle these dependencies as we should mock them.
On the other side, I was using the same mechanism on another open source project and we didn't have a lot of trouble with dependencies. I'm not sure how Tycho/Maven was handling it.

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

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 ;)

Maybe we can discuss to have a third category effectively (and perhaps even a fourth with UI tests, but this is another story ^^)

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

Do you mean to launch in "Headless mode"?
At comparison, from Eclipse to launch the same test:
- using fragments: < 100ms
- using Headless mode: 16s
- using ui.ide application: 30s


Aurelien Pupier
Senior Software Engineer in JBoss Fuse Tooling Team