How Can I Make Testing Software More Stimulating? 396
Posted
by
Soulskill
from the flamethrowers-spice-up-any-chore dept.
from the flamethrowers-spice-up-any-chore dept.
An anonymous reader writes "I like writing software. In fact, I revel in it. However, one thing has always kept me back from being able to write the best software I possibly can: testing. I consider testing to be the absolute bane of my existence. It is so boring and un-stimulating that I usually skip it entirely, pass the testing off to someone else, or even worse, if I absolutely have to test, I do a very poor job at it. I know I'm not that lazy, as I can spend hours on end writing software, but there's something about testing that makes my mind constantly want to wander off and think about something else. Does anyone have any tips on how I can make non-automated testing a little bit more stimulating so I can at least begin to form a habit of doing so?"
sharks with lasers (Score:5, Funny)
Re:You can't? (Score:5, Funny)
Wear a different hat each day.
More bugs (Score:4, Funny)
Clearly there aren't enough bugs in the software you are testing. As an experienced C programmer I can help fix this problem...
Reward yourself! (Score:2, Funny)
Re:More bugs (Score:4, Funny)
Let me guess, you can do that by writing your code in java or C#
Unit testing achievements (Score:5, Funny)
http://exogen.github.com/nose-achievements/ [github.com]
*
Instant Feedback
A suite of at least 50 tests takes less than a second to run.
*
Coffee Break
The suite takes between 5 and 15 minutes to run.
*
Take a Walk
The suite takes between 15 and 60 minutes to run.
*
Take a Nap
The suite takes between 1 and 5 hours to run.
*
Take a Vacation
The suite takes at least 3 days to run.
*
Coming soon!
Anticipation
One test in a suite of at least 10 is slow, and all the rest pass.
Time
*
Night Shift
Make a failing suite pass between midnight and 5am.
*
Punctuality
Make a failing suite pass at 9am (give or take a minute).
Failure
*
Complete Failure
All tests in a suite of 50 to 999 fail.
*
Epic Fail
All tests in a suite of at least 1,000 fail.
*
Minor Letdown
All tests in a suite of 10 to 99 pass...except the last.
*
Major Letdown
All tests in a suite of at least 100 pass...except the last.
*
Happy Ending
All tests in a suite of at least 10 fail...except the last.
*
Coming soon!
Heisenbug
Make a passing suite fail without changing anything.
Errors
*
Sausage Fingers
Cause at least 2 distinct syntax errors in a single run.
*
To Understand Recursion
Exceed the maximum recursion depth.
*
Coming soon!
To Err is Human
Cause all tests in a suite of at least 50 to fail with a single error.
Size
*
My God, It’s Full of Dots
The suite has at least 2,001 passing tests.
Frequency
*
Coming soon!
OCD
Run the suite at least 5 times in the spa
recreate the stanley milgram experiment (Score:2, Funny)
http://en.wikipedia.org/wiki/Milgram_experiment [wikipedia.org]
except for you, the shocks will be real, and you will be both tester and test subject
every time your code throws an exception, make it so you receive a small, incrementally growing shock
after about 10 or 20 bugs, and the growing voltage of the shocks, you should be breathing heavily and sweating and be focused like a laser on ensuring the integrity of your code
Re:You can't? (Score:5, Funny)
Wear a different hat each day.
I put on my robe and wizard hat.
Think of it as writing examples (Score:3, Funny)
"Here's how it works..."
That is, if you can write a test that looks like that. I work on compilers, so the trick is to write the example that tweaks just the feature that I want to check, and not 17 others. But, my test cases look like squirrelly little programs that could actually be inputs from especially peculiar users.
You ought to also think about demonstrating your error cases. "If you do this wrong thing, it says...." I am sort of a nut about error messages, partly because I once read the Apple Human Interface guidelines and thought they were a good thing. In particular, does the error message provide the user with information that will help him make the error message go away? When you decide that an error has occurred, what special information do you have that might help? My anti-favorite error message was "Bad SOCKS version number". Not "unexpected", not "too old and not-supported", but "BAD". Morally wrong, so unspeakable that not only can the BAD number not be named, even the good numbers cannot be named, because they might therefore name the BAD number by process of elimination. Truly unspeakable, the version number that shall not be named.
Re:One word (Score:2, Funny)
Re:Then you are lazy. (Score:5, Funny)
or another title+table+paragraph in Word?
Yer documentin' it wrong.
Re:Go work for a porn website (Score:5, Funny)
Actually it's just the opposite. It's like working in a candy factory and quickly getting completely bored/sick of the candy. I did one site where we were having problems with certain videos in different browsers and I swear to God that there was one clip of some really hot anal action that I got *really* sick of. After about the 3rd time I would watch about 5 seconds of it, see if the problem was manifesting, and then be back in the editor.
Now I watch whale documentaries to get my jollies. ... Wait! What?
Re:Too close to the subject... (Score:3, Funny)
I like the "Ethel" approach (I may have got her name wrong; sorry $ethel).
The story was there was this great tester lady, and when she found a bug she pounced on you "Ah hah!" like. She really took her job seriously.
The developers loved her. Go figger.
No, you can't definitively test your code. That's what users / testers are for. You can only ensure it works, within your limited space of $works. That's where $ethel comes in.
Do what I do (Score:3, Funny)
Read Slashdot instead.
Re:Too close to the subject... (Score:2, Funny)
No, you can't definitively test your code. That's what users / testers are for.
Are you serious? Users are there to test your code?!? Do you happen to work for Microsoft?
Re:Blowjobs (Score:3, Funny)
Then you have hookers killing themselves from boredom.
Although... trying to explain away the dead hookers would make debugging a lot more interesting.
Re:Then you are lazy. (Score:1, Funny)
Funny? I was really going for informative, perhaps even insightful. Why would you ever document your code in Word?!
-R.Mo