views:

112

answers:

5

What is a good open source project which uses junit tests in its source code? I want to see how its doen and learn about it.

A: 

The most widely used Test coverage tool is: eclemma

Update

Regarding "real world" understanding of jUnit. I would recommend use TDD and implement something very simple.

For example: Set (Java collections) and implement the test for the methods like: equals(), contains(), empty() etc.

The best way to learn something is by doing. Read this article, they have taken an example of Xerces XML parser

zengr
sorry ive rephrased the question
Skiy
is there stats of the usage of these tools?
Bozho
thanks I mainly want to see how its done in a complete project.
Skiy
I know 2 BIG java stack .com's which use Ecl. And I find it much easier to use. <personal opinion>
zengr
+1  A: 

Any serious project (including open source) has unit tests. For what I've seen spring and hibernate have a lot of them.

This is a very good lecture about Object-oriented design for testability. It is not for complete beginners, but it gives very good insights.

Bozho
A: 

I wrote sections for Geoserver which only got accepted into the open-source tree once the additions were covered by tests. While testing my framework I came across some of the shortcomings in the Testing itself and extended it to allow for more abstract testing. The source for Geoserver can be accessed via SVN and the Eclipse Run-As Junit Test profile gives nice pass/fail stats.

whatnick
A: 

You could also try and participate TopCoder developer competitions (this is not an ad). Every project there is required to have number of tests. And the volume of code covered by tests should not be below 85%.

SPIRiT_1984
A: 

I can recommend you to look at Hibernate project source code. Unit tests are very good there. Good example to follow.

Andriy Sholokh