httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: t/modules/rewrite tweaking
Date Thu, 09 Aug 2001 11:15:32 GMT
On Wed, 8 Aug 2001, Ryan Bloom wrote:

> > Especially important to make sure that those who code the modules know
> > about the existance of this project and the best way to proceed is to do
> > the following:
> >
> > - every time a bug gets reported, before you even attempt the fix, write a
> > test that exposes the bug.
> > - now fix the bug and make sure that test passes ok.
> > - it's possible that a few tests can be written to expose the same bug.
> >
> > Now if anybody with the high httpd karma could let others know about this
> > magic scenario, that would help the test writers a lot.
> I have posted to new-httpd at least twice letting people know about
> the perl framework.

Yup, I've seen those posts :)

But just saying that the project exists and educating people of why to
write tests and how to write them is not the same.

For example as John Sachs said in one of his replies, that he could spend
all his life writing tests for mod_rewrite, since there are so many things
that can be tested. If the folks who maintain mod_rewrite, will remember
to write only the tests to exploit the bugs that get reported, this will
already add a bug number of tests.

In most of the cases writing tests based on bugs is trivial, since
reporters many times write a simple scenario that exposes the bug.
Those who fix the bug need to reproduce the bug anyway, so why not to do
it through the test, which than can be reused many times.

May be we need to write some document explaining why and how to write
tests, to educate people. Tests are usually falling in the same category
with documentation -- nobody wants to do it after the work is done. The
only way to make people do that, is to educate them to write tests as they
go. Some methods of extreme programming suggest writing tests even before
the code have been written, which can apply in some cases and not the
others. Finding the middle ground is the best solution.

> I am going to use this project as my final excuse
> to learn perl, once I get the time to sit down in front of a computer,
> so at least one of the new-httpd programmers will be writing tests
> sooner or later.  :-)

And one more perl programmer :)

Hey, I have an idea. Is there a chance we can ask people to write tests
that expose the bugs that they report? Then we get tests for free...

Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker       mod_perl Guide

View raw message