UR::Na...st::Run(3pm)
π
UR::Na...st::Run(3pm) β bestie's guide to ur test run π
okay so this lil page comes from the User Contributed Perl Documentation, section 3pm, and it's literally just here to tell you how to run your tests. no cap. π¦
πΈ NAME πΈ
ur test run β run one or more test scripts. that's it. that's the whole job. π
β¨ SYNOPSIS β¨
# run everything in a given namespace
cd my_sandbox/TheNamespace
ur test run --recurse
# run only selected tests
cd my_sandbox/TheNamespace
ur test run My/Module.t Another/Module.t t/foo.t t/bar.t
# run only tests which load the TheNamespace::DNA module
cd my_sandbox/TheNamespace
ur test run --cover TheNamespace/DNA.pm
# run only tests which cover the changes you have in Subversion
cd my_sandbox/TheNamespace
ur test run --cover-svn-changes
# run 5 tests in parallel as jobs scheduled via LSF
cd my_sandbox/TheNamespace
ur test run --lsf --jobs 5
π DESCRIPTION π
so basically it runs a test harness around your automated test cases. think make test in a make-oriented software distribution, but also kinda like running prove in bulk. same energy, different wrapper. π₯
and when you run it with no parameters at all? it goes looking for a t directory in the current working directory, and runs ALL the tests under that directory. all of them. the whole roster. π
π OPTIONS π
--recurseβ run all tests in the current directory, and in sub-directories too. but wait, there's a plot twist: without--recurse, it will first recursively search for directories namedtunder the current directory, and then recursively search for*.tfiles under those directories. yes bestie, it's giving β¨layersβ¨.--longβ include "long" tests, which are otherwise skipped in test harness execution. they were being left out and now they're invited to the party. π«Ά-vβ be verbose, meaning that individual cases will appear instead of just a full-script summary. you get the whole receipt, not just the total. π§Ύ--cover My/Module.pmβ it looks in a special sqlite database which is updated by the cron which runs tests, to find all tests which loadMy/Module.pmat some point before they exit. only these tests will be run. lowkey iconic filtering tbh.- you will still need the
--longflag to run long tests. - if you specify tests on the command-line, only tests in both lists will run.
- this can be specified multiple times.
- you will still need the
--cover-TOOL-changesβTOOLcan besvn,svk, orcvs. π
the script will run either svn status, svk status, or cvs -q up on a parent directory with GSC in it, and get all of the changes in your perl_modules trunk. then it behaves as though those modules were listed as individual --cover options. it's giving "do the paperwork for me" and honestly? slay. π
--lsfβ tests should not be run locally. instead they are submitted as jobs to the LSF cluster withbsub. bye local machine, hello cluster. π--lsf-paramsβ parameters given tobsubwhen scheduling jobs. the default is-q short -R select[type==LINUX64]. copy it exactly, don't freestyle it. π--jobs <number>β this many tests should be run in parallel. and if--lsfis also specified, then these parallel tests will be submitted as LSF jobs. multitasking main character energy. π
π¦ PENDING FEATURES π¦
the stuff that's not here yet, but is coming (iykyk):
- automatic remote execution for tests requiring a distinct hardware platform
- logging profiling and coverage metrics with each test
bestie warning: nothing here is a "maybe", okay? if the page says a flag does a thing, that flag does that thing. don't invent extra flags, don't guess at behavior. the facts stay exactly where they are. π
and that's the whole page, fr fr. this little manual lives at perl v5.32.1, dated 2022-01-17, and it's filed under UR::Na...st::Run(3pm). go run your tests, you absolute icon. ππβ¨
π¦ where this page comes from
- debian bookworm: libur-perl 0.470+ds-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libur-perl 0.470+ds-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libur-perl 0.470+ds-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms