#172 Unnessary JUnit dependency and Bundled Tests

open
nobody
Quantum (119)
5
2009-08-13
2009-08-13
Joelle Lam
No

Ideally, Quantum can be installed on other Eclipse RCPs. A frustrating dependency is junit which is only need unit tests. Ideally it would either be an optional dependency or the tests will be separated out (since users also don't need the test bits).

Discussion

  • Julen Parra
    Julen Parra
    2009-08-14

    What are exactly the problems you find? Quantum already packs JUnit, so you don't need to add anything (correct me if the situation in RCPs is different.) So it's the added size or license considerations or something else. Just to know the kind of solutions available. I decided to just add JUnit and the unit tests instead of doing some work and packing the unit tests as plugin fragments (that's I think the canonical way of removing this problem.) So the canonical way is better than my way, I'm big enough to recognize it, but would like more details on the kind of practical problems generated. My reasoning on taking that decision was something like "It's just a bit of added size, who will care?" Now I find that someone cares :o), so please elaborate.

     
  • Joelle Lam
    Joelle Lam
    2009-08-14

    Aptana is considering offering Quantum as a featured plugin for Database Users. However, when you try to install it on Aptana, it requires JUnit (which Aptana currently doesn't ship). If you look in your plugins directory you will see that org.junit is not actually shipped in Quantum today and that is why it fails to install.

    Ideally, users would not have to pull the Test bits and therefore not require Junit. We currently keep our tests in separate plugins although doing it as fragment is also an option (http://rcpquickstart.com/2007/06/20/unit-testing-plug-ins-with-fragments/).

    So although size is important to us, more importantly is that the dependency doesn't stop our users from downloading Quantum as it does today.

    What are your thoughts?

     
  • Julen Parra
    Julen Parra
    2009-08-18

    Uhm, who would have known it? JUnit is part of the standard Eclipse distribution, so Quantum does not include it. Of course, in an RCP you have to add it.

    So it's a nag, I recognize it. I'll solve it. I'm a bit behind in adding some logging to Quantum. When it's finished, I'll do this. Next release should have it.

    Thanks for the feedback.

     
  • Julen Parra
    Julen Parra
    2009-08-22

    Well, Quantum 3.3.2 is just released, and the JUnit dependency hopefully removed. It's now in a new plugin fragment (quantum-plugin.test) that doesn't appear in the release, so all should be well. Test it please and close the bug if everything works.

     
  • Joelle Lam
    Joelle Lam
    2009-08-26

    Hello,
    I just ran the test on 3.3.2 and it seems that the junit dependency in 3.3.2 still exists :-(. I simply select "com.quantum.feature" (id: com.quantum.feature.feature.group) and nothing else, but the dependency still appears.

    Regards,
    Joelle

     
  • Julen Parra
    Julen Parra
    2009-08-27

    Rats! Well, I looked and seems like even if you don't add the fragment to the build, the plugins that are dependent on the main quantum plugin will decide that they have also a dependence on the fragment, and so, on junit. Well, I have taken the tests definitively out to another plugin, with no adverse results at the moment, but would like to be sure that that was the problem. How are you knowing the dependencies that the feature has? You say that you simply select. Where? I'd like to check before shipping.

    Thanks for the feedback.

     
  • Joelle Lam
    Joelle Lam
    2009-08-27

    Hello,

    I am install Aptana Studio 1.5 and simply adding the Quantum Site to my installation. You will then see the dependency error.

    The other option is just to grep through your features and plugins for junit.

    Regards,
    Joelle

     
  • Julen Parra
    Julen Parra
    2009-08-27

    The release 3.3.3 is installed now in the update site. I tried installing it in Aptana and it worked for me. Make a try and see how it goes.

     
  • Joelle Lam
    Joelle Lam
    2009-08-27

    Bug fixed. Will be available in the next release.

     
  • Joelle Lam
    Joelle Lam
    2009-08-27

    Looks good! Thanks!