[Catalyst] Coverage tests in Catalyst
Ian Docherty
ian at iandocherty.com
Tue Dec 5 18:02:51 GMT 2006
Don't we have to do both of these?
Coverage of the 'make test' will only show coverage for those modules we =
can test 'statically' i.e. by making direct calls to the methods in the =
tests
Tests that are done with LWP (or is it Mechanize) which are http =
requests to the application will probably be the bulk of the tests for a =
big application and these will not be caught by the first method but =
will by the second.
I suppose I am asking if both these can be combined to give total =
coverage from the two techniques.
Jonathan Rockway wrote:
> Ian Docherty wrote:
> =
>> Is it possible to do coverage tests in a Catalyst application? If so
>> how? I can't find any references that help.
>> =
>
> Catalyst apps aren't special -- do coverage tests like you would with
> any other perl module:
>
> $ cover -delete
> $ HARNESS_PERL_SWITCHES=3D-MDevel::Cover make test
> $ cover
>
> If you want "coverage" and not test coverage (why?), then just do
>
> $ perl -MDevel::Cover myapp_server.pl
> <request stuff>
> $ cover
>
> Regards,
> Jonathan Rockway
>
> =
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20061205/abb0a=
43b/attachment.htm
More information about the Catalyst
mailing list