473,657 Members | 2,407 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Jul 18 '05 #1
3 2776

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:linenu mber: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

Jul 18 '05 #2
Skip Montanaro <sk**@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_to ol(my_code)
if not uncovered: break
jump_to(uncover ed[0])
think()
write_test()
John
Jul 18 '05 #3
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

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

50
5483
by: Edward K. Ream | last post by:
I would like to say a few (actually more than a few) words here about some recent discoveries I have made concerning the interaction of Leo and Python. If you don't want to hear an inventor enthuse about his work, please feel free not to read further :-) There are at least three, no four, no five, no six, no seven reasons why Leo and Python work so well together. Most are new (in my mind) with the 4.1 release of Leo. The first several...
49
4111
IDE
by: Thomas Lindgaard | last post by:
Hello I am probably going to start a war now... but so be it :) I just want to hear what all you guys who eat pythons for breakfast use for python coding. Currently I use Kate, but I would really like an IDE with debugger and a source browser (ie. one the I can use to browse through modules etc. when looking for just the right curses stuff and such - I am a newcomer to Python).
6
2366
by: tjm | last post by:
Pure coverage from Rational is the only coverage tool I've been able to find for C#, and I don't really want to pay what Rational charges for something as simple as a coverage tool. So, I'd like to try to write my own, but I'm having trouble getting started. The way I see it, I need to do the following… 1) Create a debugger object or something similar that will allow me to step through my code. 2) Start a process to run through my...
10
2541
by: Olaf Wasmuth | last post by:
Good morning, I am using doxygen to create a reference manual for C source code. Do you know of a way to similarly create a texinfo reference manual (which I would like to use in emacs info-mode, BTW) ? Maybe this is possible through one of doxygen's already supported output formats. Kind regards, Olaf.
5
4867
by: Nikhil | last post by:
Hi, I have a set of C source files and I need a tool which can add probes and then dynamically trace the execution and print the results (The C source code does not have any printf statements). The purpose of the tool is to add test cases for unit testing and then see the statement/branch coverage for them. Thanks,
1
2027
by: =?UTF-8?B?TWFydGluIFDDtnBwaW5n?= | last post by:
Hello, I am searching for a good profiling tool for C# which can be easily embedded into Visual Studio. My objective is to measure the times and counts of every method in my program. If used the Coverage Tool of TestDriven.Net (http://www.testdriven.net/) which worked fine if I have defined any Unit test-cases.
4
4378
by: Richard Szopa | last post by:
Hi All, I am a devoted Emacs user and I write a lot in Python. However, I never managed to get my Emacs configuration right for this purpose. There were some discussions on this, but the threads that show if I search the group are either old or not so relevant. I need the following features: 0) Of course, syntax coloring and so on... But this works good enough
5
4275
by: ev | last post by:
Hello, We are looking for any testing tool that is capable of checking code coverage for C,C ++ and Java code. Or at least for C and C++. We want to know how much (percentage) of our code written on C/C++ is covered in terms of function calls and line calls. We tried Rational PureCoverage. It's excellent but has some limitations in our case. Any idea would be greatly appreciated.
24
2515
by: David | last post by:
Hi list. What strategies do you use to ensure correctness of new code? Specifically, if you've just written 100 new lines of Python code, then: 1) How do you test the new code? 2) How do you ensure that the code will work correctly in the future? Short version:
0
8411
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8323
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8838
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7351
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.