This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Code Coverage

 
Leo Aug
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Code coverage is only for Junit or is it like pmd tool which checks for coding errors?

I have three java files

Main Java FIles:

Add.java
sub.java
Multiply.java

Junit :

And I have two junit test java files

AddTest.java
subTest.java

SHould I run cobertura(tool) on the Junit files or on the Main files ?

What would be the main purpose of Code Coverage?

How does the Code coverage act on the above case and what would be the expected output ?

 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The main purpose of code coverage it to see how much of the code in your app is exercised by your unit tests. Thus you want cobertura to give you coverage details for the main java classes, so instrument them.
 
Leo Aug
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic