The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Test::Chimps::Server - Accept smoke report uploads and display smoke reports

SYNOPSIS

This module simplifies the process of running a smoke server. It is meant to be used with Test::Chimps::Client.

    use Test::Chimps::Server;

    my $server = Test::Chimps::Server->new(base_dir => '/var/www/smokes');

    $server->handle_request;

METHODS

new ARGS

Creates a new Server object. ARGS is a hash whose valid keys are:

  • base_dir

    Mandatory. Base directory where report data will be stored.

  • bucket_file

    Name of bucket database file (see Algorithm::Bucket). Defaults to 'bucket.dat'.

  • burst_rate

    Burst upload rate allowed (see Algorithm::Bucket). Defaults to 5.

  • database_dir

    Directory under bsae_dir where the SQLite database will be stored. Defaults to 'chimpsdb'.

  • database_file

    File under database_dir to use as the SQLite database. Defaults to 'database'.

  • list_template

    Template filename under base_dir/template_dir to use for listing smoke reports. Defaults to 'list.tmpl'.

  • lister

    An instance of Test::Chimps::Server::Lister to use to list smoke reports. You do not have to use this option unless you are subclassing Lister.

  • max_rate

    Maximum upload rate allowed (see Algorithm::Bucket). Defaults to 1/30.

  • max_size

    Maximum size of HTTP POST that will be accepted. Defaults to 3 MiB.

  • max_reports_per_subcategory

    Maximum number of smokes allowed per category. Defaults to 5.

  • template_dir

    Directory under base_dir where html templates will be stored. Defaults to 'templates'.

  • variables_validation_spec

    A hash reference of the form accepted by Params::Validate. If supplied, this will be used to validate the report variables submitted to the server.

handle_request

Handles a single request. This function will either accept a series of reports for upload or display report summaries.

AUTHOR

Zev Benjamin, <zev at cpan.org>

BUGS

Please report any bugs or feature requests to bug-test-chimps at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Chimps. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Test::Chimps

You can also look for information at:

ACKNOWLEDGEMENTS

Some code in this distribution is based on smokeserv-server.pl from the Pugs distribution.

COPYRIGHT & LICENSE

Copyright 2006 Best Practical Solutions. Portions copyright 2005-2006 the Pugs project.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.