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

NAME

Test::Stream::State - Representation of the state of the testing

EXPERIMENTAL CODE WARNING

This is an experimental release! Test-Stream, and all its components are still in an experimental phase. This dist has been released to cpan in order to allow testers and early adopters the chance to write experimental new tools with it, or to add experimental support for it into old tools.

PLEASE DO NOT COMPLETELY CONVERT OLD TOOLS YET. This experimental release is very likely to see a lot of code churn. API's may break at any time. Test-Stream should NOT be depended on by any toolchain level tools until the experimental phase is over.

METHODS

$num = $state->count

Get the number of tests that have been run.

$num = $state->failed

Get the number of failures (Not all failures come from a test fail, so this number can be larger than the count).

$bool = $state->ended

True if the state has ended. This MAY return the stack frame of the tool that ended the test, but that is not guarenteed.

$bool = $state->is_passing
$state->is_passing($bool)

Check if the overall state is a failure. Can also be used to set the pass/fail status.

$state->bump($bool)

Increase the test count by one, $bool should be true if the new test passed, false if it failed.

$state->bump_fail

Increase the failure count, and set is_passing to false.

$state->plan($plan)
$plan = $state->plan

Get or set the plan. The plan must be an integer larger than 0, the string 'no_plan', or the string 'skip_all'.

$state->finish([$package, $file, $line])

This is used to finalize the state, no changes should be made to the state after this is set.

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>
Kent Fredric <kentnl@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://www.perl.com/perl/misc/Artistic.html