<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi,<br>
    <br>
    comments inlined.<br>
    <br>
    <div class="moz-cite-prefix">Le 1/27/2016 1:26 PM, Max Rydahl
      Andersen a écrit :<br>
    </div>
    <blockquote
      cite="mid:668BD024-6140-4CAC-8CB5-C28F3DAEB8A5@redhat.com"
      type="cite">
      <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 moz-do-not-send="true"
              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 moz-do-not-send="true"
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 moz-do-not-send="true"
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.If
          you run with the plain maven surefire plugin you will have to
          handle dependency management on your own afaics -<br>
        </p>
      </div>
    </blockquote>
    <blockquote
      cite="mid:668BD024-6140-4CAC-8CB5-C28F3DAEB8A5@redhat.com"
      type="cite">
      <div class="markdown">
        <p dir="auto">
          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>
      </div>
    </blockquote>
    <br>
    I don't really have to handle these dependencies as we should mock
    them.<br>
    On the other side, I was using the same mechanism on another <a
      href="https://github.com/bonitasoft/bonita-studio">open source
      project</a> and we didn't have a lot of trouble with dependencies.
    I'm not sure how Tycho/Maven was handling it.<br>
    <br>
    <blockquote
      cite="mid:668BD024-6140-4CAC-8CB5-C28F3DAEB8A5@redhat.com"
      type="cite">
      <div class="markdown">
        <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 moz-do-not-send="true"
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>
      </div>
    </blockquote>
    Maybe we can discuss to have a third category effectively (and
    perhaps even a fourth with UI tests, but this is another story ^^)<br>
    <br>
    <blockquote
      cite="mid:668BD024-6140-4CAC-8CB5-C28F3DAEB8A5@redhat.com"
      type="cite">
      <div class="markdown">
        <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>
      </div>
    </blockquote>
    <br>
    Do you mean to launch in "Headless mode"?<br>
    At comparison, from Eclipse to launch the same test:<br>
    - using fragments: &lt; 100ms <br>
    - using Headless mode: 16s<br>
    - using ui.ide application: 30s<br>
    <br>
    <blockquote
      cite="mid:668BD024-6140-4CAC-8CB5-C28F3DAEB8A5@redhat.com"
      type="cite">
      <div class="markdown">
        <p dir="auto">/max<br>
          <a moz-do-not-send="true" href="http://about.me/maxandersen">http://about.me/maxandersen</a></p>
      </div>
    </blockquote>
    Regards,<br>
    <pre class="moz-signature" cols="72">-- 
Aurelien Pupier
Senior Software Engineer in JBoss Fuse Tooling Team
@apupier</pre>
  </body>
</html>