NAME
Test::OpenTracing::Interface - Test OpenTracing::Interface compliance
SYNOPSIS
use Test::OpenTracing::Interface::Tracer qw/:all/;
can_all_ok 'MyImplementation::Tracer',
"MyImplementation Class has all methods defined";
WARNING
These and others are still beta release, method can be added or removed or their names be changed. This may cause breakage.
This version works cover OpenTracing::Interface VERSION 'v0.202.x'
Use version 'v0.20.1' or VERSION 0.02 of this library for support of previous OpenTracing::Interface releases.
DESCRIPTION
This package contains mutiple tests that can be used for proving compliance with the OpenTracing::Interface API definition. That definition is written as POD documentation. It allows any developer - conform TIMTOWDI - to write their own implementation, with their own prefered tools and technology. However, to ensure that such implementations will work with OpenTracing::Implementation and the OpenTracing::GlobalTracer, any implementation should run the tests provided here.
INDEX
To use
these tests, they are contained in seperate packages. Usually, testing one part of the implementation just matches the named packages. The following are included:
- Test::OpenTracing::Interface::ContextReference
- Test::OpenTracing::Interface::Scope
- Test::OpenTracing::Interface::ScopeManager
- Test::OpenTracing::Interface::Span
- Test::OpenTracing::Interface::SpanContext
- Test::OpenTracing::Interface::Tracer
EXPORTED FUNCTIONS
Each of the packages mentioned above exports the following functions:
can_all_ok( $thing, $message )
use Test::OpenTracing::Interface::SomeThing;
can_all_ok 'MyImplementation::SomeThing',
"SomeThing class has all methods defined";
my $test_thing = MyImplementation::SomeThing->new( ... );
can_all_ok $test_thing, "TestThing object has all required methods";
Much like Test::Most, this does thest that a class or object 'can' do 'all' the required methods as defined in the OpenTracing::Interface API. But without having to know what actually needs to be there.
A failing test will report what methods are missing like: "$test_thing->can('$method_name') failed"
.
Required Positional Parameter
$thing
-
The ClassName or Object that needs be tested. Must be a
ClassName
orObject
from Types::Standard.
Optional Positional Parameter
SEE ALSO
- Test::More
-
For all your testing information.
- OpenTracing::Interface
-
The definit guide for the OpenTracing API for the Perl programming language.
- Test::OpenTracing::Interface::ContextReference
- Test::OpenTracing::Interface::Scope
- Test::OpenTracing::Interface::ScopeManager
- Test::OpenTracing::Interface::Span
- Test::OpenTracing::Interface::SpanContext
- Test::OpenTracing::Interface::Tracer
AUTHOR
Theo van Hoesel <tvanhoesel@perceptyx.com>
COPYRIGHT AND LICENSE
'Test OpenTracing' is Copyright (C) 2020, Perceptyx Inc
This library is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.
This library is distributed in the hope that it will be useful, but it is provided "as is" and without any express or implied warranties.
For details, see the full text of the license in the file LICENSE.