Hi, I've added the Cobertura plugin to my pom.xml build, using the examples
at:

http://mojo.codehaus.org/cobertura-maven-plugin/usage.html

However, when I run 'mvn clean site', it shows that I have 100% line
coverage.  I know for certain that all of the methods in our DAOs are not
exercised.  Does this sound right to people?  I would think that it would
give me an error and indicate that certain methods in my code do not have
tests with them and could be considered 'dead'.

I'm seeing 0% branch coverage as well, which may be because I don't have
conditional logic in the code that's being tested.

Here's an example:

 13            public Piddsdit getPiddsdit(PiddsditKey key) { 
 14  3                  if(key != null){ 
 15  3                  return (Piddsdit)
getSqlMapClientTemplate().queryForObject("PID_PIDDSDIT.selectByPrimaryKey", 
 16                                    key); 
 17                    } else { 
 18                            return null; 
 19                    } 
 20            } 

Notice lines 14 and 15 have each been exercised 3 times, but lines 18 hasn't
been exercised at all.  This is confusing to me.  I have other methods that
are similar.  Yet, still I get 100% coverage.

Is anyone else seeing this?  And how might I fix it.

Brian

-- 
View this message in context: 
http://www.nabble.com/Maven-2-and-Cobertura---100--coverage----tf3280827s177.html#a9125446
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to