Re: code coverage (Clover, Cobertura, that sort of thing)

Russell Gold <[email protected]> Mon, 23 Jun 2008 20:30:54 -0400
Newsgroups gmane.comp.web.httpunit.devel
Message-ID <[email protected]>
On Jun 21, 2008, at 12:35 PM, Adam Hardy wrote:

> Sorry, I was not being obvious.
>
> If Clover or Cobertura tell me how much of my Java code base my  
> JUnit tests
> cover, what reporting tool tells me how much of my JSP and MVC code  
> base my
> HttpUnit tests cover?

Clover or Cobertura again, but this time run against your servlet  
engine process rather than your client. There's nothing really unique  
about this. You get your code coverage by running your tests against  
your code. The biggest difference is simply that in this case, your  
tests are not in the same VM as your code. Just instrument your pre- 
compiled JSPs and MVC code, make sure your servlet engine is running  
with the appropriate libraries and run your tests.


>
>
>
> Russell Gold on 20/06/08 15:07, wrote:
>> Not quite sure what you are asking - Clover and Cobertura /do/ code  
>> coverage
>> for pure Java code...
>>
>> On Jun 18, 2008, at 8:57 AM, Adam Hardy wrote:
>>
>>> Hi Folks,
>>>
>>> I am about to implement a comprehensive HttpUnit batch job to  
>>> supercede the
>>> current manual testing of our project's website.
>>>
>>> This would be an incredible burden lifted, since the manual  
>>> testing is so
>>> time-consuming and often pages get missed (and turn up broken in a  
>>> live
>>> deploy).
>>>
>>> I assume, after searching the web, that there is no coverage tool  
>>> available
>>> comparable to Clover or Cobertura, which measure test coverage  
>>> achieved
>>> for pure Java code.
>>>
>>> Has this topic been raised before (or could my assumption be wrong)?
>>>
>>> My first goal is obviously to set up the tests to test the JSPs,  
>>> HTML, and
>>> MVC java that I already have. However to keep tabs on the project  
>>> as it
>>> grows, ideally I need a report that tells me how much of the  
>>> project the
>>> tests cover. That's my second goal.
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Httpunit-develop mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/httpunit-develop


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php