This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Testing and the fly likes Alternatives to JUnit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Alternatives to JUnit" Watch "Alternatives to JUnit" New topic

Alternatives to JUnit

Frank Daly
Ranch Hand

Joined: Mar 31, 2000
Posts: 141

What alternatives are there to JUnit and what are their pros and cons?

Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
I know of JUnitX and JTest (commercial) but haven't tried them.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
Reference Website

Java Developer, Thailand
Tony Williams

Joined: Oct 26, 2003
Posts: 7
In "Thinking in Java", 3rd Edition, Bruce Eckel used his own unit testing framework. You can look at that to aee if it works for you but I personally would rather use the full functionality of JUnit.

Also, make sure that you look at Ant to automate your builds and tests. Maybe it would help to read "Pragmatic Unit Testing" and "Pragmatic Project Automation"
Frank Daly
Ranch Hand

Joined: Mar 31, 2000
Posts: 141
Thanks Guys
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33132

Despite the marketing from Parasoft, JTest is not an alternate to Junit. It does static analysis (code analysis) and dynamic analysis (black box and regression testing.) JTest can send unexpected inputs to your code and try to make it throw an exception. In the latest version of JTest, these tests are written using junit, so you can run the tests independently. JTest can also run your programmer written unit tests and include them in the test coverage results.

The tests JTest generates cannot replaces hand crafted tests. They do not test logic or intent or that your code is working properly. JTest is a great tool, but it does not replace junit. <end rant>

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Surasak Leenapongpanit
Ranch Hand

Joined: May 10, 2002
Posts: 341
Many links in this wiki website.
I agree. Here's the link:
subject: Alternatives to JUnit
It's not a secret anymore!