Test::S...:Runner(3)
π Test::S...:Runner β the manual page, but make it make sense β¨
okay bestie, welcome to Test::Stream::Workflow::Runner (perl, section 3, user-contributed perl documentation, iykyk) π«Ά this is the little class that runs your workflows. she's simple. she's a base class. she's literally built to be subclassed. let's go π
π¨ DEPRECATED π¨
ngl this one hurts a little. This distribution is deprecated in favor of Test2, Test2::Suite, and Test2::Workflow. π
if you need to move over, there's a conversion guide waiting for you at Test::Stream::Manual::ToTest2. go read it, bestie, it's giving glow-up π
β οΈ EXPERIMENTAL CODE WARNING β οΈ
"This module is still EXPERIMENTAL"
Test-Stream is now stable, but this particular module is still out here in its experimental era. you are still free to use it, but you have been warned that it may change in backwords incompatible ways. This message will be removed from this modules POD once it is considered stable. π
so like... use her, love her, but don't be shocked if she changes outfits on you π
πΈ DESCRIPTION πΈ
This is a basic class for running workflows. fr fr it's basic on purpose β this class is intended to be subclassed for more fancy/feature rich workflows. main character energy for your subclass, supporting role for this one π β¨
π SYNOPSIS π
SUBCLASS
okay so here's how you make your own runner. copy this vibe:
package My::Runner;
use strict;
use warnings;
use parent 'Test::Stream::Workflow::Runner';
sub instance {
my $class = shift;
return $class->new(@_);
}
sub subtest {
my $self = shift;
my ($unit) = @_;
...
return $bool
}
sub verify_meta {
my $self = shift;
my ($unit) = @_;
my $meta = $unit->meta || return;
warn "the 'foo' meta attribute is not supported" if $meta->{foo};
...
}
sub run_task {
my $self = shift;
my ($task) = @_;
...
$task->run();
...
}
USE SUBCLASS
and then you actually use it, like this π¦
use Test::Stream qw/... Spec/;
use My::Runner; # Sets the runner for the Spec plugin.
...
π METHODS π
CLASS METHODS
$class->import()$class->import(@instance_args)β The import method checks the calling class to see if it has anTest::Stream::Workflow::Metainstance, if it does then it sets the runner. The runner that is set is the result of calling"$class->instance(@instance_args)". The instance_args are optional. and if there is no meta instance for the calling class then import is a no-op. no drama, no notes, it just does nothing π«Ά$bool = $class->subtests($unit)β This determines if the units should be run as subtest or flat. The base class always returns true for this. This is a hook that allows you to override the default behavior. your call, bestie π$runner = $class->instance()$runner = $class->instance(@args)β This is a hook allowing you to construct an instance of your runner. The base class simply returns the class name as it does not need to be instansiated. If your runner needs to maintain state then this can return a blessed instance. state-havers rise up π₯
CLASS AND/OR OBJECT METHODS
These are made to work on the class itself, but should also work just fine on a blessed instance if your subclass needs to be instantiated. flexible queen π
$runner->verify_meta($unit)β This method reads the"$unit->meta"hash and warns about any unrecognised keys. Your subclass should override this if it wants to add support for any meta-keys. π$runner->run(unit => $unit, args => $arg)$runner->run(unit => $unit, args => $arg, no_final => $bool)β Tell the runner to run a unit with the specified args. The args are optional. The"no_final"arg is optional, it should be used on support units that should not produce final results (or be a subtest of their own). yes this matters, no cap π$runner->run_task($task)β This simply calls"$task->run()". It is mainly here for subclasses to override. short king of a method, we love him π
π₯ SOURCE π₯
The source code repository for Test::Stream can be found at http://github.com/Test-More/Test-Stream/. come hang out π
π 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/
and that's the whole page, bestie π
she was documented with perl v5.42.0 on 2025-07-25, so like, a little vintage, a little iconic, and honestly still slaying. mwah π«Άπβ¨
π¦ where this page comes from
- fedora 43: perl-Test-Stream 1.302027-35.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms