473,396 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Code coverage tool

ev
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.
Feb 4 '08 #1
5 4260
On 4 Feb, 03:17, ev <evold...@gmail.comwrote:
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.
I have tried the following:

Cantata++ (www.ipl.com/products)
DevPartner (http://www.compuware.com/products/de...enterprise.htm)

Both worked for me. If you specify, in some more detail, what the
limitations of your case is, I could perhaps provide some more detail
on how well they would work for you.
Feb 4 '08 #2
ev wrote:
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.
Write the tests first, that way nothing gets written that isn't tested.

--
Ian Collins.
Feb 4 '08 #3
On 2008-02-04 06:55:35, Ian Collins wrote:
ev wrote:
>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.

Write the tests first, that way nothing gets written that isn't tested.
How do you know whether every branch/condition in a function gets executed
when you run the tests that you wrote (independently of whether you wrote
them before or after you wrote the function)?

Gerhard
Feb 4 '08 #4
REH
On Feb 6, 5:21 am, James Kanze <james.ka...@gmail.comwrote:
100% full path coverage probably isn't always possible. But if
a tool reports path coverage, it should be as a per cent of path
coverage.
If you are only look for statement coverage (or even MCDC),
you tool is correct.

And what use is statement coverage? What does knowing that your
tests have exercised 95% of the statements in the code buy you?
Where I work any code that has never been executed is considered a
bomb, and unreachable code is not allowed. What use is it? I'm not
arguing its merits. My customer requires it in safety critical code,
so I do it.

REH
Feb 6 '08 #5
On Feb 6, 3:20 pm, REH <spamj...@stny.rr.comwrote:
On Feb 6, 5:21 am, James Kanze <james.ka...@gmail.comwrote:
100% full path coverage probably isn't always possible. But if
a tool reports path coverage, it should be as a per cent of path
coverage.
If you are only look for statement coverage (or even MCDC),
you tool is correct.
And what use is statement coverage? What does knowing that your
tests have exercised 95% of the statements in the code buy you?
Where I work any code that has never been executed is considered a
bomb, and unreachable code is not allowed. What use is it? I'm not
arguing its merits. My customer requires it in safety critical code,
so I do it.
Any code which has never been executed is a bomb; I'm not
arguing about that. But code which has only been executed with
one set of pre-conditions, but is reachable with a different
set, is also a bomb. 100% statement coverage is a necessary
condition, but it is far from sufficient.

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Feb 7 '08 #6

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

Similar topics

3
by: John J. Lee | last post by:
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...
6
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...
4
by: O. Zimmermann | last post by:
Hello, I am looking for a tool to process torough UNIT and COVERAGE testing over 60 and more functions of a "critical" embedded application written in C. I found IPL's Cantata++ but we don't...
1
by: Vinay | last post by:
Hi Have any one idea of any popular code coverage tools for .Net application? Is there any such tool for Java also?? Thanks, -Vinu
5
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)....
1
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...
7
by: Kai Zhu | last post by:
Can anybody show me a list of such tools so that I can pick up the tools match my requirement.
1
by: Steven W. Orr | last post by:
Lots of code, calls to, calls by, inheritance, multiple tasks, etc. What do people use to figure out what's happening? TIA -- Time flies like the wind. Fruit flies like a banana. Stranger...
24
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.