db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramandeep Kaur" <ramandhin...@gmail.com>
Subject Re: code coverage for junit tests for svn trunk revision 529822
Date Fri, 20 Apr 2007 20:52:40 GMT
> When inspecting the results for Blob, it seems like the tests for
> the jdbc4 methods has not been run (e.g., Blob.free).  Do you know
>why?
First let me explain about how Emma collects code coverage data.
Basically, Emma collects code coverage during test run only for those
classes which have been instrumented for code coverage. For Derby, when I
run code coverage, I instrument files - derby.jar, derbytools.jar,
derbynet.jar, and derbyclient.jar.
Therefore, when you look at code coverage results, you only see code
coverage numbers for all the classes that are part of above jar files. Now
during test run, if other files such as java package files are called, code
coverage is not collected for those. It seems like Blob is part of package
java.sql and therefore you don't see any coverage numbers for that.

I hope I answered your question. Please let me know.

On a side note, to get some more information on code coverage for derby,
check out document
http://db.apache.org/derby/binaries/DerbyCodeCoverageUsingEmma.pdf. You
might want to look at section 6.2 of this document which gives information
on how to run code coverage only for selected files.


Thanks, Raman


>  -  What is the meaning of blocks?  I thought it was a block of
>     statements, but the report says there are more blocks than lines.
>     (E.g., Blob.isBinaryStream is reported to have 1 line and 10
>     blocks.)
John already answered your question. Thanks John.




-- 
Ramandeep Kaur

Mime
View raw message