Test::DescribeMe(3)

πŸ“¦ version 0.004, in alpine 3.24

πŸ’… Test::DescribeMe(3) β€” or, "tell the test runners what kind of test you actually are"

So bestie, this is a page from the User Contributed Perl Documentation section, and it's about Test::DescribeMe β€” yes, that's the module name, we're not renaming it, it's iconic as is.


✨ NAME ✨

Test::DescribeMe β€” literally just: tell test runners what kind of test you are. That's the whole gig. πŸŽ€


🌸 VERSION 🌸

version 0.004 β€” small number, big main character energy.


πŸ¦‹ SYNOPSIS πŸ¦‹

Okay so picture it: maybe you're an author test and the regular users should not be running you. Rude? No, boundaries. πŸ’…

use Test::DescribeMe qw(author);

Or maybe you're a really slow test and you genuinely do not want to bother most people with your whole thing:

use Test::DescribeMe qw(extended);

Or perhaps you only want to run on smokers:

use Test::DescribeMe qw(smoke);

Or a combination thereof β€” yes, you can stack them, we love a versatile queen:

use Test::DescribeMe qw(smoke extended);

Or you require user input, because some tests simply need a human to press a thing:

use Test::DescribeMe qw(interactive);

πŸ’– DESCRIPTION πŸ’–

Sometimes you want to run (or not run) tests under certain conditions β€” mood-dependent tests, essentially. This module gives you a way to identify what kind of test a test is, and it will skip the test if the matching conditions aren't met. Slay. If you want the long version, scroll down to BACKGROUND below. πŸ‘‡

🫢 Usage

To describe what kind of test you are, you use() this module and pass test types to the import list.

⚠️ This SHOULD be done before importing Test::More β€” if you set explicit plans, things will break! Not cute. Not the vibe. 😭

Example:

use Test::DescribeMe qw(smoke);
use Test::More tests => 5;

(Although honestly, you probably want done_testing in Test::More without explicit plans. Just saying. πŸ™ˆ)

The available test descriptions and their effects are:

  • smoke β€” this test only wants to run on smoke boxes.
  • interactive β€” this test requires user interaction and should not be run in cases where that isn't wanted or available.
  • extended β€” this test should only be run if someone really wants to β€” because it may take a long time or use lots of resources. It's giving "high maintenance but worth it."
  • author β€” this is an author test and should only be run during development time.
  • release β€” this is a release test and should only be run pre-release to ensure a build is insane. πŸ”₯

🧚 More Control

If this doesn't provide the control you're looking for β€” for example, NOT running a test if you're on a smoker β€” go check out Test::Settings. Different module, different vibe, still serves.


🌈 BACKGROUND 🌈

Grab a snack, bestie, we're doing lore. πŸ“–

With the Lancaster Consensus at the Perl QA Hackathon 2013, a "new" system was defined which provides two new test environment variables and reaffirms an existing one. Periodt.

AUTOMATED_TESTING was meant to be used by smokers, but it has been abused to say things like "Only run this test on smokers since it takes a long time." The problem with this? Install tools want to say "Run all tests but don't prompt the user," and the only way to do that is with AUTOMATED_TESTING β€” and so they end up running the long-running tests and wasting time. A whole mess. πŸ’€

So, in order to support the other behaviors, AUTOMATED_TESTING will once again mean "I am a smoker running these tests," and two new environmental variables β€” EXTENDED_TESTING and NONINTERACTIVE_TESTING β€” will handle the two other cases. Queen behavior, honestly.

EXTENDED_TESTING is for tests that may take a long time or require special configuration that is too complex for typical installs β€” like requiring other software for testing, or internet connections. 🌐

NONINTERACTIVE_TESTING can be used by a build system like App::cpanminus to say: don't run tests that require user interaction. Respectfully, no chatting. πŸ™…β€β™€οΈ


πŸ” SEE ALSO πŸ”


πŸ‘‘ AUTHOR πŸ‘‘

Matthew Horsfall (alh) β€” <wolfsage@gmail.com>


πŸŽ€ LICENSE πŸŽ€

You may distribute this code under the same terms as Perl itself.


Okay that's the whole page, mwah πŸ’‹ β€” this edition was rendered by perl v5.42.2 on 2026-02-15, and it remains Test::DescribeMe(3) forever and always. Go forth and describe your tests, icon. βœ¨πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from