Re: EMMA and jUnit
Oops. First posted this before I was fully subscribed.
I've been doing a little more research, looking at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask, and it doesn't
appear to just subclass org.apache.tools.ant.taskdefs.Java as I had
Still, I'm hoping this is a fairly straightforward change.
I just don't know if I'm clever enough to make it.
I'm going to play around with it for a few minutes and see if it "just
works" to change the superclass.
Begin forwarded message:
From: Mike Kienenberger <mkienenb@...>
Date: Thu, 12 Aug 2004 15:11:32 -0400
Subject: Re: EMMA and jUnit
Message-ID: <0408121511.AA3215621 <at> pavilion>
What I did was just to copy my junit task, and change it to run twice by
removing junit-specific options (which appears to also be a subclass of the
I've opened RFE 1007625 to request <emmajunit>.
I'm considering trying to implement such an emma task myself by copying
<emmajava>, but I'm not sure I understand how to subclass ant tasks well
enough to do this. My first guess is that it's simply a matter of changing
the superclass from <java> to <junit> since I don't see anything specific to
<java> in the <emmajava> task.
From: Ryan Bloom <rbb <at> re...>
Re: EMMA and jUnit
The easiest way to do this is to use the instrument task. Basically, the
steps you want to take are:
3) run junit tests
This will get your unit tests to output the coverage.ec and coverage.em
files, which are used to generate the coverage reports. The users guide
goes into details about how to instrument your code.
On Mon, 19 Jul 2004 SBrunning <at> tr... wrote:
> I"m having a bit of trouble getting started with EMMA. I have a project
> an existing unit test suite, and I want to know how much of my project"s
> code is covered.
> Is there some way of getting EMMA"s code coverage checking to be run as a
> side effect of the <junit> task?
> If not, I"m assuming that I"ll need to run the tests twice, once for
> and once for EMMA. For the EMMA run, I"d need to set up a task to run
> tests with the <emmajava> task. How do I get <emmajava> to run my unit
> and nothing else?
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.