Changes to Test::Builder/More/Simple incoming
A couple months back Schwern handed me the keys to Test::Builder and friends. Initially I planned to try and knock out little bugs and simply maintain stability... That plan failed and I ended up spending a lot of time giving it a major overhaul for a feature Schwern and I agreed would be very nice. Result Streaming. This was further prompted by a minor change to a specific diagnostic message that resulted in breaking fragile tests written with Test::Builder ::Tester, which frankly, has seen better days. THERE IS A BETTER WAY!
I have just released an ALPHA version of the Test-Simple dist. This dist includes the following changes and features:
- Results from Test::Builder are objects, and are funneled to a a stream which distributes them to any number of listeners/formatters
- TAP is the default formatter, you can have any number of listeners, and you can disable TAP if desired.
- Test::Tester2 is present, and can be used to intercept and validate the result stream. With this Test::Tester and Test::Builder::Tester are deprecated.
- Testing tools should use Test::Builder::Provider, this is because $Test::Builder::Level is now deprecated too (good riddance!)
- There is some basic built-in forking support (must be turned on, off by default)
- Some old methods are deprecated (but still work)
- Test::Builder is not longer required to be treated as a singleton
- 5.6 support is dropped in order to facilitate some of this work
I want to Stress that unlike the mostly-dead Test::Builder2 and Test::Builder-1.5 branches, these changes were not a project reboot. These changes are refactors and additions, I did not start from the ground up. In addition these changes were designed to maintain comparability wherever possible. In its current form there are 3 known failures:
Please play with it, build stuff against it, and report any issues that are likely the result of these changes.
Test::SharedFork - Broken, but a simple 1 or 2 line pull is sitting on github waiting to be merged. Broken because it replaces methods in TB itself. FIXED
Some moose tests still have a hack for TB1.5, a pull request has been merged, and by the time anyone reads this it will likely be shipped and fixed.FIXED
3) A single Catalyst test fails... and I have no idea why and would LOVE any help anyone could give me. It appears some tests in the file never get run and I frankly do not understand the test. Pull request: https://github.com/plack/Plack/pull/462 will fix this
Docs to checkout: