Click here to Skip to main content
15,907,396 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.

 
RantWrite test cases as if a 5 year old will do the tests. Pin
Maximilien14-May-24 5:23
Maximilien14-May-24 5:23 
GeneralRe: Write test cases as if a 5 year old will do the tests. Pin
Jeremy Falcon14-May-24 5:38
professionalJeremy Falcon14-May-24 5:38 
GeneralRe: Write test cases as if a 5 year old will do the tests. Pin
Maximilien14-May-24 5:45
Maximilien14-May-24 5:45 
GeneralRe: Write test cases as if a 5 year old will do the tests. Pin
Jeremy Falcon14-May-24 6:03
professionalJeremy Falcon14-May-24 6:03 
GeneralRe: Write test cases as if a 5 year old will do the tests. Pin
Amarnath S14-May-24 6:23
professionalAmarnath S14-May-24 6:23 
GeneralRe: Write test cases as if a 5 year old will do the tests. Pin
kmoorevs14-May-24 8:19
kmoorevs14-May-24 8:19 
GeneralRe: Write test cases as if a 5 year old will do the tests. Pin
Jo_vb.net14-May-24 8:43
mvaJo_vb.net14-May-24 8:43 
GeneralRe: Write test cases as if a 5 year old will do the tests. Pin
jochance14-May-24 8:39
jochance14-May-24 8:39 
It comes down to my biggest beef with tests and that's being only as good, generally, as whoever wrote what they're testing.

For one, some jabroni didn't really write tests for your system. They wrote some documentation.

If you can't run them in an automated fashion - without manually hunting records down and manipulating data? Then they simply aren't tests and if the person's task was to write tests, they 100% failed that task.

You write the test so that it stages the data you know will work and then delete that data post-test.

[OneTimeSetup] / [OneTimeTearDown] are the decorators for NUnit to do stuff like that.

When we started writing a bunch of tests, we settled structuring things linearly like the following with regions for:
Class Members
Assemble/Setup
Act/Invoke
Test Asserts
Cleanup
GeneralRe: Write test cases as if a 5 year old will do the tests. Pin
pkfox14-May-24 10:23
professionalpkfox14-May-24 10:23 
GeneralRe: Write test cases as if a 5 year old will do the tests. Pin
trønderen14-May-24 15:11
trønderen14-May-24 15:11 
GeneralRe: Write test cases as if a 5 year old will do the tests. Pin
jmaida14-May-24 17:55
jmaida14-May-24 17:55 
GeneralRe: Write test cases as if a 5 year old will do the tests. Pin
kdmote15-May-24 3:35
kdmote15-May-24 3:35 
GeneralRe: Write test cases as if a 5 year old will do the tests. Pin
Sander Rossel14-May-24 21:26
professionalSander Rossel14-May-24 21:26 
GeneralRe: Write test cases as if a 5 year old will do the tests. Pin
Fly Gheorghe14-May-24 21:34
Fly Gheorghe14-May-24 21:34 
GeneralRe: Write test cases as if a 5 year old will do the tests. Pin
Ian Brockbank15-May-24 1:27
Ian Brockbank15-May-24 1:27 
GeneralRe: Write test cases as if a 5 year old will do the tests. Pin
BryanFazekas15-May-24 1:41
BryanFazekas15-May-24 1:41 
GeneralWordle 1,060 Pin
Shane010313-May-24 18:38
Shane010313-May-24 18:38 
GeneralRe: Wordle 1,060 Pin
GKP199213-May-24 18:46
professionalGKP199213-May-24 18:46 
GeneralRe: Wordle 1,060 Pin
OriginalGriff13-May-24 20:37
mveOriginalGriff13-May-24 20:37 
GeneralRe: Wordle 1,060 - 4 4 me Pin
pkfox13-May-24 20:40
professionalpkfox13-May-24 20:40 
GeneralRe: Wordle 1,060 Pin
Amarnath S13-May-24 20:41
professionalAmarnath S13-May-24 20:41 
GeneralRe: Wordle 1,060 Pin
Sandeep Mewara13-May-24 22:08
mveSandeep Mewara13-May-24 22:08 
GeneralRe: Wordle 1,060 Pin
Sander Rossel13-May-24 22:27
professionalSander Rossel13-May-24 22:27 
GeneralRe: Wordle 1,060 Pin
ChandraRam13-May-24 22:46
ChandraRam13-May-24 22:46 
GeneralRe: Wordle 1,060 Pin
Cp-Coder14-May-24 1:57
Cp-Coder14-May-24 1:57 

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.