t/Asnmtap/Plugins/SOAP.t

filter: Statementstmt 80.1% 109 / 136 Branchbran 15.0% 3 / 20 Conditioncond 31.5% 18 / 57 MC/DCmcdc 0.0% 0 / 37 Subroutinesub 93.3% 14 / 15 Podpod n/a totaltotal 54.3% 144 / 265 CC 10 SCAR 38.4
CC
10
Cov
61%
actionOnSoapResponse
110.0
BEGIN
1.0
BEGIN
1.0
CRAP 46.4
« blib/lib/ASNMTAP/Time.pm ↑ Summary blib/lib/ASNMTAP/Asnmtap/Plugins/XML.pm »
1 1 ▶use Test::More tests => 25;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 1 ▶BEGIN { require_ok ( 'ASNMTAP::Asnmtap::Plugins::SOAP' ) };
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶BEGIN { use_ok ( 'ASNMTAP::Asnmtap::Plugins::SOAP' ) };
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶BEGIN { use_ok ( 'ASNMTAP::Asnmtap::Plugins::SOAP', qw(:ALL) ) };
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶BEGIN { use_ok ( 'ASNMTAP::Asnmtap::Plugins::SOAP', qw(&get_soap_request) ) };
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶use ASNMTAP::Asnmtap::Plugins v3.002.003;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use ASNMTAP::Asnmtap::Plugins qw(:PLUGINS);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 my $objectPlugins = ASNMTAP::Asnmtap::Plugins->new (
13 _programName => 'SOAP.t ',
14 _programDescription => "Testing ASNMTAP::Asnmtap::Plugins::SOAP",
15 _programVersion => '3.002.003',
16 _programGetOptions => ['proxy:s', 'trendline|T:i'],
17 _timeout => 30,
18 _debug => 0);
19  
20 1 isa_ok( $objectPlugins, 'ASNMTAP::Asnmtap::Plugins' );
21 1 can_ok( $objectPlugins, qw(programName programDescription programVersion getOptionsArgv getOptionsValue debug dumpData printRevision printRevision printUsage printHelp) );
22 1 can_ok( $objectPlugins, qw(appendPerformanceData browseragent SSLversion clientCertificate pluginValue pluginValues proxy timeout setEndTime_and_getResponsTime write_debugfile call_system exit) );
23  
24 1 ▶use SOAP::Lite;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 1 my $proxy = 'http://services.soaplite.com/hibye.cgi';
26 1 my $namespace = 'http://www.soaplite.com/Demo';
27 1 my $methodName = 'hi';
28 1 my $method = SOAP::Data->name($methodName)->attr( {xmlns => $namespace} );
29  
30 1 my %soapService_Register_NS = (
31 'http://schemas.xmlsoap.org/wsdl/mime/' => 'mime',
32 'http://www.w3.org/2001/XMLSchema' => 's'
33 );
34  
35 1 my $xmlContent;
36 my $params;
37  
38 1 my ($returnCode, $xml, $errorStatus);
39  
40 SKIP: {
41 1 ▶ my $ASNMTAP_PROXY = ( exists $ENV{ASNMTAP_PROXY} ) ? $ENV{ASNMTAP_PROXY} : undef;
Branch: 1 branch
BranchTrueFalseTotal
exists $ENV{'ASNMTAP_PROXY'} ? : 0 1 1
42 1 ▶ skip 'Missing ASNMTAP_PROXY', 8 if ( defined $ASNMTAP_PROXY and ( $ASNMTAP_PROXY eq '0.0.0.0' or $ASNMTAP_PROXY eq '' ) );
Branch: 1 branch
BranchTrueFalseTotal
if defined $ASNMTAP_PROXY and $ASNMTAP_PROXY eq "0.0.0.0" || $ASNMTAP_PROXY eq "" 0 1 1
Condition16%1/6
defined $ASNMTAP_PROXY and $ASNMTAP_PROXY eq "0.0.0.0" || $ASNMTAP_PROXY eq ""
!ll&&!rl&&r
100
$ASNMTAP_PROXY eq "0.0.0.0" or $ASNMTAP_PROXY eq ""
l!l&&r!l&&!r
000
MC/DC0%0/3
defined $ASNMTAP_PROXY and $ASNMTAP_PROXY eq "0.0.0.0" || $ASNMTAP_PROXY eq ""
defined $ASNMTAP_PROXY $ASNMTAP_PROXY eq "0.0.0.0" $ASNMTAP_PROXY eq ""
Truth table25%1/4
A and B or C
A= defined $ASNMTAP_PROXYB= $ASNMTAP_PROXY eq "0.0.0.0"C= $ASNMTAP_PROXY eq ""
ABCresult
0XX0
1000
11X1
1011
43  
44 1 ▶ if ( defined $ASNMTAP_PROXY ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $ASNMTAP_PROXY) 0 1 1
45 1 ▶ no warnings 'deprecated';
Subroutine BEGIN: called CC=1 SCAR=0.0
46 0 $objectPlugins->{_getOptionsArgv}->{proxy} = $ASNMTAP_PROXY;
47 }
48  
49 1 ($returnCode, $xml) = get_soap_request (
50 asnmtapInherited => \$objectPlugins,
51 proxy => $proxy,
52 namespace => $namespace,
53 registerNamespace => \%soapService_Register_NS,
54 method => $method,
55 xmlContent => $xmlContent,
56 params => $params,
57 cookies => 1,
58 perfdataLabel => 'SOAP.t'
59 );
60  
61 1 ok ($returnCode == 0, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): normal');
62  
63 1 ($returnCode, $xml) = get_soap_request (
64 asnmtapInherited => \$objectPlugins,
65 custom => \&actionOnSoapResponse,
66 proxy => $proxy,
67 namespace => $namespace,
68 registerNamespace => \%soapService_Register_NS,
69 method => $method,
70 xmlContent => $xmlContent,
71 params => $params,
72 cookies => 1,
73 perfdataLabel => 'SOAP.t'
74 );
75  
76 1 ▶ $errorStatus = ($returnCode == 0 && ! defined $objectPlugins->pluginValue ('result'));
Condition33%1/3
$returnCode == 0 && !defined($objectPlugins->pluginValue('result'))
!ll&&!rl&&r
100
MC/DC0%0/2
$returnCode == 0 && !defined($objectPlugins->pluginValue('result'))
$returnCode == 0 !defined($objectPlugins->pluginValue('result'))
Truth table33%1/3
A && not(B)
A= $returnCode == 0B= !defined($objectPlugins->pluginValue('result'))
ABresult
0X0
100
111
77 1 ok ($errorStatus, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): with custom');
78  
79 1 ($returnCode, $xml) = get_soap_request (
80 asnmtapInherited => \$objectPlugins,
81 custom => \&actionOnSoapResponse,
82 customArguments => 1,
83 proxy => $proxy,
84 namespace => $namespace,
85 registerNamespace => \%soapService_Register_NS,
86 method => $method,
87 xmlContent => $xmlContent,
88 params => $params,
89 cookies => 1,
90 perfdataLabel => 'SOAP.t'
91 );
92  
93 1 ▶ $errorStatus = ($returnCode == 0 && $objectPlugins->pluginValue ('result') eq 'SCALAR');
Condition33%1/3
$returnCode == 0 && $objectPlugins->pluginValue('result') eq 'SCALAR'
!ll&&!rl&&r
100
MC/DC0%0/2
$returnCode == 0 && $objectPlugins->pluginValue('result') eq 'SCALAR'
$returnCode == 0 $objectPlugins->pluginValue('result') eq 'SCALAR'
Truth table33%1/3
A && B
A= $returnCode == 0B= $objectPlugins->pluginValue('result') eq 'SCALAR'
ABresult
0X0
100
111
94 1 ok ($errorStatus, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): with custom and customArguments, scalar');
95  
96 1 ($returnCode, $xml) = get_soap_request (
97 asnmtapInherited => \$objectPlugins,
98 custom => \&actionOnSoapResponse,
99 customArguments => [1, 2, 3],
100 proxy => $proxy,
101 namespace => $namespace,
102 registerNamespace => \%soapService_Register_NS,
103 method => $method,
104 xmlContent => $xmlContent,
105 params => $params,
106 cookies => 1,
107 perfdataLabel => 'SOAP.t'
108 );
109  
110 1 ▶ $errorStatus = ($returnCode == 0 && $objectPlugins->pluginValue ('result') eq 'ARRAY');
Condition33%1/3
$returnCode == 0 && $objectPlugins->pluginValue('result') eq 'ARRAY'
!ll&&!rl&&r
100
MC/DC0%0/2
$returnCode == 0 && $objectPlugins->pluginValue('result') eq 'ARRAY'
$returnCode == 0 $objectPlugins->pluginValue('result') eq 'ARRAY'
Truth table33%1/3
A && B
A= $returnCode == 0B= $objectPlugins->pluginValue('result') eq 'ARRAY'
ABresult
0X0
100
111
111 1 ok ($errorStatus, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): with custom and customArguments, array');
112  
113 1 ($returnCode, $xml) = get_soap_request (
114 asnmtapInherited => \$objectPlugins,
115 custom => \&actionOnSoapResponse,
116 customArguments => {a=>1, b=>2, c=>3},
117 proxy => $proxy,
118 namespace => $namespace,
119 registerNamespace => \%soapService_Register_NS,
120 method => $method,
121 xmlContent => $xmlContent,
122 params => $params,
123 cookies => 1,
124 perfdataLabel => 'SOAP.t'
125 );
126  
127 1 ▶ $errorStatus = ($returnCode == 0 && $objectPlugins->pluginValue ('result') eq 'HASH');
Condition33%1/3
$returnCode == 0 && $objectPlugins->pluginValue('result') eq 'HASH'
!ll&&!rl&&r
100
MC/DC0%0/2
$returnCode == 0 && $objectPlugins->pluginValue('result') eq 'HASH'
$returnCode == 0 $objectPlugins->pluginValue('result') eq 'HASH'
Truth table33%1/3
A && B
A= $returnCode == 0B= $objectPlugins->pluginValue('result') eq 'HASH'
ABresult
0X0
100
111
128 1 ok ($errorStatus, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): with custom and customArguments, hash');
129  
130 1 ($returnCode, $xml) = get_soap_request (
131 asnmtapInherited => \$objectPlugins,
132 custom => \&actionOnSoapResponse,
133 customArguments => \1,
134 proxy => $proxy,
135 namespace => $namespace,
136 registerNamespace => \%soapService_Register_NS,
137 method => $method,
138 xmlContent => $xmlContent,
139 params => $params,
140 cookies => 1,
141 perfdataLabel => 'SOAP.t'
142 );
143  
144 1 ▶ $errorStatus = ($returnCode == 0 && $objectPlugins->pluginValue ('result') eq 'REF SCALAR');
Condition33%1/3
$returnCode == 0 && $objectPlugins->pluginValue('result') eq 'REF SCALAR'
!ll&&!rl&&r
100
MC/DC0%0/2
$returnCode == 0 && $objectPlugins->pluginValue('result') eq 'REF SCALAR'
$returnCode == 0 $objectPlugins->pluginValue('result') eq 'REF SCALAR'
Truth table33%1/3
A && B
A= $returnCode == 0B= $objectPlugins->pluginValue('result') eq 'REF SCALAR'
ABresult
0X0
100
111
145 1 ok ($errorStatus, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): with custom and customArguments, ref scalar');
146  
147 1 ($returnCode, $xml) = get_soap_request (
148 asnmtapInherited => \$objectPlugins,
149 custom => \&actionOnSoapResponse,
150 customArguments => \[1, 2, 3],
151 proxy => $proxy,
152 namespace => $namespace,
153 registerNamespace => \%soapService_Register_NS,
154 method => $method,
155 xmlContent => $xmlContent,
156 params => $params,
157 cookies => 1,
158 perfdataLabel => 'SOAP.t'
159 );
160  
161 1 ▶ $errorStatus = ($returnCode == 0 && $objectPlugins->pluginValue ('result') eq 'REF ARRAY');
Condition33%1/3
$returnCode == 0 && $objectPlugins->pluginValue('result') eq 'REF ARRAY'
!ll&&!rl&&r
100
MC/DC0%0/2
$returnCode == 0 && $objectPlugins->pluginValue('result') eq 'REF ARRAY'
$returnCode == 0 $objectPlugins->pluginValue('result') eq 'REF ARRAY'
Truth table33%1/3
A && B
A= $returnCode == 0B= $objectPlugins->pluginValue('result') eq 'REF ARRAY'
ABresult
0X0
100
111
162 1 ok ($errorStatus, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): with custom and customArguments, ref array');
163  
164 1 ($returnCode, $xml) = get_soap_request (
165 asnmtapInherited => \$objectPlugins,
166 custom => \&actionOnSoapResponse,
167 customArguments => \{a=>1, b=>2, c=>3},
168 proxy => $proxy,
169 namespace => $namespace,
170 registerNamespace => \%soapService_Register_NS,
171 method => $method,
172 xmlContent => $xmlContent,
173 params => $params,
174 cookies => 1,
175 perfdataLabel => 'SOAP.t'
176 );
177  
178 1 ▶ $errorStatus = ($returnCode == 0 && $objectPlugins->pluginValue ('result') eq 'REF HASH');
Condition33%1/3
$returnCode == 0 && $objectPlugins->pluginValue('result') eq 'REF HASH'
!ll&&!rl&&r
100
MC/DC0%0/2
$returnCode == 0 && $objectPlugins->pluginValue('result') eq 'REF HASH'
$returnCode == 0 $objectPlugins->pluginValue('result') eq 'REF HASH'
Truth table33%1/3
A && B
A= $returnCode == 0B= $objectPlugins->pluginValue('result') eq 'REF HASH'
ABresult
0X0
100
111
179 1 ok ($errorStatus, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): with custom and customArguments, ref hash');
180 };
181  
182 TODO: {
183 1 ($returnCode, $xml) = get_soap_request (
184 asnmtapInherited => \$objectPlugins
185 );
186  
187 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing SOAP parameter proxy\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ proxy/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ proxy/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ proxy/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ proxy/
ABresult
0X0
100
111
188 1 ok ($errorStatus, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): Missing SOAP parameter proxy');
189  
190 1 ($returnCode, $xml) = get_soap_request (
191 asnmtapInherited => \$objectPlugins,
192 proxy => $proxy
193 );
194  
195 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing SOAP parameter namespace\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ namespace/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ namespace/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ namespace/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ namespace/
ABresult
0X0
100
111
196 1 ok ($errorStatus, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): Missing SOAP parameter namespace');
197  
198 1 ($returnCode, $xml) = get_soap_request (
199 asnmtapInherited => \$objectPlugins,
200 proxy => $proxy,
201 namespace => $namespace
202 );
203  
204 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing SOAP parameter method\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ method/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ method/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ method/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ method/
ABresult
0X0
100
111
205 1 ok ($errorStatus, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): Missing SOAP parameter method');
206  
207 1 ($returnCode, $xml) = get_soap_request (
208 asnmtapInherited => \$objectPlugins,
209 proxy => $proxy,
210 namespace => $namespace,
211 registerNamespace => '%soapService_Register_NS'
212 );
213  
214 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing SOAP parameter registerNamespace\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ registerNamespace/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ registerNamespace/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ registerNamespace/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ registerNamespace/
ABresult
0X0
100
111
215 1 ok ($errorStatus, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): Missing SOAP parameter registerNamespace');
216  
217 1 ($returnCode, $xml) = get_soap_request (
218 asnmtapInherited => \$objectPlugins,
219 proxy => $proxy,
220 namespace => $namespace,
221 registerNamespace => \%soapService_Register_NS,
222 method => $method,
223 readable => 2
224 );
225  
226 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QSOAP parameter readable must be 0 or 1\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ readable\ must\ be\ 0\ or\ 1/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ readable\ must\ be\ 0\ or\ 1/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ readable\ must\ be\ 0\ or\ 1/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ readable\ must\ be\ 0\ or\ 1/
ABresult
0X0
100
111
227 1 ok ($errorStatus, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): SOAP parameter readable must be 0 or 1');
228  
229 1 ($returnCode, $xml) = get_soap_request (
230 asnmtapInherited => \$objectPlugins,
231 proxy => $proxy,
232 namespace => $namespace,
233 registerNamespace => \%soapService_Register_NS,
234 method => $method,
235 readline => 1,
236 cookies => 2
237 );
238  
239 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QSOAP parameter cookies must be 0 or 1\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ cookies\ must\ be\ 0\ or\ 1/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ cookies\ must\ be\ 0\ or\ 1/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ cookies\ must\ be\ 0\ or\ 1/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ cookies\ must\ be\ 0\ or\ 1/
ABresult
0X0
100
111
240 1 ok ($errorStatus, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): SOAP parameter cookies must be 0 or 1');
241  
242 1 ($returnCode, $xml) = get_soap_request (
243 asnmtapInherited => \$objectPlugins,
244 proxy => $proxy,
245 namespace => $namespace,
246 registerNamespace => \%soapService_Register_NS,
247 method => $method,
248 cookies => 1
249 );
250  
251 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing SOAP parameter perfdataLabel\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ perfdataLabel/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ perfdataLabel/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ perfdataLabel/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Missing\ SOAP\ parameter\ perfdataLabel/
ABresult
0X0
100
111
252 1 ok ($errorStatus, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): Missing SOAP parameter perfdataLabel');
253  
254 1 ($returnCode, $xml) = get_soap_request (
255 asnmtapInherited => \$objectPlugins,
256 proxy => $proxy,
257 namespace => $namespace,
258 registerNamespace => \%soapService_Register_NS,
259 method => $method,
260 xmlContent => $xmlContent,
261 params => $params,
262 cookies => 1,
263 perfdataLabel => 'SOAP.t',
264 PATCH_HTTP_KEEPALIVE => 2
265 );
266  
267 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QSOAP parameter PATCH_HTTP_KEEPALIVE must be 0 or 1\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ PATCH_HTTP_KEEPALIVE\ must\ be\ 0\ or\ 1/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ PATCH_HTTP_KEEPALIVE\ must\ be\ 0\ or\ 1/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ PATCH_HTTP_KEEPALIVE\ must\ be\ 0\ or\ 1/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ PATCH_HTTP_KEEPALIVE\ must\ be\ 0\ or\ 1/
ABresult
0X0
100
111
268 1 ok ($errorStatus, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): SOAP parameter PATCH_HTTP_KEEPALIVE must be 0 or 1');
269  
270 1 ($returnCode, $xml) = get_soap_request (
271 asnmtapInherited => \$objectPlugins,
272 proxy => $proxy,
273 namespace => $namespace,
274 registerNamespace => \%soapService_Register_NS,
275 method => $method,
276 xmlContent => $xmlContent,
277 params => $params,
278 cookies => 1,
279 perfdataLabel => 'SOAP.t',
280 WSRF => 2
281 );
282  
283 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QSOAP parameter WSRF must be 0 or 1\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ WSRF\ must\ be\ 0\ or\ 1/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ WSRF\ must\ be\ 0\ or\ 1/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ WSRF\ must\ be\ 0\ or\ 1/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ WSRF\ must\ be\ 0\ or\ 1/
ABresult
0X0
100
111
284 1 ok ($errorStatus, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): SOAP parameter WSRF must be 0 or 1');
285  
286 1 ($returnCode, $xml) = get_soap_request (
287 asnmtapInherited => \$objectPlugins,
288 proxy => $proxy,
289 namespace => $namespace,
290 registerNamespace => \%soapService_Register_NS,
291 method => $method,
292 xmlContent => $xmlContent,
293 params => $params,
294 cookies => 1,
295 perfdataLabel => 'SOAP.t',
296 TYPE_ERROR_RETURN => 'UNKNOWN'
297 );
298  
299 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QSOAP parameter TYPE_ERROR_RETURN must be [REPLACE|APPEND|INSERT|COMMA_APPEND|COMMA_INSERT]\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ TYPE_ERROR_RETURN\ must\ be\ \[REPLACE\|APPEND\|INSERT\|COMMA_APPEND\|COMMA_INSERT\]/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ TYPE_ERROR_RETURN\ must\ be\ \[REPLACE\|APPEND\|INSERT\|COMMA_APPEND\|COMMA_INSERT\]/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ TYPE_ERROR_RETURN\ must\ be\ \[REPLACE\|APPEND\|INSERT\|COMMA_APPEND\|COMMA_INSERT\]/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /SOAP\ parameter\ TYPE_ERROR_RETURN\ must\ be\ \[REPLACE\|APPEND\|INSERT\|COMMA_APPEND\|COMMA_INSERT\]/
ABresult
0X0
100
111
300 1 ok ($errorStatus, 'ASNMTAP::Asnmtap::Plugins::SOAP::get_soap_request(): SOAP parameter TYPE_ERROR_RETURN must be [REPLACE|APPEND|INSERT|COMMA_APPEND|COMMA_INSERT]');
301 }
302  
303 1 ▶no warnings 'deprecated';
Subroutine BEGIN: called CC=1 SCAR=0.0
304 1 $objectPlugins->{_pluginValues}->{stateValue} = $ERRORS{OK};
305 1 $objectPlugins->{_pluginValues}->{stateError} = $STATE{$ERRORS{OK}};
306 1 $objectPlugins->exit (0);
307  
308 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
309  
310 0 ▶sub actionOnSoapResponse {
Subroutine actionOnSoapResponse: not called CC=10 SCAR=47.0
311 0 my ($asnmtapInherited, $som, $arguments) = @_;
312  
313 0 my $result;
314  
315 0 ▶ if (defined $arguments) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $arguments) 0 0 0
316 0 for ( ref $arguments ) {
317 /^REF$/ &&
318 0 ▶ do {
Branch: 1 branch
BranchTrueFalseTotal
/^REF$/ and do { foreach $_ (ref $$arguments) { /^ARRAY$/ and do { $result = "REF ARRAY"; last }; /^HASH$/ and do { $result = "REF HASH"; last }; } ; last } 0 0 0
319 0 for ( ref $$arguments ) {
320 /^ARRAY$/ &&
321 0 ▶ do { $result = 'REF ARRAY'; last; };
Branch: 1 branch
BranchTrueFalseTotal
/^ARRAY$/ and do { $result = "REF ARRAY"; last } 0 0 0
322 /^HASH$/ &&
323 0 ▶ do { $result = 'REF HASH'; last; };
Branch: 1 branch
BranchTrueFalseTotal
/^HASH$/ and do { $result = "REF HASH"; last } 0 0 0
324 }
325  
326 0 last;
327 };
328 /^ARRAY$/ &&
329 0 ▶ do { $result = 'ARRAY'; last; };
Branch: 1 branch
BranchTrueFalseTotal
/^ARRAY$/ and do { $result = "ARRAY"; last } 0 0 0
330 /^HASH$/ &&
331 0 ▶ do { $result = 'HASH'; last; };
Branch: 1 branch
BranchTrueFalseTotal
/^HASH$/ and do { $result = "HASH"; last } 0 0 0
332 /^SCALAR$/ &&
333 0 ▶ do { $result = 'REF SCALAR'; last; };
Branch: 1 branch
BranchTrueFalseTotal
/^SCALAR$/ and do { $result = "REF SCALAR"; last } 0 0 0
334 0 $result = 'SCALAR';
335 }
336 }
337  
338 0 my $returnCode = $ERRORS{OK};
339 0 $asnmtapInherited->pluginValues ( { stateValue => $returnCode, result => $result }, $TYPE{APPEND} );
340 0 return ($returnCode);
341 }
342  
343 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
344  
« blib/lib/ASNMTAP/Time.pm ↑ Summary blib/lib/ASNMTAP/Asnmtap/Plugins/XML.pm »