Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   code coverage tool with emacs integration? (http://www.velocityreviews.com/forums/t320154-code-coverage-tool-with-emacs-integration.html)

John J. Lee 07-27-2003 12:40 AM

code coverage tool with emacs integration?
 
Anybody know of one?

Actually, I have a feeling that emacs understands a standard format
for errors, which would make it really easy to implement this by
having the coverage tool print results in that format -- anybody know
where to find the details?


I also wonder if some kind of graphical display might be useful
somehow, having been inspired by this:

http://kcachegrind.sourceforge.net/

(really, I just like the pretty pictures :)


John

Skip Montanaro 07-27-2003 02:52 PM

Re: code coverage tool with emacs integration?
 

John> Anybody know of one?

John> Actually, I have a feeling that emacs understands a standard
John> format for errors, which would make it really easy to implement
John> this by having the coverage tool print results in that format --
John> anybody know where to find the details?

compilation-error-regexp-alist. The simplest format to remember is

filename:linenumber:message

I'm not sure what you're after though. Code coverage tools generally emit
annotated listings, not compiler-like output. What would you like it to do,
emit file:line:msg info for the start of each run of lines which weren't
covered? How would you get any context showing you what lines in the region
had been executed at least once?

Skip


John J. Lee 07-28-2003 12:31 AM

Re: code coverage tool with emacs integration?
 
Skip Montanaro <skip@pobox.com> writes:
[...]
> compilation-error-regexp-alist. The simplest format to remember is


Thanks.

[...]
> emit file:line:msg info for the start of each run of lines which weren't
> covered?


Yes.


> How would you get any context showing you what lines in the region
> had been executed at least once?


Why would I want to?

I haven't done any proper code-coverage analysis before, but I
had imagined just doing:

while 1:
uncovered = run_coverage_tool(my_code)
if not uncovered: break
jump_to(uncovered[0])
think()
write_test()


John

Skip Montanaro 07-28-2003 01:17 AM

Re: code coverage tool with emacs integration?
 

>> How would you get any context showing you what lines in the region
>> had been executed at least once?


John> Why would I want to?

For me, analyzing code coverage consists of studying the code in the region
around the uncovered line(s). Knowing which lines in the area have and
haven't been covered helps me analyze what's missing in my test coverage.

Skip



All times are GMT. The time now is 05:35 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57