httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edgar Frank" <>
Subject Howto unittest httpd modules?
Date Thu, 11 Nov 2010 07:11:41 GMT
Hi modules-dev-folks,

I've written a handful of modules for httpd. I'm now looking for a way to setup some unit
tests. We have continuous integration running, so I want to supply some tests, starting from
compiling against httpd to basic functionality to more elaborate feature tests.

I wonder how to unit-test this, as the prerequsites are rather complicated. The tests would
have to setup a httpd, provide a config, compile and install the modules. As you don't want
to modify the modules themselves, you have to run a bunch of requests and monitor expected
output - maybe measuring coverage or running valgrind on the way.

I see no way to run "real" unit tests as you would have to emulate httpd and run your modules
against it, as most of the code is httpd or at least highly APR dependent. I see no point
in emulating httpd as you would have to implement every little detail - httpd specific behaviour
(e.g. in version bumps) is one important thing to test IMHO.

So, has anyone some experience with this, some suggestions, howtos or tutorials? Any help
would be greatly appreciated.


View raw message