As promised earlier, here is all you need to start writing regression 
tests for AxKit. You may have to get some additional Perl modules but not 
as many as you might think -- many of them are only required for testing 
stuff like SSL and DAV. If you can run AxKit then you probably have all 
the essential modules installed.

To download, patch up and build httpd-test do the following:

 export CVSROOT=:pserver:[EMAIL PROTECTED]:/home/cvspublic
 cvs login
 cvs checkout httpd-test
 cd httpd-test
 patch -p0 < /path/to/httpd-test-axkit.patch
 tar xvf /path/to/httpd-test-axkit.tar
 cd perl-framework
 perl Makefile.PL
 make

After this, the easiest way to run the tests is to run:

 PATH=/path/where/apxs/is:$PATH t/TEST

but that will test _everything_. More specifically,

 PATH=/path/where/apxs/is:$PATH t/TEST axkit

will only run the tests in t/axkit. To avoid waiting for the server to 
start each time, do the following:

 PATH=/path/where/apxs/is:$PATH t/TEST -configure
 t/TEST -start-httpd
 ...
 t/TEST -run-tests axkit
 ...
 t/TEST -stop-httpd

For debugging tests,

 t/TEST -run-tests axkit/xsltbasic

will run only the specified test, and 

 t/TEST -v -run-tests axkit/xsltbasic

will run it verbosely.


The files in the tarball are as follows:

perl-framework/t/conf/axkit.conf.in -- a fragment of httpd.conf that gets 
  read and incorporated during 't/TEST -configure'

perl-framework/t/axkit -- the tests (ignore the .t, they are just Perl 
  scripts). 'all.t' is a magic test -- if it fails then no test in the 
  directory will be run, which saves putting "have_module 'axconfig'" in 
  every test. xsltbasic.t is a very basic XSLT test.

perl-framework/t/htdocs/axkit -- the documents to be served during the 
  test, currently just those required for xsltbasic.t.


I'd have written a couple more tests, but xsltbasic is about the limit of 
my XSLT knowledge :-/. There are plenty of tests for Apache and PHP that 
you can look at, and feel free to ask me if you have any questions.

Have fun,
Gary

[ [EMAIL PROTECTED] ][ GnuPG 85A8F78B ][ http://inauspicious.org/ ]

Attachment: httpd-test-axkit.patch.gz
Description: GNU Zip compressed data

Attachment: httpd-test-axkit.tar.gz
Description: GNU Zip compressed data

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to