[Raleigh-talk] Testing

James Olin Oden james.oden at gmail.com
Wed Feb 4 11:47:14 PST 2009


On Wed, Feb 4, 2009 at 2:28 PM, Trevor Little <trevormg19 at gmail.com> wrote:
> I was wondering how many of you write tests for your code on a regular
> basis. What modules do you use to make that easier? I'm familiar with the
> Test::{Simple,More,Deep,...} family, but are there others anyone has used
> and likes? Does anyone work in a place were unit testing is enforced or at
> least strongly encouraged? I guess I'm just trying to figure out how other
> companies/people approach this kind of unit testing.
>
We use Test::More presently.   Tests are encouraged but I would say
strongly.  Mostly, tests get created because code can become
increasingly difficult to maintain if we don't write tests.  This is
especially true of our perl modules, as they can be used in so many
different ways, its important to have something that does a reasonable
regression across all of the libraries functionality.

Presently, when we build packages we automatically generate  test
subpackage for that package.   These tests all get installed
under some known directory tree.  We have no engine though, yet, to
automate the running of all the tests in our distribution.

BTW, I find that Test::More seems to work great for testing CLI's too,
or really perl works well  in this regard in that its more than
capable of spawning processes, checking file contents and with
Perl::Expect(3pm), controlling interactive programs or doing screen
scraping.    We don't do anything with web interface testing yet.

Cheers...james


More information about the Raleigh-talk mailing list