Click here to Skip to main content
15,795,209 members

Survey Results

Do you do Unit Testing?

Survey period: 22 Jun 2020 to 29 Jun 2020

We ran this 5 years ago. Let's see if things have changed.

OptionVotes% 
We unit test everywhere, always.9912.36
We test the most important and/or non-trivial units,15619.48
We unit test some pieces. Sometimes.27033.71
We never unit test,20225.22
What is unit testing?789.74



 
GeneralNot working on object oriented software Pin
den2k8824-Jun-20 22:42
professionalden2k8824-Jun-20 22:42 
QuestionRe: Not working on object oriented software Pin
r_hyde25-Jun-20 11:41
r_hyde25-Jun-20 11:41 
GeneralSome pieces, sometimes. Pin
Greg Utas23-Jun-20 15:28
mveGreg Utas23-Jun-20 15:28 
GeneralTesting... Unit/Integrated/Integration Pin
Julius Adam22-Jun-20 21:59
Julius Adam22-Jun-20 21:59 
GeneralRe: Testing... Unit/Integrated/Integration Pin
Matt McGuire24-Jun-20 8:02
professionalMatt McGuire24-Jun-20 8:02 
GeneralRe: Testing... Unit/Integrated/Integration Pin
Julius Adam24-Jun-20 8:23
Julius Adam24-Jun-20 8:23 
GeneralI didn't vote because... Pin
Dean Roddey22-Jun-20 14:53
Dean Roddey22-Jun-20 14:53 
GeneralIntegration testing rather than unit testing Pin
Marc Clifton22-Jun-20 3:36
mvaMarc Clifton22-Jun-20 3:36 
I find unit testing, in its pure meaning, to be rather useless. However, I do a lot of integration testing -- basically higher level function calls where I verify that the subsystem, if you will, behaves as expected. I find it a lot more efficient to write tests that way.

Example:

Unit test: when I call the Twilio API to generate a JWT token, I return the token as a string. Well of course it does. Stupid boring pointless test.

Integration test: when the endpoint is called, it returns JSON with either the JWT token, or an error key/message. The endpoint asserts that the username and password are non-null/empty, so I can test that as well.

See the difference? A pure unit test would never call the endpoint, it's too high-level. But as an integration test, I can verify that the endpoint is working exactly as it should.

GeneralRe: Integration testing rather than unit testing Pin
Erik Burd22-Jun-20 8:51
professionalErik Burd22-Jun-20 8:51 
GeneralRe: Integration testing rather than unit testing Pin
Fabio Franco23-Jun-20 0:07
professionalFabio Franco23-Jun-20 0:07 
GeneralI picked "What" Because Pin
W Balboos, GHB22-Jun-20 1:56
W Balboos, GHB22-Jun-20 1:56 
GeneralRe: I picked "What" Because Pin
Sander Rossel22-Jun-20 2:49
professionalSander Rossel22-Jun-20 2:49 
GeneralRe: I picked "What" Because Pin
W Balboos, GHB22-Jun-20 3:03
W Balboos, GHB22-Jun-20 3:03 
GeneralRe: I picked "What" Because Pin
Sander Rossel22-Jun-20 3:37
professionalSander Rossel22-Jun-20 3:37 
GeneralYoUr COde MuSt Be UnIT teStEd... Pin
Sander Rossel21-Jun-20 23:41
professionalSander Rossel21-Jun-20 23:41 
GeneralRe: YoUr COde MuSt Be UnIT teStEd... Pin
W Balboos, GHB22-Jun-20 2:04
W Balboos, GHB22-Jun-20 2:04 
GeneralRe: YoUr COde MuSt Be UnIT teStEd... Pin
Sander Rossel22-Jun-20 2:46
professionalSander Rossel22-Jun-20 2:46 
GeneralRe: YoUr COde MuSt Be UnIT teStEd... Pin
W Balboos, GHB22-Jun-20 2:50
W Balboos, GHB22-Jun-20 2:50 
GeneralRe: YoUr COde MuSt Be UnIT teStEd... Pin
Sander Rossel22-Jun-20 3:33
professionalSander Rossel22-Jun-20 3:33 
GeneralRe: YoUr COde MuSt Be UnIT teStEd... Pin
W Balboos, GHB22-Jun-20 4:00
W Balboos, GHB22-Jun-20 4:00 
GeneralRe: YoUr COde MuSt Be UnIT teStEd... Pin
Sander Rossel22-Jun-20 4:22
professionalSander Rossel22-Jun-20 4:22 
GeneralRe: YoUr COde MuSt Be UnIT teStEd... Pin
W Balboos, GHB22-Jun-20 4:27
W Balboos, GHB22-Jun-20 4:27 
GeneralRe: YoUr COde MuSt Be UnIT teStEd... Pin
Sander Rossel22-Jun-20 4:37
professionalSander Rossel22-Jun-20 4:37 
GeneralRe: YoUr COde MuSt Be UnIT teStEd... Pin
W Balboos, GHB22-Jun-20 4:54
W Balboos, GHB22-Jun-20 4:54 
GeneralRe: YoUr COde MuSt Be UnIT teStEd... Pin
Sander Rossel22-Jun-20 5:47
professionalSander Rossel22-Jun-20 5:47 

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.