t/Asnmtap/Plugins/IO.t

filter: Statementstmt 100% 82 / 82 Branchbran n/a Conditioncond 33.3% 14 / 42 MC/DCmcdc 0.0% 0 / 28 Subroutinesub 100% 12 / 12 Podpod n/a totaltotal 65.8% 108 / 164 CC 1 SCAR 0.0
CC
1
Cov
77%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« t/Templates/Plugins/WebTransact/check_template-WebTransact-XML-Cactus-parser.t ↑ Summary t/Asnmtap/Plugins/XML.t »
1 1 ▶use Test::More tests => 21;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 1 ▶BEGIN { require_ok ( 'ASNMTAP::Asnmtap::Plugins::IO' ) };
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶BEGIN { use_ok ( 'ASNMTAP::Asnmtap::Plugins::IO' ) };
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶BEGIN { use_ok ( 'ASNMTAP::Asnmtap::Plugins::IO', 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::IO', qw(:SOCKET) ) };
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 TODO: {
10 1 ▶ use ASNMTAP::Asnmtap::Plugins v3.002.003;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶ use ASNMTAP::Asnmtap::Plugins qw(:PLUGINS);
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 my $objectPlugins = ASNMTAP::Asnmtap::Plugins->new (
14 _programName => 'IO.t',
15 _programDescription => 'Test ASNMTAP::Asnmtap::Plugins::IO',
16 _programVersion => '3.002.003',
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 call_system) );
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 my ($returnCode, $errorStatus);
25  
26 1 $returnCode = scan_socket_info ( asnmtapInherited => \$objectPlugins );
27 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing attribute protocol\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ protocol/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ protocol/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ protocol/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ protocol/
ABresult
0X0
100
111
28 1 ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::protocol: Missing attribute protocol' );
29  
30 1 $returnCode = scan_socket_info (
31 asnmtapInherited => \$objectPlugins,
32 protocol => 'rfc'
33 );
34  
35 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QWrong value for attribute protocol: rfc\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Wrong\ value\ for\ attribute\ protocol\:\ rfc/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Wrong\ value\ for\ attribute\ protocol\:\ rfc/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Wrong\ value\ for\ attribute\ protocol\:\ rfc/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Wrong\ value\ for\ attribute\ protocol\:\ rfc/
ABresult
0X0
100
111
36 1 ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::protocol: Wrong value for attribute protocol: rfc' );
37  
38 1 $returnCode = scan_socket_info (
39 asnmtapInherited => \$objectPlugins,
40 protocol => 'tcp'
41 );
42  
43 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing attribute host\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ host/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ host/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ host/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ host/
ABresult
0X0
100
111
44 1 ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::host: Missing attribute host' );
45  
46 1 $returnCode = scan_socket_info (
47 asnmtapInherited => \$objectPlugins,
48 protocol => 'tcp',
49 host => 'host name'
50 );
51  
52 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QWrong value for attribute host: host name\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Wrong\ value\ for\ attribute\ host\:\ host\ name/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Wrong\ value\ for\ attribute\ host\:\ host\ name/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Wrong\ value\ for\ attribute\ host\:\ host\ name/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Wrong\ value\ for\ attribute\ host\:\ host\ name/
ABresult
0X0
100
111
53 1 ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::host: Wrong value for attribute host: host name' );
54  
55 1 $returnCode = scan_socket_info (
56 asnmtapInherited => \$objectPlugins,
57 protocol => 'tcp',
58 host => 'smtp.citap.com',
59 );
60  
61 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing attribute port\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ port/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ port/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ port/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ port/
ABresult
0X0
100
111
62 1 ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::port: Missing attribute port' );
63  
64 1 $returnCode = scan_socket_info (
65 asnmtapInherited => \$objectPlugins,
66 protocol => 'tcp',
67 host => 'smtp.citap.com',
68 port => 'pop3(110)'
69 );
70  
71 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QWrong value for attribute port: pop3(110)\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Wrong\ value\ for\ attribute\ port\:\ pop3\(110\)/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Wrong\ value\ for\ attribute\ port\:\ pop3\(110\)/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Wrong\ value\ for\ attribute\ port\:\ pop3\(110\)/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Wrong\ value\ for\ attribute\ port\:\ pop3\(110\)/
ABresult
0X0
100
111
72 1 ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::port: Wrong value for attribute port: pop3(110)' );
73  
74 1 $returnCode = scan_socket_info (
75 asnmtapInherited => \$objectPlugins,
76 protocol => 'tcp',
77 host => 'smtp.citap.com',
78 port => 110
79 );
80  
81 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing attribute service\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ service/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ service/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ service/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ service/
ABresult
0X0
100
111
82 1 ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::service: Missing attribute service' );
83  
84 1 $returnCode = scan_socket_info (
85 asnmtapInherited => \$objectPlugins,
86 protocol => 'tcp',
87 host => 'smtp.citap.com',
88 port => 110,
89 service => 'pop3'
90 );
91  
92 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing attribute username\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ username/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ username/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ username/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ username/
ABresult
0X0
100
111
93 1 ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::username: Missing attribute username' );
94  
95 1 $returnCode = scan_socket_info (
96 asnmtapInherited => \$objectPlugins,
97 protocol => 'tcp',
98 host => 'smtp.citap.com',
99 port => 110,
100 service => 'pop3',
101 POP3 => { username => 'username' },
102 socketTimeout => 'timeout'
103 );
104  
105 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing attribute password\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ password/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ password/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ password/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ password/
ABresult
0X0
100
111
106 1 ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::password: Missing attribute password' );
107  
108 1 $returnCode = scan_socket_info (
109 asnmtapInherited => \$objectPlugins,
110 protocol => 'tcp',
111 host => 'smtp.citap.com',
112 port => 110,
113 service => 'pop3',
114 POP3 => { username => 'username', password => 'password' },
115 socketTimeout => 'timeout'
116 );
117  
118 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing attribute serviceReady\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ serviceReady/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ serviceReady/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ serviceReady/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ serviceReady/
ABresult
0X0
100
111
119 1 ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::serviceReady: Missing attribute serviceReady' );
120  
121 1 $returnCode = scan_socket_info (
122 asnmtapInherited => \$objectPlugins,
123 protocol => 'tcp',
124 host => 'smtp.citap.com',
125 port => 110,
126 service => 'pop3',
127 POP3 => { username => 'username', password => 'password', serviceReady => 'serviceReady' },
128 socketTimeout => 'timeout'
129 );
130  
131 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing attribute passwordRequired\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ passwordRequired/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ passwordRequired/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ passwordRequired/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ passwordRequired/
ABresult
0X0
100
111
132 1 ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::passwordRequired: Missing attribute passwordRequired' );
133  
134 1 $returnCode = scan_socket_info (
135 asnmtapInherited => \$objectPlugins,
136 protocol => 'tcp',
137 host => 'smtp.citap.com',
138 port => 110,
139 service => 'pop3',
140 POP3 => { username => 'username', password => 'password', serviceReady => 'serviceReady', passwordRequired => 'passwordRequired' },
141 socketTimeout => 'timeout'
142 );
143  
144 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing attribute mailMessages\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ mailMessages/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ mailMessages/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ mailMessages/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ mailMessages/
ABresult
0X0
100
111
145 1 ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::mailMessages: Missing attribute mailMessages' );
146  
147 1 $returnCode = scan_socket_info (
148 asnmtapInherited => \$objectPlugins,
149 protocol => 'tcp',
150 host => 'smtp.citap.com',
151 port => 110,
152 service => 'pop3',
153 POP3 => { username => 'username', password => 'password', serviceReady => 'serviceReady', passwordRequired => 'passwordRequired', mailMessages => 'mailMessages' },
154 socketTimeout => 'timeout'
155 );
156  
157 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QMissing attribute closingSession\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ closingSession/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ closingSession/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ closingSession/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Missing\ attribute\ closingSession/
ABresult
0X0
100
111
158 1 ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::closingSession: Missing attribute closingSession' );
159  
160 1 $returnCode = scan_socket_info (
161 asnmtapInherited => \$objectPlugins,
162 protocol => 'tcp',
163 host => 'smtp.citap.com',
164 port => 110,
165 service => 'pop3',
166 POP3 => { username => 'username', password => 'password', serviceReady => 'serviceReady', passwordRequired => 'passwordRequired', mailMessages => 'mailMessages', closingSession => 'closingSession' },
167 socketTimeout => 'timeout'
168 );
169
170 1 ▶ $errorStatus = ($returnCode == 3 && $objectPlugins->pluginValue ('error') =~ /\QWrong value for attribute socketTimeout: timeout\E/);
Condition33%1/3
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Wrong\ value\ for\ attribute\ socketTimeout\:\ timeout/
!ll&&!rl&&r
001
MC/DC0%0/2
$returnCode == 3 && $objectPlugins->pluginValue('error') =~ /Wrong\ value\ for\ attribute\ socketTimeout\:\ timeout/
$returnCode == 3 $objectPlugins->pluginValue('error') =~ /Wrong\ value\ for\ attribute\ socketTimeout\:\ timeout/
Truth table33%1/3
A && B
A= $returnCode == 3B= $objectPlugins->pluginValue('error') =~ /Wrong\ value\ for\ attribute\ socketTimeout\:\ timeout/
ABresult
0X0
100
111
171 1 ok ( $errorStatus, 'ASNMTAP::Asnmtap::Plugins::IO::scan_socket_info::socketTimeout: Wrong value for attribute socketTimeout: timeout' );
172  
173 1 ▶ no warnings 'deprecated';
Subroutine BEGIN: called CC=1 SCAR=0.0
174 1 $objectPlugins->{_pluginValues}->{stateValue} = $ERRORS{OK};
175 1 $objectPlugins->{_pluginValues}->{stateError} = $STATE{$ERRORS{OK}};
176 1 $objectPlugins->exit (0);
177 }
« t/Templates/Plugins/WebTransact/check_template-WebTransact-XML-Cactus-parser.t ↑ Summary t/Asnmtap/Plugins/XML.t »