File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Skip or order JUnit tests in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Skip or order JUnit tests in Eclipse" Watch "Skip or order JUnit tests in Eclipse" New topic
Author

Skip or order JUnit tests in Eclipse

Min Huang
Greenhorn

Joined: Sep 21, 2004
Posts: 16
Is there a way to do this? I understand that having this need reveals a deeper problem in my unit tests themselves (ie they are not actually unit tests, but functional or they are just plain bad, bad I tell you!), but please humor me


SCJP, SCJD, SCBCD, SCWCD
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2477
    
    7

You can skip tests by annotating them with @Ignore.

You can't order tests (if order means: decide in which order they run; JUnit does not guarantee a specific order of execution), but you can group tests as described in Lasse's weblog.

Regards, jan


OCUP UML fundamental and ITIL foundation
youtube channel
Min Huang
Greenhorn

Joined: Sep 21, 2004
Posts: 16
Sorry, I didn't specify that this is JUnit3 specific. I strongly suspect that there is nothing I can do in this situation..
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29249
    
139

You can also implement your own suite method and hard code the order of the tests. Then have Eclipse run that.

Keep in mind that you have to maintain the suite then which is problematic.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Min Huang
Greenhorn

Joined: Sep 21, 2004
Posts: 16
Yes, I realize that. I was just wondering if there is some easy way to do it. I did stumble upon ct-eclipse, but there is are no files available for downloading. I was hoping if somebody knew of an alternative.
 
Consider Paul's rocket mass heater.
 
subject: Skip or order JUnit tests in Eclipse
 
Similar Threads
Full stack testing of java web application with selenium
Testing and the affect on junior programmers?
Testing Active Vs Passive or Explicit vs Implicit
randomness in test data
collections binarySearch: always return 1 ?