DragonFly On-Line Manual Pages

Search: Section:  


KCGIREGRESS(3)        DragonFly Library Functions Manual        KCGIREGRESS(3)

NAME

kcgiregress, kcgi_regress_cgi, kcgi_regress_fcgi - regression framework for kcgi

LIBRARY

library "libkcgiregress"

SYNOPSIS

#include <kcgiregress.h> int kcgi_regress_cgi(int (*client)(void *), void *clientData, int (*server)(void *), void *serverData); int kcgi_regress_fcgi(int (*client)(void *), void *clientData, int (*server)(void *), void *serverData);

DESCRIPTION

The kcgi_regress_cgi and kcgi_regress_fcgi functions are used for automated testing of kcgi(3) systems, both as CGI and FastCGI scripts. It is the mechanism used for internal regression tests as well. Applications wishing to use this framework provide callback functions to kcgi_regress_cgi() and kcgi_regress_fcgi(), which invoke server with argument serverArg within a CGI or FastCGI environment as if it were spawned by a web server, upon which the usual khttp_parse(3) or khttp_fcgi_init(3) and khttp_fcgi_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. In most applications, the main function invokes kcgi_regress_cgi or kcgi_regress_fcgi, prepares a libCURL request in the client callback, then runs the usual kcgi(3) sequence in the server callback.

RETURN VALUES

Both the client and server functions should return zero on test failure. kcgi_regress_cgi() and kcgi_regress_fcgi() return zero if any tests or internal machinery fail.

AUTHORS

The kcgiregress library was written by Kristaps Dzonsons <kristaps@bsd.lv>. DragonFly 6.5-DEVELOPMENT January 4, 2016 DragonFly 6.5-DEVELOPMENT

Search: Section: