You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Erick Dovale <er...@carosys.com> on 2005/11/01 17:12:09 UTC

surefire not running..

Hi there,
I am having trouble getting the surefire plugin to run my unit tests. It 
seems to be running the first unit test and crashing right after with 
the following exception:

Reporter method testStarting completed abruptly with an exception.
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1444)
        at 
org.codehaus.surefire.report.XMLReporter.testStarting(XMLReporter.jav
a:101)
        at 
org.codehaus.surefire.report.ReporterManager.testStarting(ReporterMan
ager.java:304)
        at 
org.codehaus.surefire.battery.TestListenerInvocationHandler.handleSta
rtTest(TestListenerInvocationHandler.java:143)
        at 
org.codehaus.surefire.battery.TestListenerInvocationHandler.invoke(Te
stListenerInvocationHandler.java:120)
        at $Proxy0.startTest(Unknown Source)
        at junit.framework.TestResult.startTest(TestResult.java:151)
        at junit.framework.TestResult.run(TestResult.java:103)
        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(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at 
org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.
java:246)
        at 
org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:
220)
        at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:204)
        at org.codehaus.surefire.Surefire.run(Surefire.java:153)
        at org.codehaus.surefire.Surefire.run(Surefire.java:77)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
        at 
org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:303)

        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:412)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:519)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:482)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:452)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:301)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:268)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:137)
        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(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        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 tried surefire 2.0 and 2.1-SNAPSHOT and both are having the same problem.

Any hints??

cheers,

edovale

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org