[powermock] Problem executing JUnit3 samples

104 views
Skip to first unread message

codesmart

unread,
May 7, 2010, 4:31:01 AM5/7/10
to PowerMock
Hello,

I get the following Exception below when executing the JUnit3 samples.
If I have only two Test Classes added e.g.

return new PowerMockSuite(StupidPrivateFinalTest.class,
PrivateFinalTest.class);

it works.

I am working with Eclipse 3.5.2.

Cheers codesmart

java.lang.ArrayIndexOutOfBoundsException: 2 >= 2
at java.util.Vector.elementAt(Vector.java:427)
at junit.framework.TestSuite.testAt(TestSuite.java:245)
at
org.powermock.modules.junit3.internal.impl.JUnit3TestSuiteChunkerImpl.testAt(JUnit3TestSuiteChunkerImpl.java:
199)
at
org.powermock.modules.junit3.PowerMockSuite.testAt(PowerMockSuite.java:
97)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.sendTree(JUnit3TestReference.java:
142)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.sendTrees(RemoteTestRunner.java:
476)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
464)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:
390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:
197)

--
You received this message because you are subscribed to the Google Groups "PowerMock" group.
To post to this group, send email to powe...@googlegroups.com.
To unsubscribe from this group, send email to powermock+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/powermock?hl=en.

Johan Haleby

unread,
May 7, 2010, 4:41:39 AM5/7/10
to powe...@googlegroups.com
How does your test case look like? Note that we're not putting much effort into the JUnit 3 support, I would encourage you to upgrade to JUnit4.

/Johan
Message has been deleted

codesmart

unread,
May 7, 2010, 6:46:33 AM5/7/10
to PowerMock
I just using the JUnit3 sample tests from the SVN.

Unfortunately I have to use JUnit3, because our Eclipse PDE build only
works
with JUnit3.

Johan Haleby

unread,
May 9, 2010, 6:22:38 AM5/9/10
to powe...@googlegroups.com
The test cases in SVN should work because they're always ran before we commit something. But I haven't tried to add more classes to the suite so don't know if this could be the problem.. Just so I understand you correct, which test case in SVN are you talking about? And what have you modified in order for it to fail?

/Johan

codesmart

unread,
May 9, 2010, 7:56:24 AM5/9/10
to PowerMock
I am just executing AllJUnit3Tests.java without any changes. If I only
use two of the four given Testcases it works. With three or more I got
the exception.

With which environment do you execute the tests? I am using Eclipse
3.5.2. With jdk1.1.6._06 and the junit 3.8 plugin.


On 9 Mai, 12:22, Johan Haleby <johan.hal...@gmail.com> wrote:
> The test cases in SVN should work because they're always ran before we
> commit something. But I haven't tried to add more classes to the suite so
> don't know if this could be the problem.. Just so I understand you correct,
> which test case in SVN are you talking about? And what have you modified in
> order for it to fail?
>
> /Johan
>
> On Fri, May 7, 2010 at 12:46 PM, codesmart <matthias.guth...@gmail.com>wrote:
>
>
>
> > I just using the JUnit3 sample tests from the SVN.
>
> > Unfortunately I have to use JUnit3, because our Eclipse PDE build only
> > works
> > with JUnit3.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "PowerMock" group.
> > To post to this group, send email to powe...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > powermock+...@googlegroups.com<powermock%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/powermock?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "PowerMock" group.
> To post to this group, send email to powe...@googlegroups.com.
> To unsubscribe from this group, send email to powermock+...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/powermock?hl=en.
Reply all
Reply to author
Forward
0 new messages