Test::Chimps::Howto 0.07 review

Download
by rbytes.net on

Test::Chimps::Howto is a Perl module with a howto about Test::Chimps. SYNOPSIS This document briefly describes how to set up a

License: Perl Artistic License
File size: 27K
Developer: Zev Benjamin
0 stars award from rbytes.net

Test::Chimps::Howto is a Perl module with a howto about Test::Chimps.

SYNOPSIS

This document briefly describes how to set up a Chimps server and a Chimps smoker to smoke a project.

THE SERVER

We will be setting up a smoke server for an imaginary company called Bananas 2.0, who make a trendy AJAX website for ordering bananas for primates online. To install the Chimps server, install the Test::Chimps package from CPAN on the machine that will be hosting the server CGI (in this case gorilla.bananas2.com).

root@gorilla:~# cpan Test::Chimps

This will install the various libraries that Chimps needs on the server-side. Next, you are going to need to create the server CGI. There is an example in the Test-Chimps distribution that looks a lot like this:

#!/usr/bin/env perl

use Test::Chimps::Server;

my $server = Test::Chimps::Server->new(
base_dir => '/home/chimps',
list_template => 'list.tmpl',
variables_validation_spec => {
project => 1,
revision => 1,
committer => 1,
duration => 1,
osname => 1,
osvers => 1,
archname => 1
}
);

$server->handle_request;

This file should be put somewhere where the webserver can execute CGIs. In this case, it will be dropped in /usr/lib/cgi-bin and called chimps-server.pl.

The call to the Test::Chimps::Server constructor passes three arguments. The base_dir argument specifies that /home/chimps will be where the Chimps server will store its database, rate limiting file, and templates. The list_template argument says that the file list.tmpl will be used as the template for the front page (where smoke reports are listed). This file can be found in the examples subdirectory of the Test-Chimps distribution (and it's too large to reproduce here). You should drop list.tmpl into /home/chimps/templates. Finally, variables_validation_spec tells the Chimps server which report variables the server will require. See "REPORT VARIABLES" in Test::Chimps for more information about report variables. There are also many more options that can be passed to the Test::Chimps::Server constructor for specifying where things should be stored and how to serve smoke reports.

You should now be able to hit http://gorilla.banana2.com/cgi-bin/chimps-server.pl and see an empty listing of smoke reports. We'll fix the problem of it being empty in the next section.

Requirements:
Perl

Test::Chimps::Howto 0.07 search tags