Click here to Skip to main content
15,868,340 members

Survey Results

Do you use Code Coverage tools?

Survey period: 9 May 2022 to 16 May 2022

A critical tool or an unnecessary critic?

OptionVotes% 
Yes, always344.30
When it makes sense, yes.8310.51
Sometimes. It really depends.668.35
Rarely.10112.78
No, never.24230.63
I don't know what a Code Coverage tool is26433.42



 
General:doh: I think but i don't use it. Pin
Hermin Useini10-May-22 9:15
Hermin Useini10-May-22 9:15 
GeneralIdk what is it? Pin
Hermin Useini10-May-22 9:22
Hermin Useini10-May-22 9:22 
GeneralCan't Afford One Pin
BernardIE531710-May-22 1:39
BernardIE531710-May-22 1:39 
GeneralRe: Can't Afford One Pin
Jacquers10-May-22 7:25
Jacquers10-May-22 7:25 
GeneralUnit Tests + Sonarqube Pin
Jacquers9-May-22 21:37
Jacquers9-May-22 21:37 
GeneralRe: Unit Tests + Sonarqube Pin
Sander Rossel10-May-22 21:06
professionalSander Rossel10-May-22 21:06 
GeneralRe: Unit Tests + Sonarqube Pin
Jacquers10-May-22 21:18
Jacquers10-May-22 21:18 
GeneralRe: Unit Tests + Sonarqube Pin
jpoggio11-May-22 20:55
jpoggio11-May-22 20:55 
GeneralNo, coverage is pretty useless Pin
Sander Rossel9-May-22 20:45
professionalSander Rossel9-May-22 20:45 
GeneralRe: No, coverage is pretty useless Pin
Kirk 1038982110-May-22 9:49
Kirk 1038982110-May-22 9:49 
GeneralRe: No, coverage is pretty useless Pin
Sander Rossel11-May-22 10:01
professionalSander Rossel11-May-22 10:01 
GeneralRe: No, coverage is pretty useless Pin
trønderen11-May-22 13:42
trønderen11-May-22 13:42 
GeneralRe: No, coverage is pretty useless Pin
Sander Rossel11-May-22 20:09
professionalSander Rossel11-May-22 20:09 
GeneralRe: No, coverage is pretty useless Pin
trønderen12-May-22 6:01
trønderen12-May-22 6:01 
GeneralRe: No, coverage is pretty useless Pin
Sander Rossel14-May-22 21:32
professionalSander Rossel14-May-22 21:32 
trønderen wrote:
test procedures for environmental conditions (including file system and network), verifying data structure consistency etc.
Never wrote those.
They don't sound like technical tests though and more like a utility that tests whether a user's system is running well.
I don't really see why you need partial classes for such tests though.
trønderen wrote:
procedures for testing hundreds of borderline cases, or the complete cartesian product of the values of five different parameters
These are (unit) tests in my book and the test code I was talking about that you don't put in partial classes.
You don't ship unit tests to customers.
It would clutter up the public API with lots of weird methods.
trønderen wrote:
For returning to the subject line contents: Especially with interpreted languages that are not even syntax checked at build time, coverage is essential.
I'd say linters do a better job at checking syntax.
You shouldn't have 100% coverage just to check syntax (and even then, it's not checking syntax, it's just checking that syntax doesn't cause errors).
trønderen wrote:
Coverage tools sometimes give you surprises: If you are not familiar with them, you might not believe the figures they report, the first time you use them. Most of us has a lot of code that has never been tested. For compiled languages, you at least can assume that the syntax is correct, but you forget to test all the 'else' clauses, several of the switch alternatives, etc.
I agree with you there.
If your tests make sense it can add some insights.
I don't think coverage is a pretty good metric on itself though.
Very often, you don't need 100% coverage.
My coverage is probably about 0.01%, as I don't test by default and only add tests when I think some code could easily break or is difficult to test otherwise.
The methods I test do have a 100% coverage though.
Basically, I've gone from a "test unless..." to a "test if..." approach and in that scenario, too, coverage is a useless metric.

GeneralRe: No, coverage is pretty useless Pin
Kirk 1038982111-May-22 16:12
Kirk 1038982111-May-22 16:12 
GeneralRe: No, coverage is pretty useless Pin
Sander Rossel11-May-22 20:10
professionalSander Rossel11-May-22 20:10 
GeneralRe: No, coverage is pretty useless Pin
Kirk 1038982112-May-22 2:50
Kirk 1038982112-May-22 2:50 
GeneralRe: No, coverage is pretty useless Pin
Sander Rossel12-May-22 2:55
professionalSander Rossel12-May-22 2:55 
GeneralNo, but need/want to. Pin
ergohack9-May-22 4:47
ergohack9-May-22 4:47 
GeneralRe: No, but need/want to. Pin
RickZeeland9-May-22 8:07
mveRickZeeland9-May-22 8:07 
GeneralWhen I have to Pin
Nemanja Trifunovic9-May-22 2:11
Nemanja Trifunovic9-May-22 2:11 
GeneralNo Pin
Slacker0079-May-22 0:48
professionalSlacker0079-May-22 0:48 
GeneralHad to google! Pin
CHill608-May-22 22:29
mveCHill608-May-22 22:29 
GeneralAlways - The SPICE is vital to automotive travel Pin
den2k888-May-22 22:01
professionalden2k888-May-22 22:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.