Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Tried to add JUnit Test in Eclipse -- "Test type does not exist" error

807603Nov 20 2005 — edited Jan 15 2008
Hi guys,

I'm developing an assignment whose details I won't bother going into -- it's enough to say that we were introduced to JUnit testing a couple of weeks ago in university tutorials, and I've stupidly tried to add one to my project without fully understanding it all. This is in eclipse 3.1.1.

Basically, I followed eclipse's built-in tutorial called "Writing and running JUnit tests ".

1) Created class "TestFailure" with method "testFailure".
public void testFailure() throws Exception {
    fail();
} 
2) This then appeared as a .java file in my project (as well as on my UML diagram, courtesy of Omondo's UML plugin).

3) I decided it was too risky mucking around with this stuff in a "live" project, so went ahead and deleted the TestFailure icon on my class diagram.

4) I closed down eclipse.

5) I went ahead and deleted TestFailure.java and TestFailure.class from my project folders.

6) I opened my project again, and tried to execute...

... and now I keep getting a Test type does not exist error when I try and run it.

How on earth do I get rid of this?

Any advice/guidance is greatly appriciated -- oh, how I wish I'd not started messing with JUnit testing!!! :)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 12 2008
Added on Nov 20 2005
11 comments
806 views