FW: Coding Together

Edwardson, Tony Tony.Edwardson at commerzbank.com
Thu Feb 28 02:13:39 PST 2008

Here's what I think we should do to get started

We start with Log::Dispatch which has some testing already, is fairly simple
in concept and several of us use the module already.
Below is Tom's analysis of the existing testing.

Because several of us have no previous experience of writing testing
modules, I suggest choose something simple that needs testing and we all
have a go at writing a test for it.
We can then compare our various approaches and hopefully learn from the
This should not be too daunting for any of us, will start the process of
becoming familiar with the module, will make everyone "get their hands wet"
on writing tests and will probably highlight our relative experience levels.

We can then meet up to discuss our various approaches and assign who is work
on what.

A quick scan of the current testing setup shows that it uses a test
subdirectory "t" convention with tests 00-compile.t and 01-basic.t along
with kwalitee.t pod-coverage.t and pod.t.

For those who might not know how to proceed,
 get this file from
to where you want to test it and extract the tarball
 chdir to Log-Dispatch-2.21/t
 create your test file in here (use the ones already there for inspiration)

To try it out it
prove -v <your test file name>

I suggest that we write a test to prove that we can use Log::Dispatch::File
to log something to a file 

Comments on this anyone ?



-----Original Message-----
From: miltonkeynes-pm-bounces+tony.edwardson=commerzbank.com at pm.org
[mailto:miltonkeynes-pm-bounces+tony.edwardson=commerzbank.com at pm.org] On
Behalf Of Tom Hukins
Sent: Thursday, January 10, 2008 1:16 PM
To: Milton Keynes Perl Mongers
Subject: Re: Coding Together

Here's my feedback on Log::Dispatch:

On Thu, Dec 20, 2007 at 10:33:10AM -0000, Edwardson, Tony wrote:
> *	What testing already exists

Some limited tests exist.  They run through the basics of logging
something, but they don't go into much detail for each different type
of logging available (Syslog, File, Email, etc.).  The tests don't
test to see failures occur as they should.

> *	What the testing coverage is like

Numerically, not too bad.  With Devel::Cover, the POD coverage does
very well, as there's a test for this in the suite, but it's not quite
100%.  In general, the coverage works out around 80%.

But these numbers only show what code runs, not what different inputs
and outputs take place.

> *	What needs to be done

I'd suggest:
- Check for failure.  Do things go wrong as documented?
- Test the different types of logging, probably using Test::MockObject
  to override unwanted behaviour such as sending mail.
- Read through the documentation and write examples based on what's
- Find examples of people using the modules in the wild and codify
  them as tests.  Perlmonks and mailing list archives should help us
  find such examples.

> *	How hard it is likely to be

I can see plenty of simple things to test for, and I bet we can think
of a few tricksy fun things, like how logging to a file deals with a
disk filling up.

I think this would make a good candidate for us to start out with.

MiltonKeynes-pm mailing list
MiltonKeynes-pm at pm.org

This is a commercial communication from Commerzbank AG.

This communication is confidential and is intended only for the person to
whom it is addressed.  If you are not that person you are not permitted to
make use of the information and you are requested to notify
<mailto:LONIB.Postmaster at commerzbankib.com> immediately that you have
received it and then destroy the copy in your possession.

Commerzbank AG may monitor outgoing and incoming e-mails. By replying to
this e-mail you consent to such monitoring. This e-mail message and any
attached files have been scanned for the presence of computer viruses.
However, you are advised that you open attachments at your own risk.

This email was sent either by Commerzbank AG, London Branch, or by
Commerzbank Corporates & Markets, a division of Commerzbank. Commerzbank AG
is a limited liability company incorporated in the Federal Republic of
Germany. Registered Company Number in England BR001025. Our registered
address in the UK is 60 Gracechurch Street, London, EC3V 0HR. We are
regulated by the Financial Services Authority for the conduct of investment
business in the UK and we appear on the FSA register under number 124920. 


More information about the MiltonKeynes-pm mailing list