Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jplindstrom (594)

jplindstrom
  (email not shown publicly)

Journal of jplindstrom (594)

Monday October 21, 2002
08:18 AM

Bug testing

[ #8490 ]

I know it's PK, and yes, I keep reiterating the same thing again and again...

But testing is really a useful thing.

"Hey, your Wiki mail interface doesn't recognize Wiki names when there is a colon after the name".

Oops...

Ok. I need to check if that's a correct bug report. So I write a test for that. I can do that because I already have tests for similar things. Without the previous tests, this would be difficult. But! Since I already have tests written, writing another test is the easiest way of checking this, because the feature is already broken out of the surrounding program. You don't have to pass it weird live data, or write an elaborate script faking this error condition. It's already done. True laziness.

And I write the test (it fails according to the bug report), fix the problem and all tests are go. And I feel cocky so I release it into the production environment (with the current working code properly backed up, I'm not suicidal :) without even running the entire program! And it works, because I already tested the part that I changed.

Aah, it's good that the right thing happens to be the easy way sometimes :)

The thing is this: often you need to try things out with small pieces of code; to see if what you did works the way you intended; to experiment. The thing with tests is that you take this code, that you wrote anyway, and actually use it for something good. I think that's why it works: you already did this, but now you do it in a formal way, with huge benefits.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.