view release on metacpan or search on metacpan
"Module::Build" : "0.38"
}
},
"develop" : {
"requires" : {
"Test::CPAN::Meta" : "0",
"Test::MinimumVersion" : "0.10108",
"Test::Pod" : "1.41",
"Test::Spellunker" : "v0.2.7"
}
},
"runtime" : {
"requires" : {
"AnyEvent::APNS" : "0",
"test" : {
"requires" : {
"AnyEvent" : "0",
"AnyEvent::Socket" : "0",
"HTTP::Request::Common" : "0",
"Plack::Test" : "0",
"Test::More" : "0.98",
"Test::TCP" : "0"
}
}
},
"provides" : {
"APNS::Agent" : {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
package APP::REST::RestTestSuite;
use 5.006;
use strict;
use warnings FATAL => 'all';
use Data::Dumper;
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
$| = 1; #make the pipe hot
$Data::Dumper::Indent = 1;
=head1 NAME
APP::REST::RestTestSuite - Suite for testing restful web services
=head1 VERSION
Version 0.03
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
our $VERSION = '0.03';
=head1 SYNOPSIS
use APP::REST::RestTestSuite;
my $suite = APP::REST::RestTestSuite->new();
$suite->execute_test_cases( $suite->get_test_cases() );
my ( $cases_in_config, $executed, $skipped, $passed, $failed ) =
$suite->get_result_summary();
#OR
use APP::REST::RestTestSuite;
# overrides the default config and log file paths
my $suite = APP::REST::RestTestSuite->new(
REST_CONFIG_FILE => <config file>,
LOG_FILE_PATH => <path>,
);
$suite->execute_test_cases( $suite->get_test_cases() );
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
$suite->get_result_summary();
=head1 DESCRIPTION
APP::REST::RestTestSuite object is instantiated with the data in config file.
Default config file format is defined in __DATA__ and that can be overridden
by passing the config file as an argument to the class.
Default LOG file path is the current working directory of the script which
calls this module
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
unless (@_) {
$err = "There is no test cases defined to execute.\n";
} elsif ( ( (@_) % 2 ) == 1 ) {
$err =
"Test cases are not properly configured in '"
. $self->get_config_file()
. "'\nDefine test cases properly.\nPlease see the README file for more info.\n";
}
return $err if ($err);
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
my $tc = $test_cases{$count};
my @keys = sort keys %{$tc};
no warnings;
$err .= "Test case '$tc->{test_case}' not properly defined\n"
unless ( _compare_arrays( \@spec, \@keys ) );
}
$err .= "Please see the README file to see the correct format.\n" if ($err);
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
print $err_fh
qq|<HTML> <HEAD> <TITLE>ERROR LOG for $self->{endpoint}</TITLE> </HEAD>|
. qq|<BODY><textarea rows="999999" cols="120" style="border:none;">|;
}
print STDERR "\nTest Suite executed on $self->{endpoint}\n";
print $fh "\nTest Suite executed on $self->{endpoint}\n";
print $err_fh "\nTest Suite executed on $self->{endpoint}\n";
foreach my $count ( sort { $a <=> $b } keys(%test_cases) ) {
my $tc = $test_cases{$count};
$config++;
print $fh "\n", LINE, "\n";
if ( $tc->{execute} && ( $tc->{execute} =~ /no/i ) ) {
print $fh "\nSkipping Test case $count => $tc->{test_case} \n";
$skip++;
next;
}
$uri = qq|$self->{rest_uri_base}| . qq|$tc->{uri}|;
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
if ( $username && $password );
$request->content_type($req_content_type);
$request->content_length( length($req_body) );
}
print STDERR "Executing Test case $count => $tc->{test_case}";
print $fh "Executing Test case $count => $tc->{test_case}";
my $start_time = time;
$response = $ua->request($request);
$total++;
my $exec_time = $self->delta_time( start_time => $start_time );
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
m/$respose_content_type/ )
{
$failed = 1;
print $err_fh "\n", LINE, "\n";
print $err_fh
"Executing Test case $count => $tc->{test_case}";
print $err_fh
"\n*********ATTENTION CONTENT TYPE ERROR ******";
print $err_fh
"\n\nExpected content_type is $expected_response_content_type\n";
print $err_fh
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
}
($failed) ? $fail++ : $pass++;
} else {
$fail++;
print $err_fh "\n", LINE, "\n";
print $err_fh "Executing Test case $count => $tc->{test_case}";
$self->_print_logs(
fh => $err_fh,
uri => $uri,
method => $method,
req_body => $req_body,
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
print $fh
qq|<HTML> <HEAD> <TITLE>LOG for $self->{endpoint}</TITLE> </HEAD>|
. qq|<BODY><textarea rows="999999" cols="120" style="border:none;">|;
}
print STDERR "\nTest Suite executed on $self->{endpoint}\n";
print $fh "\nTest Suite executed on $self->{endpoint}\n";
my @reqs;
foreach my $count ( sort { $a <=> $b } keys(%test_cases) ) {
my $tc = $test_cases{$count};
$config++;
if ( $tc->{execute} =~ /no/i ) {
print $fh "\nSkipping Test case $count => $tc->{test_case} \n";
$skip++;
next;
}
$uri = qq|$self->{rest_uri_base}| . qq|$tc->{uri}|;
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
my $file = $self->{file};
if ( $file->{config_file} ) {
$file->{config_file_handle} =
$self->_open_fh( FILE => $file->{config_file}, MODE => 'READ' );
} else {
$file->{config_file_handle} = \*APP::REST::RestTestSuite::DATA;
}
$self->{file} = $file;
}
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
? $self->{http_status_code}->{ $res->code }
: $define;
print $fh " ]\n";
print $fh "\n\nResponse Content =>\n";
print $fh $res->content;
print $fh "\n\nTest execution time => ";
print $fh $args{exec_time};
print $fh " milli seconds";
print $fh "\n", LINE, "\n";
}
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
perldoc APP::REST::RestTestSuite
=head1 ACKNOWLEDGEMENTS
lib/APP/REST/RestTestSuite.pm view on Meta::CPAN
=cut
=head1 REPOSITORY
L<https://github.com/rkmithun/APP-REST-RestTestSuite>
=cut
1; # End of APP::REST::RestTestSuite
__DATA__
# RestTestSuite supports config file of below format.
# All values in LHS of ':' are case sensitive.
# Every test case should be within the '#START_TEST_CASE' and '#END_TEST_CASE' block.
# Create application specific config file in below format and pass the
# full path of file as an argument to the constructor
# for POST and PUT methods you need to supply the request body within
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
my @tests = split ' ', $self->tests;
my %seen;
$args->{test} = {
TESTS => (join ' ', grep {!$seen{$_}++} @tests),
};
} elsif ( $Module::Install::ExtraTests::use_extratests ) {
# Module::Install::ExtraTests doesn't set $self->tests and does its own tests via harness.
# So, just ignore our xt tests here.
} elsif ( -d 'xt' and ($Module::Install::AUTHOR or $ENV{RELEASE_TESTING}) ) {
$args->{test} = {
TESTS => join( ' ', map { "$_/*.t" } grep { -d $_ } qw{ t xt } ),
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/APR/HTTP/Headers/Compat.pm view on Meta::CPAN
I haven't benchmarked but it's certain that this implementation will be
substantially slower than C<HTTP::Headers>.
=head1 DEPENDENCIES
L<APR::Pool>, L<APR::Table>, L<HTTP::Headers>, L<Storable>, L<Test::More>
=head1 SEE ALSO
L<FirePHP::Dispatcher>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Arc/Command/Test.pm view on Meta::CPAN
package Arc::Command::Test;
use strict;
use warnings;
use Carp;
use Arc::Command;
@Arc::Command::Test::ISA = qw(Arc::Command);
sub members
{
my $this = shift;
return { %{$this->SUPER::members},
view all matches for this distribution
view release on metacpan or search on metacpan
},
"test" : {
"requires" : {
"File::Find" : 0,
"File::Temp" : 0,
"Test::More" : 0
}
}
},
"release_status" : "stable",
"resources" : {
view all matches for this distribution
view release on metacpan or search on metacpan
---
abstract: 'Parse an environment variable and unshift into @ARGV'
author:
- 'Olivier Mengué <dolmen@cpan.org>'
build_requires:
Test::More: 0
Test::NoWarnings: 0
configure_requires:
ExtUtils::MakeMaker: 6.30
dynamic_config: 0
generated_by: 'Dist::Zilla version 4.300003, CPAN::Meta::Converter version 2.112150'
license: perl
view all matches for this distribution
view release on metacpan or search on metacpan
"Module::Build" : "0.38"
}
},
"develop" : {
"requires" : {
"Test::CPAN::Meta" : "0",
"Test::MinimumVersion" : "0.10108",
"Test::Pod" : "1.41",
"Test::Spellunker" : "v0.2.7"
}
},
"runtime" : {
"requires" : {
"JSON" : "0",
"perl" : "5.008005"
}
},
"test" : {
"requires" : {
"Test::More" : "0.98"
}
}
},
"provides" : {
"ARGV::JSON" : {
view all matches for this distribution
view release on metacpan or search on metacpan
#!/usr/bin/perl
use warnings;
use strict;
use Test::More tests => 3;
use ARGV::OrDATA;
while (<>) {
is $_, "pipe $.\n", "read line $. from stdin";
view all matches for this distribution
view release on metacpan or search on metacpan
"Types::Standard" : "0"
}
},
"test" : {
"requires" : {
"Test::Exception" : "0",
"Test::More" : "0"
}
}
},
"release_status" : "stable",
"resources" : {
view all matches for this distribution
view release on metacpan or search on metacpan
[MinimumPerl]
[Prereqs]
LWP = 5
[Test::Compile]
[Test::Kwalitee]
view all matches for this distribution
view release on metacpan or search on metacpan
t/ARGV-readonly.t view on Meta::CPAN
#########################
# change 'tests => 1' to 'tests => last_test_to_print';
use Test;
BEGIN { plan tests => 1 };
use ARGV::readonly;
ok(1); # If we made it this far, we're ok.
#########################
# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.
view all matches for this distribution
view release on metacpan or search on metacpan
]
},
"prereqs" : {
"build" : {
"requires" : {
"Test::More" : "0"
}
},
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
view all matches for this distribution
view release on metacpan or search on metacpan
#!perl -w
use strict;
use Test;
BEGIN { plan tests => 2 + 5 + 1}
if (1) {
view all matches for this distribution
view release on metacpan or search on metacpan
example/ars_GetListEntry.pl view on Meta::CPAN
|| die "ars_LoadQualifier: $ars_errstr";
# basic format: allow the server to provide sorting order
# and query list fields.
print "Testing: basic format.\n";
( my @entries = ars_GetListEntry( $ctrl, $schema, $qual, 0, 0 ) )
|| die "ars_GetListEntry: $ars_errstr";
for ( my $i = 0 ; $i < $#entries ; $i += 2 ) {
example/ars_GetListEntry.pl view on Meta::CPAN
}
# another format: specify a sorting order.
# sort by license type, ascending.
print "Testing: basic + sorting format.\n";
( my @sorted_entries =
ars_GetListEntry( $ctrl, $schema, $qual, 0, 0, $fids{$login_name}, 1 ) )
|| # sort on Login Name, ascending
die "ars_GetListEntry: $ars_errstr";
example/ars_GetListEntry.pl view on Meta::CPAN
printf( "%s %s\n", $sorted_entries[$i], $sorted_entries[ $i + 1 ] );
}
# another format: specify a custom query list field-list.
print "Testing: basic + sorting + custom field-list format.\n";
if ( !defined( $fids{$login_name} ) || !defined( $fids{$full_name} ) ) {
print
"Sorry. Either i can't find the field-id for \"$login_name\" or \"$full_name\"\n on your \"$schema\" form. I'm skipping this test.\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
applications/archive.pl view on Meta::CPAN
}
my ( $tWeek, $tYear ) = get_week('yesterday');
$weekFilename = get_year('yesterday') ."w$tWeek-$command-$catalogID_uKey-csv-week.txt";
if (-e "$path/$weekFilename") { unlink ($path.'/'.$weekFilename); }
print "Test : <$dtest>\n" if ($debug);
foreach $filename (@files) {
print "Filename : <$filename>\n" if ($debug >= 2);
catAllCsvFilesYesterdayWeek ($firstDayOfWeekEpoch, $yesterdayEpoch, $catalogID_uKey, $command, $path, $weekFilename, $filename);
removeAllNokgzipCsvSqlErrorWeekFilesOlderThenAndMoveToBackupShare ($gzipEpoch, $removeAllNokEpoch, $removeGzipEpoch, $removeDebugEpoch, $removeWeeksEpoch, $catalogID_uKey, $command, $path, $filename);
view all matches for this distribution
view release on metacpan or search on metacpan
=head1 SYNOPSIS
use strict;
use ASP qw(:strict);
print "Testing, testing.<BR><BR>";
my $item = param('item');
if($item eq 'Select one...') {
die "Please select a value from the list.";
}
view all matches for this distribution
view release on metacpan or search on metacpan
2010-09-21 v0.002
- Woops! Was not returning a coderef. Now we are.
2010-09-21 v0.001
- Initial version.
- Tested with Plack, Corona and Starman.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ASP4/API.pm view on Meta::CPAN
use strict;
use warnings 'all';
use ASP4::ConfigLoader;
use ASP4::HTTPContext;
use ASP4::UserAgent;
use ASP4::Test::Fixtures;
BEGIN { ASP4::ConfigLoader->load }
sub new
{
my ($class) = @_;;
lib/ASP4/API.pm view on Meta::CPAN
properties_file => $config->web->application_root . '/etc/test_fixtures.json'
) unless $@;
}
elsif( -f $config->web->application_root . '/etc/test_fixtures.yaml' )
{
$test_data = ASP4::Test::Fixtures->new(
properties_file => $config->web->application_root . '/etc/test_fixtures.yaml'
);
}# end if()
# Our diagnostic messages:
lib/ASP4/API.pm view on Meta::CPAN
=head1 DESCRIPTION
C<ASP4::API> is B<very useful for unit tests> - specifically when writing tests
for the actual web pages themselves.
=head2 Example Unit Test
#!/usr/bin/perl -w
use strict;
use warnings 'all';
use Test::More 'no_plan';
use ASP4::API;
my $api = ASP4::API->new();
ok(
view all matches for this distribution
view release on metacpan or search on metacpan
author:
- John Drago <jdrago_999@yahoo.com>
license: perl
distribution_type: module
test_requires:
Test::More: 0
requires:
Carp: 0
ASP4: 1.046
Imager: 0.71
no_index:
view all matches for this distribution
view release on metacpan or search on metacpan
author:
- John Drago <jdrago_999@yahoo.com>
license: perl
distribution_type: module
test_requires:
Test::More: 0
requires:
Carp: 0
ASP4: 1.044
Router::Generic: 0.016
recommends:
view all matches for this distribution
view release on metacpan or search on metacpan
author:
- John Drago <jdrago_999@yahoo.com>
license: perl
distribution_type: module
test_requires:
Test::More: 0
requires:
Carp: 0
ASP4: 1.080
Router::Generic: 0.016
recommends:
view all matches for this distribution
view release on metacpan or search on metacpan
# Change 1..1 below to 1..last_test_to_print .
# (It may become useful if the test is moved to ./t subdirectory.)
my ($count, $message, $setting, $aubbc, $Current_version, %msg) =
(1, '[br][utf://#x23]', '', '', '', (1 => 'Test good ', 2 => 'Test error ',) );
BEGIN {
$| = 1;
print "Test's 1 to 4\n";
}
use AUBBC;
$aubbc = new AUBBC;
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AVLTree.pm view on Meta::CPAN
Caller : General
Status : Unstable
=head1 DEPENDENCIES
AVLTree requires Carp and Test::More, Test::Deep and Test::LeakTrace to run the tests during installation.
If you want to run the benchmarks in the scripts directory, you need to install the Benchmark
and List::Util modules.
=head1 EXPORT
view all matches for this distribution
view release on metacpan or search on metacpan
"perl" : "5.008001"
}
},
"develop" : {
"requires" : {
"Test::Pod" : "1.41"
}
},
"runtime" : {
"requires" : {
"Carp" : "0",
}
},
"test" : {
"requires" : {
"File::Temp" : "0",
"Test::More" : "0.98",
"perl" : "5.008001"
}
}
},
"provides" : {
view all matches for this distribution
view release on metacpan or search on metacpan
"version" : "0.77"
}
},
"test" : {
"requires" : {
"Test::More" : "0"
}
}
},
"release_status" : "stable",
"resources" : {
view all matches for this distribution
view release on metacpan or search on metacpan
author:
- John Drago <jdrago_999@yahoo.com>
license: perl
distribution_type: module
test_requires:
Test::More: 0
requires:
AWS::S3: 0.023
Carp: 0
LWP::UserAgent: 0
Digest::HMAC_SHA1: 0
view all matches for this distribution
view release on metacpan or search on metacpan
"warnings" : "0"
}
},
"test" : {
"requires" : {
"Test::More" : "0"
}
}
},
"release_status" : "stable",
"version" : 0.04,
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/TestHelper/CreateTestFiles.pm view on Meta::CPAN
package TestHelper::CreateTestFiles;
use strict;
use warnings;
use Test::TempDir::Tiny qw( tempdir );
use Path::Tiny qw( path );
use base qw(Exporter);
our @EXPORT_OK = qw( populated_tempdir );
view all matches for this distribution
view release on metacpan or search on metacpan
"Dancer2" : "0",
"Minilla" : "0",
"Mojolicious" : "0",
"Parallel::ForkManager" : "0",
"Software::License::MIT" : "0",
"Test::CPAN::Meta" : "0",
"Test::MinimumVersion::Fast" : "0.04",
"Test::PAUSE::Permissions" : "0.07",
"Test::Pod" : "1.41",
"Test::Spellunker" : "v0.2.7",
"Version::Next" : "0"
}
},
"runtime" : {
"recommends" : {
},
"test" : {
"requires" : {
"File::Slurp" : "9999.25",
"Starman" : "0",
"Test::Deep" : "1.128",
"Test::More" : "0.98",
"Test::SharedFork" : "0",
"Test::TCP" : "2.19",
"Test::Warn" : "0"
}
}
},
"provides" : {
"AWS::Lambda" : {
view all matches for this distribution