<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to MeasuringCodeCoverage</title><link>https://sourceforge.net/p/osgiunit/wiki/MeasuringCodeCoverage/</link><description>Recent changes to MeasuringCodeCoverage</description><atom:link href="https://sourceforge.net/p/osgiunit/wiki/MeasuringCodeCoverage/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 13 Nov 2012 09:24:28 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/osgiunit/wiki/MeasuringCodeCoverage/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage MeasuringCodeCoverage modified by Jutta Albrecht</title><link>https://sourceforge.net/p/osgiunit/wiki/MeasuringCodeCoverage/</link><description>Since OSGi modifies the class loading, most of the tools available don't work in an OSGi environment.

Marc R. Hoffmann describes a basic approach for solving this problem on the [eclemma research site](http://www.eclemma.org/research/instrumentingosgi/index.html).

All jar files needed to run the eclemma/emma code coverage tool with OSGiUnit tests are now part of the osgiunit.externals project.

There is a second build file ([build_cc.xml](http://osgiunit.svn.sourceforge.net/viewvc/osgiunit/trunk/osgiunit.examples/build_cc.xml?revision=HEAD&amp;view=markup)) in the osgiunit.examples project which shows how to run the eclemma and emma tools to create a [coverage report](http://osgiunit.sourceforge.net/coverage-report/coverage.html).

Simply run

    ant -f build_cc.xml clean JUnit emma-report

and find the HTML report in the file [coverage/coverage.html](http://osgiunit.sourceforge.net/coverage-report/coverage.html).

One problem currently exists: The coverage report shows only the functions and the number of blocks covered, but does not show the sourcecode lines.

### Links ###
[Coverage report from the osgiunit.example project](http://osgiunit.sourceforge.net/coverage-report/coverage.html)

[EMMA Homepage](http://emma.sourceforge.net)

[EMMA Eclipse Plugin](http://www.eclemma.org)

[Using EMMA in OSGi applications](http://www.eclemma.org/research/instrumentingosgi/index.html)
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jutta Albrecht</dc:creator><pubDate>Tue, 13 Nov 2012 09:24:28 -0000</pubDate><guid>https://sourceforge.netadb11afe6186746bd0571c75b0a430481dbef696</guid></item></channel></rss>