[Catalyst] Coverage tests in Catalyst

Jonathan Rockway jon at jrock.us
Tue Dec 5 18:10:07 GMT 2006


Ian Docherty wrote:
> 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.

Does C<make test> use an external server?  If so, then start the server
(myapp_fastcgi, or myapp_server) with -MDevel::Cover.  If not, then
things will Just Work.  There's no HTTP going on with Catalyst::Test
unless you set up your environment to use an external server.

Regards,
Jonathan Rockway

-- 
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;



More information about the Catalyst mailing list