Unexplicable exception when running tests using Eclipse plugin

16 views
Skip to first unread message

Karthik Krishnan

unread,
Nov 5, 2009, 9:43:23 PM11/5/09
to testng...@googlegroups.com
Hi All,

I am not sure this is related to TestNG. I have been getting ArrayIndexOutOfBoundsException when running my unit tests.

SetUp

I am using Guice modules to create an object instance in my method annotated with @BeforeMethod set up. The class that I am trying to instantiate leverages AssistedInject to inject a string passed to the constructor at run time. This test class has some test methods as well. When I try to run the test class through Eclipse plugin, I get the following stack trace but not when running with Ant. I am sure what the problem is. Any help would be appreciated.

I will try to recreate the problem with a small sub set of my test class. I am using TestNG 5.10 and Guice 2.0

Thanks,

Kartik


===============================================
    com.jbe.test.MyTest
    Tests run: 0, Failures: 0, Skips: 0
===============================================

java.lang.ArrayIndexOutOfBoundsException: 0
    at org.testng.remote.strprotocol.TestResultMessage.getMessageAsString(TestResultMessage.java:137)
    at org.testng.remote.strprotocol.StringMessageSenderHelper.sendMessage(StringMessageSenderHelper.java:137)
    at org.testng.remote.strprotocol.RemoteMessageSenderTestListener.onTestFailure(RemoteMessageSenderTestListener.java:64)
    at org.testng.internal.Invoker.runTestListeners(Invoker.java:1520)
    at org.testng.internal.Invoker.runTestListeners(Invoker.java:1504)
    at org.testng.internal.Invoker.handleInvocationResults(Invoker.java:1241)
===============================================
tests
Total tests run: 0, Failures: 0, Skips: 0
===============================================


    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:969)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:110)
    at org.testng.TestRunner.runWorkers(TestRunner.java:759)
    at org.testng.TestRunner.privateRun(TestRunner.java:592)
    at org.testng.TestRunner.run(TestRunner.java:486)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
    at org.testng.SuiteRunner.run(SuiteRunner.java:204)
    at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:877)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:842)
    at org.testng.TestNG.run(TestNG.java:751)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)

Reply all
Reply to author
Forward
0 new messages