ruby-jmeter 2.12.5 → 2.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 67256bea2ac70d78ae81cfd385217d5117f6952e
4
- data.tar.gz: 416fac8d1209b9f9645f3a3a385ca2e6fd7748eb
3
+ metadata.gz: 6cfaa73f375f18dcbed1578b3fbe7da0d4272dbf
4
+ data.tar.gz: ccb0f5f16e5b9078b188f4759bc4cb7a991a0784
5
5
  SHA512:
6
- metadata.gz: 4a0a01e3eae46e57a288cd7cd6721f1806a0eb2e75b02c2596ad9c741b422425982963fa74bf15f80dc18b38bc48999f88dac947f2e68ee9a7af2288270f95ae
7
- data.tar.gz: f004d84a487a028f85094f3e4cc2f838d449c2b99d5aecc0c43dc0a429f4ad42868650f837a0219b7b4fe90d052386cd0a1f8155316d9301b07af2cb0038dce8
6
+ metadata.gz: 4b2d0839a1e28d74952b202740f3ce8449ca1c18a2351cf0fd4db7888ff2e0d5714f0109ff8a604909105bddd7c64af69ad2029e00faad1b9794af5cbaea8816
7
+ data.tar.gz: 86866132e9fd56e6537ba3278eb2400817903dea4ce360bc302fe04a0aa502ae271fd55440bfeb6884a83db6c330137d305ae1bce6f83a77e6f787fede245bff
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.1.1
1
+ 2.2.0
data/.travis.yml CHANGED
@@ -1,3 +1,3 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.1
3
+ - 2.2.0
data/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changes
2
2
 
3
+ ## v2.13.0
4
+
5
+ - Update to JMeter 2.13
6
+
3
7
  ## v2.11.11
4
8
 
