Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: Re: Loose Guidelines

by stvn (Monsignor)
on Apr 01, 2004 at 02:03 UTC ( #341484=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Loose Guidelines
in thread Testaholics Anonymous (or how I learned to stop worrying and love Test::More)

Nice in theory. Sucks in practice. More than one developer here (on a "must never fail on pain of death" project) has skipped running the entire 1.5 hour test suite because "their one little change" won't break things and their one little test didn't break. When you're in a hurry, one and one half hours can seem like a long time :)

I see your point. We have institued a "must run tests under pain of death before commiting to CVS" policy, but even that can be subverted by modifying the working directory. We have several distinct sub-systems which do not interact with one another (except in maybe in application code that uses the sub-systems), I suppose I could use the prove utility that comes with Test::Harness (my other new favorite toy along with Devel::Cover), to script sub-system tests in some way.

Redundant tests are bad. They slow things down, they are more tests to maintain and they provide no benefit. You don't need to prove that 2+2 == 4 more than once.

Agreed, but what about if they are redundant because they are in a function? Here is an example:

sub test_Base_Interface { my ($o) = @_; can_ok($o, 'new'); can_ok($o, 'helloWorld'); } sub test_DerivedFromBase_Interface { my ($o) = @_; can_ok($o, 'new'); can_ok($o, 'gutenTag'); test_Base_Interface($o); }
The can_ok($o, 'new') test is repeated (because 'new' is overridden in 'DerivedFromBase'). Its redundant, but "for a reason" (maybe not a good one). Is this still bad? Or am I being silly and should just use Test::Class or something similar?

-stvn

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://341484]
help
Chatterbox?
[erix]: ah, pcregrep is a stanalone program?
[Lady_Aleena]: erix, yes.
[Lady_Aleena]: pcre stands for 'Perl Compatible Regular Expressions'.
[erix]: ok, ok, I thought you meant the engine
[perldigious]: Tanktalus: Ha, understandable, that does make it harder when you don't want to move. I assume you are looking at remote work from home jobs too?
[Tanktalus]: yeah, I'm looking at a lot of remote work - I've been working from home since 2002, so I know how to do the work from remote, I just need a new employer ;)
[Lady_Aleena]: Discipulus, I wouldn't know how to get a script to do what the greps do in one line.
[perldigious]: Even working for a large software engineering contractor that's willing to do remote could be an option. The fortune 500 company at $job-- I worked for had quite a lot of that work to hire out to large contractors.
[perldigious]: The pay and benifits leave a lot to be desired though, or so I've heard...
[Lady_Aleena]: Discipulus, grep doesn't have an option to go recursively through a directory as far as I know.

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (14)
As of 2017-05-23 19:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?