#summary A rewrite of Test::Builder #labels Featured,Phase-Requirements = Introduction = Test::Builder2 is a rewrite of Test::Builder to support the needs of post-modern test modules. = Goals = * Implement everything Test::Builder does * Allow many "builder" classes and objects in the same test process * Allow modules to customize test behavior without interfering with other modules * Eliminate the "$Level" hack * Allow beginning/end of test actions * Allow output formats other than TAP * Allow tests before a plan has been declared * "Until declared done" style plan. * A better way to add tests at the end (a la Test::NoWarnings). * Additive plans. * Composable test comparisons = Use Cases = * die-on-fail * debug-on-fail * stack-trace-on-fail * Use test libraries as assertions in running code (see Carp::Assert::More and Test::AtRuntime) * Implement Test::Builder with Test::Builder2 * Implement one of [http://www.phpunit.de/pocket_guide/3.3/en/phpunit-book.html#logging PHPUnit's Logging Formats] as output. * Have two test libraries adding the same named attribute and not interfere * Have a test library using a Test::Builder2 subclass * Simple alternative test output format: + for a pass, - for a fail. * Have a test library wrap Test::More's functions (instead of using Test::Builder). * Add a new test result type * Build up a test plan by adding to it test block by test block * Record what function the test was called in (to better support xUnit style results) * Try to silently deal with a forked test * Deal with threaded tests * [POSIX http://www.gnu.org/software/dejagnu/manual/x47.html#posix] test output * Use test functions as generic comparison functions. * Multiple test output objects (ie. spit out XML and send email on failure) * Publish test output over HTTP = Internals = For the most part, chromatic's write up of [http://www.perl.com/pub/a/2005/07/28/test_builder_p6.html Porting Test::Builder to Perl 6] gives a good idea of how the redesign will go. Basically, break up the monolithic Test::Builder singleton object into a conglomerate of many objects so pieces can be reused and replaced. Only certain key bits, such as the test counter and history, need be singletons.