The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Java code coverage: Cobertura 1.6 released

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jared Richardson

Posts: 1031
Nickname: jaredr
Registered: Jun, 2005

Jared Richardson is an author, speaker, and consultant who enjoys working with Ruby and Rails.
Java code coverage: Cobertura 1.6 released Posted: Aug 22, 2005 5:12 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by Jared Richardson.
Original Post: Java code coverage: Cobertura 1.6 released
Feed Title: Jared's Weblog
Feed URL: http://www.jaredrichardson.net/blog/index.rss
Feed Description: Jared's weblog. The web site was created after the launch of the book "Ship It!" and discusses issues from Continuous Integration to web hosting providers.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by Jared Richardson
Latest Posts From Jared's Weblog

Advertisement

I was fortunate enough to be involved with getting the JCoverage fork (called Cobertura) launched. Although my role was primarily managerial, not technical, I still enjoy watching it grow. SourceForge tells me that the project has nearly 250,000 "Project Web Hits". Today Mark Doliner and company (Grzegorz Lukasik, Jeremy Thomerson and others) released version 1.6 of Cobertura.

If you are writing tests, you need to know what code is being excercised and what code is being missed. A code coverage tool should be a part of your toolbox. If you've never used one before, you may be very surprised at what it shows you.

Here's a sample Cobertura report. The web site has sample Ant tasks to get you started quickly. Here are a few of the Cobertura features:

  • Runs from Ant or the command line
  • Instruments Java bytecode after it has been compiled
  • Generates reports in HTML or XML
  • Shows percent of lines coveraged and branches coveraged for each class, package, and for the overall project
  • Shows the McCabe cyclomatic code complexity of each class, and the average cyclomatic code complexity for each package, and for the overall product
  • Sorts HTML results by class name, percent of lines covered, percent of branches covered, etc in ascending or decending order

Of course the project is using CruiseControl, under multiple JDKs! See here.

If you're still not sure you want to tackle Java code coverage, read Measure test coverage with Cobertura by Elliotte Rusty Harold, an article on IBM's developerWorks site.

Enjoy!

Jared

Read: Java code coverage: Cobertura 1.6 released

Topic: Hostage crisis in Brussels Previous Topic   Next Topic Topic: Tom Nies audio interview

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use