descriptionReports the test results of Perl distributions to the CPAN testing service
homepage URLhttp://code.google.com/p/test-reporter/
ownerafoxson@pobox.com
last changeWed, 10 Oct 2007 00:28:38 +0000 (9 20:28 -0400)
content tags
add:
README
NAME
    Test::Reporter - sends test results to cpan-testers@perl.org

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->edit_comments(); # if you want to edit comments in an editor
      $reporter->send('afoxson@cpan.org') || die $reporter->errstr();

      # or

      my $reporter = Test::Reporter->new(
          grade => 'fail',
          distribution => 'Mail-Freshmeat-1.20',
          from => 'whoever@wherever.net (Whoever Wherever)',
          comments => 'output of a failed make test goes here...',
          via => 'CPANPLUS X.Y.Z',
      );
      $reporter->send() || die $reporter->errstr();

DESCRIPTION
    Test::Reporter reports the test results of any given distribution to the
    CPAN Testers. Test::Reporter has wide support for various perl5's and
    platforms. For further information visit the below links:

    * <http://cpantesters.perl.org/>
        CPAN Testers reports (new site)

    * <http://testers.cpan.org/>
        CPAN Testers reports (old site)

    * <http://cpantest.grango.org/>
        The new CPAN Testers Wiki (thanks Barbie!)

    * <http://lists.cpan.org/showlist.cgi?name=cpan-testers>
        The cpan-testers mailing list

    Test::Reporter itself--as a project--also has several links for your
    visiting enjoyment:

    * <http://code.google.com/p/test-reporter/>
        Test::Reporter's master project page

    * <http://groups.google.com/group/test-reporter>
        Discussion group for Test::Reporter

    * <http://code.google.com/p/test-reporter/w/list>
        The Wiki for Test::Reporter

    * <http://repo.or.cz/w/test-reporter.git>
        Test::Reporter's public git source code repository.

    * <http://search.cpan.org/dist/Test-Reporter/>
        Test::Reporter on CPAN

    * <http://code.google.com/p/test-reporter/issues/list>
        UNFORTUNATELY, WE ARE UNABLE TO ACCEPT TICKETS FILED WITH RT.

        Please file all bug reports and enhancement requests at our Google
        Code issue tracker. Thank you for your support and understanding.

    * <http://backpan.cpan.org/authors/id/F/FO/FOX/>
    * <http://backpan.cpan.org/authors/id/A/AF/AFOXSON/>
        If you happen to--for some strange reason--be looking for primordial
        versions of Test::Reporter, you can almost certainly find them at
        the above 2 links.

