Branch Coverage

blib/lib/Test/Rail/Parser.pm
Criterion Covered Total %
branch 148 188 78.7


line true false branch
63 1 0 if not $tropts->{'run'} and $tropts->{'plan'}
80 56 0 if defined $tropts->{'browser'}
84 52 4 if (not defined $tropts->{'project_id'}) { }
88 0 52 if $tropts->{'project'} == -500
89 0 52 unless ($tropts->{'project'})
98 0 4 unless $tropts->{'project'}
117 18 38 if $tropts->{'test_bad_status'}
118 0 56 unless scalar @ok
120 0 56 unless scalar @not_ok
122 0 56 unless scalar @skip
124 0 56 unless scalar @todof
126 0 56 unless scalar @todop
128 0 56 unless scalar @retest
132 1 55 unless scalar @tbad or not $tropts->{'test_bad_status'}
144 0 29 if $tropts->{'testsuite_id'} and $tropts->{'testsuite'}
147 3 52 if ($tropts->{'testsuite'})
150 0 3 unless $ts
164 3 13 if (scalar @$configz2create and $tropts->{'config_group'})
167 3 0 unless (ref $cgroup eq "HASH")
173 0 3 unless ref $cgroup eq "HASH"
184 0 55 unless (&reftype($config_ids) || 'undef') eq "ARRAY"
188 0 55 if $num_bogus
192 21 34 if ($tropts->{'plan'}) { }
195 0 21 if ($tropts->{'plan_id'}) { }
206 1 13 if ref $plan eq "HASH" and $plan->{'is_completed'} and not $tropts->{'testsuite_id'}
207 12 8 if ($plan and not $plan->{'is_completed'}) { }
212 10 2 if (defined $run and (&reftype($run) || 'undef') eq "HASH")
221 8 0 if $tropts->{'testsuite_id'}
225 0 8 unless $tropts->{'plan'}
234 1 14 if ref $run eq "HASH" and $run->{'is_completed'} and not $tropts->{'testsuite_id'}
235 12 21 if (defined $run and (&reftype($run) || 'undef') eq "HASH" and not $run->{'is_completed'})
245 30 23 if ($tropts->{'testsuite_id'} and not $tropts->{'run_id'})
248 9 21 if ($tropts->{'sections'})
253 0 9 unless (&reftype($tropts->{'sections'}) || 'undef') eq "ARRAY"
283 9 0 if (&reftype($section_cases) || 'undef') eq "ARRAY"
288 5 24 if (scalar @$cases) { }
295 9 20 if ($tropts->{'plan'}) { }
305 9 0 if exists $plan->{'runs'} and (&reftype($plan->{'runs'}) || 'undef') eq "ARRAY" and scalar @{$plan->{'runs'};}
306 9 0 if (defined $run and (&reftype($run) || 'undef') eq "HASH")
321 20 0 if (defined $run and (&reftype($run) || 'undef') eq "HASH")
327 0 29 unless $tropts->{'run_id'}
332 1 51 unless $tropts->{'run_id'}
335 33 18 if (defined $self->{'_iterator'}{'command'} and &reftype($self->{'_iterator'}{'command'}) eq 'ARRAY') { }
352 13 38 if defined $tropts->{'step_results'}
355 1 50 if ref $tropts->{'step_results'} ne "HASH" and $sr_name
379 1 86 if ($status_override)
381 0 1 unless defined $self->{'tr_opts'}{$status_override}{'id'}
384 1 0 if $self->{'tr_opts'}{$status_override}
388 1 0 if $self->{'global_status'}
394 16 71 if not $self->{'file'} and $file
405 0 77 if ($line =~ /^#TESTDESC:\s*/)
416 45 24 if ($self->{'track_time'})
424 12 33 defined $self->{'tr_opts'}{'result_options'}{'elapsed'} ? :
434 45 24 if $self->{'track_time'}
438 57 12 unless ($self->{'tr_opts'}{'step_results'})
441 57 0 if $self->{'tr_opts'}{'debug'}
449 0 12 if $self->{'tr_opts'}{'debug'} and not $self->{'tr_opts'}{'step_results'}
456 9 3 if ($test->is_actual_ok) { }
459 1 8 if ($test->has_skip)
466 4 5 if ($test->has_todo)
476 1 2 if ($test->has_todo)
490 5 7 if $todo_reason
495 6 6 unless defined $self->{'tr_opts'}{'result_custom_options'}
497 6 6 unless defined $self->{'tr_opts'}{'result_custom_options'}{$sr_sys_name}
504 10 2 if $self->{'track_time'}
511 12 0 if $self->{'tr_opts'}{'debug'}
521 1 0 if ($self->{'tr_opts'}{'step_results'})
541 29 16 if ($self->{'track_time'})
549 0 45 unless (defined $self->{'file'})
562 29 16 if $self->has_problems
563 1 2 if (not $self->tests_run || $self->is_good_plan and $self->{'tr_opts'}{'test_bad_status'})
570 5 5 if $self->todo_passed and not $self->failed and $self->is_good_plan
574 3 0 if $todo_failed and not $self->failed and $self->is_good_plan
579 8 37 if $self->skip_all
583 1 44 if $self->{'global_status'}
586 6 2 if (not $self->is_good_plan || $self->{'is_bailout'} and defined $self->tests_run and defined $self->tests_planned)
596 3 3 if ($self->{'tr_opts'}{'step_results'})
629 0 45 unless $self->{'tr_opts'}{'debug'}
637 43 0 if $plan->as_string
647 13 32 if $options->{'elapsed'}
654 1 44 if (not defined $tc or (&reftype($tc) || 'undef') ne "HASH")
660 44 0 $tc ? :
665 44 0 if ($tc)
674 43 1 if (&reftype($cres) || 'undef') eq "HASH"
677 1 43 if (not $tc or (&reftype($cres) || 'undef') ne "HASH")
697 2 76 if ($hours_elapsed) { }
703 3 75 if ($mins_elapsed) { }
709 50 28 if $datestr eq "0m 0s"
715 37 8 unless $self->{'tr_opts'}{'autoclose'}
716 4 4 $self->{'tr_opts'}{'plan'} ? :
720 4 4 $self->{'tr_opts'}{'plan'} ? :
722 4 4 if ($is_plan)
728 1 3 if $plan_summary->{'totals'}{'Untested'} + $plan_summary->{'totals'}{'Retest'}
737 3 1 if $run_summary->{'run_status'}{'Untested'} + $run_summary->{'run_status'}{'Retest'}