3

I'm wrintting java tests to control the GUI application, and I'm searching a tool to cover the java test , what is your recommandation ? which tool is usually used to cover java tests ?

laura
  • 155
  • 3
  • 13
  • Duplicate of http://stackoverflow.com/questions/39329/what-is-your-favourite-code-coverage-tools-free-and-non-free (although that is a fairly old thread); see also http://stackoverflow.com/questions/3904571/code-coverage-tools-in-java – Péter Török Jan 24 '11 at 14:18

4 Answers4

6

I recommend Cobertura for measuring test coverage. You can plug it into ant, maven, hudson, eclipse etc.

Community
  • 1
  • 1
dogbane
  • 266,786
  • 75
  • 396
  • 414
2

I recommend Sonar, see the hyperlink for how it shows code coverage (apart from doing many other handy things).

mindas
  • 26,463
  • 15
  • 97
  • 154
  • +1 Sonar isn't exactly what you're looking for, but it can do the job and *much, much more*. – Qwerky Jan 24 '11 at 14:49
2

You can try to use Cobertura, it creates nice reports, and is easy to use in conjunction with junit, using ant or maven.

A great tool for reporting is Sonar, which integrates coverage tests, but also tools like checkstyle, findbugs, and provides a nice interface to analyse the outputs. It is also very easy to setup, definitively worth trying.

tonio
  • 10,355
  • 2
  • 46
  • 60
0

I strongly recommend taking a look at Code Pro tools. It's for Eclipse. And it contains a lot more than code coverage, it is code analyzer, junit test generator, dependency analyzer and so on...

Lukasz
  • 7,572
  • 4
  • 41
  • 50