Adam J. Foxson > CPAN-Testers-Report-0.04 > CPAN::Testers::Report

Download:
CPAN-Testers-Report-0.04.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.04   Source   Latest Release: CPAN-Testers-Report-1.999002

NAME ^

CPAN::Testers::Report - Creates CPAN Testers test-report objects

SYNOPSIS ^

  use CPAN::Testers::Report;
  use JSON::DWIW;

  my $serialized_report;

  {
    my $test_report = CPAN::Testers::Report->new() ||
        die CPAN::Testers::Report->errstr();
    $test_report->comments('..This is a computer-generated test report..');
    $test_report->dist('Test-Reporter-1.34') || die $test_report->errstr();
    $test_report->from('Adam J. Foxson <afoxson@pobox.com>') ||
        die $test_report->errstr();
    $test_report->grade('pass') || die $test_report->errstr();

    # generate a JSON serialization of test-report object ("client side")
    my $json_obj = JSON::DWIW->new({pretty => 1});
    $serialized_report = $json_obj->to_json($test_report);
  }

  # transport magic pixie dust! ($serialized_report transmitted via HTTP)

  {
    # reconstitue the object ("server side")
    my $json_obj = JSON::DWIW->new();
    my $test_report = $json_obj->from_json($serialized_report);
    bless $test_report, 'CPAN::Testers::Report';

    # methods may now be called against the reconstituted object..
    print $test_report->grade(), "\n";
  }

DESCRIPTION ^

This module is a component of the next-generation implementation of the CPAN Tester's stack. Once completed, this distribution and its constituents will obsolete Test::Reporter.

This module provides an abstraction for test reports. An object of this type will encapsulate all data and information about a single, specific test report. This object can then be submitted to a user's transport of choice for delivery.

This is a developer's release. The interface is not stable (but will be soon); The API may change at any time without notice. This module is not yet recommended for general use, but testing is highly encouraged.

SERIALIZATION ^

These objects are generated specifically with serialization in mind.

Below, please find a sample test report in JSON:

{ "_interpreter_vers_numeric":"5.8.8", "_grade":"PASS", "_from":"Adam J. Foxson <afoxson@pobox.com>", "_config": { "gnulibc_version":"", "uname":"uname", "longdblsize":"16", "nvtype":"double", "ccdlflags":" ", "cppflags":"-no-cpp-precomp -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I\/usr\/local\/include", "cc":"cc", "archname":"darwin-thread-multi-2level", "config_args":"-ds -e -Dprefix=\/usr -Dccflags=-g -pipe -Dldflags=-Dman3ext=3pm -Duseithreads -Duseshrplib", "libc":"\/usr\/lib\/libc.dylib", "byteorder":"1234", "osname":"darwin", "d_longdbl":"define", "libpth":"\/usr\/local\/lib \/usr\/lib", "prototype":"define", "useperlio":"define", "so":"dylib", "ccflags":"-arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I\/usr\/local\/include", "gccversion":"4.0.1 (Apple Inc. build 5465)", "ldflags":"-arch i386 -arch ppc -L\/usr\/local\/lib", "useposix":"true", "useshrplib":"true", "longsize":"4", "uselongdouble":null, "alignbytes":"8", "d_longlong":"define", "use64bitall":"define", "ccversion":"", "man3ext":"3pm", "doublesize":"8", "usemymalloc":"n", "hint":"recommended", "use5005threads":null, "usemultiplicity":"define", "perllibs":"-ldl -lm -lutil -lc", "dlext":"bundle", "ivsize":"4", "usesocks":null, "lddlflags":"-arch i386 -arch ppc -bundle -undefined dynamic_lookup -L\/usr\/local\/lib", "libperl":"libperl.dylib", "osvers":"9.0", "cccdlflags":" ", "ptrsize":"4", "uselargefiles":"define", "useithreads":"define", "longlongsize":"8", "usethreads":"define", "d_sfio":null, "lseeksize":"8", "n":"", "libs":"-ldbm -ldl -lm -lutil -lc", "dlsrc":"dl_dlopen.xs", "use64bitint":"define", "d_dlsymun":null, "ld":"cc -mmacosx-version-min=10.5", "gccosandvers":"", "d_sigaction":"define", "ivtype":"long", "optimize":"-O3", "nvsize":"8", "intsize":"4", "prefix":"\/" }, "_report_vers":1, "_need_prerequisites": { "Test::More":"0.74" }, "_interpreter_vers_extra":null, "_via":"CPAN::Testers::Report 0.03, cpantest", "_make_test_output":"PERL_DL_NONLAZY=1 \/usr\/bin\/perl \"-MExtUtils::Command::MM\" \"-e\" \"test_harness(0, 'blib\/lib', 'blib\/arch')\" t\/*.t\nt\/0-signature........skipped\n all skipped: Set the environment variable TEST_SIGNATURE to enable this test.\nt\/1-report...........ok \nt\/98-pod.............skipped\n all skipped: Skipping author tests\nt\/99-pod_coverage....skipped\n all skipped: Skipping author tests\nAll tests successful, 3 tests skipped.\nFiles=4, Tests=113, 0 wallclock secs ( 0.38 cusr + 0.02 csys = 0.40 CPU)\n", "__errstr":null, "_dist":"Test-Reporter-1.34", "_dist_name":"Test-Reporter", "_environment_variables": { "HOME":"\/Users\/afoxson", "PERL5LIB":"\/sw\/lib\/perl5:\/sw\/lib\/perl5\/darwin" }, "_interpreter_version_extra":"", "_interpreter_vers_float":"5.008008", "_interpreter":"perl", "_have_prerequisites": { "Test::More":"0.47" }, "_perl_special_variables": { "$GID":"500 500", "$^X":"\/usr\/bin\/perl", "$EGID":"500 500", "$UID\/$EUID":"500 \/ 500" }, "_dist_vers":"1.34", "_rfc2822_date":"Sun, 13 Jan 2008 03:03:03 -0500", "_perl_toolchain_modules": { "Module::Signature":"0.55", "YAML":"0.66", "File::Spec":"3.25", "ExtUtils::Install":"1.44", "ExtUtils::Command":"1.13", "Module::Build":"0.2808", "ExtUtils::CBuilder":"0.21", "ExtUtils::Manifest":"1.51", "Test::Harness":"3.05", "ExtUtils::MakeMaker":"6.42", "ExtUtils::ParseXS":"2.18", "version":"0.74", "YAML::Syck":"1.00", "Test::More":"0.74", "CPAN":"1.9205", "Cwd":"3.25" }, "_comments":"...This is a computer-generated test report..." }

METHODS ^

COPYRIGHT ^

 Copyright (C) 2007, 2008 Adam J. Foxson and the CPAN Testers.
 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 many thanks to:

syntax highlighting: