Test::...esults(3pm)

πŸ“¦
version 0.30 Β· 2 versions
, in fedora 43

πŸ’– 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.

  • wait
  • exit

πŸ’€ 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