Try to set this in your project.properties: maven.test.failure.ignore = true
Then the test should go through, and you'll see what the error was in target/testreports Aslak > -----Original Message----- > From: Justinus Menzel [mailto:[EMAIL PROTECTED]] > Sent: 29. januar 2003 01:04 > To: [EMAIL PROTECTED] > Subject: problem with error reporting of JUnit in Maven > > > consider the TestCase: > import junit.framework.TestCase; > > public class ThrowErrorTest extends TestCase { > public void setUp() { > } > > public void testMe() { > // throw new IncompatibleClassChangeError(); > throw new RuntimeException("test runtime exception"); > // fail("test failed"); > } > > public static void main(String[] args) { > junit.textui.TestRunner.run(ThrowErrorTest.class); > } > } > > No matter how I let the test fail, the exception and > with it the reason for the failure is not reported > to the user. > > maven -e test > ... > [junit] Running ThrowErrorTest > [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.061 sec > [junit] [ERROR] TEST ThrowErrorTest FAILED > > BUILD FAILED > There were test failures. > at org.apache.tools.ant.taskdefs.Exit.execute(Exit.java:104) > at org.apache.tools.ant.Task.perform(Task.java:319) > at > org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:215) > at > org.apache.commons.jelly.impl.TagScript.run(TagScript.java:278) > at > org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:133) > at > org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:232) > at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:87) > at > org.apache.commons.jelly.impl.TagScript.run(TagScript.java:278) > at > org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:133) > at > org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:232) > at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:87) > at > org.apache.commons.jelly.impl.TagScript.run(TagScript.java:278) > at > org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:133) > at > org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:232) > at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:87) > at > org.apache.commons.jelly.impl.TagScript.run(TagScript.java:278) > at > org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:133) > at > org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:232) > at > com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:108) > at com.werken.werkz.Goal.fire(Goal.java:632) > at com.werken.werkz.Goal.attain(Goal.java:568) > at com.werken.werkz.Goal.attainPrecursors(Goal.java:481) > at com.werken.werkz.Goal.attain(Goal.java:566) > at > org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:384) > at > org.apache.maven.MavenSession.attainGoals(MavenSession.java:350) > at org.apache.maven.cli.App.doMain(App.java:523) > at org.apache.maven.cli.App.main(App.java:1079) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm > pl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc > cessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at com.werken.forehead.Forehead.run(Forehead.java:543) > at com.werken.forehead.Forehead.main(Forehead.java:573) > There were test failures. > Total time: 10 seconds > > Im using a 1.0-beta-8 > > Any idea? > > Thanks > > Justinus > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
