Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Multiple testclass invocations per plugin

it turns out you can run both maven-surefire-plugin and tycho-surefire-plugin together.
I added an FAQ https://wiki.eclipse.org/Tycho/FAQ#Can_I_run_eclipse-plugin_tests_also_outside_an_OSGi_container.3F

Regards,
Jan


On 24.10.17, 12:05, "tycho-user-bounces@xxxxxxxxxxx on behalf of Ed Willink" <tycho-user-bounces@xxxxxxxxxxx on behalf of ed@xxxxxxxxxxxxx> wrote:

    Hi
    After considerable pain attempting to empathize with magic nothing happenings, I can now be quite confident that while the correct answer is indeed use maven-surefire-plugin to run standalone tests, a further correct answer is that it is not possible to
     run both maven-surefire-plugin and tycho-surefire-plugin together. tycho-surefire-plugin won't run for a "jar" packaging and an "eclipse-test-plugin" packaging for tycho-surefire-plugin disrupts the maven functionality.
    Repro on: 
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=526404 <https://bugs.eclipse.org/bugs/show_bug.cgi?id=526404>
    Regards
    Ed Willink
    
    
    On 16/10/2017 09:10, Aurélien Pupier wrote:
    
    
    Hi,
    
    
    Mickaël Istria pointed me to this thread mail https://dev.eclipse.org/mhonarc/lists/tycho-user/msg07794.html I just registered to the mailing-list and so
     not sure that this mail will be added to the current thread.
    
    
    I can give some hints for one of the issue mentioned:
    
    
    "For a JUnit configuration, I do not want OSGI to start. (useUIHarness=false still starts OSGI). I cannot see how to do this with the tycho-surefire-plugin; seems contrary to its philosophy; providing non-Eclipse functionality within an Eclipse added
     value.
    
    
    So I presume I should revert to the maven-surefire-plugin, but it appears that the tycho-surefire-plugin subverts its functionality. I don't think I have succeeded in getting maven-surefire-plugin to run any tests. I thought I had but that was just
     a mega-confusion caused by the helpful "default-test"; the kind of help that I normally associate with Microsoft tools."
    
    
    To be able to launch the tests without OSGi, you need to go back to maven-surefire-plugin. You can have a look to this plugin  https://github.com/jbosstools/jbosstools-fuse/tree/master/core/tests/org.fusesource.ide.camel.model.service.core.tests
     and these places in the parent pom: 
    https://github.com/jbosstools/jbosstools-fuse/blob/master/pom.xml#L221 <https://github.com/jbosstools/jbosstools-fuse/blob/master/pom.xml#L221> and 
    https://github.com/jbosstools/jbosstools-fuse/blob/master/pom.xml#L265 <https://github.com/jbosstools/jbosstools-fuse/blob/master/pom.xml#L265>
    
    
    I take the opportunity of this discussion to point to a presentation (video <https://www.youtube.com/watch?v=IGkFy2H-d60>,
    
    slides <https://www.slideshare.net/AurelienPupier/fast-unit-tests-for-eclipse-plugins>) I provided at an EclipseCon explaining why using tests without launching OSGi is really a good thing for some unit tests, you will also see some alternatives to use maven-surefire-plugin for Eclipse tests.
    
    
    Regards,
    
    
    
    
    -- 
    AURÉLIEN PUPIER
    SENIOR SOFTWARE ENGINEER, FUSE TOOLING
    Red Hat France <https://www.redhat.com/>
    apupier@xxxxxxxxxx    IM: apupier
     <https://red.ht/sig>
    
    
    
    
    
    
     
    _______________________________________________
    tycho-user mailing list
    tycho-user@xxxxxxxxxxx
    To change your delivery options, retrieve your password, or unsubscribe from this list, visit
    https://dev.eclipse.org/mailman/listinfo/tycho-user
    
    
    
     <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
    Virus-free. 
    www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>  <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
    


Back to the top