Click here to Skip to main content
15,905,915 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 
I have bad news for you, but no, absolutely not.
Partial classes can't be defined across assemblies.
You're basically creating a single class, but split up over multiple files, so those files need to be in the same assembly.
If you're using one of those files for testing, that means your test code is running in your production code as well.

So let's say you've got a partial Person class with FirstName and LastName properties and a GetFullName() function.
Now you create a partial class in a Person.Test.cs file in the same assembly and add a test called TestGetFullName_ShouldReturnFullName().
Your public API for your Person class is now FirstName, LastName, GetFullName() and TestGetFullName_ShouldReturnFullName().
I'm pretty sure you don't want that Unsure | :~

Unless I'm missing something?

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 
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.