Library Functions Manual
NAME kcgi_regress — automated testing framework for kcgi
LIBRARY library “libkcgiregress”
SYNOPSIS #include <kcgiregress.h>
, void *client_arg
, kcgi_regress_server server
, void *server_arg
function is the single function in a library used for automated testing of kcgi(3)
systems. It is the mechanism used for internal regression tests as well.
Applications wishing to use this framework provide callback functions to kcgi_regress
(), which invokes server
with argument server_arg
within a CGI environment as if it were spawned by a web server, upon which the usual khttp_parse(3)
functions are used to test behaviour. Meanwhile, the client
function is invoked for communicating with the server over port 17123. The libcurl(3)
library is used for internal testing on the client side.
RETURN VALUES Both the client and server functions should return zero on test failure. kcgi_regress() returns 0 if any tests or internal machinery fail.