GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  TEST::STREAM::MANUAL::TOTEST2 (3)

.ds Aq ’

NAME

Test::Stream::Manual::ToTest2 - How to move code to Test2/Test2-Suite

CONTENTS

DESCRIPTION

Test::Stream is deprecated in favor of Test2, Test2::Suite, and Test2::Workflow.

MAP

This section briefly tells you where to look for replacements.

    THE GUTS AND INTERNALS

CONTEXT

If you used the context() method it can now be found in Test2::API, usage is identical. Converting from Test-Stream’s context() function could be as easy as changing use Test::Stream::Context qw/context/ to use Test2::API qw/context/.

One major gotcha though is that the debug() attribute is gone. Instead there is a trace() attribute, but its usage is not identical.

TODO/SKIP

TODO and SKIP are no longer managed inside the Context and DebugInfo objects. Skip is now a full fledged event type Test2::Event::Skip, and Test2::API::Context has added a skip() method.

TODO is no longer tracked at all by the Test2 internals. Instead look at Test2::Tools::Todo and/or Test2::Todo which are both part of Test2::Suite. These tools manage TODO as a hub filter.

IPC

IPC has not changed much. Load the Test2::IPC module to make sure IPC is loaded if you need it.

CAPABILITIES

Test::Stream::Capabilities has been merged with Test::Stream::Util in Test2::Util.

EXPORTER

Test::Stream::Exporter is completely gone. Use Exporter, Export::Declare, Exporter::Declare, or Sub::Exporter.

HASHBASE

See Test2::Util::HashBase.

Change



    use Test::Stream::HashBase(
        base => Parent::Class,
        accessors => [qw/foo bar baz/],
    );



To



    use parent Parent::Class;
    use Test2::Util::HashBase qw/foo bar baz/;



EVENTS

See Test2::Event for the new event base class. Very little has changed apart from the HashBase usage.

SYNC

Test::Stream::Sync has been replaced by Test2::API. One major difference is that Test2::API exports functions, you do not call clas methods on it the way you did with Test2::Sync. Test2::API also adds and renames several functions.

HUB AND STATE

Test::Stream::Hub and Test::Stream::State have been merged into Test2::API::Stack. Methods form both are now in a single class. Some deprecated methods were removed.

    TOOLS, PLUGINS, FORMATTERS, ETC.

There is a new namespace layout. Test::Stream::Plugin:: has been split into:
Test2::Tools:: Tools live here.
Test2::Bundle:: Bundles live here.
Test2::Plugin:: Plugins (behavior modifications) live here.
Test2::Require:: Things that cause a test to skip all live here.
Test2::Formatter:: Formatters live here.
-V1

Test::Stream::Bundle::V1 is now spelled Test2::Bundle::Extended.

-Classic

Test::Stream::Bundle::Classic is now spelled Test2::Bundle::Classic.

    SPEC AND WORKFLOWS

All the spec and workflow stuff has moved to Test2::Workflow. This was never maked stable so I don’t expect anyone to need a conversion guide.

    TESTING YOUR TESTS

Test2::API now exports the $events = intercept { ... } function.

SOURCE

The source code repository for Test::Stream can be found at http://github.com/Test-More/Test-Stream/.

MAINTAINERS

Chad Granum <exodist@cpan.org>

AUTHORS

Chad Granum <exodist@cpan.org>

COPYRIGHT

Copyright 2015 Chad Granum <exodist7@gmail.com>.

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

See http://dev.perl.org/licenses/

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 TEST::STREAM::MANUAL::TOTEST2 (3) 2016-02-05

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.