nysus has asked for the wisdom of the Perl Monks concerning the following question:
I'd love to get some general pointers from pros on how to efficiently create tests for modules.
Using the Module::Starter::PBP module, I notice that the t directory has the following test files by default: 00.load.t, perlcritic.t, pod-coverage.t, pod.t.
Some of the questions I'm trying to answer are: When should I create a new .t file? How should I group my tests into the different .t files? What's best practice for naming the .t files?
Also, I'd like to be able to run the tests as efficiently as possible from vim, my tool of choice. Right now, I'm using Damian Conway's vim configuration which has a short cut for running make on a module. It runs all the tests it finds. I imagine this could slow things down quite a bit, however, if I'm just interested in running a few of the test files. How are the pros running individual test files quickly and efficiently with vim?
Thanks!
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How do you structure and run module test code?
by toolic (Bishop) on Feb 23, 2017 at 14:15 UTC | |
by hippo (Archbishop) on Feb 23, 2017 at 14:24 UTC | |
Re: How do you structure and run module test code?
by Corion (Patriarch) on Feb 23, 2017 at 13:46 UTC | |
Re: How do you structure and run module test code?
by haukex (Archbishop) on Feb 23, 2017 at 14:53 UTC | |
Re: How do you structure and run module test code?
by choroba (Cardinal) on Feb 23, 2017 at 13:58 UTC | |
Re: How do you structure and run module test code?
by stevieb (Canon) on Feb 23, 2017 at 15:09 UTC | |
Re: How do you structure and run module test code?
by 1nickt (Canon) on Feb 23, 2017 at 14:16 UTC | |
Re: How do you structure and run module test code?
by Anonymous Monk on Feb 23, 2017 at 18:55 UTC |