gridinit-jmeter 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/jbhifi_now_search.rb +18 -22
- data/lib/gridinit-jmeter.rb +1 -0
- data/lib/gridinit-jmeter/dsl.rb +91 -77
- data/lib/gridinit-jmeter/helpers/user-agents.rb +29 -0
- data/lib/gridinit-jmeter/version.rb +1 -1
- metadata +3 -2
@@ -5,19 +5,16 @@ require 'open-uri'
|
|
5
5
|
test do
|
6
6
|
|
7
7
|
defaults(
|
8
|
-
:domain
|
9
|
-
:protocol
|
10
|
-
:image_parser
|
11
|
-
:concurrentDwn
|
8
|
+
:domain => 'now.jbhifi.com.au',
|
9
|
+
:protocol => 'https',
|
10
|
+
:image_parser => true,
|
11
|
+
:concurrentDwn => true,
|
12
12
|
:embedded_url_re => '.+?now.((?!\$\{).)*$',
|
13
|
-
:concurrentPool
|
14
|
-
)
|
15
|
-
|
16
|
-
header(
|
17
|
-
'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.27 (KHTML, like Gecko) Chrome/26.0.1386.0 Safari/537.27',
|
18
|
-
'Accept' => '*/*'
|
13
|
+
:concurrentPool => 4
|
19
14
|
)
|
20
15
|
|
16
|
+
with_user_agent :iphone, 'Accept' => '*/*'
|
17
|
+
|
21
18
|
cache :clear_each_iteration => true
|
22
19
|
|
23
20
|
cookies
|
@@ -29,14 +26,13 @@ test do
|
|
29
26
|
transaction 'jbhifi_home' do
|
30
27
|
visit 'home', '/'
|
31
28
|
visit 'choose', '/music/Home/Choose/?_=${__time(,)}', {
|
32
|
-
|
33
|
-
|
34
|
-
|
29
|
+
:follow_redirects => false,
|
30
|
+
:image_parser => true,
|
31
|
+
:embedded_url_re => 'none',
|
35
32
|
} do
|
36
|
-
|
37
|
-
|
33
|
+
with_xhr
|
34
|
+
assert 'contains', 'WELCOME TO JB HI-FI NOW'
|
38
35
|
end
|
39
|
-
|
40
36
|
end
|
41
37
|
|
42
38
|
transaction 'jbhifi_search_xhr' do
|
@@ -48,7 +44,7 @@ test do
|
|
48
44
|
vars.put("search_value", varArray[idx]);
|
49
45
|
EOS
|
50
46
|
get 'tgsearch', '/tgsearch/predictSearch.aspx?id=MD84-225&k=${search_value}' do
|
51
|
-
|
47
|
+
with_xhr
|
52
48
|
end
|
53
49
|
end
|
54
50
|
end
|
@@ -61,10 +57,10 @@ test do
|
|
61
57
|
'numRecords' => 25
|
62
58
|
}
|
63
59
|
} do
|
64
|
-
|
60
|
+
with_xhr
|
65
61
|
extract 'id', '"c":"(.+?)"', {
|
66
62
|
:match_number => 0,
|
67
|
-
:template
|
63
|
+
:template => '$1$'
|
68
64
|
}
|
69
65
|
end
|
70
66
|
end
|
@@ -75,7 +71,7 @@ test do
|
|
75
71
|
'id' => '${id}'
|
76
72
|
}
|
77
73
|
} do
|
78
|
-
|
74
|
+
with_xhr
|
79
75
|
extract 'mp3', '"mp3":"(.+?)"', {
|
80
76
|
:match_number => 0,
|
81
77
|
:template => '$1$'
|
@@ -93,6 +89,6 @@ test do
|
|
93
89
|
|
94
90
|
end
|
95
91
|
|
96
|
-
end.grid ENV['API_TOKEN']
|
97
|
-
|
92
|
+
# end.grid ENV['API_TOKEN']
|
93
|
+
end.jmx
|
98
94
|
# end.run(path: '/usr/share/jmeter/bin/')
|
data/lib/gridinit-jmeter.rb
CHANGED
@@ -10,6 +10,7 @@ require 'gridinit-jmeter/helpers/fallback_content_proxy'
|
|
10
10
|
require 'gridinit-jmeter/helpers/dsl_helper'
|
11
11
|
require 'gridinit-jmeter/helpers/logger-colors'
|
12
12
|
require 'gridinit-jmeter/helpers/strip-heredoc'
|
13
|
+
require 'gridinit-jmeter/helpers/user-agents'
|
13
14
|
|
14
15
|
# TEST PLAN
|
15
16
|
require 'gridinit-jmeter/test_plan/test_plan'
|
data/lib/gridinit-jmeter/dsl.rb
CHANGED
@@ -31,100 +31,116 @@ module Gridinit
|
|
31
31
|
@root.at_xpath("//jmeterTestPlan/hashTree") << node.doc.children << hash_tree
|
32
32
|
|
33
33
|
variables(
|
34
|
-
:name
|
35
|
-
:value
|
34
|
+
:name => 'testguid',
|
35
|
+
:value => '${__P(testguid,${__time(,)})}',
|
36
36
|
:comments => 'The testguid variable is mandatory when running on the Grid.') {}
|
37
37
|
end
|
38
38
|
|
39
39
|
def variables(params={}, &block)
|
40
40
|
node = Gridinit::Jmeter::UserDefinedVariable.new(params)
|
41
|
-
|
41
|
+
attach_to_last(node, caller)
|
42
42
|
self.instance_exec(&block) if block
|
43
43
|
end
|
44
44
|
|
45
45
|
def defaults(params={}, &block)
|
46
46
|
node = Gridinit::Jmeter::RequestDefaults.new(params)
|
47
|
-
|
47
|
+
attach_to_last(node, caller)
|
48
48
|
self.instance_exec(&block) if block
|
49
49
|
end
|
50
50
|
|
51
51
|
def cookies(params={}, &block)
|
52
52
|
node = Gridinit::Jmeter::CookieManager.new(params)
|
53
|
-
|
53
|
+
attach_to_last(node, caller)
|
54
54
|
self.instance_exec(&block) if block
|
55
55
|
end
|
56
56
|
|
57
57
|
def cache(params={}, &block)
|
58
58
|
node = Gridinit::Jmeter::CacheManager.new(params)
|
59
|
-
|
59
|
+
attach_to_last(node, caller)
|
60
60
|
self.instance_exec(&block) if block
|
61
61
|
end
|
62
62
|
|
63
63
|
def header(params={}, &block)
|
64
64
|
node = Gridinit::Jmeter::HeaderManager.new(params)
|
65
|
-
|
65
|
+
attach_to_last(node, caller)
|
66
|
+
self.instance_exec(&block) if block
|
67
|
+
end
|
68
|
+
|
69
|
+
def with_xhr(params={}, &block)
|
70
|
+
node = Gridinit::Jmeter::HeaderManager.new(
|
71
|
+
params.merge('X-Requested-With' => 'XMLHttpRequest')
|
72
|
+
)
|
73
|
+
attach_to_last(node, caller)
|
74
|
+
self.instance_exec(&block) if block
|
75
|
+
end
|
76
|
+
|
77
|
+
def with_user_agent(device, params={}, &block)
|
78
|
+
node = Gridinit::Jmeter::HeaderManager.new(
|
79
|
+
params.merge('User-Agent' => Gridinit::Jmeter::UserAgent.new(device).string)
|
80
|
+
)
|
81
|
+
attach_to_last(node, caller)
|
66
82
|
self.instance_exec(&block) if block
|
67
83
|
end
|
68
84
|
|
69
85
|
def auth(params={}, &block)
|
70
86
|
node = Gridinit::Jmeter::AuthManager.new(params)
|
71
|
-
|
87
|
+
attach_to_last(node, caller)
|
72
88
|
self.instance_exec(&block) if block
|
73
89
|
end
|
74
90
|
|
75
91
|
def threads(num_threads=1, params={}, &block)
|
76
92
|
node = Gridinit::Jmeter::ThreadGroup.new(num_threads, params)
|
77
|
-
|
93
|
+
attach_to_last(node, caller)
|
78
94
|
self.instance_exec(&block) if block
|
79
95
|
end
|
80
96
|
|
81
97
|
def transaction(name="Transaction Contoller", params={}, &block)
|
82
98
|
node = Gridinit::Jmeter::Transaction.new(name, params)
|
83
|
-
|
99
|
+
attach_to_last(node, caller)
|
84
100
|
self.instance_exec(&block) if block
|
85
101
|
end
|
86
102
|
|
87
103
|
def exists(var, params={}, &block)
|
88
104
|
params[:condition] = "'${#{var}}'.length > 0"
|
89
105
|
node = Gridinit::Jmeter::IfController.new("if #{var}", params)
|
90
|
-
|
106
|
+
attach_to_last(node, caller)
|
91
107
|
self.instance_exec(&block) if block
|
92
108
|
end
|
93
109
|
|
94
110
|
def once(name="do once", params={}, &block)
|
95
111
|
node = Gridinit::Jmeter::OnceOnly.new(name, params)
|
96
|
-
|
112
|
+
attach_to_last(node, caller)
|
97
113
|
self.instance_exec(&block) if block
|
98
114
|
end
|
99
115
|
|
100
116
|
def If(name="If Controller", params={}, &block)
|
101
117
|
node = Gridinit::Jmeter::IfController.new(name, params)
|
102
|
-
|
118
|
+
attach_to_last(node, caller)
|
103
119
|
self.instance_exec(&block) if block
|
104
120
|
end
|
105
121
|
|
106
122
|
def Loop(loops=1, params={}, &block)
|
107
123
|
node = Gridinit::Jmeter::LoopController.new(loops, params)
|
108
|
-
|
124
|
+
attach_to_last(node, caller)
|
109
125
|
self.instance_exec(&block) if block
|
110
126
|
end
|
111
127
|
|
112
128
|
def counter(name="counter", params={}, &block)
|
113
129
|
node = Gridinit::Jmeter::CounterConfig.new(name, params)
|
114
|
-
|
130
|
+
attach_to_last(node, caller)
|
115
131
|
self.instance_exec(&block) if block
|
116
132
|
end
|
117
133
|
|
118
134
|
def bsh_pre(script, params={}, &block)
|
119
135
|
node = Gridinit::Jmeter::BeanShellPreProcessor.new(script, params)
|
120
|
-
|
136
|
+
attach_to_last(node, caller)
|
121
137
|
self.instance_exec(&block) if block
|
122
138
|
end
|
123
139
|
|
124
140
|
def visit(name="HTTP Request", url="", params={}, &block)
|
125
141
|
params[:method] = 'GET'
|
126
142
|
node = Gridinit::Jmeter::HttpSampler.new(name, url, params)
|
127
|
-
|
143
|
+
attach_to_last(node, caller)
|
128
144
|
self.instance_exec(&block) if block
|
129
145
|
end
|
130
146
|
|
@@ -133,7 +149,7 @@ module Gridinit
|
|
133
149
|
def submit(name="HTTP Request", url="", params={}, &block)
|
134
150
|
params[:method] = 'POST'
|
135
151
|
node = Gridinit::Jmeter::HttpSampler.new(name, url, params)
|
136
|
-
|
152
|
+
attach_to_last(node, caller)
|
137
153
|
self.instance_exec(&block) if block
|
138
154
|
end
|
139
155
|
|
@@ -148,7 +164,7 @@ module Gridinit
|
|
148
164
|
else
|
149
165
|
Gridinit::Jmeter::RegexExtractor.new(*args)
|
150
166
|
end
|
151
|
-
|
167
|
+
attach_to_last(node, caller)
|
152
168
|
self.instance_exec(&block) if block
|
153
169
|
end
|
154
170
|
|
@@ -156,7 +172,7 @@ module Gridinit
|
|
156
172
|
|
157
173
|
def random_timer(delay=0, range=0, &block)
|
158
174
|
node = Gridinit::Jmeter::GaussianRandomTimer.new(delay, range)
|
159
|
-
|
175
|
+
attach_to_last(node, caller)
|
160
176
|
self.instance_exec(&block) if block
|
161
177
|
end
|
162
178
|
|
@@ -164,52 +180,15 @@ module Gridinit
|
|
164
180
|
|
165
181
|
def assert(match="contains", pattern="", params={}, &block)
|
166
182
|
node = Gridinit::Jmeter::ResponseAssertion.new(match, pattern, params)
|
167
|
-
|
183
|
+
attach_to_last(node, caller)
|
168
184
|
self.instance_exec(&block) if block
|
169
185
|
end
|
170
186
|
|
171
187
|
alias_method :web_reg_find, :assert
|
172
188
|
|
173
|
-
def out(params={})
|
174
|
-
puts doc.to_xml(:indent => 2)
|
175
|
-
end
|
176
|
-
|
177
|
-
def jmx(params={})
|
178
|
-
file(params)
|
179
|
-
logger.info "JMX saved to: #{params[:file]}"
|
180
|
-
end
|
181
|
-
|
182
|
-
def run(params={})
|
183
|
-
file(params)
|
184
|
-
logger.warn "Test executing locally ..."
|
185
|
-
cmd = "#{params[:path]}jmeter -n -t #{params[:file]} -j #{params[:log] ? params[:log] : 'jmeter.log' } -l #{params[:jtl] ? params[:jtl] : 'jmeter.jtl' }"
|
186
|
-
logger.info cmd
|
187
|
-
`#{cmd}`
|
188
|
-
logger.info "Results at: #{params[:jtl] ? params[:jtl] : 'jmeter.jtl'}"
|
189
|
-
end
|
190
|
-
|
191
|
-
def grid(token, params={})
|
192
|
-
RestClient.proxy = params[:proxy] if params[:proxy]
|
193
|
-
begin
|
194
|
-
file = Tempfile.new('jmeter')
|
195
|
-
file.write(doc.to_xml(:indent => 2))
|
196
|
-
file.rewind
|
197
|
-
response = RestClient.post "http://#{params[:endpoint] ? params[:endpoint] : 'gridinit.com'}/api?token=#{token}®ion=#{params[:region]}",
|
198
|
-
{
|
199
|
-
:name => 'attachment',
|
200
|
-
:attachment => File.new("#{file.path}", 'rb'),
|
201
|
-
:multipart => true,
|
202
|
-
:content_type => 'application/octet-stream'
|
203
|
-
}
|
204
|
-
logger.info "Results at: #{JSON.parse(response)["results"]}" if response.code == 200
|
205
|
-
rescue => e
|
206
|
-
logger.fatal "There was an error: #{e.message}"
|
207
|
-
end
|
208
|
-
end
|
209
|
-
|
210
189
|
def view_results_full_visualizer(name="View Results Tree", params={}, &block)
|
211
190
|
node = Gridinit::Jmeter::ViewResultsFullVisualizer.new(name, params)
|
212
|
-
|
191
|
+
attach_to_last(node, caller)
|
213
192
|
self.instance_exec(&block) if block
|
214
193
|
end
|
215
194
|
|
@@ -217,25 +196,25 @@ module Gridinit
|
|
217
196
|
|
218
197
|
def table_visualizer(name="View Results in Table", params={}, &block)
|
219
198
|
node = Gridinit::Jmeter::TableVisualizer.new(name, params)
|
220
|
-
|
199
|
+
attach_to_last(node, caller)
|
221
200
|
self.instance_exec(&block) if block
|
222
201
|
end
|
223
202
|
|
224
203
|
def graph_visualizer(name="Graph Results", params={}, &block)
|
225
204
|
node = Gridinit::Jmeter::GraphVisualizer.new(name, params)
|
226
|
-
|
205
|
+
attach_to_last(node, caller)
|
227
206
|
self.instance_exec(&block) if block
|
228
207
|
end
|
229
208
|
|
230
209
|
def stat_visualizer(name="Stat Results", params={}, &block)
|
231
210
|
node = Gridinit::Jmeter::StatVisualizer.new(name, params)
|
232
|
-
|
211
|
+
attach_to_last(node, caller)
|
233
212
|
self.instance_exec(&block) if block
|
234
213
|
end
|
235
214
|
|
236
215
|
def response_time_graph_visualizer(name="Reponse Time Graph", params={}, &block)
|
237
216
|
node = Gridinit::Jmeter::ResponseTimeGraphVisualizer.new(name, params)
|
238
|
-
|
217
|
+
attach_to_last(node, caller)
|
239
218
|
self.instance_exec(&block) if block
|
240
219
|
end
|
241
220
|
|
@@ -243,51 +222,88 @@ module Gridinit
|
|
243
222
|
|
244
223
|
def summary_report(name="Summary Report", params={}, &block)
|
245
224
|
node = Gridinit::Jmeter::SummaryReport.new(name, params)
|
246
|
-
|
225
|
+
attach_to_last(node, caller)
|
247
226
|
self.instance_exec(&block) if block
|
248
227
|
end
|
249
228
|
|
250
229
|
def ldap_ext(name="LDAPExtSampler", params={}, &block)
|
251
230
|
node = Gridinit::Jmeter::LDAPExtSampler.new(name, params)
|
252
|
-
|
231
|
+
attach_to_last(node, caller)
|
253
232
|
self.instance_exec(&block) if block
|
254
233
|
end
|
255
234
|
|
256
235
|
def gc_response_codes_per_second(name="jp@gc - Response Codes per Second", params={}, &block)
|
257
236
|
node = Gridinit::Jmeter::GCResponseCodesPerSecond.new(name, params)
|
258
|
-
|
237
|
+
attach_to_last(node, caller)
|
259
238
|
self.instance_exec(&block) if block
|
260
239
|
end
|
261
240
|
|
262
241
|
def gc_response_times_distribution(name="jp@gc - Response Times Distribution", params={}, &block)
|
263
242
|
node = Gridinit::Jmeter::GCResponseTimesDistribution.new(name, params)
|
264
|
-
|
243
|
+
attach_to_last(node, caller)
|
265
244
|
self.instance_exec(&block) if block
|
266
245
|
end
|
267
246
|
|
268
247
|
def gc_response_times_over_time(name="jp@gc - Response Times Over Time", params={}, &block)
|
269
248
|
node = Gridinit::Jmeter::GCResponseTimesOverTime.new(name, params)
|
270
|
-
|
249
|
+
attach_to_last(node, caller)
|
271
250
|
self.instance_exec(&block) if block
|
272
251
|
end
|
273
252
|
|
274
253
|
def gc_response_times_percentiles(name="jp@gc - Response Times Percentiles", params={}, &block)
|
275
254
|
node = Gridinit::Jmeter::GCResponseTimesPercentiles.new(name, params)
|
276
|
-
|
255
|
+
attach_to_last(node, caller)
|
277
256
|
self.instance_exec(&block) if block
|
278
257
|
end
|
279
258
|
|
280
259
|
def gc_transactions_per_second(name="jp@gc - Transactions per Second", params={}, &block)
|
281
260
|
node = Gridinit::Jmeter::GCTransactionsPerSecond.new(name, params)
|
282
|
-
|
261
|
+
attach_to_last(node, caller)
|
283
262
|
self.instance_exec(&block) if block
|
284
263
|
end
|
285
264
|
|
286
265
|
def gc_latencies_over_time(name="jp@gc - Response Latencies Over Time", params={}, &block)
|
287
266
|
node = Gridinit::Jmeter::GCLatenciesOverTime.new(name, params)
|
288
|
-
|
267
|
+
attach_to_last(node, caller)
|
289
268
|
self.instance_exec(&block) if block
|
290
269
|
end
|
270
|
+
|
271
|
+
def out(params={})
|
272
|
+
puts doc.to_xml(:indent => 2)
|
273
|
+
end
|
274
|
+
|
275
|
+
def jmx(params={})
|
276
|
+
file(params)
|
277
|
+
logger.info "JMX saved to: #{params[:file]}"
|
278
|
+
end
|
279
|
+
|
280
|
+
def run(params={})
|
281
|
+
file(params)
|
282
|
+
logger.warn "Test executing locally ..."
|
283
|
+
cmd = "#{params[:path]}jmeter -n -t #{params[:file]} -j #{params[:log] ? params[:log] : 'jmeter.log' } -l #{params[:jtl] ? params[:jtl] : 'jmeter.jtl' }"
|
284
|
+
logger.info cmd
|
285
|
+
`#{cmd}`
|
286
|
+
logger.info "Results at: #{params[:jtl] ? params[:jtl] : 'jmeter.jtl'}"
|
287
|
+
end
|
288
|
+
|
289
|
+
def grid(token, params={})
|
290
|
+
RestClient.proxy = params[:proxy] if params[:proxy]
|
291
|
+
begin
|
292
|
+
file = Tempfile.new('jmeter')
|
293
|
+
file.write(doc.to_xml(:indent => 2))
|
294
|
+
file.rewind
|
295
|
+
response = RestClient.post "http://#{params[:endpoint] ? params[:endpoint] : 'gridinit.com'}/api?token=#{token}®ion=#{params[:region]}",
|
296
|
+
{
|
297
|
+
:name => 'attachment',
|
298
|
+
:attachment => File.new("#{file.path}", 'rb'),
|
299
|
+
:multipart => true,
|
300
|
+
:content_type => 'application/octet-stream'
|
301
|
+
}
|
302
|
+
logger.info "Results at: #{JSON.parse(response)["results"]}" if response.code == 200
|
303
|
+
rescue => e
|
304
|
+
logger.fatal "There was an error: #{e.message}"
|
305
|
+
end
|
306
|
+
end
|
291
307
|
|
292
308
|
private
|
293
309
|
|
@@ -295,10 +311,10 @@ module Gridinit
|
|
295
311
|
Nokogiri::XML::Node.new("hashTree", @root)
|
296
312
|
end
|
297
313
|
|
298
|
-
def
|
314
|
+
def attach_to_last(node, calling_method)
|
299
315
|
xpath = xpath_from(calling_method)
|
300
|
-
|
301
|
-
node
|
316
|
+
last_node = @root.xpath(xpath).last
|
317
|
+
last_node << node.doc.children << hash_tree
|
302
318
|
end
|
303
319
|
|
304
320
|
def xpath_from(calling_method)
|
@@ -353,7 +369,5 @@ module Gridinit
|
|
353
369
|
end
|
354
370
|
|
355
371
|
def test(&block)
|
356
|
-
|
357
|
-
t.out
|
358
|
-
t
|
372
|
+
Gridinit.dsl_eval(Gridinit::Jmeter::DSL.new, &block)
|
359
373
|
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Gridinit
|
2
|
+
module Jmeter
|
3
|
+
class UserAgent
|
4
|
+
def initialize(device)
|
5
|
+
@common_devices = {
|
6
|
+
:iphone => 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B179 Safari/7534.48.3',
|
7
|
+
:ipod => 'Mozilla/5.0 (iPod; CPU iPhone OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3',
|
8
|
+
:ipad => 'Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3',
|
9
|
+
:safari_osx => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.25 (KHTML, like Gecko) Version/6.0 Safari/536.25',
|
10
|
+
:safari_win => 'Mozilla/5.0 (Windows; Windows NT 6.1) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2',
|
11
|
+
:ie7 => 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)',
|
12
|
+
:ie8 => 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)',
|
13
|
+
:ie9 => 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)',
|
14
|
+
:chrome_osx => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5',
|
15
|
+
:chrome_win => 'Mozilla/5.0 (Windows; Windows NT 6.1) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5',
|
16
|
+
:ff_osx => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20100101 Firefox/11.0',
|
17
|
+
:ff_win => 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
|
18
|
+
:opera_osx => 'Opera/9.80 (Macintosh; Intel Mac OS X 10.7.4; U; en) Presto/2.10.229 Version/11.62',
|
19
|
+
:opera_win => 'Opera/9.80 (Windows NT 6.1; U; en) Presto/2.10.229 Version/11.62'
|
20
|
+
}
|
21
|
+
@device = device
|
22
|
+
end
|
23
|
+
|
24
|
+
def string
|
25
|
+
@common_devices[@device] || @common_devices[:chrome_osx]
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gridinit-jmeter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-02-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|
@@ -102,6 +102,7 @@ files:
|
|
102
102
|
- lib/gridinit-jmeter/helpers/fallback_content_proxy.rb
|
103
103
|
- lib/gridinit-jmeter/helpers/logger-colors.rb
|
104
104
|
- lib/gridinit-jmeter/helpers/strip-heredoc.rb
|
105
|
+
- lib/gridinit-jmeter/helpers/user-agents.rb
|
105
106
|
- lib/gridinit-jmeter/listeners/gc_latencies_over_time.rb
|
106
107
|
- lib/gridinit-jmeter/listeners/gc_response_codes_per_second.rb
|
107
108
|
- lib/gridinit-jmeter/listeners/gc_response_times_distribution.rb
|