C TAP Harness 1.0

I've just released the first stand-alone distribution of the test suite driver that I use for nearly all of my software that both has a test suite and isn't only for Perl.

C TAP Harness is a pure-C implementation of TAP, the Test Anything Protocol. (TAP is the text-based protocol used by Perl's test suite.) This package provides a harness similar to Perl's Test::Harness for running tests, with some additional features useful for test suites in packages that use Autoconf and Automake, and C and shell libraries to make writing TAP-compliant test programs in those languages easier.

I wrote the underlying program that's the core of this distribution for INN's test suite a long time ago and tweaked it over time, but over the past year or so I've added a lot of TAP features I wasn't aware of at the time and significantly improved the supporting libraries. There is now special support for builds outside the source directory, both to help the harness find the test programs (even if they're not compiled) and to help test programs find supporting data.

While one can build and install this package, that's not its intended use. Instead, just the harness program and the bits of TAP library that one wants to use are meant to be copied into any package that needs a test suite. My main purpose for making it a separate package is so that I can easily update all of my packages to benefit from improvements in the shared code.

Support for the TAP protocol isn't entirely complete. I don't yet support giving the plan last instead of first or reporting the text for individual skipped tests in a useful way, and the handling of todo tests is a bit lame. But all the standard features I've wanted to use in the past are supported, including skipping entire test cases. Also, while I'm admittedly biased, I think the result reporting is a bit cleaner and nicer than Perl's Test::Harness.

You can get the current version from the C TAP Harness distribution page.

Posted: 2009-05-21 23:39 — Why no comments?

Last spun 2013-07-01 from thread modified 2013-01-04