Archive for August 26, 2006

Code Coverage

Code Coverage is a process which determines the level of testing that has been performed on a program. While you can get more information on code coverage from wikipedia, manually doing code coverage is going to be a tedious process and you need someone specifically for it to really look at all the programs the developers have done. At the same time code coverage is important to identify how much of testing is done on a code and how much can actually be covered during unit testing.

We know that unit testing is very important as it uncovers lot of issues prior to the application going to QA. A vigorously tested application at the development end means a lot of challenge to the QA team to really break the system. If the QA team is challenged they are forced to think beyond what it takes to really bring up a bug. This means you are covering all sorts of possibilities that will break the system and solve it. Ultimately the point is each and every project should have code coverage done.

Of course not 100% of the code can be unit tested. Come on how can you unit test this line in your code “}” :) . So there should be an acceptable percentage set that the unit tests should cover. Given that, code coverage will make more sense in terms of time if there is a tool that could it. There are tools that will help in doing code coverage. Each and every technology has a flavor of code coverage tools which you can google search and get. The highlight would be if you can automate this code coverage so that you can view the report every day and make sure the developers cover unit tests properly. Cobertura is one tool that can analyze the JUnit tests written and if your application build/release is automated through Maven, the maven cobertura plugin can help generate the code coverage results as and when a build happens (or you could schedule report generation at a separate time say every midnight since it takes some take than the normal build).

Blink this Code Coverage at blinklist.com    Bookmark Code Coverage at blogmarks    Bookmark Code Coverage at del.icio.us    Digg Code Coverage at Digg.com    Fark Code Coverage at Fark.com    Bookmark Code Coverage at Furl.net    Bookmark Code Coverage at NewsVine    Bookmark Code Coverage at reddit.com    Bookmark Code Coverage at Simpy.com    Bookmark Code Coverage at Spurl.net    Bookmark Code Coverage with wists    Bookmark Code Coverage at YahooMyWeb

Comments (1)      Cosmos


Creative Commons License  This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.