CPAN-Testers-WWW-Reports-Query-AJAX
view release on metacpan or search on metacpan
0.09 2014-09-26
- fixed license fields in META.json to be lists.
- added homepage to META resources.
- added documentation about the CPAN Testers Fund.
- extended META testing.
- fixed option validation.
- more documentation.
- switched 'txt' to 'csv'.
0.08 2014-04-04
- refine percentage calculation to 10 decimal places.
- added live test to be used under RELEASE_TESTING.
- added LICENSE file.
0.07 2012-11-25
- use Test::MockObject instead of an internet connection.
0.06 2012-11-18
- change file dates changed to meet W3CDTF standards.
- updated README.
- updated tests.
lib/CPAN/Testers/WWW/Reports/Query/AJAX.pm view on Meta::CPAN
=item * na
For the given query, the total number of NA reports stored.
=item * unknown
For the given query, the total number of UNKNOWN reports stored.
=item * pc_pass
For the given query, the percentage number of PASS reports stored against all
reports stored.
=item * pc_fail
For the given query, the percentage number of FAIL reports stored against all
reports stored.
=item * pc_na
For the given query, the percentage number of NA reports stored against all
reports stored.
=item * pc_unknown
For the given query, the percentage number of UNKNOWN reports stored against all
reports stored.
=back
=head2 Data Methods
=over 4
=item * data
t/10query.t view on Meta::CPAN
is($query->is_success, 1, '.. returned successfully');
is($query->error, '', '.. no errors');
if($args->{results}) {
is($query->all, $args->{results}{all}, '.. counted all reports');
is($query->pass, $args->{results}{pass}, '.. counted pass reports');
is($query->fail, $args->{results}{fail}, '.. counted fail reports');
is($query->na, $args->{results}{na}, '.. counted na reports');
is($query->unknown, $args->{results}{unknown}, '.. counted unknown reports');
is($query->pc_pass, $args->{results}{pc_pass}, '.. percentage pass reports');
is($query->pc_fail, $args->{results}{pc_fail}, '.. percentage fail reports');
is($query->pc_na, $args->{results}{pc_na}, '.. percentage na reports');
is($query->pc_unknown, $args->{results}{pc_unknown}, '.. percentage unknown reports');
}
if($raw) {
my $version = $args->{args}{version} || '0.15';
if($args->{args}{format} && $args->{args}{format} eq 'html') {
is($query->{options}{format},$args->{args}{format},'.. format the same: html');
like($raw,qr{<td><a href=(\\)?"javascript:selectReports\('App-Maisha-$version'\);(\\)?">$version</a></td>},'.. got version statement in raw');
ok(1,".. we don't parse html format");
} elsif($args->{args}{format} && $args->{args}{format} eq 'csv') {
t/11query.t view on Meta::CPAN
is($query->is_success, 1, '.. returned successfully');
is($query->error, '', '.. no errors');
if($args->{results}) {
is($query->all, $args->{results}{all}, '.. counted all reports');
is($query->pass, $args->{results}{pass}, '.. counted pass reports');
is($query->fail, $args->{results}{fail}, '.. counted fail reports');
is($query->na, $args->{results}{na}, '.. counted na reports');
is($query->unknown, $args->{results}{unknown}, '.. counted unknown reports');
is($query->pc_pass, $args->{results}{pc_pass}, '.. percentage pass reports');
is($query->pc_fail, $args->{results}{pc_fail}, '.. percentage fail reports');
is($query->pc_na, $args->{results}{pc_na}, '.. percentage na reports');
is($query->pc_unknown, $args->{results}{pc_unknown}, '.. percentage unknown reports');
}
if($raw) {
my $version = $args->{args}{version} || '0.50';
my $distro = $args->{args}{dist} || '';
if($args->{args}{format} && $args->{args}{format} eq 'html') {
is($query->{options}{format},$args->{args}{format},'.. format the same: html');
like($raw,qr{<td><a href=(\\)?"javascript:selectReports\('$distro-$version'\);(\\)?">$version</a></td>},'.. got version statement in raw');
ok(1,".. we don't parse html format");
( run in 0.396 second using v1.01-cache-2.11-cpan-624ce96ca49 )