• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Code Coverage

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?

 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you....
reply
    Bookmark Topic Watch Topic
  • New Topic