<?xml version="1.0" encoding="windows-1252"?>
<node id="341668" title="Re: Testaholics Anonymous (or how I learned to stop worrying and love Test::More)" created="2004-04-01 10:51:07" updated="2005-07-05 09:23:09">
<type id="11">
note</type>
<author id="72812">
petdance</author>
<data>
<field name="doctext">
See [http://petdance.com/perl/] for a couple of my talks on the topic of large-scale project testing, including the one I gave at last year's OSCON.
&lt;P&gt;Also, I'd be glad to visit your local Perl Mongers group and talk, too.  (No cost to you, either, so long as my costs to get there don't exceed $100)  I'm going to Minneapolis in a few weeks, and I've spoken at St. Louis and Grand Rapids.
&lt;P&gt;
Short version of my comments on this thread:
&lt;UL&gt;
&lt;LI&gt;Redundancy is OK.  Don't build for redundancy, but if you happen to have redundant tests between a couple of .t files, that's OK.  Don't try to remove the "inefficiencies".
&lt;LI&gt;Don't worry how long your tests take.  Set up a bot that runs hourly and notifies you (or the entire department, in my case) if any tests fail.
&lt;/UL&gt;
Here's the bot we use at work.  It's set up to handle a branches if necessary, as in:
&lt;code&gt;
# Runs the smokebot program on the trunk and mails the results
0 * * * * smokebot HEAD smokereports@us.com

# Smoke against the branches
30 * * * * smokebot cp2004-branch smokereports@us.com
&lt;/code&gt;

Adapt to your own uses:
&lt;code&gt;
#!/bin/sh

if [ $# -lt 2 ]
then
    echo Must pass at least a branch, and one email address, 
    echo plus any parms to echo pass to smoke.
    exit 1
fi

REV=$1
shift

MAIL=$1
shift

cd $TMP
DIR=tw
FULLPATH=$TMP/$DIR

# This assumes you have already logged in once as anoncvs
# so that the password is in your ~/.cvspass file.
cvs -d/home/cvs -Q co -d $DIR -r $REV tw &gt; /dev/null

TWROOT=$FULLPATH
export TWROOT

/home/smoke/tw/Dev/devapache stop  &gt;  /dev/null 2&gt;&amp;1
/home/smoke/tw/Dev/devapache start &gt; /home/smoke/smoke.out 2&gt;&amp;1 

cd $TWROOT
smoke $@ &gt;&gt; /home/smoke/smoke.out 2&gt;&amp;1 
grep -i "^Failed" /home/smoke/smoke.out &gt; /home/smoke/smoke.out.fail

if [ -s /home/smoke/smoke.out.fail ]
then
    STATUS="FAILED"
    mail -s"Smoke $REV $@ $STATUS `date`" $MAIL &lt; /home/smoke/smoke.out
else
    STATUS="passed"
fi

/home/smoke/tw/Dev/devapache stop &gt;&gt; /home/smoke/smoke.out 2&gt;&amp;1 
&lt;/code&gt;
&lt;div class="pmsig"&gt;
&lt;div class="pmsig-72812"&gt;
&lt;P&gt;
xoxo,&lt;BR&gt;
Andy&lt;BR&gt;

&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
341329</field>
<field name="parent_node">
341329</field>
</data>
</node>
