mu 5.7.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Mu_Gem.html +1591 -0
- data/bin/mu +11 -0
- data/lib/mu.rb +65 -0
- data/lib/mu/api/ddt.rb +233 -0
- data/lib/mu/api/homepage.rb +54 -0
- data/lib/mu/api/muapi.rb +231 -0
- data/lib/mu/api/netconfig.rb +233 -0
- data/lib/mu/api/scale.rb +199 -0
- data/lib/mu/api/system.rb +40 -0
- data/lib/mu/client.rb +31 -0
- data/lib/mu/command.rb +28 -0
- data/lib/mu/command/api.rb +95 -0
- data/lib/mu/command/cmd_appid.rb +486 -0
- data/lib/mu/command/cmd_cli.rb +151 -0
- data/lib/mu/command/cmd_ddt.rb +449 -0
- data/lib/mu/command/cmd_homepage.rb +146 -0
- data/lib/mu/command/cmd_muapi.rb +361 -0
- data/lib/mu/command/cmd_netconfig.rb +262 -0
- data/lib/mu/command/cmd_runscale.rb +533 -0
- data/lib/mu/command/cmd_runscenario.rb +258 -0
- data/lib/mu/command/cmd_runverify.rb +336 -0
- data/lib/mu/command/cmd_scale.rb +333 -0
- data/lib/mu/command/cmd_system.rb +127 -0
- data/lib/mu/command/curl.rb +246 -0
- data/lib/mu/command/help.rb +29 -0
- data/lib/mu/curl/error.rb +54 -0
- data/lib/mu/curl/verify.rb +137 -0
- data/lib/mu/helper.rb +55 -0
- data/lib/mu/http_helper.rb +232 -0
- data/rdoc/classes/Mu.html +305 -0
- data/rdoc/classes/Mu/Client.html +265 -0
- data/rdoc/classes/Mu/Command.html +208 -0
- data/rdoc/classes/Mu/Command/API.html +524 -0
- data/rdoc/classes/Mu/Command/Cmd_appid.html +934 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.html +515 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.html +1169 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.html +489 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.html +968 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.html +743 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.html +970 -0
- data/rdoc/classes/Mu/Command/Cmd_runscenario.html +530 -0
- data/rdoc/classes/Mu/Command/Cmd_runverify.html +621 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.html +939 -0
- data/rdoc/classes/Mu/Command/Cmd_system.html +426 -0
- data/rdoc/classes/Mu/Command/Curl.html +524 -0
- data/rdoc/classes/Mu/Command/Help.html +166 -0
- data/rdoc/classes/Mu/Curl.html +116 -0
- data/rdoc/classes/Mu/Curl/Error.html +157 -0
- data/rdoc/classes/Mu/Curl/Error/Authorize.html +178 -0
- data/rdoc/classes/Mu/Curl/Error/Connect.html +149 -0
- data/rdoc/classes/Mu/Curl/Error/DNS.html +113 -0
- data/rdoc/classes/Mu/Curl/Error/Region.html +160 -0
- data/rdoc/classes/Mu/Curl/Error/Status.html +149 -0
- data/rdoc/classes/Mu/Curl/Error/Timeout.html +149 -0
- data/rdoc/classes/Mu/Curl/Verify.html +282 -0
- data/rdoc/classes/Mu/Curl/Verify/Request.html +227 -0
- data/rdoc/classes/Mu/Curl/Verify/Response.html +187 -0
- data/rdoc/classes/Mu/Curl/Verify/Result.html +188 -0
- data/rdoc/classes/Mu/Ddt.html +914 -0
- data/rdoc/classes/Mu/Helper.html +308 -0
- data/rdoc/classes/Mu/Homepage.html +377 -0
- data/rdoc/classes/Mu/HttpHelper.html +639 -0
- data/rdoc/classes/Mu/Muapi.html +816 -0
- data/rdoc/classes/Mu/Netconfig.html +781 -0
- data/rdoc/classes/Mu/Scale.html +832 -0
- data/rdoc/classes/Mu/System.html +281 -0
- data/rdoc/classes/Object.html +148 -0
- data/rdoc/classes/TCTestMu.html +1793 -0
- data/rdoc/classes/Test.html +107 -0
- data/rdoc/classes/Test/Unit.html +107 -0
- data/rdoc/classes/Test/Unit/TestCase.html +113 -0
- data/rdoc/created.rid +1 -0
- data/rdoc/files/lib/mu/api/ddt_rb.html +101 -0
- data/rdoc/files/lib/mu/api/homepage_rb.html +101 -0
- data/rdoc/files/lib/mu/api/muapi_rb.html +101 -0
- data/rdoc/files/lib/mu/api/netconfig_rb.html +101 -0
- data/rdoc/files/lib/mu/api/scale_rb.html +101 -0
- data/rdoc/files/lib/mu/api/system_rb.html +101 -0
- data/rdoc/files/lib/mu/client_rb.html +101 -0
- data/rdoc/files/lib/mu/command/api_rb.html +101 -0
- data/rdoc/files/lib/mu/command/cmd_appid_rb.html +119 -0
- data/rdoc/files/lib/mu/command/cmd_cli_rb.html +108 -0
- data/rdoc/files/lib/mu/command/cmd_ddt_rb.html +117 -0
- data/rdoc/files/lib/mu/command/cmd_homepage_rb.html +115 -0
- data/rdoc/files/lib/mu/command/cmd_muapi_rb.html +116 -0
- data/rdoc/files/lib/mu/command/cmd_netconfig_rb.html +116 -0
- data/rdoc/files/lib/mu/command/cmd_runscale_rb.html +119 -0
- data/rdoc/files/lib/mu/command/cmd_runscenario_rb.html +115 -0
- data/rdoc/files/lib/mu/command/cmd_runverify_rb.html +117 -0
- data/rdoc/files/lib/mu/command/cmd_scale_rb.html +115 -0
- data/rdoc/files/lib/mu/command/cmd_system_rb.html +116 -0
- data/rdoc/files/lib/mu/command/curl_rb.html +101 -0
- data/rdoc/files/lib/mu/command/help_rb.html +101 -0
- data/rdoc/files/lib/mu/command_rb.html +107 -0
- data/rdoc/files/lib/mu/curl/error_rb.html +101 -0
- data/rdoc/files/lib/mu/curl/verify_rb.html +101 -0
- data/rdoc/files/lib/mu/helper_rb.html +101 -0
- data/rdoc/files/lib/mu/http_helper_rb.html +101 -0
- data/rdoc/files/lib/mu_rb.html +121 -0
- data/rdoc/files/test/helper_rb.html +112 -0
- data/rdoc/files/test/tc_test_mu_rb.html +111 -0
- data/rdoc/fr_class_index.html +68 -0
- data/rdoc/fr_file_index.html +55 -0
- data/rdoc/fr_method_index.html +374 -0
- data/rdoc/index.html +24 -0
- data/rdoc/rdoc-style.css +208 -0
- data/test/data/app_id_stats.csv +1 -0
- data/test/data/data_cgi.msl +94 -0
- data/test/data/data_cgi.xml +322 -0
- data/test/data/default_test.csv +3 -0
- data/test/data/ftp_with_channel.xml +1643 -0
- data/test/data/irc.xml +3837 -0
- data/test/data/scale_configuration.json +25 -0
- data/test/data/test_data_cgi_error.xml +35 -0
- data/test/helper.rb +18 -0
- data/test/tc_test_mu.rb +716 -0
- metadata +322 -0
@@ -0,0 +1,187 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Mu::Curl::Verify::Response</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Mu::Curl::Verify::Response</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../../files/lib/mu/curl/verify_rb.html">
|
59
|
+
lib/mu/curl/verify.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="../../../Object.html">
|
69
|
+
Object
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div id="method-list">
|
88
|
+
<h3 class="section-bar">Methods</h3>
|
89
|
+
|
90
|
+
<div class="name-list">
|
91
|
+
<a href="#M000056">new</a>
|
92
|
+
</div>
|
93
|
+
</div>
|
94
|
+
|
95
|
+
</div>
|
96
|
+
|
97
|
+
|
98
|
+
<!-- if includes -->
|
99
|
+
|
100
|
+
<div id="section">
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
<div id="attribute-list">
|
107
|
+
<h3 class="section-bar">Attributes</h3>
|
108
|
+
|
109
|
+
<div class="name-list">
|
110
|
+
<table>
|
111
|
+
<tr class="top-aligned-row context-row">
|
112
|
+
<td class="context-item-name">content</td>
|
113
|
+
<td class="context-item-value"> [R] </td>
|
114
|
+
<td class="context-item-desc"></td>
|
115
|
+
</tr>
|
116
|
+
<tr class="top-aligned-row context-row">
|
117
|
+
<td class="context-item-name">headers</td>
|
118
|
+
<td class="context-item-value"> [R] </td>
|
119
|
+
<td class="context-item-desc"></td>
|
120
|
+
</tr>
|
121
|
+
<tr class="top-aligned-row context-row">
|
122
|
+
<td class="context-item-name">line</td>
|
123
|
+
<td class="context-item-value"> [R] </td>
|
124
|
+
<td class="context-item-desc"></td>
|
125
|
+
</tr>
|
126
|
+
<tr class="top-aligned-row context-row">
|
127
|
+
<td class="context-item-name">message</td>
|
128
|
+
<td class="context-item-value"> [R] </td>
|
129
|
+
<td class="context-item-desc"></td>
|
130
|
+
</tr>
|
131
|
+
<tr class="top-aligned-row context-row">
|
132
|
+
<td class="context-item-name">status</td>
|
133
|
+
<td class="context-item-value"> [R] </td>
|
134
|
+
<td class="context-item-desc"></td>
|
135
|
+
</tr>
|
136
|
+
</table>
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<!-- if method_list -->
|
143
|
+
<div id="methods">
|
144
|
+
<h3 class="section-bar">Public Class methods</h3>
|
145
|
+
|
146
|
+
<div id="method-M000056" class="method-detail">
|
147
|
+
<a name="M000056"></a>
|
148
|
+
|
149
|
+
<div class="method-heading">
|
150
|
+
<a href="#M000056" class="method-signature">
|
151
|
+
<span class="method-name">new</span><span class="method-args">(json)</span>
|
152
|
+
</a>
|
153
|
+
</div>
|
154
|
+
|
155
|
+
<div class="method-description">
|
156
|
+
<p><a class="source-toggle" href="#"
|
157
|
+
onclick="toggleCode('M000056-source');return false;">[Source]</a></p>
|
158
|
+
<div class="method-source-code" id="M000056-source">
|
159
|
+
<pre>
|
160
|
+
<span class="ruby-comment cmt"># File lib/mu/curl/verify.rb, line 49</span>
|
161
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">json</span>
|
162
|
+
<span class="ruby-identifier">rs</span> = <span class="ruby-constant">Request</span>.<span class="ruby-identifier">parse</span> <span class="ruby-identifier">json</span>[<span class="ruby-value str">'bytes'</span>][<span class="ruby-value">1</span>][<span class="ruby-value str">'data'</span>]
|
163
|
+
<span class="ruby-ivar">@line</span> = <span class="ruby-identifier">rs</span>[<span class="ruby-identifier">:line</span>]
|
164
|
+
<span class="ruby-identifier">_</span>, <span class="ruby-ivar">@status</span>, <span class="ruby-ivar">@message</span> = <span class="ruby-identifier">rs</span>[<span class="ruby-identifier">:line</span>].<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/\s+/</span>, <span class="ruby-value">3</span>)
|
165
|
+
<span class="ruby-ivar">@status</span> = <span class="ruby-ivar">@status</span>.<span class="ruby-identifier">to_i</span>
|
166
|
+
<span class="ruby-ivar">@content</span> = <span class="ruby-identifier">rs</span>[<span class="ruby-identifier">:content</span>]
|
167
|
+
<span class="ruby-ivar">@headers</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
168
|
+
<span class="ruby-identifier">rs</span>[<span class="ruby-identifier">:headers</span>].<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@headers</span>[<span class="ruby-identifier">h</span>[<span class="ruby-identifier">:key</span>]] = <span class="ruby-identifier">h</span>[<span class="ruby-identifier">:val</span>] }
|
169
|
+
<span class="ruby-keyword kw">end</span>
|
170
|
+
</pre>
|
171
|
+
</div>
|
172
|
+
</div>
|
173
|
+
</div>
|
174
|
+
|
175
|
+
|
176
|
+
</div>
|
177
|
+
|
178
|
+
|
179
|
+
</div>
|
180
|
+
|
181
|
+
|
182
|
+
<div id="validator-badges">
|
183
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
184
|
+
</div>
|
185
|
+
|
186
|
+
</body>
|
187
|
+
</html>
|
@@ -0,0 +1,188 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Mu::Curl::Verify::Result</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Mu::Curl::Verify::Result</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../../files/lib/mu/curl/verify_rb.html">
|
59
|
+
lib/mu/curl/verify.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="../../../Object.html">
|
69
|
+
Object
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div id="method-list">
|
88
|
+
<h3 class="section-bar">Methods</h3>
|
89
|
+
|
90
|
+
<div class="name-list">
|
91
|
+
<a href="#M000057">new</a>
|
92
|
+
</div>
|
93
|
+
</div>
|
94
|
+
|
95
|
+
</div>
|
96
|
+
|
97
|
+
|
98
|
+
<!-- if includes -->
|
99
|
+
|
100
|
+
<div id="section">
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
<div id="attribute-list">
|
107
|
+
<h3 class="section-bar">Attributes</h3>
|
108
|
+
|
109
|
+
<div class="name-list">
|
110
|
+
<table>
|
111
|
+
<tr class="top-aligned-row context-row">
|
112
|
+
<td class="context-item-name">connect</td>
|
113
|
+
<td class="context-item-value"> [R] </td>
|
114
|
+
<td class="context-item-desc"></td>
|
115
|
+
</tr>
|
116
|
+
<tr class="top-aligned-row context-row">
|
117
|
+
<td class="context-item-name">duration</td>
|
118
|
+
<td class="context-item-value"> [R] </td>
|
119
|
+
<td class="context-item-desc"></td>
|
120
|
+
</tr>
|
121
|
+
<tr class="top-aligned-row context-row">
|
122
|
+
<td class="context-item-name">region</td>
|
123
|
+
<td class="context-item-value"> [R] </td>
|
124
|
+
<td class="context-item-desc"></td>
|
125
|
+
</tr>
|
126
|
+
<tr class="top-aligned-row context-row">
|
127
|
+
<td class="context-item-name">request</td>
|
128
|
+
<td class="context-item-value"> [R] </td>
|
129
|
+
<td class="context-item-desc"></td>
|
130
|
+
</tr>
|
131
|
+
<tr class="top-aligned-row context-row">
|
132
|
+
<td class="context-item-name">response</td>
|
133
|
+
<td class="context-item-value"> [R] </td>
|
134
|
+
<td class="context-item-desc"></td>
|
135
|
+
</tr>
|
136
|
+
</table>
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<!-- if method_list -->
|
143
|
+
<div id="methods">
|
144
|
+
<h3 class="section-bar">Public Class methods</h3>
|
145
|
+
|
146
|
+
<div id="method-M000057" class="method-detail">
|
147
|
+
<a name="M000057"></a>
|
148
|
+
|
149
|
+
<div class="method-heading">
|
150
|
+
<a href="#M000057" class="method-signature">
|
151
|
+
<span class="method-name">new</span><span class="method-args">(json)</span>
|
152
|
+
</a>
|
153
|
+
</div>
|
154
|
+
|
155
|
+
<div class="method-description">
|
156
|
+
<p><a class="source-toggle" href="#"
|
157
|
+
onclick="toggleCode('M000057-source');return false;">[Source]</a></p>
|
158
|
+
<div class="method-source-code" id="M000057-source">
|
159
|
+
<pre>
|
160
|
+
<span class="ruby-comment cmt"># File lib/mu/curl/verify.rb, line 67</span>
|
161
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">json</span>
|
162
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-identifier">json</span>[<span class="ruby-value str">'result'</span>]
|
163
|
+
<span class="ruby-identifier">stats</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value str">'statistics'</span>]
|
164
|
+
|
165
|
+
<span class="ruby-ivar">@region</span> = <span class="ruby-identifier">json</span>[<span class="ruby-value str">'region'</span>]
|
166
|
+
<span class="ruby-ivar">@duration</span> = <span class="ruby-identifier">stats</span>[<span class="ruby-value str">'duration'</span>][<span class="ruby-value str">'avg'</span>]
|
167
|
+
<span class="ruby-ivar">@connect</span> = <span class="ruby-identifier">stats</span>[<span class="ruby-value str">'steps'</span>][<span class="ruby-value">0</span>][<span class="ruby-value str">'duration'</span>][<span class="ruby-value str">'avg'</span>]
|
168
|
+
<span class="ruby-ivar">@request</span> = <span class="ruby-constant">Request</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">result</span>
|
169
|
+
<span class="ruby-ivar">@response</span> = <span class="ruby-constant">Response</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">result</span>
|
170
|
+
<span class="ruby-keyword kw">end</span>
|
171
|
+
</pre>
|
172
|
+
</div>
|
173
|
+
</div>
|
174
|
+
</div>
|
175
|
+
|
176
|
+
|
177
|
+
</div>
|
178
|
+
|
179
|
+
|
180
|
+
</div>
|
181
|
+
|
182
|
+
|
183
|
+
<div id="validator-badges">
|
184
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
185
|
+
</div>
|
186
|
+
|
187
|
+
</body>
|
188
|
+
</html>
|
@@ -0,0 +1,914 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Mu::Ddt</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Mu::Ddt</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/mu/api/ddt_rb.html">
|
59
|
+
lib/mu/api/ddt.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="../Object.html">
|
69
|
+
Object
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div id="method-list">
|
88
|
+
<h3 class="section-bar">Methods</h3>
|
89
|
+
|
90
|
+
<div class="name-list">
|
91
|
+
<a href="#M000312">close_all_sessions</a>
|
92
|
+
<a href="#M000310">close_session</a>
|
93
|
+
<a href="#M000323">collect_results</a>
|
94
|
+
<a href="#M000327">csv_export</a>
|
95
|
+
<a href="#M000328">csv_import</a>
|
96
|
+
<a href="#M000313">get_all_sessions</a>
|
97
|
+
<a href="#M000319">get_channels</a>
|
98
|
+
<a href="#M000317">get_hosts</a>
|
99
|
+
<a href="#M000321">get_options</a>
|
100
|
+
<a href="#M000311">get_sessions</a>
|
101
|
+
<a href="#M000326">get_testset_results</a>
|
102
|
+
<a href="#M000325">get_testset_status</a>
|
103
|
+
<a href="#M000316">load_scenario</a>
|
104
|
+
<a href="#M000306">new</a>
|
105
|
+
<a href="#M000309">new_session</a>
|
106
|
+
<a href="#M000307">run</a>
|
107
|
+
<a href="#M000308">run_testset</a>
|
108
|
+
<a href="#M000320">set_channels</a>
|
109
|
+
<a href="#M000318">set_hosts</a>
|
110
|
+
<a href="#M000322">set_options</a>
|
111
|
+
<a href="#M000314">setup_test</a>
|
112
|
+
<a href="#M000315">teardown_test</a>
|
113
|
+
<a href="#M000324">wait_until_done</a>
|
114
|
+
</div>
|
115
|
+
</div>
|
116
|
+
|
117
|
+
</div>
|
118
|
+
|
119
|
+
|
120
|
+
<!-- if includes -->
|
121
|
+
<div id="includes">
|
122
|
+
<h3 class="section-bar">Included Modules</h3>
|
123
|
+
|
124
|
+
<div id="includes-list">
|
125
|
+
<span class="include-name"><a href="Helper.html">Helper</a></span>
|
126
|
+
</div>
|
127
|
+
</div>
|
128
|
+
|
129
|
+
<div id="section">
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
<div id="attribute-list">
|
136
|
+
<h3 class="section-bar">Attributes</h3>
|
137
|
+
|
138
|
+
<div class="name-list">
|
139
|
+
<table>
|
140
|
+
<tr class="top-aligned-row context-row">
|
141
|
+
<td class="context-item-name">docroot</td>
|
142
|
+
<td class="context-item-value"> [RW] </td>
|
143
|
+
<td class="context-item-desc"></td>
|
144
|
+
</tr>
|
145
|
+
<tr class="top-aligned-row context-row">
|
146
|
+
<td class="context-item-name">host</td>
|
147
|
+
<td class="context-item-value"> [RW] </td>
|
148
|
+
<td class="context-item-desc"></td>
|
149
|
+
</tr>
|
150
|
+
<tr class="top-aligned-row context-row">
|
151
|
+
<td class="context-item-name">password</td>
|
152
|
+
<td class="context-item-value"> [RW] </td>
|
153
|
+
<td class="context-item-desc"></td>
|
154
|
+
</tr>
|
155
|
+
<tr class="top-aligned-row context-row">
|
156
|
+
<td class="context-item-name">session_id</td>
|
157
|
+
<td class="context-item-value"> [RW] </td>
|
158
|
+
<td class="context-item-desc"></td>
|
159
|
+
</tr>
|
160
|
+
<tr class="top-aligned-row context-row">
|
161
|
+
<td class="context-item-name">username</td>
|
162
|
+
<td class="context-item-value"> [RW] </td>
|
163
|
+
<td class="context-item-desc"></td>
|
164
|
+
</tr>
|
165
|
+
</table>
|
166
|
+
</div>
|
167
|
+
</div>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<!-- if method_list -->
|
172
|
+
<div id="methods">
|
173
|
+
<h3 class="section-bar">Public Class methods</h3>
|
174
|
+
|
175
|
+
<div id="method-M000306" class="method-detail">
|
176
|
+
<a name="M000306"></a>
|
177
|
+
|
178
|
+
<div class="method-heading">
|
179
|
+
<a href="#M000306" class="method-signature">
|
180
|
+
<span class="method-name">new</span><span class="method-args">(host=ENV['MU_IP'], username=ENV['MU_ADMIN_USER'], password=ENV['MU_ADMIN_PASS'])</span>
|
181
|
+
</a>
|
182
|
+
</div>
|
183
|
+
|
184
|
+
<div class="method-description">
|
185
|
+
<p><a class="source-toggle" href="#"
|
186
|
+
onclick="toggleCode('M000306-source');return false;">[Source]</a></p>
|
187
|
+
<div class="method-source-code" id="M000306-source">
|
188
|
+
<pre>
|
189
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 7</span>
|
190
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">host</span>=<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'MU_IP'</span>], <span class="ruby-identifier">username</span>=<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'MU_ADMIN_USER'</span>], <span class="ruby-identifier">password</span>=<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'MU_ADMIN_PASS'</span>])
|
191
|
+
<span class="ruby-ivar">@host</span> = <span class="ruby-identifier">host</span>
|
192
|
+
<span class="ruby-ivar">@username</span> = <span class="ruby-identifier">username</span>
|
193
|
+
<span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
|
194
|
+
<span class="ruby-ivar">@docroot</span> = <span class="ruby-value str">"/api/v5/ddt/"</span>
|
195
|
+
<span class="ruby-ivar">@session_id</span> = <span class="ruby-keyword kw">nil</span>
|
196
|
+
<span class="ruby-ivar">@http</span> = <span class="ruby-constant">HttpHelper</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@host</span>, <span class="ruby-ivar">@username</span>, <span class="ruby-ivar">@password</span>, <span class="ruby-ivar">@docroot</span>)
|
197
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-node">"Created Ddt Api object to :#{@host}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
198
|
+
<span class="ruby-keyword kw">end</span>
|
199
|
+
</pre>
|
200
|
+
</div>
|
201
|
+
</div>
|
202
|
+
</div>
|
203
|
+
|
204
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
205
|
+
|
206
|
+
<div id="method-M000312" class="method-detail">
|
207
|
+
<a name="M000312"></a>
|
208
|
+
|
209
|
+
<div class="method-heading">
|
210
|
+
<a href="#M000312" class="method-signature">
|
211
|
+
<span class="method-name">close_all_sessions</span><span class="method-args">()</span>
|
212
|
+
</a>
|
213
|
+
</div>
|
214
|
+
|
215
|
+
<div class="method-description">
|
216
|
+
<p>
|
217
|
+
closes all Studio Verify sessions
|
218
|
+
</p>
|
219
|
+
<p><a class="source-toggle" href="#"
|
220
|
+
onclick="toggleCode('M000312-source');return false;">[Source]</a></p>
|
221
|
+
<div class="method-source-code" id="M000312-source">
|
222
|
+
<pre>
|
223
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 69</span>
|
224
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close_all_sessions</span>
|
225
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post</span>(<span class="ruby-value str">"closeAllSessions"</span>)
|
226
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
227
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
228
|
+
<span class="ruby-keyword kw">end</span>
|
229
|
+
</pre>
|
230
|
+
</div>
|
231
|
+
</div>
|
232
|
+
</div>
|
233
|
+
|
234
|
+
<div id="method-M000310" class="method-detail">
|
235
|
+
<a name="M000310"></a>
|
236
|
+
|
237
|
+
<div class="method-heading">
|
238
|
+
<a href="#M000310" class="method-signature">
|
239
|
+
<span class="method-name">close_session</span><span class="method-args">()</span>
|
240
|
+
</a>
|
241
|
+
</div>
|
242
|
+
|
243
|
+
<div class="method-description">
|
244
|
+
<p>
|
245
|
+
closes the existing Studio Verify session
|
246
|
+
</p>
|
247
|
+
<p><a class="source-toggle" href="#"
|
248
|
+
onclick="toggleCode('M000310-source');return false;">[Source]</a></p>
|
249
|
+
<div class="method-source-code" id="M000310-source">
|
250
|
+
<pre>
|
251
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 43</span>
|
252
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close_session</span>
|
253
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">"session/closeSession"</span>)
|
254
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
255
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
256
|
+
<span class="ruby-keyword kw">end</span>
|
257
|
+
</pre>
|
258
|
+
</div>
|
259
|
+
</div>
|
260
|
+
</div>
|
261
|
+
|
262
|
+
<div id="method-M000323" class="method-detail">
|
263
|
+
<a name="M000323"></a>
|
264
|
+
|
265
|
+
<div class="method-heading">
|
266
|
+
<a href="#M000323" class="method-signature">
|
267
|
+
<span class="method-name">collect_results</span><span class="method-args">(timeout=120)</span>
|
268
|
+
</a>
|
269
|
+
</div>
|
270
|
+
|
271
|
+
<div class="method-description">
|
272
|
+
<p>
|
273
|
+
collects results until the test is done or the timeout expires
|
274
|
+
</p>
|
275
|
+
<pre>
|
276
|
+
* timeout = time in seconds to wait for the test to complete
|
277
|
+
</pre>
|
278
|
+
<p><a class="source-toggle" href="#"
|
279
|
+
onclick="toggleCode('M000323-source');return false;">[Source]</a></p>
|
280
|
+
<div class="method-source-code" id="M000323-source">
|
281
|
+
<pre>
|
282
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 168</span>
|
283
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collect_results</span>(<span class="ruby-identifier">timeout</span>=<span class="ruby-value">120</span>)
|
284
|
+
<span class="ruby-identifier">wait_until_done</span>(<span class="ruby-identifier">timeout</span>)
|
285
|
+
<span class="ruby-identifier">results</span> = <span class="ruby-identifier">get_testset_results</span>
|
286
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">results</span>
|
287
|
+
<span class="ruby-keyword kw">end</span>
|
288
|
+
</pre>
|
289
|
+
</div>
|
290
|
+
</div>
|
291
|
+
</div>
|
292
|
+
|
293
|
+
<div id="method-M000327" class="method-detail">
|
294
|
+
<a name="M000327"></a>
|
295
|
+
|
296
|
+
<div class="method-heading">
|
297
|
+
<a href="#M000327" class="method-signature">
|
298
|
+
<span class="method-name">csv_export</span><span class="method-args">(uuid=@testset)</span>
|
299
|
+
</a>
|
300
|
+
</div>
|
301
|
+
|
302
|
+
<div class="method-description">
|
303
|
+
<p>
|
304
|
+
exports a testset to a csv file
|
305
|
+
</p>
|
306
|
+
<pre>
|
307
|
+
* uuid = the uuid of the testset to export
|
308
|
+
</pre>
|
309
|
+
<p><a class="source-toggle" href="#"
|
310
|
+
onclick="toggleCode('M000327-source');return false;">[Source]</a></p>
|
311
|
+
<div class="method-source-code" id="M000327-source">
|
312
|
+
<pre>
|
313
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 214</span>
|
314
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">csv_export</span>(<span class="ruby-identifier">uuid</span>=<span class="ruby-ivar">@testset</span>)
|
315
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post</span>(<span class="ruby-node">"session/test/export/csv/#{uuid}"</span>)
|
316
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
317
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
318
|
+
<span class="ruby-keyword kw">end</span>
|
319
|
+
</pre>
|
320
|
+
</div>
|
321
|
+
</div>
|
322
|
+
</div>
|
323
|
+
|
324
|
+
<div id="method-M000313" class="method-detail">
|
325
|
+
<a name="M000313"></a>
|
326
|
+
|
327
|
+
<div class="method-heading">
|
328
|
+
<a href="#M000313" class="method-signature">
|
329
|
+
<span class="method-name">get_all_sessions</span><span class="method-args">()</span>
|
330
|
+
</a>
|
331
|
+
</div>
|
332
|
+
|
333
|
+
<div class="method-description">
|
334
|
+
<p>
|
335
|
+
returns the session id‘s of all existing Studio Verify sessions
|
336
|
+
</p>
|
337
|
+
<p><a class="source-toggle" href="#"
|
338
|
+
onclick="toggleCode('M000313-source');return false;">[Source]</a></p>
|
339
|
+
<div class="method-source-code" id="M000313-source">
|
340
|
+
<pre>
|
341
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 76</span>
|
342
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_all_sessions</span>
|
343
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">"getAllSessions"</span>)
|
344
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
345
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
346
|
+
<span class="ruby-keyword kw">end</span>
|
347
|
+
</pre>
|
348
|
+
</div>
|
349
|
+
</div>
|
350
|
+
</div>
|
351
|
+
|
352
|
+
<div id="method-M000319" class="method-detail">
|
353
|
+
<a name="M000319"></a>
|
354
|
+
|
355
|
+
<div class="method-heading">
|
356
|
+
<a href="#M000319" class="method-signature">
|
357
|
+
<span class="method-name">get_channels</span><span class="method-args">()</span>
|
358
|
+
</a>
|
359
|
+
</div>
|
360
|
+
|
361
|
+
<div class="method-description">
|
362
|
+
<p>
|
363
|
+
returns the channel elements of the loaded scenario
|
364
|
+
</p>
|
365
|
+
<p><a class="source-toggle" href="#"
|
366
|
+
onclick="toggleCode('M000319-source');return false;">[Source]</a></p>
|
367
|
+
<div class="method-source-code" id="M000319-source">
|
368
|
+
<pre>
|
369
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 127</span>
|
370
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_channels</span>
|
371
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">"session/scenario/channels"</span>)
|
372
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
373
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
374
|
+
<span class="ruby-keyword kw">end</span>
|
375
|
+
</pre>
|
376
|
+
</div>
|
377
|
+
</div>
|
378
|
+
</div>
|
379
|
+
|
380
|
+
<div id="method-M000317" class="method-detail">
|
381
|
+
<a name="M000317"></a>
|
382
|
+
|
383
|
+
<div class="method-heading">
|
384
|
+
<a href="#M000317" class="method-signature">
|
385
|
+
<span class="method-name">get_hosts</span><span class="method-args">()</span>
|
386
|
+
</a>
|
387
|
+
</div>
|
388
|
+
|
389
|
+
<div class="method-description">
|
390
|
+
<p>
|
391
|
+
returns the hosts in the loaded scenario
|
392
|
+
</p>
|
393
|
+
<p><a class="source-toggle" href="#"
|
394
|
+
onclick="toggleCode('M000317-source');return false;">[Source]</a></p>
|
395
|
+
<div class="method-source-code" id="M000317-source">
|
396
|
+
<pre>
|
397
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 105</span>
|
398
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_hosts</span>
|
399
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">"session/scenario/hosts"</span>)
|
400
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
401
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
402
|
+
<span class="ruby-keyword kw">end</span>
|
403
|
+
</pre>
|
404
|
+
</div>
|
405
|
+
</div>
|
406
|
+
</div>
|
407
|
+
|
408
|
+
<div id="method-M000321" class="method-detail">
|
409
|
+
<a name="M000321"></a>
|
410
|
+
|
411
|
+
<div class="method-heading">
|
412
|
+
<a href="#M000321" class="method-signature">
|
413
|
+
<span class="method-name">get_options</span><span class="method-args">()</span>
|
414
|
+
</a>
|
415
|
+
</div>
|
416
|
+
|
417
|
+
<div class="method-description">
|
418
|
+
<p>
|
419
|
+
returns the options from the loaded scenario
|
420
|
+
</p>
|
421
|
+
<p><a class="source-toggle" href="#"
|
422
|
+
onclick="toggleCode('M000321-source');return false;">[Source]</a></p>
|
423
|
+
<div class="method-source-code" id="M000321-source">
|
424
|
+
<pre>
|
425
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 147</span>
|
426
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_options</span>
|
427
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">"session/scenario/options"</span>)
|
428
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
429
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
430
|
+
<span class="ruby-keyword kw">end</span>
|
431
|
+
</pre>
|
432
|
+
</div>
|
433
|
+
</div>
|
434
|
+
</div>
|
435
|
+
|
436
|
+
<div id="method-M000311" class="method-detail">
|
437
|
+
<a name="M000311"></a>
|
438
|
+
|
439
|
+
<div class="method-heading">
|
440
|
+
<a href="#M000311" class="method-signature">
|
441
|
+
<span class="method-name">get_sessions</span><span class="method-args">()</span>
|
442
|
+
</a>
|
443
|
+
</div>
|
444
|
+
|
445
|
+
<div class="method-description">
|
446
|
+
<p>
|
447
|
+
returns array of session_ids
|
448
|
+
</p>
|
449
|
+
<p><a class="source-toggle" href="#"
|
450
|
+
onclick="toggleCode('M000311-source');return false;">[Source]</a></p>
|
451
|
+
<div class="method-source-code" id="M000311-source">
|
452
|
+
<pre>
|
453
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 50</span>
|
454
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_sessions</span>
|
455
|
+
<span class="ruby-identifier">all_sessions</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
456
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">""</span>) <span class="ruby-comment cmt"># with no args</span>
|
457
|
+
<span class="ruby-identifier">sessions</span> = <span class="ruby-identifier">response</span>[<span class="ruby-value str">"sessions"</span>]
|
458
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">sessions</span>[<span class="ruby-value str">"session"</span>].<span class="ruby-identifier">nil?</span>
|
459
|
+
<span class="ruby-identifier">num</span> = <span class="ruby-identifier">sessions</span>[<span class="ruby-value str">"session"</span>].<span class="ruby-identifier">size</span>
|
460
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">num</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span>
|
461
|
+
<span class="ruby-identifier">sessions</span>[<span class="ruby-value str">"session"</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">s</span> <span class="ruby-operator">|</span>
|
462
|
+
<span class="ruby-identifier">all_sessions</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span>[<span class="ruby-value str">"id"</span>]
|
463
|
+
<span class="ruby-keyword kw">end</span>
|
464
|
+
<span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># special case if there is only one (there is no array)</span>
|
465
|
+
<span class="ruby-identifier">all_sessions</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">sessions</span>[<span class="ruby-value str">"session"</span>][<span class="ruby-value str">"id"</span>]
|
466
|
+
<span class="ruby-keyword kw">end</span>
|
467
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">all_sessions</span>
|
468
|
+
<span class="ruby-keyword kw">end</span>
|
469
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
470
|
+
<span class="ruby-keyword kw">end</span>
|
471
|
+
</pre>
|
472
|
+
</div>
|
473
|
+
</div>
|
474
|
+
</div>
|
475
|
+
|
476
|
+
<div id="method-M000326" class="method-detail">
|
477
|
+
<a name="M000326"></a>
|
478
|
+
|
479
|
+
<div class="method-heading">
|
480
|
+
<a href="#M000326" class="method-signature">
|
481
|
+
<span class="method-name">get_testset_results</span><span class="method-args">()</span>
|
482
|
+
</a>
|
483
|
+
</div>
|
484
|
+
|
485
|
+
<div class="method-description">
|
486
|
+
<p>
|
487
|
+
returns the results of a running test set. can be called repeatedly. the
|
488
|
+
test is done when the results include the ‘END’ keyword
|
489
|
+
</p>
|
490
|
+
<p><a class="source-toggle" href="#"
|
491
|
+
onclick="toggleCode('M000326-source');return false;">[Source]</a></p>
|
492
|
+
<div class="method-source-code" id="M000326-source">
|
493
|
+
<pre>
|
494
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 206</span>
|
495
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_testset_results</span>
|
496
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">"session/test/runSuite/results"</span>)
|
497
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
498
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
499
|
+
<span class="ruby-keyword kw">end</span>
|
500
|
+
</pre>
|
501
|
+
</div>
|
502
|
+
</div>
|
503
|
+
</div>
|
504
|
+
|
505
|
+
<div id="method-M000325" class="method-detail">
|
506
|
+
<a name="M000325"></a>
|
507
|
+
|
508
|
+
<div class="method-heading">
|
509
|
+
<a href="#M000325" class="method-signature">
|
510
|
+
<span class="method-name">get_testset_status</span><span class="method-args">()</span>
|
511
|
+
</a>
|
512
|
+
</div>
|
513
|
+
|
514
|
+
<div class="method-description">
|
515
|
+
<p>
|
516
|
+
returns the status of a running test set
|
517
|
+
</p>
|
518
|
+
<p><a class="source-toggle" href="#"
|
519
|
+
onclick="toggleCode('M000325-source');return false;">[Source]</a></p>
|
520
|
+
<div class="method-source-code" id="M000325-source">
|
521
|
+
<pre>
|
522
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 198</span>
|
523
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_testset_status</span>
|
524
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value str">"session/test/runSuite/status"</span>)
|
525
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
526
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
527
|
+
<span class="ruby-keyword kw">end</span>
|
528
|
+
</pre>
|
529
|
+
</div>
|
530
|
+
</div>
|
531
|
+
</div>
|
532
|
+
|
533
|
+
<div id="method-M000316" class="method-detail">
|
534
|
+
<a name="M000316"></a>
|
535
|
+
|
536
|
+
<div class="method-heading">
|
537
|
+
<a href="#M000316" class="method-signature">
|
538
|
+
<span class="method-name">load_scenario</span><span class="method-args">(uuid)</span>
|
539
|
+
</a>
|
540
|
+
</div>
|
541
|
+
|
542
|
+
<div class="method-description">
|
543
|
+
<p>
|
544
|
+
loads a scenario
|
545
|
+
</p>
|
546
|
+
<pre>
|
547
|
+
* the uuid of a scenario present on the Mu
|
548
|
+
</pre>
|
549
|
+
<p><a class="source-toggle" href="#"
|
550
|
+
onclick="toggleCode('M000316-source');return false;">[Source]</a></p>
|
551
|
+
<div class="method-source-code" id="M000316-source">
|
552
|
+
<pre>
|
553
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 98</span>
|
554
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_scenario</span>(<span class="ruby-identifier">uuid</span>)
|
555
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post</span>(<span class="ruby-node">"session/loadScenario/#{uuid}"</span>)
|
556
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
557
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
558
|
+
<span class="ruby-keyword kw">end</span>
|
559
|
+
</pre>
|
560
|
+
</div>
|
561
|
+
</div>
|
562
|
+
</div>
|
563
|
+
|
564
|
+
<div id="method-M000309" class="method-detail">
|
565
|
+
<a name="M000309"></a>
|
566
|
+
|
567
|
+
<div class="method-heading">
|
568
|
+
<a href="#M000309" class="method-signature">
|
569
|
+
<span class="method-name">new_session</span><span class="method-args">()</span>
|
570
|
+
</a>
|
571
|
+
</div>
|
572
|
+
|
573
|
+
<div class="method-description">
|
574
|
+
<p>
|
575
|
+
must be called first to establish a <a href="Ddt.html#M000306">new</a>
|
576
|
+
Studio Verify session
|
577
|
+
</p>
|
578
|
+
<p><a class="source-toggle" href="#"
|
579
|
+
onclick="toggleCode('M000309-source');return false;">[Source]</a></p>
|
580
|
+
<div class="method-source-code" id="M000309-source">
|
581
|
+
<pre>
|
582
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 33</span>
|
583
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new_session</span>
|
584
|
+
<span class="ruby-identifier">reply</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post</span>(<span class="ruby-value str">"newSession"</span>) <span class="ruby-comment cmt"># with no args</span>
|
585
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">reply</span>[<span class="ruby-value str">"response"</span>]
|
586
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
587
|
+
<span class="ruby-ivar">@session_id</span> = <span class="ruby-identifier">response</span>[<span class="ruby-value str">"sessionId"</span>]
|
588
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-ivar">@session_id</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
589
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@session_id</span>
|
590
|
+
<span class="ruby-keyword kw">end</span>
|
591
|
+
</pre>
|
592
|
+
</div>
|
593
|
+
</div>
|
594
|
+
</div>
|
595
|
+
|
596
|
+
<div id="method-M000307" class="method-detail">
|
597
|
+
<a name="M000307"></a>
|
598
|
+
|
599
|
+
<div class="method-heading">
|
600
|
+
<a href="#M000307" class="method-signature">
|
601
|
+
<span class="method-name">run</span><span class="method-args">()</span>
|
602
|
+
</a>
|
603
|
+
</div>
|
604
|
+
|
605
|
+
<div class="method-description">
|
606
|
+
<p>
|
607
|
+
verifies the loaded scenario
|
608
|
+
</p>
|
609
|
+
<p><a class="source-toggle" href="#"
|
610
|
+
onclick="toggleCode('M000307-source');return false;">[Source]</a></p>
|
611
|
+
<div class="method-source-code" id="M000307-source">
|
612
|
+
<pre>
|
613
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 18</span>
|
614
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>
|
615
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post</span>(<span class="ruby-value str">"session/test/run"</span>)
|
616
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
617
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
618
|
+
<span class="ruby-keyword kw">end</span>
|
619
|
+
</pre>
|
620
|
+
</div>
|
621
|
+
</div>
|
622
|
+
</div>
|
623
|
+
|
624
|
+
<div id="method-M000308" class="method-detail">
|
625
|
+
<a name="M000308"></a>
|
626
|
+
|
627
|
+
<div class="method-heading">
|
628
|
+
<a href="#M000308" class="method-signature">
|
629
|
+
<span class="method-name">run_testset</span><span class="method-args">(uuid)</span>
|
630
|
+
</a>
|
631
|
+
</div>
|
632
|
+
|
633
|
+
<div class="method-description">
|
634
|
+
<p>
|
635
|
+
sets and executes test suite
|
636
|
+
</p>
|
637
|
+
<pre>
|
638
|
+
* uuid = the uuid of a testset loaded on the Mu
|
639
|
+
</pre>
|
640
|
+
<p><a class="source-toggle" href="#"
|
641
|
+
onclick="toggleCode('M000308-source');return false;">[Source]</a></p>
|
642
|
+
<div class="method-source-code" id="M000308-source">
|
643
|
+
<pre>
|
644
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 26</span>
|
645
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run_testset</span>(<span class="ruby-identifier">uuid</span>)
|
646
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post</span>(<span class="ruby-node">"session/test/runSuite/#{uuid}"</span>)
|
647
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
648
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
649
|
+
<span class="ruby-keyword kw">end</span>
|
650
|
+
</pre>
|
651
|
+
</div>
|
652
|
+
</div>
|
653
|
+
</div>
|
654
|
+
|
655
|
+
<div id="method-M000320" class="method-detail">
|
656
|
+
<a name="M000320"></a>
|
657
|
+
|
658
|
+
<div class="method-heading">
|
659
|
+
<a href="#M000320" class="method-signature">
|
660
|
+
<span class="method-name">set_channels</span><span class="method-args">(roles=[], names=[])</span>
|
661
|
+
</a>
|
662
|
+
</div>
|
663
|
+
|
664
|
+
<div class="method-description">
|
665
|
+
<p>
|
666
|
+
sets the channel elements of the loaded scenario
|
667
|
+
</p>
|
668
|
+
<pre>
|
669
|
+
* roles = an array of the roles defined for the channels in the scenario ('channel')
|
670
|
+
* names = an array of host names to be mapped to the roles
|
671
|
+
</pre>
|
672
|
+
<p><a class="source-toggle" href="#"
|
673
|
+
onclick="toggleCode('M000320-source');return false;">[Source]</a></p>
|
674
|
+
<div class="method-source-code" id="M000320-source">
|
675
|
+
<pre>
|
676
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 136</span>
|
677
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_channels</span>(<span class="ruby-identifier">roles</span>=[], <span class="ruby-identifier">names</span>=[])
|
678
|
+
<span class="ruby-identifier">responses</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
679
|
+
<span class="ruby-identifier">roles</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">|</span>
|
680
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post</span>(<span class="ruby-node">"session/scenario/channels/#{roles[i]}/#{names[i]}"</span>)
|
681
|
+
<span class="ruby-identifier">responses</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">response</span>
|
682
|
+
<span class="ruby-keyword kw">end</span>
|
683
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">responses</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
684
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">responses</span>
|
685
|
+
<span class="ruby-keyword kw">end</span>
|
686
|
+
</pre>
|
687
|
+
</div>
|
688
|
+
</div>
|
689
|
+
</div>
|
690
|
+
|
691
|
+
<div id="method-M000318" class="method-detail">
|
692
|
+
<a name="M000318"></a>
|
693
|
+
|
694
|
+
<div class="method-heading">
|
695
|
+
<a href="#M000318" class="method-signature">
|
696
|
+
<span class="method-name">set_hosts</span><span class="method-args">(roles=[], names=[], type="v4")</span>
|
697
|
+
</a>
|
698
|
+
</div>
|
699
|
+
|
700
|
+
<div class="method-description">
|
701
|
+
<p>
|
702
|
+
sets the hosts in the loaded scenario
|
703
|
+
</p>
|
704
|
+
<pre>
|
705
|
+
* roles = an array of the host roles defined in the scenario
|
706
|
+
* names = an array of host names to be mapped to the roles
|
707
|
+
* type = network layer type (v4, v6 or l2) matching the defined hosts
|
708
|
+
</pre>
|
709
|
+
<p><a class="source-toggle" href="#"
|
710
|
+
onclick="toggleCode('M000318-source');return false;">[Source]</a></p>
|
711
|
+
<div class="method-source-code" id="M000318-source">
|
712
|
+
<pre>
|
713
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 115</span>
|
714
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_hosts</span>(<span class="ruby-identifier">roles</span>=[], <span class="ruby-identifier">names</span>=[], <span class="ruby-identifier">type</span>=<span class="ruby-value str">"v4"</span>)
|
715
|
+
<span class="ruby-identifier">responses</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
716
|
+
<span class="ruby-identifier">hosts</span> = <span class="ruby-identifier">roles</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">to_i</span>
|
717
|
+
<span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">|</span>
|
718
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post</span>(<span class="ruby-node">"session/scenario/hosts/#{roles[i]}/#{names[i]}/#{type}"</span>)
|
719
|
+
<span class="ruby-identifier">responses</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">response</span>
|
720
|
+
<span class="ruby-keyword kw">end</span>
|
721
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">responses</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
722
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">responses</span>
|
723
|
+
<span class="ruby-keyword kw">end</span>
|
724
|
+
</pre>
|
725
|
+
</div>
|
726
|
+
</div>
|
727
|
+
</div>
|
728
|
+
|
729
|
+
<div id="method-M000322" class="method-detail">
|
730
|
+
<a name="M000322"></a>
|
731
|
+
|
732
|
+
<div class="method-heading">
|
733
|
+
<a href="#M000322" class="method-signature">
|
734
|
+
<span class="method-name">set_options</span><span class="method-args">(names=[], values=[])</span>
|
735
|
+
</a>
|
736
|
+
</div>
|
737
|
+
|
738
|
+
<div class="method-description">
|
739
|
+
<p>
|
740
|
+
sets the options for the loaded scenario
|
741
|
+
</p>
|
742
|
+
<pre>
|
743
|
+
* an array of option names
|
744
|
+
* an array of option values
|
745
|
+
</pre>
|
746
|
+
<p><a class="source-toggle" href="#"
|
747
|
+
onclick="toggleCode('M000322-source');return false;">[Source]</a></p>
|
748
|
+
<div class="method-source-code" id="M000322-source">
|
749
|
+
<pre>
|
750
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 156</span>
|
751
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_options</span>(<span class="ruby-identifier">names</span>=[], <span class="ruby-identifier">values</span>=[])
|
752
|
+
<span class="ruby-identifier">responses</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
753
|
+
<span class="ruby-identifier">names</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">|</span>
|
754
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post</span>(<span class="ruby-node">"session/scenario/options/#{names[i]}/#{values[i]}"</span>)
|
755
|
+
<span class="ruby-identifier">responses</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">response</span>
|
756
|
+
<span class="ruby-keyword kw">end</span>
|
757
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">responses</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
758
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">responses</span>
|
759
|
+
<span class="ruby-keyword kw">end</span>
|
760
|
+
</pre>
|
761
|
+
</div>
|
762
|
+
</div>
|
763
|
+
</div>
|
764
|
+
|
765
|
+
<div id="method-M000314" class="method-detail">
|
766
|
+
<a name="M000314"></a>
|
767
|
+
|
768
|
+
<div class="method-heading">
|
769
|
+
<a href="#M000314" class="method-signature">
|
770
|
+
<span class="method-name">setup_test</span><span class="method-args">()</span>
|
771
|
+
</a>
|
772
|
+
</div>
|
773
|
+
|
774
|
+
<div class="method-description">
|
775
|
+
<p>
|
776
|
+
sets up a test for <a href="Ddt.html#M000307">run</a>
|
777
|
+
</p>
|
778
|
+
<p><a class="source-toggle" href="#"
|
779
|
+
onclick="toggleCode('M000314-source');return false;">[Source]</a></p>
|
780
|
+
<div class="method-source-code" id="M000314-source">
|
781
|
+
<pre>
|
782
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 83</span>
|
783
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup_test</span>
|
784
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post</span>(<span class="ruby-value str">"session/setupTest"</span>)
|
785
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
786
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
787
|
+
<span class="ruby-keyword kw">end</span>
|
788
|
+
</pre>
|
789
|
+
</div>
|
790
|
+
</div>
|
791
|
+
</div>
|
792
|
+
|
793
|
+
<div id="method-M000315" class="method-detail">
|
794
|
+
<a name="M000315"></a>
|
795
|
+
|
796
|
+
<div class="method-heading">
|
797
|
+
<a href="#M000315" class="method-signature">
|
798
|
+
<span class="method-name">teardown_test</span><span class="method-args">()</span>
|
799
|
+
</a>
|
800
|
+
</div>
|
801
|
+
|
802
|
+
<div class="method-description">
|
803
|
+
<p>
|
804
|
+
tears down a test
|
805
|
+
</p>
|
806
|
+
<p><a class="source-toggle" href="#"
|
807
|
+
onclick="toggleCode('M000315-source');return false;">[Source]</a></p>
|
808
|
+
<div class="method-source-code" id="M000315-source">
|
809
|
+
<pre>
|
810
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 90</span>
|
811
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">teardown_test</span>
|
812
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post</span>(<span class="ruby-value str">"session/test/tearDownTest"</span>)
|
813
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
814
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
815
|
+
<span class="ruby-keyword kw">end</span>
|
816
|
+
</pre>
|
817
|
+
</div>
|
818
|
+
</div>
|
819
|
+
</div>
|
820
|
+
|
821
|
+
<div id="method-M000324" class="method-detail">
|
822
|
+
<a name="M000324"></a>
|
823
|
+
|
824
|
+
<div class="method-heading">
|
825
|
+
<a href="#M000324" class="method-signature">
|
826
|
+
<span class="method-name">wait_until_done</span><span class="method-args">(timeout=120)</span>
|
827
|
+
</a>
|
828
|
+
</div>
|
829
|
+
|
830
|
+
<div class="method-description">
|
831
|
+
<p>
|
832
|
+
waits until the test is done or the timeout expires
|
833
|
+
</p>
|
834
|
+
<pre>
|
835
|
+
* timeout = the time in seconds to wait for the test to complete
|
836
|
+
</pre>
|
837
|
+
<p><a class="source-toggle" href="#"
|
838
|
+
onclick="toggleCode('M000324-source');return false;">[Source]</a></p>
|
839
|
+
<div class="method-source-code" id="M000324-source">
|
840
|
+
<pre>
|
841
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 176</span>
|
842
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">wait_until_done</span>(<span class="ruby-identifier">timeout</span>=<span class="ruby-value">120</span>)
|
843
|
+
<span class="ruby-identifier">finished</span> = <span class="ruby-keyword kw">false</span>
|
844
|
+
<span class="ruby-identifier">interval</span> = <span class="ruby-identifier">timeout</span> <span class="ruby-operator">/</span> <span class="ruby-value">10</span>
|
845
|
+
<span class="ruby-value">10</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span>
|
846
|
+
<span class="ruby-keyword kw">begin</span>
|
847
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">get_testset_status</span>
|
848
|
+
<span class="ruby-comment cmt">#msg "wait_until_done, response = #{response}", Logger::DEBUG</span>
|
849
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">response</span>.<span class="ruby-identifier">nil?</span>
|
850
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">"Done"</span>)
|
851
|
+
<span class="ruby-identifier">finished</span> = <span class="ruby-keyword kw">true</span>
|
852
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">finished</span>
|
853
|
+
<span class="ruby-keyword kw">end</span>
|
854
|
+
<span class="ruby-keyword kw">end</span>
|
855
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
856
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">e</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-comment cmt"># status may not be ready right away. may return a 500</span>
|
857
|
+
<span class="ruby-keyword kw">end</span>
|
858
|
+
<span class="ruby-identifier">sleep</span> <span class="ruby-identifier">interval</span>
|
859
|
+
<span class="ruby-keyword kw">end</span>
|
860
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">finished</span>
|
861
|
+
<span class="ruby-keyword kw">end</span>
|
862
|
+
</pre>
|
863
|
+
</div>
|
864
|
+
</div>
|
865
|
+
</div>
|
866
|
+
|
867
|
+
<h3 class="section-bar">Private Instance methods</h3>
|
868
|
+
|
869
|
+
<div id="method-M000328" class="method-detail">
|
870
|
+
<a name="M000328"></a>
|
871
|
+
|
872
|
+
<div class="method-heading">
|
873
|
+
<a href="#M000328" class="method-signature">
|
874
|
+
<span class="method-name">csv_import</span><span class="method-args">(filepath, filename)</span>
|
875
|
+
</a>
|
876
|
+
</div>
|
877
|
+
|
878
|
+
<div class="method-description">
|
879
|
+
<p>
|
880
|
+
imports a csv file to the <a href="../Mu.html">Mu</a> (TODO: this method is
|
881
|
+
not yet working)
|
882
|
+
</p>
|
883
|
+
<pre>
|
884
|
+
* filepath = the path to the csv file
|
885
|
+
* filename = the name with which to save the file on the Mu
|
886
|
+
</pre>
|
887
|
+
<p><a class="source-toggle" href="#"
|
888
|
+
onclick="toggleCode('M000328-source');return false;">[Source]</a></p>
|
889
|
+
<div class="method-source-code" id="M000328-source">
|
890
|
+
<pre>
|
891
|
+
<span class="ruby-comment cmt"># File lib/mu/api/ddt.rb, line 226</span>
|
892
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">csv_import</span>(<span class="ruby-identifier">filepath</span>, <span class="ruby-identifier">filename</span>)
|
893
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@http</span>.<span class="ruby-identifier">post_form</span>(<span class="ruby-value str">"session/test/import/csv"</span>, <span class="ruby-identifier">filepath</span>, <span class="ruby-identifier">filename</span>)
|
894
|
+
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
895
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">response</span>
|
896
|
+
<span class="ruby-keyword kw">end</span>
|
897
|
+
</pre>
|
898
|
+
</div>
|
899
|
+
</div>
|
900
|
+
</div>
|
901
|
+
|
902
|
+
|
903
|
+
</div>
|
904
|
+
|
905
|
+
|
906
|
+
</div>
|
907
|
+
|
908
|
+
|
909
|
+
<div id="validator-badges">
|
910
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
911
|
+
</div>
|
912
|
+
|
913
|
+
</body>
|
914
|
+
</html>
|