[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [m2e-users] Running single JUnit tests with maven in Eclipse
|
Maybe because tests behave differently in Maven than Eclipse due to bugs in eclipse which stem from its inability to have different classpaths (test vs runtime vs compile etc..) - and the way that test dependencies from project X show up in Project Y when Y depends on X...
(although you could just use the command line - but that's not as nice....)
> -----Original Message-----
> From: m2e-users-bounces@xxxxxxxxxxx [mailto:m2e-users-
> bounces@xxxxxxxxxxx] On Behalf Of Igor Fedorenko
> Sent: 20 February 2013 14:19
> To: m2e-users@xxxxxxxxxxx
> Subject: Re: [m2e-users] Running single JUnit tests with maven in Eclipse
>
> I am not sure why we still keep "Run As... > Maven JUnit Test" menu item. It
> does not provide any explicit junit or testng support and is nothing more than
> an alias for running "mvn test".
>
> In most cases I do RunAs->JUnitTest, which "just works" as long as the tests
> do not depend on special setup done in pom.xml.
>
> --
> Regards,
> Igor
>
> On 2013-02-20 9:05 AM, Jeremie Bresson wrote:
> > Hi,
> >
> > According to this stackoverflow question [1], it is possible to run a single
> test with maven (I am new to maven):
> > mvn -Dtest=XxxxYyyyyTest#testAbc test
> >
> > I am looking for the same function in Eclipse (I assume it could be
> implemented in m2e):
> >
> > On a JUnit java file, in a maven project, I want a menu "Run As... > Maven
> JUnit Test"
> >
> > The first approach is to start maven run the specific selected test class (and
> even test method).
> > A very good integration would display the test result in the JUnit view and
> allow to rerun a specific test.
> >
> > * Do you know if such a function exists?
> > * Is there some interest for m2e (as enhancement bug) or should it be
> implemented in a separate plugin?
> >
> > Side note: I had a quick look at the jdt code. There is a
> JunitLaunchConfigurationDelegate class (org.eclipse.jdt.junit.core) and an
> extension point.
> >
> > Thanks a lot for your inputs.
> >
> > Jeremie Bresson.
> >
> >
> > [1]
> > http://stackoverflow.com/questions/1873995/run-a-single-test-method-
> wi
> > th-maven
> >
> >
> >
> > _______________________________________________
> > m2e-users mailing list
> > m2e-users@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/m2e-users
> >
> _______________________________________________
> m2e-users mailing list
> m2e-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/m2e-users