Click here to Skip to main content
15,891,033 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
JokeRe: Unit Testing... yay or nay? Pin
Daniel Pfeffer21-Apr-24 22:22
professionalDaniel Pfeffer21-Apr-24 22:22 
AnswerRe: Unit Testing... yay or nay? Pin
lmoelleb20-Apr-24 22:39
lmoelleb20-Apr-24 22:39 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon21-Apr-24 4:51
professionalJeremy Falcon21-Apr-24 4:51 
AnswerRe: Unit Testing... yay or nay? Pin
Nelson Goncalves Oct202221-Apr-24 20:31
Nelson Goncalves Oct202221-Apr-24 20:31 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon22-Apr-24 4:08
professionalJeremy Falcon22-Apr-24 4:08 
AnswerRe: Unit Testing... yay or nay? Pin
Private Dobbs21-Apr-24 20:46
Private Dobbs21-Apr-24 20:46 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon22-Apr-24 4:09
professionalJeremy Falcon22-Apr-24 4:09 
AnswerRe: Unit Testing... yay or nay? Pin
DT Bullock21-Apr-24 22:55
DT Bullock21-Apr-24 22:55 
The best use of unit-testing I've seen (ie. admired, admittedly from a distance thus far) is to create a test that breaks in a meaningful way (when fixing a bug, it tickles the bug and fails ... or when adding a feature, it tries to perform the actions that are not yet implemented). Then, 'fixing the bug' or 'implementing the feature' is 'done' when your test passes. The test lingers on ... because it continues to pass, you know that your latest changes didn't take other parts of your code backward. A great example of this discipline in action is the main dev of jOOQ (Github link)[^] ... he pretty much doesn't start a bit of new code without an issue and a failing test.

Unit testing should absolutely not be used for things like double-checking that code does what the complier pretty much says it will. Less is more.
GeneralRe: Unit Testing... yay or nay? Pin
haughtonomous21-Apr-24 23:14
haughtonomous21-Apr-24 23:14 
GeneralRe: Unit Testing... yay or nay? Pin
DT Bullock22-Apr-24 22:19
DT Bullock22-Apr-24 22:19 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon22-Apr-24 4:12
professionalJeremy Falcon22-Apr-24 4:12 
GeneralRe: Unit Testing... yay or nay? Pin
DT Bullock22-Apr-24 20:17
DT Bullock22-Apr-24 20:17 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon23-Apr-24 5:40
professionalJeremy Falcon23-Apr-24 5:40 
GeneralRe: Unit Testing... yay or nay? Pin
DT Bullock23-Apr-24 21:32
DT Bullock23-Apr-24 21:32 
AnswerRe: Unit Testing... yay or nay? Pin
Peter Shaw22-Apr-24 0:45
professionalPeter Shaw22-Apr-24 0:45 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon22-Apr-24 4:15
professionalJeremy Falcon22-Apr-24 4:15 
GeneralRe: Unit Testing... yay or nay? Pin
Peter Shaw22-Apr-24 4:32
professionalPeter Shaw22-Apr-24 4:32 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon22-Apr-24 4:47
professionalJeremy Falcon22-Apr-24 4:47 
AnswerRe: Unit Testing... yay or nay? Pin
K Personett22-Apr-24 3:46
K Personett22-Apr-24 3:46 
AnswerRe: Unit Testing... yay or nay? Pin
Jerry Walter 202422-Apr-24 3:14
Jerry Walter 202422-Apr-24 3:14 
AnswerRe: Unit Testing... yay or nay? Pin
PIEBALDconsult22-Apr-24 3:41
mvePIEBALDconsult22-Apr-24 3:41 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon22-Apr-24 4:20
professionalJeremy Falcon22-Apr-24 4:20 
GeneralRe: Unit Testing... yay or nay? Pin
PIEBALDconsult22-Apr-24 7:00
mvePIEBALDconsult22-Apr-24 7:00 
AnswerRe: Unit Testing... yay or nay? Pin
Shmoken9922-Apr-24 5:36
Shmoken9922-Apr-24 5:36 
AnswerRe: Unit Testing... yay or nay? Pin
SeattleC++22-Apr-24 8:02
SeattleC++22-Apr-24 8:02 

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.