Click here to Skip to main content
15,896,547 members

Survey Results

Do you do Unit Testing?

Survey period: 3 Aug 2015 to 10 Aug 2015

Whether it's using a formal unit testing system or hand-made tests of the fundamental parts of your system: do you do it?

OptionVotes% 
We unit test everywhere, always.20411.56
We test the most important and/or non-trivial units,31317.73
We unit test some pieces. Sometimes.44825.38
We never unit test,29116.49
What is unit testing?50928.84



 
GeneralFORTH is unit testing Pin
BrainiacV4-Aug-15 4:43
BrainiacV4-Aug-15 4:43 
GeneralRe: FORTH is unit testing Pin
RugbyLeague4-Aug-15 23:20
RugbyLeague4-Aug-15 23:20 
GeneralRe: FORTH is unit testing Pin
Vivi Chellappa5-Aug-15 3:41
professionalVivi Chellappa5-Aug-15 3:41 
QuestionDoes anyone else seem to find that... Pin
Wastedtalent4-Aug-15 3:04
professionalWastedtalent4-Aug-15 3:04 
AnswerRe: Does anyone else seem to find that... Pin
Doug_K4-Aug-15 4:31
Doug_K4-Aug-15 4:31 
GeneralRe: Does anyone else seem to find that... Pin
Wastedtalent4-Aug-15 4:34
professionalWastedtalent4-Aug-15 4:34 
GeneralRe: Does anyone else seem to find that... Pin
Rob Philpott4-Aug-15 23:17
Rob Philpott4-Aug-15 23:17 
GeneralRe: Does anyone else seem to find that... Pin
Slacker0075-Aug-15 1:59
professionalSlacker0075-Aug-15 1:59 
AnswerDoes anyone *else* seem to find that... Pin
Chris Maunder4-Aug-15 7:42
cofounderChris Maunder4-Aug-15 7:42 
GeneralMaybe Pin
RugbyLeague3-Aug-15 21:49
RugbyLeague3-Aug-15 21:49 
GeneralRe: Maybe Pin
Rob Philpott4-Aug-15 23:19
Rob Philpott4-Aug-15 23:19 
AnswerI don't Knit ~ ergo, nothing to test... Pin
MacSpudster3-Aug-15 8:45
professionalMacSpudster3-Aug-15 8:45 
GeneralBy any other name Pin
W Balboos, GHB3-Aug-15 2:05
W Balboos, GHB3-Aug-15 2:05 
GeneralRe: By any other name Pin
Mohibur Rashid3-Aug-15 16:03
professionalMohibur Rashid3-Aug-15 16:03 
GeneralRe: By any other name Pin
Daniel Pfeffer8-Aug-15 22:53
professionalDaniel Pfeffer8-Aug-15 22:53 
GeneralUnit Testing is a great idea in theory Pin
Slacker0073-Aug-15 0:17
professionalSlacker0073-Aug-15 0:17 
GeneralUnit tests are overrated... PinPopular
Sander Rossel2-Aug-15 20:44
professionalSander Rossel2-Aug-15 20:44 
They're only as good as the programmer who writes them!
I've worked with someone who unit tested a function (all tests passed), put it in production, and got me a few hours overtime because everything collapsed!
That same programmer unit tested some code and told me "nothing is wrong with this code because all tests passed" while clearly something was wrong (a multi threaded timer that went off 3 milliseconds early, unit test that!)...
This programmer also believed unit testing solved all of his problems (and in a way it did, because I was the one who had to solve them).

And then I've seen code that isn't unit testable.
A function with some 100 lines of code and numerous if- and switch statements?
Such code should never see the light of day, but there are bad programmers and such code is produced.
Anyway, unit tests aren't going to help you there (only fear and caution will).

I'm not saying unit tests are worthless, they saved my ass a couple of times.
They're just not worth getting all religious over (something I see far too often with unit testing).
Writing clear and readable code and using your common sense is so much more effective than unit testing.
Visit my blog at Sander's bits - Writing the code you need.
Or read my articles at my CodeProject profile.
Simplicity is prerequisite for reliability.
— Edsger W. Dijkstra
Regards,
Sander

GeneralRe: Unit tests are overrated... Pin
KarstenK2-Aug-15 21:12
mveKarstenK2-Aug-15 21:12 
GeneralRe: Unit tests are overrated... Pin
jgakenhe3-Aug-15 1:58
professionaljgakenhe3-Aug-15 1:58 
GeneralRe: Unit tests are overrated... Pin
Vikram A Punathambekar3-Aug-15 6:59
Vikram A Punathambekar3-Aug-15 6:59 
GeneralRe: Unit tests are overrated... Pin
Jahmal233-Aug-15 7:07
Jahmal233-Aug-15 7:07 
GeneralRe: Unit tests are overrated... Pin
ed welch3-Aug-15 23:34
ed welch3-Aug-15 23:34 
GeneralRe: Unit tests are overrated... Pin
H.Brydon4-Aug-15 17:33
professionalH.Brydon4-Aug-15 17:33 
GeneralRe: Unit tests are overrated... Pin
ed welch6-Aug-15 0:57
ed welch6-Aug-15 0:57 
GeneralUnit test for class libraries Pin
Mostafa A. Ali2-Aug-15 20:43
professionalMostafa A. Ali2-Aug-15 20:43 

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.