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

NAME

TAP::Formatter::BambooExtended - Harness output delegate for Atlassian's Bamboo CI server

SYNOPSIS

On the command line, with prove:

    prove --formatter TAP::Formatter::BambooExtended ...

Or, in your own scripts:

    use TAP::Harness;
    my $harness = TAP::Harness->new({
        formatter_class => 'TAP::Formatter::BambooExtended',
        merge => 1,
    });
    $harness->runtests(@tests);

DESCRIPTION

TAP::Formatter::BambooExtended provides JUnit output formatting for TAP::Harness, which can be used in Atlassian's Bamboo CI server or any other CI server that looks for JUnit files.

This module is based on TAP::Formatter::Bamboo by Piotr Piatkowski <pp@idea7.pl>, main differences are:

Resulting XML is saved as one output file per source test script.
Each test gets its own result line in the JUnit output rather than grouping all the tests from one test script into one result.
A summary test result is appended to indicate if there were any problems with the test script itself outside of individual tests.
Output of failed tests are attached to the test that failed AND the test script itself. Each test script will create one JUnit compatible test result file. The test result file names will match the full path and file name of the test script. By default these files are created in a directory called prove_db that is created in your current working directory. This can be changed by setting the environment variable FORMATTER_OUTPUT_DIR to a relative or absolute path.

By way of example, when you run a test like this:

    prove -l --formatter TAP::Formatter::BambooExtended

You might see these results on the command line:

    PASS t/00-load.t
    ALL DONE

Then you'll see a new directory called $ENV{'FORMATTER_OUTPUT_DIR'}. By default, this directory will be created as prove_db in your current working directory. In the output directory you'll see one file for each test script, like this:

    > ls
    t-00-load_t.xml

In that file you will see one test output for the file itself, named after the file. You'll also see one test output for each individual test in the test script. So if your test script has twenty ok statements, you'll have twenty- one tests in Bamboo -- one for the file itself and then one for each ok statement. This makes it easier to track exactly which tests are failing with Bamboo.

AUTHOR

Paul Lockaby <plockaby@cpan.org>

Piotr Piatkowski <pp@idea7.pl> (original TAP::Formatter::Bamboo)

Graham TerMarsch <cpan@howlingfrog.com> (original TAP::Formatter::JUnit)

COPYRIGHT

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

SEE ALSO

TAP::Formatter::Bamboo, TAP::Formatter::JUnit, TAP::Formatter::Console, http://confluence.atlassian.com/display/BAMBOO/JUnit+parsing+in+Bamboo.