<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 5: Using Emma Eclipse Plugin with J2EE</title><link>https://sourceforge.net/p/emma/patches/5/</link><description>Recent changes to 5: Using Emma Eclipse Plugin with J2EE</description><atom:link href="https://sourceforge.net/p/emma/patches/5/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 20 Feb 2006 20:42:16 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/emma/patches/5/feed.rss" rel="self" type="application/rss+xml"/><item><title>Using Emma Eclipse Plugin with J2EE</title><link>https://sourceforge.net/p/emma/patches/5/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Ok, here we go,&lt;/p&gt;
&lt;p&gt;Remember my problem when enabling the plugin (and&lt;br /&gt;
losing the instrumented classes)? &lt;br /&gt;
That problem remains...&lt;br /&gt;
So I did a few modifications at the plugin code,&lt;br /&gt;
adding/changing actions.&lt;/p&gt;
&lt;p&gt;Requirements:&lt;br /&gt;
- emma-2.1.5320&lt;/p&gt;
&lt;p&gt;ResetDataAction:&lt;br /&gt;
- Remove coverage.ec&lt;br /&gt;
- Remove internal xml and html report&lt;br /&gt;
- Instrument the classes (not using&lt;br /&gt;
BuildRunner.startBuild()) &lt;/p&gt;
&lt;p&gt;CleanExistingCoverageData (new):&lt;br /&gt;
- Run ctl coverage.reset&lt;/p&gt;
&lt;p&gt;BuildReportAction&lt;br /&gt;
- Automatically dump the coverage data by ctl&lt;/p&gt;
&lt;p&gt;J2EE test:&lt;/p&gt;
&lt;p&gt;Configuration to Work:&lt;br /&gt;
- Project with emma-2.1.5320 in the classpath&lt;br /&gt;
- Project with emma.properties in the classpath (this&lt;br /&gt;
file can't be in Jboss deploy folder.&lt;br /&gt;
It will be just in classpath project).&lt;br /&gt;
emma.properties must contain the "rt.control = false"&lt;br /&gt;
property.&lt;br /&gt;
- The project classes must be in an exploded jar into&lt;br /&gt;
deploy folder.&lt;/p&gt;
&lt;p&gt;Classpath example:&lt;br /&gt;
&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;
&amp;lt;classpath&amp;gt;&lt;br /&gt;
&amp;lt;classpathentry kind="src" path="implementacao/src/java"/&amp;gt;&lt;br /&gt;
&amp;lt;classpathentry output="target/exp-eclipse-only"&lt;br /&gt;
kind="src" path="target/exp-eclipse-only"/&amp;gt; &amp;lt;!-- This&lt;br /&gt;
is where emma.properties will be --&amp;gt;&lt;br /&gt;
&amp;lt;classpathentry kind="var"&lt;br /&gt;
path="MAVEN_REPO/emma/jars/emma-2.1.5320.jar"/&amp;gt;&lt;br /&gt;
&amp;lt;classpathentry kind="output"&lt;br /&gt;
path="systemparameters-geral-cactus.ear/systemparameters-geral-ejb-2.0.0.jar"/&amp;gt;&lt;br /&gt;
&amp;lt;/classpath&amp;gt;&lt;/p&gt;
&lt;p&gt;Steps to test:&lt;br /&gt;
- Enable Emma Plugin&lt;br /&gt;
- Use ResetDataAction&lt;br /&gt;
- Run JBOSS&lt;br /&gt;
- Run Tests&lt;br /&gt;
- BuildReportAction&lt;br /&gt;
- ShowCoverage&lt;br /&gt;
- CleanExistingCoverageData&lt;br /&gt;
- BuildReportAction&lt;br /&gt;
- Show Coverage&lt;/p&gt;
&lt;p&gt;The test worked fine, and I got the expected coverage.&lt;br /&gt;
So I just needed to use ResetDataAction,&lt;br /&gt;
BuildReportAction, CleanExistingCoverageData and&lt;br /&gt;
ShowReportAction &lt;br /&gt;
to do anything that I want with the plugin.&lt;/p&gt;
&lt;p&gt;- Summarizing -&lt;/p&gt;
&lt;p&gt;So what is the ideia?&lt;br /&gt;
Make a simple plugin!&lt;/p&gt;
&lt;p&gt;What we need to do to make the plugin works in&lt;br /&gt;
different enviroment?&lt;br /&gt;
Turn it very configurable.&lt;/p&gt;
&lt;p&gt;Interesting Options to add in Emma's Project property&lt;br /&gt;
(checkbox): &lt;br /&gt;
- Add jar to the classpath&lt;br /&gt;
- Get the coverage by dump&lt;/p&gt;
&lt;p&gt;Interesting feature to add to the Plugin:&lt;br /&gt;
- Use ctl (to dump, reset...)&lt;/p&gt;
&lt;p&gt;Interesting Modifications:&lt;br /&gt;
- A better way to instrument the code&lt;/p&gt;
&lt;p&gt;----------------------------------------------&lt;/p&gt;
&lt;p&gt;--Saraiva&lt;/p&gt;&lt;/div&gt;</description><pubDate>Mon, 20 Feb 2006 20:42:16 -0000</pubDate><guid>https://sourceforge.net6e8118de8101c9201346239cfc70ab97cee141f6</guid></item></channel></rss>