I have been working with TAP to test environment and other things that are not code.
Did I win the lottery?
http://pl129.pairlitesite.com/tests/action/lottery.txt
http://pl129.pairlitesite.com/tests/action/lottery.t
Is my server up?
http://pl129.pairlitesite.com/tests/action/ping.txt
http://pl129.pairlitesite.com/tests/action/ping.t
etc.
I have been running these with cron and I get email about the results. Well the trouble is when I have failing tests I want to see if the tests are still failing. I was in a place that was blocking ssh traffic. So it lead me to this solution.
I wrote a little prove wrapper.
#!/usr/local/bin/perl
use CGI;
my $q = new CGI;
print $q->header;
print $q->start_html('prove');
my $file = $q->param('file');
my $ok_file = {
'/tests/action/ping.t' => 1,
'/tests/action/lottery.t' => 1,
};
my $out;
if ( $ok_file->{$file} ) {
my $command = "/usr/home/pl129/public_html/bin/prove/usr/home/pl129/public_html$file 2>&1";
$out = `$command`;
} else {
$out = "<pre> $file not allowed </pre>";
}
print $q->h1($file);
print "<hr>";
print "<pre>$out</pre>";
print $q->end_html;
I added this to my
AddHandler prove-type
.t
Action prove-type/bin/proveit.cgi?v=1&file=
So know I can link to my tests:
http://pl129.pairlitesite.com/tests/action/ping.t
Running your tests with Apache 0 Comments More | Login | Reply /