aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Code Coverage Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Code Coverage" Watch "Code Coverage" New topic
Author

Code Coverage

Leo Aug
Greenhorn

Joined: Sep 02, 2012
Posts: 7
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

Joined: May 14, 2008
Posts: 5827
    
    7

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.


JBoss In Action
Leo Aug
Greenhorn

Joined: Sep 02, 2012
Posts: 7
Thank you....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Code Coverage