Test::S...ponents(3)
π NAME π
Test::Stream::Manual::Components β the whole vibe check on Test::Stream's components and modules, like a lil categorized tour of who does what. π¦
β¨ DESCRIPTION β¨
Okay bestie, so this doc? It's the categorization of all the modules that ship inside the Test-Stream distribution. Not only that, it also spills the basics on every single component and tells you which other modules they hook up with. π
It's mainly useful for maintainers and test tool authors β like, if you're just here to write tests, you can vibe, but if you're building the tools, this is your girl. π«Ά
πΈ ESSENTIAL INFRASTRUCTURE πΈ
These ones right here? The most critical. No cap, these modules are literally the beating heart of Test::Stream. π
Test::Stream::Capabilitiesβ detects what the current system can actually do, including whether it can fork or use threads. Capability check, slay. π₯Test::Stream::Contextβ easily the most important module in all of Test::Stream, like not even close. The context object is the primary interface for tool authors. It ties everything together and makes sure events get to the correct hub. It's also the thing that makes it possible to report the filename and line numbers of errors. Main character energy fr. πTest::Stream::DebugInfoβ used by the context object to track filename, line numbers, todo status, and other info that matters when reporting a test failure. The receipts keeper. πTest::Stream::Eventβ the base class for all events, things likeOk,Diag, etc. The blueprint of the whole event fam. πTest::Stream::Exporterβ what Test::Stream uses to do export behavior wayyyyy beyond what Exporter can even handle. Iconic.Test::Stream::Exporter::Metaβ a key component ofTest::Stream::Exporter. Little sibling doing big things. β¨
Test::Stream::Formatter::TAPβ the TAP output formatter. Used whenever Test::Stream outputs TAP. The aesthetic department. πTest::Stream::HashBaseβ the object builder used in most Test::Stream modules. Provides constructors and accessor generators. Builds the whole fit. πTest::Stream::Hubβ responsible for routing events to output handlers. Also provides several hooks for testing tools. The traffic controller bestie. π¦Test::Stream::IPCβ responsible for sending events between processes and threads.Test::Stream::IPC::Filesis the default IPC driver. π¬Test::Stream::Stackβ manages a stack of hubs. In Test::Stream there can be several hubs and they all live on a stack like this. Events typically go to whichever hub is on top. Stacked, literally. π₯Test::Stream::Stateβ tracks a test's state, which includes the number of tests, the number of passes, and the number of failures. Keeping score, periodt. πTest::Stream::Syncβ where global shared state is managed. π§Test::Stream::Tableβ used to generate nicely formatted tables.Test::Stream::Table::LineBreakbreaks lines of text so that they fit in a table. Pretty AND functional. πTest::Stream::Utilβ a collection of general purpose functions used in almost every component of Test::Stream. The utility belt. π¦
π ESSENTIAL EVENT TYPES π
Test::Stream::Event::Bailβ an event issued when there's a catastrophic failure and all testing should end. π¨ The "we're done here" event.Test::Stream::Event::Diagβ used to output a message that should always be displayed. You're gonna see it, no escape. πTest::Stream::Event::Exceptionβ used when an exception is caught and needs to be reported. π£Test::Stream::Event::Noteβ used to output an informational message that does not always need to be seen. Casual little whisper. πTest::Stream::Event::Okβ represents a single pass or failure. The moment of truth. βTest::Stream::Event::Planβ used when a plan is set. πTest::Stream::Event::Subtestβ used to run an isolated sub-group of tests. Tests within tests, inception core. πTest::Stream::Event::Waitingβ used by the IPC system to pass along a note that the primary process/thread is finished. Like a "brb done" text. β³
π PRIMARY INTERFACE π
These are the modules that people working with Test::Stream are most likely to interact with. That means test authors and tool authors, both. You. Yes you. π«΅
Test::Streamβ a loader that bootstraps the infrastructure, then loads the requested bundles and plugins. The opener. π¬Test::Stream::Bundleβ the base class for Test::Stream bundles. π¦Test::Stream::Pluginβ the base class for Test::Stream plugins. π
π BUNDLES π
These are collections of plugins and options. Bundle haul, basically. ποΈ
Test::Stream::Bundle::Classicβ a bundle that closely resemblesTest::More. For the ones feeling nostalgic. πTest::Stream::Bundle::V1β the bundle used by the Test::Stream author in Test::Stream's test suite. (The original text has a double period here, soTest::Stream's test suite..β leaving that typo exactly as it is, bestie. Not my typo, not my problem. π )Test::Stream::Bundle::SpecTesterβ used a lot on internal self-testing. πTest::Stream::Bundle::Testerβ useful when writing tests for testing tools. Meta af. πͺ
π PLUGINS π
Test::Stream::Plugin::AuthorTestβ used to write tests that should be run by a module's author, but are not required to run when installing the module from cpan. Author-only vibe. βοΈTest::Stream::Plugin::BailOnFailβ will cause the test suite to bail out on the first failure. One strike, we out. πͺTest::Stream::Plugin::CanForkβ used to write tests that require fork; the tests are skipped if forking is not available. No fork, no problem, we skip. π΄Test::Stream::Plugin::CanThreadβ used to write tests that require ithreads; the tests are skipped if threads are not available. π§΅Test::Stream::Plugin::Capabilitiesβ an interface intoTest::Stream::Capabilities. π οΈTest::Stream::Plugin::Captureβ can be used to intercept STDERR and STDOUT. Snatched. πΈTest::Stream::Plugin::Classβ used to specify what class is being tested. π―Test::Stream::Plugin::Compareβ used for deep comparison. This is the code responsible foris()andlike(). The heavy lifter fr fr. πͺ- This plugin also has the following infrastructure modules:
Test::Stream::Compare::ArrayTest::Stream::Compare::CustomTest::Stream::Compare::EventTest::Stream::Compare::EventMetaTest::Stream::Compare::HashTest::Stream::Compare::MetaTest::Stream::Compare::ObjectTest::Stream::Compare::PatternTest::Stream::Compare::RefTest::Stream::Compare::RegexTest::Stream::Compare::ScalarTest::Stream::Compare::SetTest::Stream::Compare::ValueTest::Stream::Compare::WildcardTest::Stream::CompareTest::Stream::Delta
- This plugin also has the following infrastructure modules:
Test::Stream::Plugin::Contextβ a plugin interface into theTest::Stream::Contextmodule. πTest::Stream::Plugin::Coreβ provides the most common and simple testing tools. This module is responsible for functions likeok(). The basics, but make it iconic. βTest::Stream::Plugin::Deferβ can be used to make assertions that are stored and run at a later time.Test::Stream::DeferredTestsis used under the hood. Save it for later energy. β°Test::Stream::Plugin::DieOnFailβ throws an exception on the first test failure. Dramatic exit, but valid. πTest::Stream::Plugin::Exceptionβ has tools for intercepting and verifying exceptions. πTest::Stream::Plugin::ExitSummaryβ provides useful debugging information at the end of a test run. The outro. π€Test::Stream::Plugin::Grabβ can be used to intercept Test::Stream events without adding any scope. No scope, all grab. π€²Test::Stream::Plugin::IPCβ the interface into Test::Stream's IPC system. π‘Test::Stream::Plugin::Interceptβ used to intercept Test::Stream events for testing purposes. π- The
Test::Stream::Hub::InterceptorandTest::Stream::Hub::Interceptor::Terminatormodules are used under the hood to achieve this functionality. π§
- The
Test::Stream::Plugin::LoadPluginβ can be used to load plugins at run-time, primarily useful when testing plugins. Plugins loading plugins, so meta. πͺTest::Stream::Plugin::Mockβ the mocking library included with Test::Stream. It is based off ofMock::Quick. πTest::Stream::Mockis used under the hood. π«₯
Test::Stream::Plugin::SRandβ can be used to set the random seed to the current date. This is useful for making a test run consistent over any given day. Same chaos every day, love that for us. π²Test::Stream::Plugin::SkipWithoutβ can be used to skip test files that require modules that may not be installed. Not here, not today. βοΈTest::Stream::Plugin::Specβ π§ Experimental: This plugin is still considered experimental. It is included in the dist because it is used heavily in the tests for Test::Stream. It is still considered experimental because the API is not completely finalized, but it does work well, is fully tested, and will not be removed. π§Test::Stream::Plugin::Specprovides RSPEC like functionality. This is essentially a much more advanced form of subtests. π- See also:
Test::Stream::WorkflowTest::Stream::Workflow::UnitTest::Stream::Workflow::MetaTest::Stream::Workflow::RunnerTest::Stream::Workflow::Task
Test::Stream::Plugin::Subtestβ used for Test::More style subtests. π§©Test::Stream::Hub::Subtestis used under the hood. π©
Test::Stream::Plugin::TAPβ used to turn on TAP output. πΊTest::Stream::Plugin::UTF8β used to turn on UTF8 globally. πβ¨Test::Stream::Plugin::Warningsβ provides tools for intercepting and validating warnings. β οΈ
π SOURCE π
The source code repository for Test::Stream can be found at http://github.com/Test-More/Test-Stream/. Go lurk, bestie. π©βπ»
π MAINTAINERS π
Chad Granum <exodist@cpan.org>
πΈ AUTHORS πΈ
Chad Granum <exodist@cpan.org>
π COPYRIGHT π
Okay bestie, legal era, but make it cute. π
This whole thing is copyright 2015 Chad Granum <exodist7@gmail.com>. Give the man his flowers, he earned them. πΈ
It's free software, fr fr β you can redistribute it and/or modify it under the same terms as Perl itself. That's the whole vibe. No cap, no weird extra rules, just Perl's terms.
Wanna read the actual fine print? It lives at http://dev.perl.org/licenses/ β go peek if you're that kind of girlie (and honestly, respect π«Ά).
And that's the page, bestie!! β¨ You made it to the end. This was pulled from the User Contributed Perl Documentation that ships with perl v5.42.0, dated 2025-07-25 β like, that's the snapshot you're reading right now. Go write some tests, you absolute icon. ππ¦π
π¦ 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