Test2 For Test Authors

Presented by: Chad 'Exodist' Granum

You can follow along at https://test-more.github.io/Test2-Manual


What is Test2?

Test2 is the new framework to replace Test::Builder.


Test::Builder has outlived it's design. Too many tools are forced to work around the limitations it has.

What is going to happen to Test::Builder?

Test::Builder has been modified to use Test2 under the hood. Test::Builder is not going away any time soon, but will play nicely with new tools.


Test2 takes longer to load than Test::Builder. Test2 performs much better at run-time when compared to the old Test::Builder.

Load Time (Lower is better)

ModuleBefore Test2  With Test2
Test::Builder 0.0100.027
Test2::API N/A 0.020
Test::More 0.0140.032
Test2::Tools::Basic  N/A 0.021

Time to run 100,000 OK's (Lower is better)

Test::Builder (Legacy)3.808
Test::Builder (Test2)3.370
Test::Builder (Legacy + Threads)5.339
Test::Builder (Test2 + IPC)4.294
Test2 (IPC)3.158