Apache-Test
view release on metacpan or search on metacpan
lib/Apache/TestCommon.pm view on Meta::CPAN
my($chunk, $res) = @_;
$received += length $chunk;
});
ok t_cmp($received, $length, 'bytes in body');
}
}
}
sub run_files_test {
my($verify, $skip_other) = @_;
my $vars = Apache::Test::vars();
my $perlpod = $vars->{perlpod};
my %pod = (
files => [],
num => 0,
url => '/getfiles-perl-pod',
dir => "",
);
lib/Apache/TestCommon.pm view on Meta::CPAN
} qw(httpd perl);
}
my $tests = $pod{num} + keys(%other_files);
plan tests => $tests, sub { $pod{num} and have_lwp() };
my $ua = Apache::TestRequest::user_agent();
for my $file (@{ $pod{files} }) {
$verify->($ua, "$pod{url}/$file", "$pod{dir}/$file");
}
for my $url (sort keys %other_files) {
$verify->($ua, $url, $other_files{$url});
}
}
1;
__END__
lib/Apache/TestRequest.pm view on Meta::CPAN
$args->{keep_alive} ||= $ENV{APACHE_TEST_HTTP11};
if ($args->{keep_alive}) {
install_http11();
eval {
require LWP::Protocol::https; #https10 is the default
LWP::Protocol::implementor('https', 'LWP::Protocol::https');
};
}
# in LWP 6, verify_hostname defaults to on, so SSL_ca_file
# needs to be set accordingly
if ($have_lwp and $LWP::VERSION >= 6.0 and not exists $args->{ssl_opts}->{SSL_ca_file}) {
my $vars = Apache::Test::vars();
my $cafile = "$vars->{sslca}/$vars->{sslcaorg}/certs/ca.crt";
$args->{ssl_opts}->{SSL_ca_file} = $cafile;
# IO::Socket:SSL raw socket compatibility
$conn_opts->{SSL_ca_file} = $cafile;
}
eval { $UA ||= __PACKAGE__->new(%$args); };
lib/Apache/TestSmoke.pm view on Meta::CPAN
=head2 Resolving Sequence Problems
When this kind of testing is used and a failure is detected there are
two problems:
=over
=item 1
First is to be able to reproduce the problem so if we think we fixed
it, we could verify the fix. This one is easy, just remember the
sequence of tests run till the failed test and rerun the same sequence
once again after the problem has been fixed.
=item 2
Second is to be able to understand the cause of the problem. If during
the random test the failure has happened after running 400 tests, how
can we possibly know which previously running tests has caused to the
failure of the test 401. Chances are that most of the tests were clean
and don't have inter-dependency problem. Therefore it'd be very
( run in 0.443 second using v1.01-cache-2.11-cpan-5467b0d2c73 )