METHODS
    * address
        Optional. Gets or sets the e-mail address that the reports will be
        sent to. By default, this is set to cpan-testers@perl.org. You
        shouldn't need this unless the CPAN Tester's change the e-mail
        address to send report's to.

    * comments
        Optional. Gets or sets the comments on the test report. This is most
        commonly used for distributions that did not pass a 'make test'.

    * debug
        Optional. Gets or sets the value that will turn debugging on or off.
        Debug messages are sent to STDERR. 1 for on, 0 for off. Debugging
        generates very verbose output and is useful mainly for finding bugs
        in Test::Reporter itself.

    * dir
        Optional. Defaults to the current working directory. This method
        specifies the directory that write() writes test report files to.

    * 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.

    * edit_comments
        Optional. Allows one to interactively edit the comments within a
        text editor. comments() doesn't have to be first specified, but it
        will work properly if it was. Accepts an optional hash of arguments:

        * suffix
            Optional. Allows one to specify the suffix ("extension") of the
            temp file used by edit_comments. Defaults to '.txt'.

    * errstr
        Returns an error message describing why something failed. You must
        check errstr() on a send() in order to be guaranteed delivery. This
        is optional if you don't intend to use Test::Reporter to send
        reports via e-mail, see 'send' below for more information.

    * from
        Optional. Gets or sets the e-mail address of the individual
        submitting the test report, i.e. "afoxson@pobox.com (Adam Foxson)".
        This is mostly of use to testers running under Windows, since
        Test::Reporter will usually figure this out automatically.
        Alternatively, you can use the MAILADDRESS environmental variable to
        accomplish the same.

    * 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

    * mail_send_args
        Optional. If you have MailTools installed and you want to have it
        behave in a non-default manner, parameters that you give this method
        will be passed directly to the constructor of Mail::Mailer. See
        Mail::Mailer and Mail::Send for details.

    * message_id
        Returns an automatically generated Message ID. This Message ID will
        later be included as an outgoing mail header in the test report
        e-mail. This was included to conform to local mail policies at
        perl.org. This method courtesy of Email::MessageID.

    * mx
        Optional. Gets or sets the mail exchangers that will be used to send
        the test reports. If you override the default values make sure you
        pass in a reference to an array. By default, this contains the MX's
        known at the time of release for perl.org. If you do not have
        Mail::Send installed (thus using the Net::SMTP interface) and do
        have Net::DNS installed it will dynamically retrieve the latest
        MX's. You really shouldn't need to use this unless the hardcoded
        MX's have become wrong and you don't have Net::DNS installed.

    * new
        This constructor returns a Test::Reporter object. It will optionally
        accept named parameters for: mx, address, grade, distribution, from,
        comments, via, timeout, debug, dir, perl_version, and transport.

    * perl_version
        Returns a hashref containing _archname, _osvers, and _myconfig based
        upon the perl that you are using. Alternatively, you may supply a
        different perl (path to the binary) as an argument, in which case
        the supplied perl will be used as the basis of the above data.

    * 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.

    * 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 and you do not have Mail::Send installed be sure that you
        use the author's @cpan.org address otherwise they will not be
        delivered. You must check errstr() on a send() in order to be
        guaranteed delivery. Technically, this is optional, as you may use
        Test::Reporter to only obtain the 'subject' and 'report' without
        sending an e-mail at all, although that would be unusual.

    * 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.

    * timeout
        Optional. Gets or sets the timeout value for the submission of test
        reports. Default is 120 seconds.

    * transport
        Optional. Gets or sets the transport method. If you do not specify a
        transport, one will be selected automatically on your behalf: If
        you're on Windows, Net::SMTP will be selected, if you're not on
        Windows, Net::SMTP will be selected unless Mail::Send is installed,
        in which case Mail::Send is used.

        At the moment, this must be one of either 'Net::SMTP', or
        'Mail::Send'. Support for authenticated SMTP may soon be possibly
        added as well.

        If you specify 'Mail::Send' as a transport, you can add an
        additional argument in the form of an array reference which will be
        passed to the constructor of the lower-level Mail::Mailer. This can
        be used to great effect for all manner of fun and enjoyment. ;-)

        This is not designed to be an extensible platform upon which to
        build transport plugins. That functionality is planned for the
        next-generation release of Test::Reporter, which will reside in the
        CPAN::Testers namespace.

    * via
        Optional. Gets or sets the value that will be appended to
        X-Reported-Via, generally this is useful for distributions that use
        Test::Reporter to report test results. This would be something like
        "CPANPLUS 0.036".

    * write and read
        These methods are used in situations where you test on a machine
        that has port 25 blocked and there is no local MTA. You use write()
        on the machine that you are testing from, transfer the written test
        reports from the testing machine to the sending machine, and use
        read() on the machine that you actually want to submit the reports
        from. write() will write a file in an internal format that contains
        'From', 'Subject', and the content of the report. The filename will
        be represented as:
        grade.distribution.archname.osvers.seconds_since_epoch.pid.rpt.
        write() uses the value of dir() if it was specified, else the cwd.

        On the machine you are testing from:

          my $reporter = Test::Reporter->new
          (
            grade => 'pass',
            distribution => 'Test-Reporter-1.16',
          )->write();

        On the machine you are submitting from:

          my $reporter;
          $reporter = Test::Reporter->new()->read('pass.Test-Reporter-1.16.i686-linux.2.2.16.1046685296.14961.rpt')->send() || die $reporter->errstr(); # wrap in an opendir if you've a lot to submit

        write() also accepts an optional filehandle argument:

          my $fh; open $fh, '>-';  # create a STDOUT filehandle object
          $reporter->write($fh);   # prints the report to STDOUT