5
9
  - Support for `test_fragment` for use with the `module_controller`. [See example here](https://github.com/flood-io/ruby-jmeter/blob/master/examples/basic_test_fragment.rb).
data/Gemfile CHANGED
@@ -13,9 +13,6 @@ end
13
13
 
14
14
  group :development do
15
15
  gem 'pry', :require => 'pry'
16
- gem 'pry-nav', :require => 'pry-nav'
17
- gem 'pry-debugger', :require => 'pry-debugger'
18
- gem 'awesome_print', :require => 'ap'
19
16
  end
20
17
 
21
18
  group :test do
data/README.md CHANGED
@@ -8,6 +8,8 @@ Tired of using the JMeter GUI or looking at hairy XML files?
8
8
 
9
9
  This gem lets you write test plans for JMeter in your favourite text editor, and optionally run them on [flood.io](http://flood.io).
10
10
 
11
+ ![](https://flood.io/images/logo-flood-medium.png)
12
+
11
13
  ## Installation
12
14
 
13
15
  Install it yourself as:
@@ -99,26 +101,41 @@ end.run(
99
101
  jtl: 'results.jtl')
100
102
  ```
101
103
 
102
- ### Running a JMeter Test Plan on flood.io
104
+ ### Running a JMeter Test Plan on Flood IO
103
105
 
104
- You can also execute JMeter test plans on flood.io using our API. To do so, you require an account and API token. If you don't know your token, sign in to [flood.io](https://flood.io/api) and check your account settings.
106
+ You can also execute JMeter test plans on Flood IO using our API. To do so, you require an account and API token. If you don't know your token, sign in to [flood.io](https://flood.io/) and check your account settings.
105
107
 
106
- To execute the test on flood.io, call the `grid` method on the test and pass it the API token like this.
108
+ To execute the test on Flood IO, call the `flood` method on the test and pass it the API token like this.
107
109
 
108
110
  ```ruby
109
111
  test do
110
112
  threads count: 10 do
111
113
  visit name: 'Google Search', url: 'http://google.com'
112
114
  end
113
- end.grid('OxtZ-4v-v0koSz5Y0enEQQ')
115
+ end.flood(
116
+ ENV['FLOOD_API_TOKEN'],
117
+ name: 'Demo',
118
+ privacy_flag: 'public',
119
+ region: 'ap-southeast-2'
120
+ )
114
121
  ```
115
122
 
116
- This will then provide you with a link to the live test results on flood.io like this.
123
+ This will then provide you with a link to the live test results on Flood IO like this.
117
124
 
118
125
  ```
119
- Results at: http://prod.flood.io/shared?testguid=73608030311611e2962f123141011033&run_id=339&tags=jmeter&domain=altentee.com&cluster=54.251.48.129&status=running&view=
126
+ I, [2015-02-24T11:15:25.669029 #14010] INFO -- : Flood results at: https://flood.io/AbRWkFl7VODYCkQuy3ffvA
120
127
  ```
121
128
 
129
+ Note you will need to provide a `grid` or `region` parameter to the `.flood` method to describe which grid to distribute the flood test to. You can find the Grid ID from the URL of the target grid in your [grids](https://flood.io/dashboard/grids) dashboard e.g.:
130
+
131
+ ![](https://s3.amazonaws.com/flood-io-support/Flood_IO_2015-02-24_11-43-21.jpg)
132
+
133
+ Flood IO provides a shared grid for free, suitable for 5 minute tests, check your dashboard for the latest grid:
134
+
135
+ ![](https://s3.amazonaws.com/flood-io-support/Flood_IO_2015-02-24_11-44-29.jpg)
136
+
137
+ Alternatively upgrade to a paid subscription on Flood IO and start your own grids on demand.
138
+
122
139
  ## Advanced Usage
123
140
 
124
141
  ### Blocks
@@ -352,7 +369,7 @@ end
352
369
 
353
370
  ## Roadmap
354
371
 
355
- This work is being sponsored by flood.io. Get in touch with us if you'd like to be involved.
372
+ This work is being sponsored by Flood IO. Get in touch with us if you'd like to be involved.
356
373
 
357
374
  ## Contributing
358
375
 
@@ -4,4 +4,4 @@ require 'ruby-jmeter'
4
4
  test do
5
5
  # Simulate user agent, accept and accept-encodings of typical browsers
6
6
  with_browser :ie9
7
- end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)
7
+ end.run(path: '/usr/share/jmeter-2.13/bin/', gui: true)
@@ -12,4 +12,4 @@ test do
12
12
  visit name: 'Home Page', url: 'http://google.com/'
13
13
  end
14
14
  end
15
- end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)
15
+ end.run(path: '/usr/share/jmeter-2.13/bin/', gui: true)
@@ -8,4 +8,4 @@ test do
8
8
  extract regex: 'pattern', name: 'jmeter_variable_regex', variable: 'test'
9
9
  end
10
10
  end
11
- end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)
11
+ end.run(path: '/usr/share/jmeter-2.13/bin/', gui: true)
@@ -10,4 +10,4 @@ test do
10
10
  'DO_MULTIPART_POST' => true
11
11
  end
12
12
  end
13
- end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)
13
+ end.run(path: '/usr/share/jmeter-2.13/bin/', gui: true)
@@ -8,5 +8,5 @@ test do
8
8
  end
9
9
  end
10
10
 
11
- # end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)
11
+ # end.run(path: '/usr/share/jmeter-2.13/bin/', gui: true)
12
12
  end.flood(ENV['FLOOD_API_TOKEN'])
@@ -7,4 +7,4 @@ test do
7
7
  visit name: 'Home Page', url: 'http://google.com/'
8
8
  end
9
9
  end
10
- end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)
10
+ end.run(path: '/usr/share/jmeter-2.13/bin/', gui: true)
@@ -28,4 +28,4 @@ test do
28
28
 
29
29
  end
30
30
 
31
- end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)
31
+ end.run(path: '/usr/share/jmeter-2.13/bin/', gui: true)
@@ -11,4 +11,4 @@ test do
11
11
  module_controller test_fragment: 'WorkBench/TestPlan/anonymous_user'
12
12
  end
13
13
 
14
- end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)
14
+ end.run(path: '/usr/share/jmeter-2.13/bin/', gui: true)
@@ -4,4 +4,4 @@ require 'ruby-jmeter'
4
4
  test do
5
5
  threads count: 100, rampup: 3600, loops: 10, scheduler: false do
6
6
  end
7
- end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)
7
+ end.run(path: '/usr/share/jmeter-2.13/bin/', gui: true)
@@ -0,0 +1,14 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ require 'ruby-jmeter'
3
+
4
+ test do
5
+ threads count: 10, duration: 180, continue_forever: true do
6
+ think_time 5_000
7
+ visit name: 'Google Search', url: 'http://google.com'
8
+ end
9
+ end.flood(
10
+ ENV['FLOOD_API_TOKEN'],
11
+ name: 'Demo',
12
+ privacy_flag: 'public',
13
+ grid: 'a3Hf9pIs30DX0pYfitU4AA' # UUID of the target grid
14
+ )
@@ -2,10 +2,14 @@ require 'ruby-jmeter'
2
2
 
3
3
  test do
4
4
  threads 1 do
5
- get name: '__testdata', url: 'http://54.252.206.143:8080/SRANDMEMBER/postcodes?type=text' do
5
+ get name: '__testdata', url: 'http://54.252.206.143:8080/SRANDMEMBER/postcodes?type=text' do
6
6
  extract name: 'postcode', regex: '^.+?"(\d+)"'
7
7
  end
8
8
  visit name: 'Search Post Code', url: 'http://google.com/?q=${postcode}'
9
9
  end
10
- # end.flood(ENV['FLOOD_API_TOKEN'], {region: 'us-west-2'})
11
- end.run(path: '/usr/share/jmeter/bin/', gui: true)
10
+ end.flood(
11
+ ENV['FLOOD_API_TOKEN'],
12
+ name: 'Demo',
13
+ privacy_flag: 'public',
14
+ region: 'us-west-2' # Region of the target grid
15
+ )
@@ -2,9 +2,9 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
  require 'ruby-jmeter'
3
3
 
4
4
  test do
5
-
6
- defaults domain: 'www.immi.gov.au',
7
- protocol: 'http',
5
+
6
+ defaults domain: 'www.immi.gov.au',
7
+ protocol: 'http',
8
8
  image_parser: true,
9
9
  concurrentDwn: true,
10
10
  concurrentPool: 4
@@ -15,15 +15,15 @@ test do
15
15
 
16
16
  with_user_agent :iphone
17
17
 
18
- header [
18
+ header [
19
19
  { name: 'Accept-Encoding', value: 'gzip,deflate,sdch' },
20
20
  { name: 'Accept', value: 'text/javascript, text/html, application/xml, text/xml, */*' }
21
21
  ]
22
-
22
+
23
23
  threads 1, {
24
- rampup: 1,
24
+ rampup: 1,
25
25
  scheduler: true,
26
- duration: 300,
26
+ duration: 300,
27
27
  continue_forever: true
28
28
  } do
29
29
 
@@ -34,7 +34,7 @@ test do
34
34
  extract xpath: "//select[@id='Q1']/option/@value", name: 'q1', tolerant: true
35
35
  end
36
36
  end
37
- # ${__Random(1,${q1_matchNr},n)}
37
+ # ${__Random(1,${q1_matchNr},n)}
38
38
  # $__V{q1_${n}}
39
39
  # $__V{q1_${${__Random(1,${q1_matchNr},)}}}
40
40
 
@@ -67,12 +67,12 @@ test do
67
67
 
68
68
  view_results
69
69
 
70
- log filename: '/var/log/flood/custom.log', error_logging: true
70
+ log filename: '/var/log/flood/custom.log', error_logging: true
71
71
 
72
72
  end
73
- end.run(path: '/usr/share/jmeter/bin/', gui: true)
74
- # end.jmx
75
- # end.flood ENV['FLOOD_API_TOKEN'], {
76
- # region: 'ap-southeast-2',
77
- # name: 'Demo for Immi'
78
- # }
73
+ end.flood(
74
+ ENV['FLOOD_API_TOKEN'],
75
+ name: 'Demo',
76
+ privacy_flag: 'public',
77
+ region: 'us-west-2' # Region of the target grid
78
+ )
@@ -38,4 +38,4 @@ test do
38
38
  home = HomePage.new(self)
39
39
  home.visit
40
40
  end
41
- end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)
41
+ end.run(path: '/usr/share/jmeter-2.13/bin/', gui: true)
@@ -42,7 +42,7 @@ class VirtualUser
42
42
  pause
43
43
  end
44
44
 
45
- # Searches for a repository.
45
+ # Searches for a repository.
46
46
  # @param repo [String] the repository to search for
47
47
  def search_for_repository(repo)
48
48
  visit name: 'Search for project', url: '/search',
@@ -108,5 +108,5 @@ test do
108
108
  user.view_branch '/flood-io/ruby-jmeter/tree/v2.11.8'
109
109
 
110
110
  end
111
- end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)
111
+ end.run(path: '/usr/share/jmeter-2.13/bin/', gui: true)
112
112
 
@@ -223,6 +223,8 @@
223
223
  `monitor_results`
224
224
  - Response Time Graph
225
225
  `response_time_graph`
226
+ - Response Time Graph
227
+ `response_time_graph`
226
228
  - Save Responses to a file
227
229
  `save_responses_to_a_file`
228
230
  - Simple Data Writer
@@ -6,14 +6,14 @@ module RubyJmeter
6
6
  def initialize(params = {})
7
7
  @root = Nokogiri::XML(<<-EOF.strip_heredoc)
8
8
  <?xml version="1.0" encoding="UTF-8"?>
9
- <jmeterTestPlan version="1.2" properties="2.7" jmeter="2.12 r1636949">
9
+ <jmeterTestPlan version="1.2" properties="2.8" jmeter="2.13" ruby-jmeter="2.13.0">
10
10
  <hashTree>
11
11
  </hashTree>
12
12
  </jmeterTestPlan>
13
13
  EOF
14
14
  node = RubyJmeter::TestPlan.new(params)
15
15
 
16
- @current_node = @root.at_xpath("//jmeterTestPlan/hashTree")
16
+ @current_node = @root.at_xpath('//jmeterTestPlan/hashTree')
17
17
  @current_node = attach_to_last(node)
18
18
  end
19
19
 
@@ -29,7 +29,7 @@ module RubyJmeter
29
29
 
30
30
  alias_method :variables, :user_defined_variables
31
31
 
32
- def http_request_defaults(params={}, &block)
32
+ def http_request_defaults(params = {}, &block)
33
33
  params[:image_parser] = true if params.keys.include? :download_resources
34
34
  params[:concurrentDwn] = true if params.keys.include? :use_concurrent_pool
35
35
  params[:concurrentPool] = params[:use_concurrent_pool] if params.keys.include? :use_concurrent_pool
@@ -39,14 +39,14 @@ module RubyJmeter
39
39
 
40
40
  alias_method :defaults, :http_request_defaults
41
41
 
42
- def http_cookie_manager(params={}, &block)
42
+ def http_cookie_manager(params = {}, &block)
43
43
  params[:clearEachIteration] = true if params.keys.include? :clear_each_iteration
44
44
  super
45
45
  end
46
46
 
47
47
  alias_method :cookies, :http_cookie_manager
48
48
 
49
- def http_cache_manager(params={}, &block)
49
+ def http_cache_manager(params = {}, &block)
50
50
  params[:clearEachIteration] = true if params.keys.include? :clear_each_iteration
51
51
  super
52
52
  end
@@ -81,13 +81,13 @@ module RubyJmeter
81
81
  def thread_group(*args, &block)
82
82
  params = args.shift || {}
83
83
  params = { count: params }.merge(args.shift || {}) if params.class == Fixnum
84
- params[:num_threads] = params[:count] || 1
85
- params[:ramp_time] = params[:rampup] || (params[:num_threads]/2.0).ceil
86
- params[:start_time] = params[:start_time] || Time.now.to_i * 1000
87
- params[:end_time] = params[:end_time] || Time.now.to_i * 1000
88
- params[:duration] ||= 60
84
+ params[:num_threads] = params[:count] || 1
85
+ params[:ramp_time] = params[:rampup] || (params[:num_threads]/2.0).ceil
86
+ params[:start_time] = params[:start_time] || Time.now.to_i * 1000
87
+ params[:end_time] = params[:end_time] || Time.now.to_i * 1000
88
+ params[:duration] ||= 60
89
89
  params[:continue_forever] ||= false
90
- params[:loops] = -1 if params[:continue_forever]
90
+ params[:loops] = -1 if params[:continue_forever]
91
91
  node = RubyJmeter::ThreadGroup.new(params)
92
92
  attach_node(node, &block)
93
93
  end
@@ -219,7 +219,6 @@ module RubyJmeter
219
219
 
220
220
  alias_method :ldap_extended, :ldap_extended_request
221
221
 
222
-
223
222
  ##
224
223
  # Controllers
225
224
 
@@ -361,7 +360,7 @@ module RubyJmeter
361
360
  alias_method :web_reg_save_param, :extract
362
361
 
363
362
  def random_timer(delay=0, range=0, &block)
364
- params={}
363
+ params = {}
365
364
  params[:delay] = delay
366
365
  params[:range] = range
367
366
  node = RubyJmeter::GaussianRandomTimer.new(params)
@@ -374,16 +373,16 @@ module RubyJmeter
374
373
  params[:value] ||= params[:throughput] || 0.0
375
374
 
376
375
  node = RubyJmeter::ConstantThroughputTimer.new(params)
377
- node.doc.xpath(".//value").first.content = params[:value].to_f
376
+ node.doc.xpath('.//value').first.content = params[:value].to_f
378
377
 
379
378
  attach_node(node, &block)
380
379
  end
381
380
 
382
381
  alias_method :ConstantThroughputTimer, :constant_throughput_timer
383
382
 
384
- def response_assertion(params={}, &block)
383
+ def response_assertion(params = {}, &block)
385
384
  params[:test_type] = parse_test_type(params)
386
- params["0"] = params.values.first
385
+ params['0'] = params.values.first
387
386
  node = RubyJmeter::ResponseAssertion.new(params)
388
387
  node.doc.xpath("//stringProp[@name='Assertion.scope']").remove if
389
388
  params[:scope] == 'main' || params['scope'] == 'main'
@@ -397,79 +396,79 @@ module RubyJmeter
397
396
  ##
398
397
  # JMeter Plugins
399
398
 
400
- def response_codes_per_second(name="Response Codes per Second", params={}, &block)
399
+ def response_codes_per_second(name = 'Response Codes per Second', params = {}, &block)
401
400
  node = RubyJmeter::Plugins::ResponseCodesPerSecond.new(name, params)
402
401
  attach_node(node, &block)
403
402
  end
404
403
 
405
- def response_times_distribution(name="Response Times Distribution", params={}, &block)
404
+ def response_times_distribution(name = 'Response Times Distribution', params = {}, &block)
406
405
  node = RubyJmeter::Plugins::ResponseTimesDistribution.new(name, params)
407
406
  attach_node(node, &block)
408
407
  end
409
408
 
410
- def response_times_over_time(name="Response Times Over Time", params={}, &block)
409
+ def response_times_over_time(name = 'Response Times Over Time', params = {}, &block)
411
410
  node = RubyJmeter::Plugins::ResponseTimesOverTime.new(name, params)
412
411
  attach_node(node, &block)
413
412
  end
414
413
 
415
- def response_times_percentiles(name="Response Times Percentiles", params={}, &block)
414
+ def response_times_percentiles(name = 'Response Times Percentiles', params = {}, &block)
416
415
  node = RubyJmeter::Plugins::ResponseTimesPercentiles.new(name, params)
417
416
  attach_node(node, &block)
418
417
  end
419
418
 
420
- def transactions_per_second(name="Transactions per Second", params={}, &block)
419
+ def transactions_per_second(name = 'Transactions per Second', params = {}, &block)
421
420
  node = RubyJmeter::Plugins::TransactionsPerSecond.new(name, params)
422
421
  attach_node(node, &block)
423
422
  end
424
423
 
425
- def latencies_over_time(name="Response Latencies Over Time", params={}, &block)
424
+ def latencies_over_time(name = 'Response Latencies Over Time', params = {}, &block)
426
425
  node = RubyJmeter::Plugins::LatenciesOverTime.new(name, params)
427
426
  attach_node(node, &block)
428
427
  end
429
428
 
430
- def console_status_logger(name="Console Status Logger", params={}, &block)
429
+ def console_status_logger(name = 'Console Status Logger', params = {}, &block)
431
430
  node = RubyJmeter::Plugins::ConsoleStatusLogger.new(name, params)
432
431
  attach_node(node, &block)
433
432
  end
434
433
 
435
434
  alias_method :console, :console_status_logger
436
435
 
437
- def throughput_shaper(name="Throughput Shaping Timer", steps=[], params={}, &block)
436
+ def throughput_shaper(name = 'Throughput Shaping Timer', steps=[], params = {}, &block)
438
437
  node = RubyJmeter::Plugins::ThroughputShapingTimer.new(name, steps)
439
438
  attach_node(node, &block)
440
439
  end
441
440
 
442
441
  alias_method :shaper, :throughput_shaper
443
442
 
444
- def dummy_sampler(name="Dummy Sampler", params={}, &block)
443
+ def dummy_sampler(name = 'Dummy Sampler', params = {}, &block)
445
444
  node = RubyJmeter::Plugins::DummySampler.new(name, params)
446
445
  attach_node(node, &block)
447
446
  end
448
447
 
449
448
  alias_method :dummy, :dummy_sampler
450
449
 
451
- def stepping_thread_group(params={}, &block)
450
+ def stepping_thread_group(params = {}, &block)
452
451
  node = RubyJmeter::Plugins::SteppingThreadGroup.new(params)
453
452
  attach_node(node, &block)
454
453
  end
455
454
 
456
455
  alias_method :step, :stepping_thread_group
457
456
 
458
- def composite_graph(name, params={}, &block)
457
+ def composite_graph(name, params = {}, &block)
459
458
  node = RubyJmeter::Plugins::CompositeGraph.new(name, params)
460
459
  attach_node(node, &block)
461
460
  end
462
461
 
463
462
  alias_method :composite, :composite_graph
464
463
 
465
- def active_threads_over_time(params={}, &block)
464
+ def active_threads_over_time(params = {}, &block)
466
465
  node = RubyJmeter::Plugins::ActiveThreadsOverTime.new(params)
467
466
  attach_node(node, &block)
468
467
  end
469
468
 
470
469
  alias_method :active_threads, :active_threads_over_time
471
470
 
472
- def perfmon_collector(name, params={}, &block)
471
+ def perfmon_collector(name, params = {}, &block)
473
472
  node = RubyJmeter::Plugins::PerfmonCollector.new(name, params)
474
473
  attach_node(node, &block)
475
474
  end
@@ -478,11 +477,11 @@ module RubyJmeter
478
477
 
479
478
  # API Methods
480
479
 
481
- def out(params={})
480
+ def out(params = {})
482
481
  puts doc.to_xml(:indent => 2)
483
482
  end
484
483
 
485
- def jmx(params={})
484
+ def jmx(params = {})
486
485
  file(params)
487
486
  logger.info "Test plan saved to: #{params[:file]}"
488
487
  end
@@ -495,7 +494,7 @@ module RubyJmeter
495
494
  doc.clone
496
495
  end
497
496
 
498
- def run(params={})
497
+ def run(params = {})
499
498
  file(params)
500
499
  logger.warn "Test executing locally ..."
501
500
  properties = params.has_key?(:properties) ? params[:properties] : "#{File.dirname(__FILE__)}/helpers/jmeter.properties"
@@ -515,21 +514,19 @@ module RubyJmeter
515
514
  end
516
515
 
517
516
  exit_status = wait_thr.value
518
- unless exit_status.success?
519
- abort "FAILED !!! #{cmd}"
520
- end
517
+ abort "FAILED !!! #{cmd}" unless exit_status.success?
521
518
  end
522
519
  logger.info "Local Results at: #{params[:jtl] ? params[:jtl] : 'jmeter.jtl'}"
523
520
  end
524
521
 
525
- def flood(token, params={})
522
+ def flood(token, params = {})
526
523
  if params[:region] == 'local'
527
- logger.info "Starting test ..."
524
+ logger.info 'Starting test ...'
528
525
  params[:started] = Time.now
529
526
  run params
530
527
  params[:stopped] = Time.now
531
- logger.info "Completed test ..."
532
- logger.debug "Uploading results ..." if params[:debug]
528
+ logger.info 'Completed test ...'
529
+ logger.debug 'Uploading results ...' if params[:debug]
533
530
  end
534
531
  RestClient.proxy = params[:proxy] if params[:proxy]
535
532
  begin
@@ -549,7 +546,7 @@ module RubyJmeter
549
546
  response = RestClient.post "#{params[:endpoint] ? params[:endpoint] : 'https://api.flood.io'}/floods?auth_token=#{token}",
550
547
  {
551
548
  :flood => {
552
- :tool => 'jmeter-2.12',
549
+ :tool => 'jmeter',
553
550
  :url => params[:url],
554
551
  :name => params[:name],
555
552
  :notes => params[:notes],
@@ -598,11 +595,11 @@ module RubyJmeter
598
595
  ht = attach_to_last(node)
599
596
  previous = @current_node
600
597
  @current_node = ht
601
- self.instance_exec(&block) if block
598
+ instance_exec(&block) if block
602
599
  @current_node = previous
603
600
  end
604
601
 
605
- def file(params={})
602
+ def file(params = {})
606
603
  params[:file] ||= 'jmeter.jmx'
607
604
  File.open(params[:file], 'w') { |file| file.write(doc.to_xml(:indent => 2)) }
608
605
  end
@@ -616,7 +613,6 @@ module RubyJmeter
616
613
  @log.level = Logger::DEBUG
617
614
  @log
618
615
  end
619
-
620
616
  end
621
617
  end
622
618
 
@@ -22,6 +22,7 @@ module RubyJmeter
22
22
  <stringProp name="resultVariable"/>
23
23
  <stringProp name="variableNames"/>
24
24
  <stringProp name="queryTimeout"/>
25
+ <stringProp name="resultSetHandler">Store as String</stringProp>
25
26
  </JDBCPostProcessor>)
26
27
  EOS
27
28
  update params
@@ -22,6 +22,7 @@ module RubyJmeter
22
22
  <stringProp name="resultVariable"/>
23
23
  <stringProp name="variableNames"/>
24
24
  <stringProp name="queryTimeout"/>
25
+ <stringProp name="resultSetHandler">Store as String</stringProp>
25
26
  </JDBCPreProcessor>)
26
27
  EOS
27
28
  update params
@@ -22,6 +22,7 @@ module RubyJmeter
22
22
  <stringProp name="resultVariable"/>
23
23
  <stringProp name="variableNames"/>
24
24
  <stringProp name="queryTimeout"/>
25
+ <stringProp name="resultSetHandler">Store as String</stringProp>
25
26
  </JDBCSampler>)
26
27
  EOS
27
28
  update params
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <jmeterTestPlan version="1.2" properties="2.7" jmeter="2.12 r1636949">
2
+ <jmeterTestPlan version="1.2" properties="2.8" jmeter="2.13 r1665067">
3
3
  <hashTree>
4
4
  <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
5
5
  <stringProp name="TestPlan.comments"></stringProp>
@@ -91,7 +91,6 @@
91
91
  <boolProp name="HTTPSampler.image_parser">true</boolProp>
92
92
  <boolProp name="HTTPSampler.concurrentDwn">true</boolProp>
93
93
  <stringProp name="HTTPSampler.concurrentPool">4</stringProp>
94
- <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
95
94
  </ConfigTestElement>
96
95
  <hashTree/>
97
96
  <JavaConfig guiclass="JavaConfigGui" testclass="JavaConfig" testname="Java Request Defaults" enabled="true">
@@ -264,7 +263,6 @@
264
263
  <stringProp name="ForeachController.inputVal"></stringProp>
265
264
  <stringProp name="ForeachController.returnVal"></stringProp>
266
265
  <boolProp name="ForeachController.useSeparator">true</boolProp>
267
- <stringProp name="ForeachController.endIndex"/>
268
266
  </ForeachController>
269
267
  <hashTree/>
270
268
  <IfController guiclass="IfControllerPanel" testclass="IfController" testname="If Controller" enabled="true">
@@ -426,6 +424,7 @@
426
424
  <stringProp name="resultVariable"></stringProp>
427
425
  <stringProp name="variableNames"></stringProp>
428
426
  <stringProp name="queryTimeout"></stringProp>
427
+ <stringProp name="resultSetHandler">Store as String</stringProp>
429
428
  </JDBCPreProcessor>
430
429
  <hashTree/>
431
430
  <JSR223PreProcessor guiclass="TestBeanGUI" testclass="JSR223PreProcessor" testname="JSR223 PreProcessor" enabled="true">
@@ -592,6 +591,7 @@
592
591
  <stringProp name="resultVariable"></stringProp>
593
592
  <stringProp name="variableNames"></stringProp>
594
593
  <stringProp name="queryTimeout"></stringProp>
594
+ <stringProp name="resultSetHandler">Store as String</stringProp>
595
595
  </JDBCSampler>
596
596
  <hashTree/>
597
597
  <JMSSampler guiclass="JMSSamplerGui" testclass="JMSSampler" testname="JMS Point-to-Point" enabled="true">
@@ -846,6 +846,7 @@
846
846
  <stringProp name="resultVariable"></stringProp>
847
847
  <stringProp name="variableNames"></stringProp>
848
848
  <stringProp name="queryTimeout"></stringProp>
849
+ <stringProp name="resultSetHandler">Store as String</stringProp>
849
850
  </JDBCPostProcessor>
850
851
  <hashTree/>
851
852
  <JSR223PostProcessor guiclass="TestBeanGUI" testclass="JSR223PostProcessor" testname="JSR223 PostProcessor" enabled="true">
@@ -1,3 +1,3 @@
1
1
  module RubyJmeter
2
- VERSION = "2.12.5"
2
+ VERSION = '2.13.0'
3
3
  end
data/spec/dsl_spec.rb CHANGED
@@ -1,8 +1,7 @@
1
- require "spec_helper"
2
- require "pry-debugger"
3
-
4
- describe "DSL" do
1
+ require 'spec_helper'
2
+ require 'pry'
5
3
 
4
+ describe 'DSL' do
6
5
  describe 'aliased DSL methods' do
7
6
  it "test plan should respond to aliased methods" do
8
7
  test {}.should respond_to :variables
@@ -14,7 +13,6 @@ describe "DSL" do
14
13
  end
15
14
  end
16
15
 
17
-
18
16
  describe 'write to stdout and file' do
19
17
  it "should output a test plan to stdout" do
20
18
  $stdout.should_receive(:puts).with(/jmeterTestPlan/i)
@@ -22,16 +20,15 @@ describe "DSL" do
22
20
  end.out
23
21
  end
24
22
 
25
- it "should output a test plan to jmx file" do
23
+ it 'should output a test plan to jmx file' do
26
24
  file = double('file')
27
- File.should_receive(:open).with("jmeter.jmx", "w").and_yield(file)
25
+ File.should_receive(:open).with('jmeter.jmx', 'w').and_yield(file)
28
26
  file.should_receive(:write).with(/jmeterTestPlan/i)
29
27
  test do
30
28
  end.jmx
31
29
  end
32
30
  end
33
31
 
34
-
35
32
  describe 'user agent' do
36
33
  let(:doc) do
37
34
  test do
@@ -40,7 +37,7 @@ describe "DSL" do
40
37
  end.to_doc
41
38
  end
42
39
 
43
- let(:fragment) { doc.search("//HeaderManager").first }
40
+ let(:fragment) { doc.search('//HeaderManager').first }
44
41
 
45
42
  it 'should match on user_agent' do
46
43
  fragment.search(".//stringProp[@name='Header.name']").text.should == 'User-Agent'
@@ -49,7 +46,6 @@ describe "DSL" do
49
46
  end
50
47
  end
51
48
 
52
-
53
49
  describe 'http request defaults' do
54
50
  let(:doc) do
55
51
  test do
@@ -65,8 +61,8 @@ describe "DSL" do
65
61
  end.to_doc
66
62
  end
67
63
 
68
- let(:config_fragment) { doc.search("//ConfigTestElement").first }
69
- let(:sampler_fragment) { doc.search("//HTTPSamplerProxy").first }
64
+ let(:config_fragment) { doc.search('//ConfigTestElement').first }
65
+ let(:sampler_fragment) { doc.search('//HTTPSamplerProxy').first }
70
66
 
71
67
  it 'should match on implementation' do
72
68
  sampler_fragment.search(".//stringProp[@name='HTTPSampler.implementation']").text.should == ''
@@ -83,7 +79,6 @@ describe "DSL" do
83
79
  end
84
80
  end
85
81
 
86
-
87
82
  describe 'disabled elements' do
88
83
  let(:doc) do
89
84
  test do
@@ -91,14 +86,13 @@ describe "DSL" do
91
86
  end.to_doc
92
87
  end
93
88
 
94
- let(:fragment) { doc.search("//HeaderManager") }
89
+ let(:fragment) { doc.search('//HeaderManager') }
95
90
 
96
91
  it 'should be disabled' do
97
92
  fragment.first.attributes['enabled'].value.should == 'false'
98
93
  end
99
94
  end
100
95
 
101
-
102
96
  describe 'header manager' do
103
97
  let(:doc) do
104
98
  test do
@@ -106,7 +100,7 @@ describe "DSL" do
106
100
  end.to_doc
107
101
  end
108
102
 
109
- let(:fragment) { doc.search("//HeaderManager").first }
103
+ let(:fragment) { doc.search('//HeaderManager').first }
110
104
 
111
105
  it 'should match on accept' do
112
106
  fragment.search(".//stringProp[@name='Header.name']").text.should == 'Accept'
@@ -114,7 +108,6 @@ describe "DSL" do
114
108
  end
115
109
  end
116
110
 
117
-
118
111
  describe 'header manager multiple values' do
119
112
  let(:doc) do
120
113
  test do
@@ -122,7 +115,7 @@ describe "DSL" do
122
115
  end.to_doc
123
116
  end
124
117
 
125
- let(:fragment) { doc.search("//HeaderManager") }
118
+ let(:fragment) { doc.search('//HeaderManager') }
126
119
 
127
120
 
128
121
  it 'should match on accept for fragment_first' do
@@ -136,7 +129,6 @@ describe "DSL" do
136
129
  end
137
130
  end
138
131
 
139
-
140
132
  describe 'the clear_each_iteration option should be respected' do
141
133
  let(:doc) do
142
134
  test do
@@ -154,7 +146,6 @@ describe "DSL" do
154
146
  end
155
147
  end
156
148
 
157
-
158
149
  describe 'test plan' do
159
150
  it 'should allow to take params' do
160
151
  test_plan = test({"TestPlan.serialize_threadgroups" => "false"}) {}
@@ -165,7 +156,6 @@ describe "DSL" do
165
156
  end
166
157
  end
167
158
 
168
-
169
159
  describe 'thread groups' do
170
160
  let(:doc) do
171
161
  test do
@@ -196,7 +186,6 @@ describe "DSL" do
196
186
  end
197
187
  end
198
188
 
199
-
200
189
  describe 'thread groups old syntax' do
201
190
  let(:doc) do
202
191
  test do
@@ -223,7 +212,6 @@ describe "DSL" do
223
212
  end
224
213
  end
225
214
 
226
-
227
215
  describe 'transaction controller' do
228
216
  let(:doc) do
229
217
  test do
@@ -253,7 +241,6 @@ describe "DSL" do
253
241
  end
254
242
  end
255
243
 
256
-
257
244
  describe 'throughput controller' do
258
245
  let(:doc) do
259
246
  test do
@@ -278,7 +265,6 @@ describe "DSL" do
278
265
  end
279
266
  end
280
267
 
281
-
282
268
  describe 'visit' do
283
269
  let(:doc) do
284
270
  test do
@@ -290,7 +276,7 @@ describe "DSL" do
290
276
  end.to_doc
291
277
  end
292
278
 
293
- let(:fragment) { doc.search("//HTTPSamplerProxy").first }
279
+ let(:fragment) { doc.search('//HTTPSamplerProxy').first }
294
280
 
295
281
  it 'should match on path' do
296
282
  fragment.search(".//stringProp[@name='HTTPSampler.path']").text.should == '/home'
@@ -301,7 +287,6 @@ describe "DSL" do
301
287
  end
302
288
  end
303
289
 
304
-
305
290
  describe 'visit old syntax' do
306
291
  let(:doc) do
307
292
  test do
@@ -311,14 +296,13 @@ describe "DSL" do
311
296
  end.to_doc
312
297
  end
313
298
 
314
- let(:fragment) { doc.search("//HTTPSamplerProxy").first }
299
+ let(:fragment) { doc.search('//HTTPSamplerProxy').first }
315
300
 
316
301
  it 'should match on path' do
317
302
  fragment.search(".//stringProp[@name='HTTPSampler.path']").text.should == '/home'
318
303
  end
319
304
  end
320
305
 
321
-
322
306
  describe 'visit raw_path' do
323
307
  let(:doc) do
324
308
  test do
@@ -330,15 +314,13 @@ describe "DSL" do
330
314
  end.to_doc
331
315
  end
332
316
 
333
- let(:fragment) { doc.search("//HTTPSamplerProxy").first }
317
+ let(:fragment) { doc.search('//HTTPSamplerProxy').first }
334
318
 
335
319
  it 'should match on path' do
336
320
  fragment.search(".//stringProp[@name='HTTPSampler.path']").text.should == '/home?location=melbourne'
337
321
  end
338
-
339
322
  end
340
323
 
341
-
342
324
  describe 'get_with_parameterized_domain' do
343
325
  let(:doc) do
344
326
  test do
@@ -350,7 +332,7 @@ describe "DSL" do
350
332
  end.to_doc
351
333
  end
352
334
 
353
- let(:fragment) { doc.search("//HTTPSamplerProxy").first }
335
+ let(:fragment) { doc.search('//HTTPSamplerProxy').first }
354
336
 
355
337
  it 'should match on path' do
356
338
  fragment.search(".//stringProp[@name='HTTPSampler.path']").text.should == '/home'
@@ -361,7 +343,6 @@ describe "DSL" do
361
343
  end
362
344
  end
363
345
 
364
-
365
346
  describe 'https' do
366
347
  let(:doc) do
367
348
  test do
@@ -373,14 +354,13 @@ describe "DSL" do
373
354
  end.to_doc
374
355
  end
375
356
 
376
- let(:fragment) { doc.search("//HTTPSamplerProxy").first }
357
+ let(:fragment) { doc.search('//HTTPSamplerProxy').first }
377
358
 
378
359
  it 'should match on protocol' do
379
360
  fragment.search(".//stringProp[@name='HTTPSampler.protocol']").text.should == 'https'
380
361
  end
381
362
  end
382
363
 
383
-
384
364
  describe 'user_parameters' do
385
365
  let(:doc) do
386
366
  test do
@@ -419,7 +399,6 @@ describe "DSL" do
419
399
  end
420
400
  end
421
401
 
422
-
423
402
  describe 'xhr' do
424
403
  let(:doc) do
425
404
  test do
@@ -433,20 +412,19 @@ describe "DSL" do
433
412
  end.to_doc
434
413
  end
435
414
 
436
- let(:fragment) { doc.search("//HeaderManager").first }
415
+ let(:fragment) { doc.search('//HeaderManager').first }
437
416
 
438
417
  it 'should match on XHR' do
439
418
  fragment.search(".//stringProp[@name='Header.value']").text.should == 'XMLHttpRequest'
440
419
  end
441
420
  end
442
421
 
443
-
444
422
  describe 'gzip' do
445
423
  let(:doc) do
446
424
  test do
447
425
  threads do
448
- transaction name: "TC_02", parent: true, include_timers: true do
449
- visit url: "/" do
426
+ transaction name: 'TC_02', parent: true, include_timers: true do
427
+ visit url: '/' do
450
428
  with_gzip
451
429
  end
452
430
  end
@@ -454,26 +432,25 @@ describe "DSL" do
454
432
  end.to_doc
455
433
  end
456
434
 
457
- let(:fragment) { doc.search("//HeaderManager").first }
435
+ let(:fragment) { doc.search('//HeaderManager').first }
458
436
 
459
437
  it 'should match on Acept Encoding' do
460
438
  fragment.search(".//stringProp[@name='Header.value']").text.should == 'gzip, deflate'
461
439
  end
462
440
  end
463
441
 
464
-
465
442
  describe 'submit' do
466
443
  let(:doc) do
467
444
  test do
468
445
  threads do
469
- transaction name: "TC_03", parent: true, include_timers: true do
446
+ transaction name: 'TC_03', parent: true, include_timers: true do
470
447
  submit url: "/", fill_in: { username: 'tim', password: 'password' }
471
448
  end
472
449
  end
473
450
  end.to_doc
474
451
  end
475
452
 
476
- let(:fragment) { doc.search("//HTTPSamplerProxy").first }
453
+ let(:fragment) { doc.search('//HTTPSamplerProxy').first }
477
454
 
478
455
  it 'should match on POST' do
479
456
  fragment.search(".//stringProp[@name='HTTPSampler.method']").text.should == 'POST'
@@ -482,10 +459,8 @@ describe "DSL" do
482
459
  it 'should have no files' do
483
460
  fragment.search(".//elementProp[@name='HTTPsampler.Files']").length.should == 0
484
461
  end
485
-
486
462
  end
487
463
 
488
-
489
464
  describe 'submit_with_files' do
490
465
  let(:doc) do
491
466
  test do
@@ -510,7 +485,6 @@ describe "DSL" do
510
485
  end
511
486
  end
512
487
 
513
-
514
488
  describe 'If' do
515
489
  let(:doc) do
516
490
  test do
@@ -529,7 +503,6 @@ describe "DSL" do
529
503
  end
530
504
  end
531
505
 
532
-
533
506
  describe 'exists' do
534
507
  let(:doc) do
535
508
  test do
@@ -548,7 +521,6 @@ describe "DSL" do
548
521
  end
549
522
  end
550
523
 
551
-
552
524
  describe 'While' do
553
525
  let(:doc) do
554
526
  test do
@@ -560,14 +532,13 @@ describe "DSL" do
560
532
  end.to_doc
561
533
  end
562
534
 
563
- let(:fragment) { doc.search("//WhileController").first }
535
+ let(:fragment) { doc.search('//WhileController').first }
564
536
 
565
537
  it 'should match on While' do
566
538
  fragment.search(".//stringProp[@name='WhileController.condition']").text.should == 'true'
567
539
  end
568
540
  end
569
541
 
570
-
571
542
  describe 'Loop' do
572
543
  let(:doc) do
573
544
  test do
@@ -579,14 +550,13 @@ describe "DSL" do
579
550
  end.to_doc
580
551
  end
581
552
 
582
- let(:fragment) { doc.search("//LoopController").first }
553
+ let(:fragment) { doc.search('//LoopController').first }
583
554
 
584
555
  it 'should match on Loops' do
585
556
  fragment.search(".//stringProp[@name='LoopController.loops']").text.should == '5'
586
557
  end
587
558
  end
588
559
 
589
-
590
560
  describe 'Counter' do
591
561
  let(:doc) do
592
562
  test do
@@ -598,14 +568,13 @@ describe "DSL" do
598
568
  end.to_doc
599
569
  end
600
570
 
601
- let(:fragment) { doc.search("//CounterConfig").first }
571
+ let(:fragment) { doc.search('//CounterConfig').first }
602
572
 
603
573
  it 'should match on 5 Loops' do
604
574
  fragment.search(".//boolProp[@name='CounterConfig.per_user']").text.should == 'true'
605
575
  end
606
576
  end
607
577
 
608
-
609
578
  describe 'Switch' do
610
579
  let(:doc) do
611
580
  test do
@@ -617,14 +586,13 @@ describe "DSL" do
617
586
  end.to_doc
618
587
  end
619
588
 
620
- let(:fragment) { doc.search("//SwitchController").first }
589
+ let(:fragment) { doc.search('//SwitchController').first }
621
590
 
622
591
  it 'should match on Switch' do
623
592
  fragment.search(".//stringProp[@name='SwitchController.value']").text.should == 'cat'
624
593
  end
625
594
  end
626
595
 
627
-
628
596
  describe 'regex extract' do
629
597
  let(:doc) do
630
598
  test do
@@ -632,14 +600,13 @@ describe "DSL" do
632
600
  end.to_doc
633
601
  end
634
602
 
635
- let(:fragment) { doc.search("//RegexExtractor").first }
603
+ let(:fragment) { doc.search('//RegexExtractor').first }
636
604
 
637
605
  it 'should match on refname' do
638
606
  fragment.search(".//stringProp[@name='RegexExtractor.refname']").text.should == 'my_regex'
639
607
  end
640
608
  end
641
609
 
642
-
643
610
  describe 'regex extract with variable' do
644
611
  let(:doc) do
645
612
  test do
@@ -647,7 +614,7 @@ describe "DSL" do
647
614
  end.to_doc
648
615
  end
649
616
 
650
- let(:fragment) { doc.search("//RegexExtractor").first }
617
+ let(:fragment) { doc.search('//RegexExtractor').first }
651
618
 
652
619
  it 'should match on refname' do
653
620
  fragment.search(".//stringProp[@name='Scope.variable']").text.should == 'test'
@@ -662,14 +629,13 @@ describe "DSL" do
662
629
  end.to_doc
663
630
  end
664
631
 
665
- let(:fragment) { doc.search("//XPathExtractor").first }
632
+ let(:fragment) { doc.search('//XPathExtractor').first }
666
633
 
667
634
  it 'should match on refname' do
668
635
  fragment.search(".//stringProp[@name='XPathExtractor.refname']").text.should == 'my_xpath'
669
636
  end
670
637
  end
671
638
 
672
-
673
639
  describe 'json extract' do
674
640
  let(:doc) do
675
641
  test do
@@ -685,7 +651,6 @@ describe "DSL" do
685
651
  end
686
652
  end
687
653
 
688
-
689
654
  describe 'testdata extract' do
690
655
  let(:doc) do
691
656
  test do
@@ -693,16 +658,14 @@ describe "DSL" do
693
658
  end.to_doc
694
659
  end
695
660
 
696
- let(:fragment) { doc.search("//RegexExtractor").first }
661
+ let(:fragment) { doc.search('//RegexExtractor').first }
697
662
 
698
663
  it 'should match on refname' do
699
664
  fragment.search(".//stringProp[@name='RegexExtractor.refname']").text.should == 'testdata'
700
665
  end
701
666
  end
702
667
 
703
-
704
668
  describe 'assertions' do
705
-
706
669
  describe 'scope all' do
707
670
  let(:doc) do
708
671
  test do
@@ -736,7 +699,7 @@ describe "DSL" do
736
699
  end.to_doc
737
700
  end
738
701
 
739
- let(:fragment) { doc.search("//ResponseAssertion").first }
702
+ let(:fragment) { doc.search('//ResponseAssertion').first }
740
703
 
741
704
  it 'should match on scope' do
742
705
  fragment.search(".//stringProp[@name='Assertion.scope']").text.should == ""
@@ -744,7 +707,6 @@ describe "DSL" do
744
707
  end
745
708
  end
746
709
 
747
-
748
710
  describe 'Nested controllers' do
749
711
  let(:doc) do
750
712
  test do
@@ -785,10 +747,8 @@ describe "DSL" do
785
747
  node1_2.previous.previous.should == node1_1
786
748
  end
787
749
  end
788
-
789
750
  end
790
751
 
791
-
792
752
  describe 'raw body containing xml entities' do
793
753
  let(:doc) do
794
754
  test do
@@ -798,14 +758,13 @@ describe "DSL" do
798
758
  end.to_doc
799
759
  end
800
760
 
801
- let(:fragment) { doc.search("//HTTPSamplerProxy").first }
761
+ let(:fragment) { doc.search('//HTTPSamplerProxy').first }
802
762
 
803
763
  it 'escape raw_body' do
804
764
  fragment.search(".//stringProp[@name='Argument.value']").text.should == 'username=my_name&password=my_password&email="my name <test@example.com>"'
805
765
  end
806
766
  end
807
767
 
808
-
809
768
  describe 'constant_throughput_timer' do
810
769
  let(:doc) do
811
770
  test do
@@ -827,7 +786,6 @@ describe "DSL" do
827
786
  end
828
787
  end
829
788
 
830
-
831
789
  describe 'run' do
832
790
  let(:deflate_properties) {
833
791
  File.expand_path('../../lib/ruby-jmeter/helpers/jmeter.properties', __FILE__)
@@ -872,10 +830,8 @@ describe "DSL" do
872
830
  test do
873
831
  end.run(properties: nil, remote_hosts: ['192.168.1.1', '192.168.1.2'])
874
832
  end
875
-
876
833
  end
877
834
 
878
-
879
835
  describe 'module controllers' do
880
836
  let(:doc) do
881
837
  test name: 'tests' do
@@ -906,7 +862,6 @@ describe "DSL" do
906
862
  end
907
863
  end
908
864
 
909
-
910
865
  describe 'module controllers with test fragment' do
911
866
  let(:doc) do
912
867
  test do
data/spec/spec_helper.rb CHANGED
@@ -7,4 +7,4 @@ $LOAD_PATH.unshift test_dir unless $LOAD_PATH.include?(test_dir)
7
7
  lib_dir = File.join(File.dirname(test_dir), 'lib')
8
8
  $LOAD_PATH.unshift lib_dir unless $LOAD_PATH.include?(lib_dir)
9
9
 
10
- require 'ruby-jmeter'
10
+ require 'ruby-jmeter'
data/spec/stub.rb CHANGED
@@ -28,4 +28,4 @@ __END__
28
28
  %div.title Hello world.
29
29
 
30
30
  @@ magic
31
- %div.title Magic happens
31
+ %div.title Magic happens
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-jmeter
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.5
4
+ version: 2.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Koopmans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-16 00:00:00.000000000 Z
11
+ date: 2015-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -97,6 +97,7 @@ files:
97
97
  - examples/basic_user_defined_variables.rb
98
98
  - examples/demo.csv
99
99
  - examples/etsy_login_browse.rb
100
+ - examples/real_flood_test.rb
100
101
  - examples/real_flood_test_data.rb
101
102
  - examples/real_immi.gov.au_visa.rb
102
103
  - examples/real_page_objects.rb
@@ -268,7 +269,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
269
  version: '0'
269
270
  requirements: []
270
271
  rubyforge_project:
271
- rubygems_version: 2.2.2
272
+ rubygems_version: 2.4.5
272
273
  signing_key:
273
274
  specification_version: 4
274
275
  summary: Ruby based DSL for writing JMeter test plans