Empty coverage with 24 tests en 100% test success

View: New views
7 Messages — Rating Filter:   Alert me  

Empty coverage with 24 tests en 100% test success

by Jeroen Wolff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, i've got a project with some tests and they all succeed, but there
is no code coverage at all.
With the same Sonar server and another maven project there is some coverage with 1 test configured in this project...so cobertura is working.

In my project pom's there is no covertura or surefire configured....

I've deleted the Derby database and started sonar (linux 64 bit) again...and ran sonar:sonar but still no coverage.

What can i do?

Regards,

Jeroen

Re: Empty coverage with 24 tests en 100% test success

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jeroen,

Could you try to manually launch "mvn cobertura:cobertura" and then open the file target/site/cobertura/index.html to see what you get.

Thanks for your help,
Freddy


On Mon, Oct 19, 2009 at 8:23 PM, Jeroen Wolff <jeroen.wolff@...> wrote:

Hi, i've got a project with some tests and they all succeed, but there
is no code coverage at all.
With the same Sonar server and another maven project there is some coverage
with 1 test configured in this project...so cobertura is working.

In my project pom's there is no covertura or surefire configured....

I've deleted the Derby database and started sonar (linux 64 bit) again...and
ran sonar:sonar but still no coverage.

What can i do?

Regards,

Jeroen
--
View this message in context: http://www.nabble.com/Empty-coverage-with-24-tests-en-100--test-success-tp25963146p25963146.html
Sent from the Sonar user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: Empty coverage with 24 tests en 100% test success

by Jeroen Wolff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ferry, thanks for your help, but when i run "mvn cobertura:cobertura"
the target/site/cobertura/index.html shows also Line Coverage: N/A

In de mvn output i see also: "Perhaps you need to compile with debug=true?"

that's when i found out i had to clean the classes......me stupid!

Now i works!!

Thanks,

Jeroen

Re: Empty coverage with 24 tests en 100% test success

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That's in fact a good beginning Jeroen ;-)

Could you send the Maven log generated when you launch "mvn cobertura:cobertura" and the target/sonar/sonar-pom.xm file ?

Thanks
Freddy

On Tue, Oct 20, 2009 at 9:13 AM, Jeroen Wolff <jeroen.wolff@...> wrote:

Ferry, thanks for your help, but when i run "mvn cobertura:cobertura"
the target/site/cobertura/index.html shows also Line Coverage: N/A

How strange....

Jeroen

--
View this message in context: http://www.nabble.com/Empty-coverage-with-24-tests-en-100--test-success-tp25963146p25970682.html
Sent from the Sonar user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: Empty coverage with 24 tests en 100% test success

by Jeroen Wolff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It is still a problem with my original pom's.

Freddy, here a the logs you asked for. Thanks for your help!.

mvn.log
sonar-pom.xml

Regards,

Jeroen

Re: Empty coverage with 24 tests en 100% test success

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jeroen,

If you remove the property "optimize=true" on the maven-compiler-plugin, your issue will be fixed. Indeed, with this option, line numbers are removed from the bytecode and Cobertura has no way to "link" bytecode to source code.

It's why you get the those kind of warnings in your log file :
[cobertura] WARN  [main] net.sourceforge.cobertura.instrument.ClassInstrumenter - No line number information found for class nl.belastingdienst.wdp.beradmin.provider.BerichtDTOValidator.  Perhaps you need to compile with debug=true?
Regards,
Freddy

On Mon, Oct 26, 2009 at 4:40 PM, Jeroen Wolff <jeroen.wolff@...> wrote:

It is still a problem with my original pom's.

Freddy, here a the logs you asked for. Thanks for your help!.

http://www.nabble.com/file/p26062076/mvn.log mvn.log
http://www.nabble.com/file/p26062076/sonar-pom.xml sonar-pom.xml

Regards,

Jeroen
--
View this message in context: http://www.nabble.com/Empty-coverage-with-24-tests-en-100--test-success-tp25963146p26062076.html
Sent from the Sonar user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: Empty coverage with 24 tests en 100% test success

by Jeroen Wolff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Freddy, that solved my problem...

Jeroen