Test::...esults(3pm)
π Test::...esults(3pm) β User Contributed Perl Documentation, but make it cute π
okay so this page is literally Test::...esults(3pm) from the User Contributed Perl Documentation, and it's giving object-oriented test-result tracking. No cap. π«Ά
β¨ NAME β¨
Test::Harness::Results β bestie, it's an object for tracking results from a single test file. That's the whole vibe. π
πΈ SYNOPSIS πΈ
One Test::Harness::Results object represents the results from one test file getting analyzed. One file, one object. Periodt. β¨
π οΈ CONSTRUCTION π οΈ
new()
my $results = new Test::Harness::Results;
Create a test point object. Typically, however, you'll not create one yourself, but access a Results object returned to you by Test::Harness::Results. So like, it's a thing that exists, but you're probably not the one birthing it. It's more of a "the framework hands it to you" situation. π
π ACCESSORS π
The following data points are defined:
passingβ true if the whole test is considered a pass (or skipped), false if its a failure. slay πexitβ the exit code of the test run, if from a file.waitβ the wait code of the test run, if from a file.maxβ total tests which should have been run.seenβ total tests actually seen.skip_allβ if the whole test was skipped, this will contain the reason.okβ number of tests which passed (including todo and skips).todoβ number of todo tests seen.bonusβ number of todo tests which unexpectedly passed.skipβ number of tests skipped.
So a successful test should have max == seen == ok. math queen behavior π
There is one final item, the details.
detailsβ an array ref reporting the result of each test looks like this:
$results{details}[$test_num - 1] =
{ ok => is the test considered ok?
actual_ok => did it literally say 'ok'?
name => name of the test (if any)
diagnostics => test diagnostics (if any)
type => 'skip' or 'todo' (if any)
reason => reason for the above (if any)
};
Element 0 of the details is test #1. I tried it with element 1 being #1 and 0 being empty, this is less awkward. the more you know π
Each of the following fields has a getter and setter method.
waitexit
π POD ERRORS π
Hey! The above document had some coding errors, which are explained below:
Around line 83:
=over without closing =back
okay bye bestie, this was Test::...esults(3pm) from perl v5.42.0, dated 2025-07-25. mwah π
π¦ where this page comes from
- fedora 43: perl-Test-Harness-Straps 0.30-47.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms