[ http://jira.codehaus.org/browse/MSUREFIRE-23?page=comments#action_55849 ]
Gunnar Hillert commented on MSUREFIRE-23:
-----------------------------------------
Hi Jesse,
Finally, I successfully applied the patch and everything compiled fine except
the surefire-report-maven-plugin. See below.
Once I 'deactvated' the SurefireREportParserTest test, the report plug-in was
compiled and installed successfully, though.
So far I did only some very quick testing - The good news is that 2 simple
TestNG tests I have run, worked fine.
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Fast test
Slow test
[surefire] Running Command line test
[surefire] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.031 sec
===============================================
Suite for Command line test
Total tests run: 2, Failures: 0, Skips: 0
===============================================
However, some of my 'real' tests failed (Exceptions). I will need to look at
those a little bit closer later tonight.
Also, are there any further settings I have to make in my POM regarding
TestNG's configuration? Or is everything the same as the typical settings you
make for JUnit (include/exclude tests, skip tests etc.)?
In my test output I see the following output that is a bit irritating:
[surefire] Running Command line test (What does that mean??)
+++++++++++++++++++++++++++++++++++
As mentioned above, the "surefire-report-maven-plugin" was not successfully
built initially due to a failing test.
[ERROR] BUILD ERROR
[INFO]
----------------------------------------------------------------------------
[INFO] There are some test failure.
[INFO]
----------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: There are some test
failure.
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:555)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecut
or.java:472)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleEx
ecutor.java:303)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.ja
va:270)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: There are some test
failure.
at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:401)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:432)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:530)
... 16 more
[INFO]
----------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Sat Jan 14 13:50:29 EST 2006
[INFO] Final Memory: 5M/11M
[INFO]
----------------------------------------------------------------------------
============================================================
org.codehaus.mojo.surefire.SurefireReportParserTest.txt contains:
-------------------------------------------------------------------------------
Battery: org.codehaus.mojo.surefire.SurefireReportParserTest
-------------------------------------------------------------------------------
Tests run: 6, Failures: 1, Errors: 0, Time elapsed: 0.094 sec
testParseXMLReportFiles(org.codehaus.mojo.surefire.SurefireReportParserTest)
Time elapsed: 0.062 sec <<< FAILURE!
[ stdout ] ---------------------------------------------------------------
suite name CircleTest has group com.shape
suite name PointTest has group com.shape
[ stderr ] ---------------------------------------------------------------
[ stacktrace ] -----------------------------------------------------------
junit.framework.AssertionFailedError: expected:<2> but was:<3>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:282)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:201)
at junit.framework.Assert.assertEquals(Assert.java:207)
at
org.codehaus.mojo.surefire.SurefireReportParserTest.testParseXMLReportFiles(SurefireReportParserTest.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:242)
at
org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBattery.java:216)
at org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:303)
at org.apache.maven.surefire.Surefire.run(Surefire.java:227)
at org.apache.maven.surefire.Surefire.run(Surefire.java:102)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.maven.surefire.SurefireBooter.runTestsInProcess(SurefireBooter.java:293)
at org.apache.maven.surefire.SurefireBooter.run(SurefireBooter.java:208)
at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:383)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:432)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:530)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
I hope this provides some quick initial feedback.
> Support TestNG
> --------------
>
> Key: MSUREFIRE-23
> URL: http://jira.codehaus.org/browse/MSUREFIRE-23
> Project: Maven 2.x Surefire Plugin
> Type: New Feature
> Reporter: Mike Perham
> Attachments: maven-surefire-plugin-patch.txt,
> maven-surefire-report-maven-plugin-patch.txt, surefire-patch.txt,
> surefire-patch.txt, surefire-patch.txt, testng-4.4.5-jdk14.jar,
> testng-4.4.5-jdk15.jar
>
>
> Add support for running unit tests with TestNG.
> http://www.testng.org
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]