Branch Coverage

blib/lib/Tapper/Cmd/Testrun.pm
Criterion Covered Total %
branch 42 78 53.8


line true false branch
29 0 10 unless (ref $plan)
34 0 10 unless (ref $plan eq 'HASH')
43 35 10 if lc $_ ne 'preconditions'
46 0 10 unless $plan->{'requested_hosts_all'}
55 4 6 if ($plan->{'requested_hosts_any'})
71 4 6 if ($plan->{'requested_features_any'})
79 0 10 unless (grep {$_ =~ /^requested/i;} keys %$plan)
99 0 23 unless $received_args
117 19 4 if ($args{'requested_hosts'} and not $args{'requested_host_ids'})
118 5 14 ref $args{'requested_hosts'} eq 'ARRAY' ? :
120 0 24 unless $host_result
121 24 0 if $host_result
125 23 0 unless ($args{'queue_id'})
128 0 23 unless $queue_result->count
134 4 19 if ($args{'requested_features'})
139 4 0 ref $args{'requested_features'} eq 'ARRAY' ? :
150 1 22 if (exists $args{'notify'})
154 1 0 if (lc $args{'notify'} eq any('pass', 'ok', 'success')) { }
0 0 elsif (lc $args{'notify'} eq any('fail', 'not_ok', 'error')) { }
174 0 23 if (wantarray) { }
178 0 23 if ($exception)
194 0 1 if $args{'owner'}
203 1 0 if ($testrun->testrun_scheduling)
204 0 1 if $testrun->testrun_scheduling->status eq 'running'
206 1 0 if ($testrun->testrun_scheduling->requested_hosts->count)
211 1 0 if ($testrun->testrun_scheduling->requested_features->count)
225 1 0 unless $args
238 0 0 if ($testrun and $testrun->testrun_id)
252 0 0 if ($testrun and $testrun->testrun_id)
263 1 1 if ($comment)
266 0 2 unless my $testrun_result = $self->schema->resultset('Testrun')->find($testrun_id)
267 1 1 if ($testrun_result->testrun_scheduling->status eq 'schedule' or $testrun_result->testrun_scheduling->status eq 'prepare') { }
1 0 elsif ($testrun_result->testrun_scheduling->status eq 'running') { }
289 0 1 unless $testrun
295 0 1 if ($reportgroup->count > 0)
299 0 0 if $group_element->primaryreport
303 0 1 if ($result->{'status'} eq 'finished')
305 0 0 unless defined $stats
308 0 0 if ($stats->success_ratio < 100) { }