maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Dolk <andreas.dolk.mo...@googlemail.com>
Subject Re: maven surefire - selecting providers
Date Wed, 24 Jul 2013 20:46:28 GMT
Hi,

just tried it and yes, only TestNG is started. But it can't execute the
tests. Doesn't find a test method. Maybe because the test actually use a
special runner?

@RunWith(ExampleGroupRunner.class)

@SuppressWarnings("all")

public class JnSpecBPMNProcessSpec {

//...


Unless I can talk the jnario team into supporting TestNG, I think, I still
need a solution to disable the TestNG provider for a certain set of tests
in my project...

Best regards,

Andreas




2013/7/24 Andreas Gudian <andreas.gudian@gmail.com>

> When both Junit and TestNg tests are found, then the TestNG provider should
> be selected automatically and used in mixed mode.
>
> Did you try not specifying any provider at all?
>
> Am Mittwoch, 24. Juli 2013 schrieb Andreas Dolk :
>
> > But on second thought - TestNG looked at the test but actually didn't
> > execute them. It reported "Tests run: 0, Failures: 0, Errors: 0, Skipped:
> > 0". That should be different in "mixed mode", shouldn't it? If I could
> > activate mixed mode correctly, then I could drop the jUnit provider
> anyway
> > and have TestNG execute all test classes. That would even be a far better
> > solution to my real problem.
> >
> > I need the additional jUnit tests only because I have some test written
> in
> > xtend (where the integration with TestNG is not that good in eclipse
> right
> > now) and because I use jnario, which creates jUnit tests only.
> >
> > So my real problem is running all tests in a maven build. If it is
> possible
> > with TestNG only, even better!
> >
> > Best regards,
> > Andreas
> >
> >
> > 2013/7/24 Andreas Dolk <andreas.dolk.mobil@googlemail.com>
> >
> > > Ah sure, sorry:
> > >
> > > jUnit: 4.11
> > > TestNG: 6.8.5
> > >
> > > And thanks for the "mixed mode" hint, I study the reference, maybe I
> find
> > > something in the build files!
> > >
> > > Best regards,
> > > Andreas
> > >
> > >
> > > 2013/7/24 Francesco Mari <mari.francesco@gmail.com>
> > >
> > >> I still wasn't able to reproduce your issue.
> > >>
> > >> Looks like TestNG is running in "mixed mode" [1][2]. The last missing
> > >> information is the version of JUnit and TestNG you are using. Can you
> > >> provide this piece of configuration?
> > >>
> > >> [1]: http://testng.org/doc/migrating.html
> > >> [2]: http://testng.org/doc/documentation-main.html#junit
> > >>
> > >>
> > >> 2013/7/24 Andreas Dolk <andreas.dolk.mobil@googlemail.com>
> > >>
> > >> > Hi Francesco,
> > >> >
> > >> > I'm using 2.15
> > >> >
> > >> > And here's the result from a test run, that's what happens. The
> tests
> > >> are
> > >> > *only* jUnit tests. I've only replaced path and package names. BTW,
> > the
> > >> > jUnit times are net execution times (unfair!!), testNG reports the
> > total
> > >> > times (fair) ;) The other annoying part is that TestNG picks up far
> > more
> > >> > classes then jUnit...
> > >> >
> > >> > The tests are auto-compiled from jnario specs (jnario.org) which
> > >> shouldn't
> > >> > make a difference - at the end it's classes compiled from java
> source
> > >> > files.
> > >> >
> > >> > Regards,
> > >> > Andreas
> > >> >
> > >> >
> > >> >
> > >> > > mvn -Dtest=JnSpec* test
> > >> >
> > >> > ...
> > >> >
> > >> > [INFO] --- maven-surefire-plugin:2.15:test (default-test) @
> > a42-order-be
> > >> > ---
> > >> > [INFO] Surefire report directory: /<path>/target/surefire-reports
> > >> > [INFO] Using configured provider
> > >> > org.apache.maven.surefire.junitcore.JUnitCoreProvider
> > >> > [INFO] Using configured provider
> > >> > org.apache.maven.surefire.testng.TestNGProvider
> > >> > [INFO] parallel='none', perCoreThreadCount=true, threadCount=2,
> > >> > useUnlimitedThreads=false
> > >> >
> > >> > -------------------------------------------------------
> > >> >  T E S T S
> > >> > -------------------------------------------------------
> > >> >
> > >> > -------------------------------------------------------
> > >> >  T E S T S
> > >> > -------------------------------------------------------
> > >> > Running <package>.JnSpecBPMNProcessSpec
> > >> > Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:
> 0.199
> > >> sec -
> > >> > in <package>.JnSpecBPMNProcessSpec
> > >> > Running <package>.JnSpecCreateTheResultMessageOfACancellationSpec
> > >> > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:
> 1.485
> > >> sec -
> > >> > in <package>.JnSpecCreateTheResultMessageOfACancellationSpec
> > >> > Running
> > >> <package>.JnSpecServicesToSupportCancellationOfItemsOfOneOrderSpec
> > >> > Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:
> 0.471
> > >> sec -
> > >> > in
> <package>.JnSpecServicesToSupportCancellationOfItemsOfOneOrderSpec
> > >> > Running
> > >> >
> > >>
> >
> <package>.JnSpecServicesToSupportCancellationOfItemsOfOnePurchaseOrderSpec
> > >> > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:
> 0.975
> > >> sec -
> > >> > in
> > >> >
> > >>
> >
> <package>.JnSpecServicesToSupportCancellationOfItemsOfOnePurchaseOrderSpec
> > >> > Running
> > >> >
> > >> >
> > >> <package>.JnSpecVerifyingTheCancellation
>



-- 
Andreas Dolk

Zurmainerstraße 33
D-54292 Trier
Phone「+49 651 4362884」
Mobile「+49 177 4970815」
EMail「andreas.dolk.mobil@googlemail.com」

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message