Sync

Test::Stream::Sync

What it tracks:

Hub Stack

Test::Stream::Stack (Hub Stack)

Hub

Test::Stream::Hub

The hub object handles 4 things in this order:
  1. Event modification hooks.
  2. Track event driven state changes.
  3. Route events to the formatter.
  4. Event listener hooks.
Things the hub has to consider:
State

Test::Stream::State

The test state has the following attributes:
Formatter

Test::Stream::Formatter::*

Currently there is only one formatter, the TAP formatter.

Formatters are easy to create:

IPC

Test::Stream::IPC

The IPC system is responsible for sending events to the correct process or thread in tests that fork or spawn threads.
Context

Test::Stream::Context

The context object is the Test::Stream linchpin.

The context object ties everything together:

Conception of the context object happened fairly early in development. The idea started as a way to address the shortcommings of $Level. Schwern and I had conversed about how awful $Level was several times with no resolution. One day the concept came to me, much of the Test::Stream architecture is a result of the context object concept.
Event

Test::Stream::Event

Events should be used for any of the following: The core event types are:
Ok
Represents a pass or fail result.
Plan
Represents the expectations of a test file.
Diag
Critical Diagnostics intended for humans.
Note
Informational Diagnostics intended for humans.
Exception
If a tool trapped an exception it can use this to cause a test failure, even across processes and threads.
Bail
Used to abort all testing.
Subtest
This is a subclass of Ok, used for subtests to track sub-events.
Waiting
Used internally by the IPC system to note that the main process/thread is waiting.