Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Automation using perl

by sundialsvc4 (Abbot)
on Jul 14, 2014 at 21:56 UTC ( [id://1093624]=note: print w/replies, xml ) Need Help??


in reply to Automation using perl

Jaypal, my experienced opinion on this matter is that you probably should refactor everything “one more level-of-detail down” in your overall testing hierarchy.   Instead of putting “use my package script” at the outermost level, allow each of the individual test scripts to do it.   (Or, if multiple scripts have common prerequisites, let each of them use a common library which, in turn, specifies the individual uses.)

When any particular (outer-level) test script finally runs, then from the Perl interpreter’s point-of-view it will “top down, incorporate everything.”     However, generally speaking, you would prefer to be able to also run any individual script, well, “individually.”   Therefore, it’s generally a good idea to put all of the prerequisites for each individual test-case at the bottom of the tree, so that each case, if run individually, is guaranteed to produce the same results that it would when it is run within the larger framework.

Therefore, build each script, necessarily “from the bottom up,” in such a way that it will perform identically when run “from the top down.”   If a group of tests share common prerequisites, let all of them use a common ancestor which, in turn, uses all the rest.

Replies are listed 'Best First'.
Re^2: Automation using perl
by Anonymous Monk on Jul 14, 2014 at 22:08 UTC

    Without code or a more detailed description, it's practically impossible to tell where and what the "top", "bottom", and "outside" of this "tree" you are describing is... perhaps a diagram would help?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1093624]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2024-03-19 06:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found