<div class="markdown">
<p dir="auto">On 27 Jan 2016, at 10:28, Aurelien Pupier wrote:</p>

<blockquote>
<p dir="auto">Hi,</p>

<p dir="auto">I'm currently trying to improve test structure for Jboss Fuse Tooling<br>
project (<a href="https://github.com/fusesource/fuseide">https://github.com/fusesource/fuseide</a>).</p>

<p dir="auto">On Max recommendation, I take a look at jbosstools-devdoc<br>
<a href="https://github.com/jbosstools/jbosstools-devdoc/blob/master/source/how_to_add_a_test_plugin_or_feature.adoc">https://github.com/jbosstools/jbosstools-devdoc/blob/master/source/how_to_add_a_test_plugin_or_feature.adoc</a></p>

<p dir="auto">When i take a look to<br>
<a href="https://github.com/jbosstools/jbosstools-server/blob/master/as/tests/org.jboss.tools.as.test.core/pom.xml">https://github.com/jbosstools/jbosstools-server/blob/master/as/tests/org.jboss.tools.as.test.core/pom.xml</a><br>
. This project is in tests folder but it launches tycho-surefire-plugin.<br>
As far as I understand Tycho, it means that it is launching an OSGi<br>
platform. From my point of view, it means that these tests are already<br>
integration tests and the only difference between tests and itests<br>
currently is more fast vs slow tests.</p>
</blockquote>

<p dir="auto">I disagree launching in osgi means it is an integration test.</p>

<p dir="auto">You can run fast tests with tyco-surefire-plugin or rater from eclipse - just don't launch with the workbench.</p>

<p dir="auto">If you run with the plain maven surefire plugin you will have to handle dependency management on your own afaics -<br>
i.e. you cannot depend on anything in the osgi or in p2 repos for that matter.</p>

<p dir="auto">Meaning any work done for Target platform will have to be done twice - one for existing target platform, another<br>
for your pure maven setup.</p>

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

<p dir="auto">so this will have to not rely on <em>any</em> eclipse osgi dependent api's.</p>

<p dir="auto">That is doable, but super limited. As long as you are aware of that and the need to maintain two "target platforms" <br>
that is fine.</p>

<p dir="auto">Need to find a different name than test or itest then though ;)</p>

<p dir="auto">Does it really make that big difference wether you use tyco-surefire vs plain maven-surefire speed wise ? (remember to not start the workbench ;)</p>

<p dir="auto">/max<br>
<a href="http://about.me/maxandersen">http://about.me/maxandersen</a></p>

</div>