CAVEATS
    If you specify recipients to be cc'd while using send() (and you do not
    have Mail::Send installed) be sure that you use the author's @cpan.org
    address otherwise they may not be delivered, since the perl.org MX's are
    unlikely to relay for anything other than perl.org and cpan.org.

COPYRIGHT
    Copyright (c) 2007 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
    * perl
    * Config
    * Net::SMTP
    * File::Spec
    * File::Temp
    * Net::Domain
        This is optional. If it's installed Test::Reporter will try even
        harder at guessing your mail domain.

    * Net::DNS
        This is optional. If it's installed Test::Reporter will dynamically
        retrieve the mail exchangers for perl.org, instead of relying on the
        MX's known at the time of this release.

    * Mail::Send
        This is optional. If it's installed Test::Reporter will use
        Mail::Send instead of Net::SMTP.

AUTHOR
    Adam J. Foxson <afoxson@pobox.com> and Richard Soderberg
    <rsod@cpan.org>, 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).
shortlog
2007-10-10 Adam J. FoxsonHerein lies Test-Reporter-1.38.mastercpan-release-1.38
2007-10-10 Adam J. FoxsonMerge branch 'vms_compat'
2007-10-10 Adam J. FoxsonAdditional VMS compatibility improvements.vms_compat
2007-10-09 Adam J. FoxsonHerein lies Test-Reporter-1.36.cpan-release-1.36
2007-10-09 Adam J. FoxsonMinor documentation clarification.
2007-10-09 Adam J. FoxsonReversioning for 1.36
2007-10-09 Adam J. FoxsonFixes for VMS compatibility
2007-10-09 Adam J. FoxsonPer 29690@RT cleaning up cpantest's -dump outputcpantest_dump_output
2007-10-09 Adam J. FoxsonUpdating Changes file per the perl-5.005_05 compat... perl-5.005_05_compat
2007-10-09 Adam J. FoxsonCompat for perl-5.005_05.
2007-08-13 Adam J. FoxsonBringing support files up-to-date.1.34cpan-release-1.34
2007-08-13 Adam J. FoxsonIndeed, we'll want cpantest to support transports...
2007-08-13 Adam J. FoxsonWe should ensure we have Mail::Send before we try to...
2007-08-13 Adam J. FoxsonImplementation, documentation, and tests for transport()
2007-08-13 Adam J. FoxsonAdding MANIFEST.bak to .gitignore
2007-08-12 Adam J. FoxsonAdding a mention of the cpan-testers mailing list in...
...
tags
16 years ago cpan-release-1.38 Tag for CPAN release of Test-Report...
16 years ago cpan-release-1.36 Tag for CPAN release of Test-Report...
16 years ago cpan-release-1.34 Tag for CPAN release of Test-Report...
16 years ago cpan-release-1.32 Tag for CPAN release of Test-Report...
16 years ago cpan-release-1.30 Tag for CPAN release of Test-Report...
16 years ago cpan-release-1.29_04 Tag for CPAN release of Test-Report...
16 years ago cpan-release-1.29_03 Tag for CPAN release of Test-Report...
16 years ago cpan-release-1.29_02 Tag for CPAN release of Test-Report...
16 years ago cpan-release-1.29_01 Tag for CPAN release of Test-Report...
16 years ago cpan-release-1.27 Tag for CPAN release of Test-Report...
16 years ago cpan-release-1.26 Tag for CPAN release of Test-Report...
16 years ago cpan-release-1.25 Tag for CPAN release of Test-Report...
16 years ago cpan-release-1.24 Tag for CPAN release of Test-Report...
16 years ago cpan-release-1.22 Tag for CPAN release of Test-Report...
16 years ago cpan-release-1.20 Tag for CPAN release of Test-Report...
16 years ago cpan-release-1.19 Tag for CPAN release of Test-Report...
...
heads
16 years ago master
16 years ago vms_compat
16 years ago cpantest_dump_output
16 years ago perl-5.005_05_compat
16 years ago 1.36
16 years ago 1.34
16 years ago 1.32
16 years ago 1.30
16 years ago 1.29_04
16 years ago 1.29_03
16 years ago 1.29_02
16 years ago 1.29_01
16 years ago 1.27
16 years ago 1.26
16 years ago 1.25
16 years ago 1.24
...