Test::U...ner::XML(3)

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

✨ Test::Unit::Runner::XML ✨

okay bestie, so this is a page from the User Contributed Perl Documentation, section 3 of the manual (iykyk, section 3 is the Perl module section πŸ’…). Let's get into it.


🌸 NAME 🌸

Test::Unit::Runner::XML β€” it generates XML reports from your unit test results. that's the whole job. it's giving ✨documentation✨.


πŸŽ€ SYNOPSIS πŸŽ€

here's the vibe, copy it exactly bestie:

use Test::Unit::Runner::XML;

mkdir("test_reports");
my $runner = Test::Unit::Runner::XML->new("test-reports");
$runner->start($test);
exit(!$runner->all_tests_passed());

not me noticing that mkdir makes "test_reports" and then the runner gets "test-reports"... that's the original, don't come for me, I don't make the rules πŸ™ˆ


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so Test::Unit::Runner::XML generates XML reports from unit test results. periodt.

and the slay part? the reports come out in the same format as the ones Ant's JUnit task produces, which means you can feed them straight into Java continuous integration and reporting tools. it's literally built to play nice with the Java girlies 🫢.


πŸ’– CONSTRUCTOR πŸ’–

Test::Unit::Runner::XML->new($directory)

construct a brand new runner that will write its XML reports into $directory. that's it, that's the constructor. iconic. πŸ‘‘


πŸ‘‘ METHODS πŸ‘‘

🌈 start

$runner->start($test);

run the Test::Unit::Test $test and generate XML reports from whatever the results turn out to be. go off, little runner πŸ’«

πŸ’œ all_tests_passed

exit(!$runner->all_tests_passed());

returns true if all the tests executed by $runner since it was constructed passed. yes, since it was constructed β€” it's keeping track the whole time, main character energy fr fr.


⭐ AUTHOR ⭐

Copyright (c) 2004 Andrew Eland, <andrew@andreweland.org>.

All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

(shoutout to Andrew for the 2004 serve πŸ«‘πŸ’–)


πŸ”₯ SEE ALSO πŸ”₯


πŸ’€ POD ERRORS πŸ’€

hey! the above document had some coding errors, which are explained below:

Around line 186:

=over without closing =back
not the dangling =over with no =back 😭 the POD parser is NOT having it. anyway we move.

and that's the whole page, bestie β€” brought to you by perl v5.42.0, dated 2025-07-25, straight out of the User Contributed Perl Documentation. mwah, slay, bye πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from