| 1 | package TAP::Formatter::TeamCity; | ||
| 2 | |||
| 3 | 18 | ▶ | use 5.010; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 18 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 18 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 18 | our $VERSION = '0.08'; | |
| 9 | |||
| 10 | 18 | ▶ | use TAP::Formatter::Session::TeamCity; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 18 | ▶ | use base qw(TAP::Formatter::Base); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | sub open_test { | ||
| 15 | 48 | ▶ | my $self = shift; |
|
Subroutine
open_test: called CC=1 SCAR=0.0
Pod
documented
| |||
| 16 | 48 | my $test_name = shift; | |
| 17 | 48 | my $parser = shift; | |
| 18 | |||
| 19 | 48 | my $session = TAP::Formatter::Session::TeamCity->new( | |
| 20 | { | ||
| 21 | name => $test_name, | ||
| 22 | formatter => $self, | ||
| 23 | parser => $parser, | ||
| 24 | } | ||
| 25 | ); | ||
| 26 | |||
| 27 | 48 | return $session; | |
| 28 | } | ||
| 29 | |||
| 30 | 18 | 1; | |
| 31 | |||
| 32 | # ABSTRACT: Emit test results as TeamCity build messages | ||
| 33 | |||
| 34 | __END__ | ||
| 35 | |||
| 36 | =pod | ||
| 37 | |||
| 38 | =head1 NAME | ||
| 39 | |||
| 40 | TAP::Formatter::TeamCity - Emit test results as TeamCity build messages | ||
| 41 | |||
| 42 | =head1 VERSION | ||
| 43 | |||
| 44 | version 0.08 | ||
| 45 | |||
| 46 | =head1 SYNOPSIS | ||
| 47 | |||
| 48 | # When using prove(1): | ||
| 49 | prove --merge --formatter TAP::Formatter::TeamCity my_test.t | ||
| 50 | |||
| 51 | =head1 DESCRIPTION | ||
| 52 | |||
| 53 | L<TAP::Formatter::TeamCity> is a formatter for L<TAP::Harness> that emits | ||
| 54 | TeamCity build messages to the console, rather than the usual output. The | ||
| 55 | TeamCity build server is able to process these messages in the build log and | ||
| 56 | present your test results in its web interface (along with some nice | ||
| 57 | statistics and graphs). | ||
| 58 | |||
| 59 | =head1 SUGGESTED USAGE | ||
| 60 | |||
| 61 | The TeamCity service messages are generally not human-readable, so you | ||
| 62 | probably only want to use this Formatter when the tests are being run by a | ||
| 63 | TeamCity build agent and the L<TAP::Formatter::TeamCity> module is available. | ||
| 64 | |||
| 65 | =head1 LIMITATIONS | ||
| 66 | |||
| 67 | TeamCity comes from a jUnit culture, so it doesn't understand skip and TODO | ||
| 68 | tests in the same way that Perl testing harnesses do. Therefore, this | ||
| 69 | formatter simply treats skipped and TODO tests as ignored tests. | ||
| 70 | |||
| 71 | =head1 SEE ALSO | ||
| 72 | |||
| 73 | L<TeamCity::BuildMessages> | ||
| 74 | |||
| 75 | =head1 AUTHORS | ||
| 76 | |||
| 77 | =over 4 | ||
| 78 | |||
| 79 | =item * | ||
| 80 | |||
| 81 | Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> | ||
| 82 | |||
| 83 | =item * | ||
| 84 | |||
| 85 | Ran Eilam <reilam@maxmind.com> | ||
| 86 | |||
| 87 | =back | ||
| 88 | |||
| 89 | =head1 CONTRIBUTORS | ||
| 90 | |||
| 91 | =for stopwords Andy Jack Dave Rolsky | ||
| 92 | |||
| 93 | =over 4 | ||
| 94 | |||
| 95 | =item * | ||
| 96 | |||
| 97 | Andy Jack <ajack@maxmind.com> | ||
| 98 | |||
| 99 | =item * | ||
| 100 | |||
| 101 | Dave Rolsky <drolsky@maxmind.com> | ||
| 102 | |||
| 103 | =back | ||
| 104 | |||
| 105 | =head1 COPYRIGHT AND LICENSE | ||
| 106 | |||
| 107 | This software is copyright (c) 2009 - 2016 by MaxMind, Inc.. | ||
| 108 | |||
| 109 | This is free software; you can redistribute it and/or modify it under | ||
| 110 | the same terms as the Perl 5 programming language system itself. | ||
| 111 | |||
| 112 | =cut | ||