NAME
Test::Reporter - reports test results to the CPAN testing service
SYNOPSIS
use Test::Reporter;
my $reporter = Test::Reporter->new();
$reporter->grade('pass');
$reporter->distribution('Mail-Freshmeat-1.20');
$reporter->send() || die $reporter->errstr();
# or
my $reporter = Test::Reporter->new();
$reporter->grade('fail');
$reporter->distribution('Mail-Freshmeat-1.20');
$reporter->comments('output of a failed make test goes here...');
$reporter->send('afoxson@pobox.com') || die $reporter->errstr();
NOTE: THIS VERSION OF Test::Reporter SHOULD BE CONSIDERED BETA.
THE INTERFACE MAY CHANGE.
DESCRIPTION
Test::Reporter reports the test results of any given distribution to the CPAN testing service. See http://testers.cpan.org/ for details.
METHODS
new
This constructor returns a Test::Reporter object. It currently accepts no parameters, but will likely take named parameters in a future version.
subject
Returns the subject line of a report, i.e. "PASS Mail-Freshmeat-1.20 Darwin 6.0". 'grade' and 'distribution' must first be specified before calling this method.
report
Returns the actual content of a report, i.e. "This distribution has been tested as part of the cpan-testers...". 'comments' must first be specified before calling this method, if you have comments to make and expect them to be included in the report.
comments
Gets or sets the comments on the test report. This is optional, and most commonly used for distributions that did not pass a 'make test'.
errstr
Returns an error message describing why something failed. You must check errstr() on a send() in order to be guaranteed delivery.
from
Gets or sets the e-mail address of the individual submitting the test report, i.e. "Adam J. Foxson <afoxson@pobox.com>". This is mostly of use to testers running under Windows, since Test::Reporter will usually figure this out automatically.
grade
Gets or sets the success or failure of the distributions's 'make test' result. This must be one of:
grade meaning ----- ------- pass all tests passed fail one or more tests failed na distribution will not work on this platform unknown distribution did not include tests
distribution
Gets or sets the name of the distribution you're working on, for example Foo-Bar-0.01. There are no restrictions on what can be put here.
send
Sends the test report to cpan-testers@perl.org and cc's the e-mail to the specified recipients, if any. If you do specify recipients to be cc'd be sure that you use the author's @cpan.org address otherwise they will not be delivered.
timeout
Gets or sets the timeout value for the submission of test reports.
TODO
- More detailed error messages and reporting.
- More tests.
- Possibly use Net::DNS to get MX's for perl.org.
- Cycle through all available MX servers, instead of just the first.
- Encoding of data may be necessary.
- Allow the constructor to take named parameters.
COPYRIGHT
Copyright (c) 2002 Adam J. Foxson. All rights reserved.
LICENSE
This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
AUTHOR
Adam J. Foxson <afoxson@pobox.com>, with much deserved credit to Kirrily "Skud" Robert <skud@cpan.org>, and Kurt Starsinic <Kurt.Starsinic@isinet.com> for predecessor versions (CPAN::Test::Reporter, and cpantest respectively).