Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Q: JUnit and Rerun single test from hierarchy
Q: JUnit and Rerun single test from hierarchy [message #63519] Fri, 20 June 2003 15:29 Go to next message
Eclipse UserFriend
I've recently encountered this situation. I have an AllTests class with a
suite method
that includes the suites from two other classes. I run all the tests and
then want
to rerun just one of the tests. I use the Hierarchy tab and right-click on
the test and
choose Rerun. It doesn't work.
For example, I use the JUnit sample project and first run AllTests.java via
the Run->Run As->JUnit Test.
I then choose the "testSimpleAdd" under the junit.samples.money.MoneyTest
from the Hierarchy tab and try to rerun:

junit.framework.AssertionFailedError: Could not create test 'testSimpleAdd'
at junit.framework.Assert.fail(Assert.java:51)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner$1.run Test(RemoteTestR
unner.java:433)
at junit.framework.TestCase.runBare(TestCase.java:140)
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:131)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRu
nner.java:392)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.
java:276)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner
..java:167)


If I only run the containing class (i.e., not AllTests but just run
MoneyTest), when I do this rerun it works.

Should I just NOT try to do this?

Richard.
Re: JUnit and Rerun single test from hierarchy [message #63566 is a reply to message #63519] Fri, 20 June 2003 16:32 Go to previous message
Eclipse UserFriend
Well if it doesn't prompt a message window telling you what you are up to
is forbidden and instead you are getting exceptions then its a bug for sure
;)

So fill out a bug request (but first check if someone does so before ;)


Martin (Kersten)

"Richard Jensen" <rjensen@persistence.com> schrieb im Newsbeitrag
news:bcvnap$9e3$1@rogue.oti.com...
> I've recently encountered this situation. I have an AllTests class with a
> suite method
> that includes the suites from two other classes. I run all the tests and
> then want
> to rerun just one of the tests. I use the Hierarchy tab and right-click on
> the test and
> choose Rerun. It doesn't work.
> For example, I use the JUnit sample project and first run AllTests.java
via
> the Run->Run As->JUnit Test.
> I then choose the "testSimpleAdd" under the junit.samples.money.MoneyTest
> from the Hierarchy tab and try to rerun:
>
> junit.framework.AssertionFailedError: Could not create test
'testSimpleAdd'
> at junit.framework.Assert.fail(Assert.java:51)
> at
>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner$1.run Test(RemoteTestR
> unner.java:433)
> at junit.framework.TestCase.runBare(TestCase.java:140)
> 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:131)
> at
>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRu
> nner.java:392)
> at
>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.
> java:276)
> at
>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner
> .java:167)
>
>
> If I only run the containing class (i.e., not AllTests but just run
> MoneyTest), when I do this rerun it works.
>
> Should I just NOT try to do this?
>
> Richard.
>
>
Previous Topic:Finding method line-number
Next Topic:-> PDE JUnit
Goto Forum:
  


Current Time: Sat May 10 00:34:21 EDT 2025

Powered by FUDForum. Page generated in 0.03241 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top