On 25 May 2017, at 11:44 PM, Jacob Champion <champio...@gmail.com> wrote:

> Last week I had a personal hackathon since I couldn't make it out to 
> ApacheCon. As a result there is now a C-language unit test suite available in 
> branches/httpdunit (based on trunk). I've tested it with a Windows+CMake 
> toolchain as well as an Ubuntu+autoconf toolchain.
> 
> The suite itself is based on Check, which is a testing library I've had some 
> success with in the past. It's supported on a wide variety of platforms and 
> has a nice feature of running each test in a separate process space, so a 
> crash doesn't derail the entire suite. (Note: Check is LGPL.) The build 
> system has been augmented slightly to generate some of the more tedious 
> boilerplate code.
> 
> If you want to give it a try, just install Check (and, if using the configure 
> scripts, make sure Check is visible via pkg-config). The test suite will then 
> automatically be added to the default targets. Once everything builds you 
> just run the suite directly with
> 
>    $ ./test/httpdunit
> 
> As a Check binary, it has multiple knobs to control which tests run and how 
> the reporting is done, but by default it just runs all the tests and prints 
> TAP to stdout.
> 
> The example tests that are currently running are testing a new API for strict 
> Base64 decoding. Right now it's a feature without a client; I included it 
> here because it was a good showcase of the test suite (see test/unit/base64.c 
> for the test case code).
> 
> Let me know what you think!

Love the idea of a test suite written in the same language as the server itself.

It means that anyone who updates the server can use the same skills to update 
the tests.

Regards,
Graham
—

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to