```{index} single: Test2::Plugin ``` # Test2::Plugin Documentation for plugins ## DESCRIPTION Plugins are packages that cause behavior changes, or other side-effects for the test file that loads them. They should not export any functions, or provide any tools. Plugins should be distinct units of functionality. If you wish to combine behavior changes with tools then you should write a Plugin, a Tools module, and a bundle that loads them both. ## FAQ - Should I subclass Test2::Plugin? No. Currently this class is empty. Eventually we may want to add behavior, in which case we do not want anyone to already be subclassing it. ## HOW DO I WRITE A PLUGIN? Writing a plugin is not as simple as writing an [Test2::Bundle](Bundle.md), or writing [Test2::Tools](Tools.md). Plugins alter behavior, or cause desirable side-effects. To accomplish this you typically need a custom `import()` method that calls one or more functions provided by the [Test2::API](API.md) package. If you want to write a plugin you should look at existing plugins, as well as the [Test2::API](API.md) and [Test2::Hub](Hub.md) documentation. There is no formula for a Plugin, they are generally unique, however consistent rules are that they should not load other plugins, or export any functions. ## SOURCE The source code repository for Test2-Suite can be found at `https://github.com/Test-More/test-more/`. ## MAINTAINERS - Chad Granum ## AUTHORS - Chad Granum ## COPYRIGHT Copyright Chad Granum . This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See `http://dev.perl.org/licenses/` ## Modules - [`Test2::Plugin::BailOnFail`](Plugin/BailOnFail.md) - Automatically bail out of testing on the first test failure. - [`Test2::Plugin::DieOnFail`](Plugin/DieOnFail.md) - Automatically die on the first test failure. - [`Test2::Plugin::ExitSummary`](Plugin/ExitSummary.md) - Add extra diagnostics on failure at the end of the test. - [`Test2::Plugin::SRand`](Plugin/SRand.md) - Control the random seed for more controlled test environments. - [`Test2::Plugin::Times`](Plugin/Times.md) - Output timing data at the end of the test. - [`Test2::Plugin::UTF8`](Plugin/UTF8.md) - Test2 plugin to test with utf8. ```{toctree} :hidden: :maxdepth: 1 Plugin/BailOnFail Plugin/DieOnFail Plugin/ExitSummary Plugin/SRand Plugin/Times Plugin/UTF8 ```