NAME

Test::Smoke::Metabase::Transport - Metabase transport for Test::Smoke::Metabase

SYNOPSIS

my $report = Test::Reporter->new (
    transport      => "Metabase",
    transport_args => [
        uri     => 'http://metabase.example.com:3000/',
        id_file => '/home/jdoe/.metabase/metabase_id.json',
        ],
    );

# use space-separated in a Test::Smoke metabase.ini
transport = Metabase uri http://metabase.example.com:3000/ ...

DESCRIPTION

This module submits a Test::Smoke::Metabase report to the specified Metabase instance.

This requires a network connection to the Metabase uri provided. If you wish to save reports during offline operation, see Test::Reporter::Transport::File.

USAGE

See Test::Reporter and Test::Reporter::Transport for general usage information.

Transport arguments

Unlike most other Transport classes, this class requires transport arguments to be provided as key-value pairs:

my $report = Test::Reporter->new (
    transport      => "Metabase",
    transport_args => [
        uri     => 'http://metabase.example.com:3000/',
        id_file => '/home/jdoe/.metabase/metabase_id.json',
        ],
    );

Arguments include:

uri (required)

The uri argument gives the network location of a Metabase instance to receive reports.

id_file (required)

The id_file argument must be a path to a Metabase ID file. If you do not already have an ID file, use the metabase-profile program to create one.

$ metabase-profile

This creates the file metabase_id.json in the current directory. You can also give an --output argument to save the file to a different location or with a different name.

METHODS

These methods are only for internal use by Test::Smoke::Metabase.

new

my $sender = Test::Reporter::Transport::File->new ($params);

The new method is the object constructor.

send

$sender->send ($report);

The send method transmits the report.

AUTHORS

H.Merijn Brand <h.m.brand@xs4all.nl>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2010-2011 by H.Merijn Brand

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