You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Audun Foyen <au...@gnokk.no> on 2003/04/24 01:21:53 UTC

Questions regarding code coverage in Velocity test-cases.

Hi,

I have some questions regarding the test-cases in Velocity.

As part of the research for an article on object
coupling and cohesion in real-world systems I am collecting data 
from Velocity. The data is collected by a library using JVMPI/JVMDI 
to monitor what classes/objects/methods are used, and how many times. 
The measurements are to be collected for different versions of
Velocity. Hopefully this might make it possible to estimate, for
example, how differences in coupling affects change-proneness or 
bug frequency.

To gather the needed data I need to run as much as possible of the
Velocity code. My first attempts have been based on the test-cases
provided with release 1.3.1rc1. 
The problem is that on running the test-cases with a code coverage
analysis tool (Clover) it seems that only 51.1% of the system is 
exercised. This is the sum of conditionals (46.5%), statements (57.6%)
and methods (61.3%) divided by three. This might not be enough to be
able to say anything about what the real coupling between classes is.

So, here are my questions:
1. What is the philosophy behind the test-cases? How do people decide
   what test-cases are needed? Are they only for critical features? 
   Or are they meant to cover most normal conditional branches?

2. How much dead code do you think the project contains? Does someone
   clean out the cruft on a regular basis, or are there things in
   the source that no-one ever use? Alternatively, are there features
   kept for backward compatibility that are not in any test-cases?

3. It seems that some features are meant to be used in conjunction
   with other Jakarta projects. An example would be code dealing with
   servlets, or the Log4JLogSystem. Are there test-cases dealing with
   these features in the other projects? Or do these features remain 
   mostly untested except at development time?
   
4. Are there any more test-cases around? 

I'll gladly send the coverage report from Clover to anyone who wants
to have a look at it. 

Any help or comments are appreciated.

(I understand that you people work mainly to create an application that
functions well, rather than providing easily available research data.
:-) )




---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org