Take a look at using Test::Harness for this type of testing. Here's a bit of code I use to run a bunch of tests and get a nice report (it's inspired by chromatic's Perl Testing ISBN 0596100922):
#!/usr/bin/perl use strict; use warnings; use File::Find; use Cwd; use Text::Reform qw( form ); use Data::Dumper; use Getopt::Long; use Pod::Usage; use Test::Harness::Straps; my $strap = Test::Harness::Straps->new(); our( @status, @filename, @expected, @run, @passed, @skipped, @todo, @t +odo_skipped ); our( $opt_help, $opt_path, $opt_email, $opt_noprint ); GetOptions( "help|h" => \$opt_help, "path|p=s" => \$opt_path, "email|e=s" => \$opt_email, "noprint|n" => \$opt_noprint, ); pod2usage( -verbose => 2 ) if $opt_help; my $path = getcwd unless $opt_path; find( { wanted => \&test_found, no_chdir => 1 }, $path ); my $report_date = localtime( time ); my $alert = form '', "Test suite at $path", "Report Date: $report_date", '', ' =========================== +=========================', ' Te +sts ', ' =========================== +=========================', 'Status Filename Expected Run Passed Sk +ipped TODO TODO Skipped', '--------------------------------------------------------------------- +-------------------------', '|||| [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ ||| ||| ||| +||| ||| |||', \@status, \@filename, \@expected, \@run, \@passed, \@skipped, \@todo, +\@todo_skipped; print $alert unless $opt_noprint; send_mail( $alert, "Test Suite: $path", $opt_email ) if $opt_email; sub send_mail{ my ( $alert, $subject, $to_email ) = @_; # Send email here } sub test_found{ return unless m/\.t$/; return if $File::Find::name =~ m/exclude_tests/i; my %results = $strap->analyze_file( $File::Find::name ); my $status = 'FAIL'; $status = ' OK ' if $results{'max'} == $results{'seen'} && $result +s{'seen'} == $results{'ok'}; my ( $file ) = $File::Find::name; $file =~ s/$path//;; push @status, $status; push @filename, $file; push @expected, $results{'max'}; push @run, $results{'seen'}; push @passed, $results{'ok'}; push @skipped, $results{'skip'}; push @todo, $results{'todo'}; push @todo_skipped, $results{'bonus'}; } 1; __END__ =head1 NAME test_harness.pl - Main test harness script. =head1 SYNOPSIS test_harness.pl --path <path to tests> --help --path, -p: Path to look for tests - will run all tests found. Defau +lts to ./t. --email, -e: Email address to send report to. If ommitted, no report + is sent. --noprint, n: Suppress printing report to STDOUT. --help, -h: This message. =head1 AUTHOR Troy Denkinger (tdenkinger at gmail.com) =head1 VERSION Version 1.0 =head1 COPYRIGHT Copyright (c) 2005 by Troy Denkinger. This program is free software; +you can redistribute it and/or modify it under the same terms as Perl + itself. =cut
I'm not sure how I'd handle the long running tests. Maybe output the results to a file you can come back and pick up later. The key is getting the browser to disconnect and keep the test running.

In reply to Re: Running .t Tests in a web-based environment by SheridanCat
in thread Running .t Tests in a web-based environment by skazat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.