ruby-jmeter 3.0.8 → 3.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5f7e301f7230400fc1209e14de0cab9a9c598870
4
- data.tar.gz: 2c2dd6207bc2ef9109b94dbaef2bc7dbedcaa10c
3
+ metadata.gz: 78108c12eef77ede9a55c1b424a21db222942f61
4
+ data.tar.gz: 340a7d5fe1226b8903741f07cf234d24b916a157
5
5
  SHA512:
6
- metadata.gz: 979db78c9a2b2dde3d6286f31f6af42b8bad9a29b219d9ec50007f25ebcb580fb653add14979edb2a13cf9f37649ecb4970c8c8f74a75fc2446501fe51e11f3a
7
- data.tar.gz: 117c2a81ebb929b0ebb72e236d40091e8fdebf26090c6a281fae341a10c4341aac7d9cf7109d4b8ce0fc336d8d1eb5c9cb7906e1931572e76425441010c1a0bb
6
+ metadata.gz: 2ce5be696ae8cf5dc7d8bdeb46b806abf6cf622d39ad02e416cbf71e2d439769fe99e35ff3d6873773db54d97f2e43a6f641c877737581d04a94f9a79fa3ad6a
7
+ data.tar.gz: d1d0f3ec729b2273f8e010abeb98a4abb37a50351aef53c79030ab739e5469ce67026d7a9a7d31e9c468041fbaff343b4622b56373b7f2e460117298afb13de3
@@ -4,8 +4,8 @@ require 'ruby-jmeter'
4
4
  test do
5
5
  auth url: '/', username: 'tim', password: 'secret', domain: 'altentee.com'
6
6
  threads count: 1 do
7
- transaction name: 'Google Search' do
8
- visit name: 'Home Page', url: 'http://google.com/'
7
+ transaction name: 'Home' do
8
+ visit name: 'Home Page', url: 'https://flooded.io/'
9
9
  end
10
10
  end
11
11
  end.run(path: '/usr/share/jmeter/bin/', gui: true)
@@ -4,8 +4,8 @@ require 'ruby-jmeter'
4
4
  test do
5
5
  cookies clear_each_iteration: false
6
6
  threads count: 5, rampup: 10 do
7
- transaction name: 'Google Search' do
8
- visit name: 'Home Page', url: 'http://google.com/'
7
+ transaction name: 'Home' do
8
+ visit name: 'Home Page', url: 'https://flooded.io/'
9
9
  end
10
10
  end
11
11
 
@@ -11,11 +11,11 @@ test do
11
11
  with_user_agent :iphone
12
12
 
13
13
  threads count: 1 do
14
- visit name: 'Home Page', url: 'http://google.com/'
14
+ visit name: 'Home Page', url: 'https://flooded.io/'
15
15
  end
16
16
 
17
- transaction name: 'Google Search via XHR' do
18
- visit name: 'Home Page', url: 'http://google.com/' do
17
+ transaction name: 'Home via XHR' do
18
+ visit name: 'Home Page', url: 'https://flooded.io/' do
19
19
  with_xhr
20
20
  end
21
21
  end
@@ -4,8 +4,8 @@ require 'ruby-jmeter'
4
4
  test do
5
5
  cache clear_each_iteration: true
6
6
  threads count: 1 do
7
- transaction name: 'Google Search' do
8
- visit name: 'Home Page', url: 'http://google.com/'
7
+ transaction name: 'Home' do
8
+ visit name: 'Home Page', url: 'https://flooded.io/'
9
9
  end
10
10
  end
11
11
  end.run(path: '/usr/share/jmeter/bin/', gui: true)
@@ -4,8 +4,8 @@ require 'ruby-jmeter'
4
4
  test do
5
5
  cookies clear_each_iteration: false
6
6
  threads count: 1 do
7
- transaction name: 'Google Search' do
8
- visit name: 'Home Page', url: 'http://google.com/'
7
+ transaction name: 'Home' do
8
+ visit name: 'Home Page', url: 'https://flooded.io/'
9
9
  end
10
10
  end
11
11
  end.run(path: '/usr/share/jmeter/bin/', gui: true)
@@ -4,8 +4,8 @@ require 'ruby-jmeter'
4
4
  test do
5
5
  cookies clear_each_iteration: false
6
6
  threads count: 1 do
7
- transaction name: 'Google Search' do
8
- visit name: 'Home Page', url: 'http://google.com/'
7
+ transaction name: 'Home' do
8
+ visit name: 'Home Page', url: 'https://flooded.io/'
9
9
  end
10
10
  end
11
11
 
@@ -13,6 +13,6 @@ test do
13
13
  })
14
14
 
15
15
  threads count: 1 do
16
- visit name: 'Home Page', url: 'http://google.com/'
16
+ visit name: 'Home Page', url: 'https://flooded.io/'
17
17
  end
18
18
  end.run(path: '/usr/share/jmeter/bin/', gui: true)
@@ -4,7 +4,7 @@ require 'ruby-jmeter'
4
4
  test do
5
5
  threads count: 1 do
6
6
  loops count:10 do
7
- visit name: 'Home Page', url: 'http://google.com/'
7
+ visit name: 'Home Page', url: 'https://flooded.io/'
8
8
  end
9
9
  end
10
10
  end.run(path: '/usr/share/jmeter/bin/', gui: true)
@@ -9,7 +9,7 @@ test do
9
9
  'CounterConfig.incr' => 1,
10
10
  'CounterConfig.end' => 100
11
11
 
12
- visit name: 'Home Page', url: 'http://google.com/'
12
+ visit name: 'Home Page', url: 'https://flooded.io/'
13
13
  end
14
14
  end
15
15
  end.run(path: '/usr/share/jmeter/bin/', gui: true)
@@ -5,7 +5,7 @@ test do
5
5
  cookies clear_each_iteration: false
6
6
  threads count: 5, rampup: 10 do
7
7
  transaction name: 'Google Search' do
8
- visit name: 'Home Page', url: 'http://google.com/'
8
+ visit name: 'Home Page', url: 'https://flooded.io/'
9
9
  end
10
10
  end
11
11
 
@@ -0,0 +1,16 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ require 'ruby-jmeter'
3
+
4
+ test do
5
+ threads count: 10 do
6
+ visit name: 'Home Page', url: 'https://flooded.io'
7
+ end
8
+ end.rsync(
9
+ remote_host: 'xxx.xxx.xxx.xxx',
10
+ remote_user: 'user',
11
+ remote_path: '/path/to/remote',
12
+ rsync_bin_path: '/usr/bin/rsync',
13
+ rsync_params: '-az -e "ssh -i /path/to/key.pem"',
14
+ file: './jmx/' + File.basename(__FILE__, ".rb") + '.jmx',
15
+ debug: true
16
+ )
@@ -3,7 +3,7 @@ require 'ruby-jmeter'
3
3
 
4
4
  test do
5
5
  threads count: 1 do
6
- visit name: 'Home Page', url: 'http://google.com/'
6
+ visit name: 'Home Page', url: 'https://flooded.io/'
7
7
 
8
8
  # write errors to a simple data writer with the log alias
9
9
  log filename: '/var/log/flood/custom.log', error_logging: true
@@ -7,7 +7,7 @@ test do
7
7
  think_time 5000, 5000
8
8
 
9
9
  transaction name: 'Google Search' do
10
- visit name: 'Home Page', url: 'http://google.com/'
10
+ visit name: 'Home Page', url: 'https://flooded.io/'
11
11
  random_timer 3000
12
12
  end
13
13
 
@@ -14,7 +14,7 @@ test do
14
14
  ]
15
15
 
16
16
  transaction name: 'Google Search' do
17
- visit name: 'Home Page', url: 'http://google.com/'
17
+ visit name: 'Home Page', url: 'https://flooded.io/'
18
18
  end
19
19
  end
20
20
  end.run(path: '/usr/share/jmeter/bin/', gui: true)
@@ -3,7 +3,7 @@ require 'ruby-jmeter'
3
3
 
4
4
  test do
5
5
  # user parameters with multiple values
6
- visit name: 'Home Page', url: 'http://google.com/' do
6
+ visit name: 'Home Page', url: 'https://flooded.io/' do
7
7
  user_parameters names: ['name1', 'name2'],
8
8
  thread_values: {
9
9
  user_1: [
@@ -0,0 +1,24 @@
1
+ module RubyJmeter
2
+ class ExtendedDSL < DSL
3
+ def rsync(params = {})
4
+ logger.warn "Test file upload via rsync ..."
5
+
6
+ file(params)
7
+
8
+ cmd = "#{params[:rsync_bin_path]} #{params[:rsync_params]} #{params[:file]} #{params[:remote_user]}@#{params[:remote_host]}:#{params[:remote_path]}"
9
+
10
+ logger.debug cmd if params[:debug]
11
+
12
+ Open3.popen2e("#{cmd}") do |stdin, stdout_err, wait_thr|
13
+ while line = stdout_err.gets
14
+ logger.debug line.chomp if params[:debug]
15
+ end
16
+
17
+ exit_status = wait_thr.value
18
+ abort "Sorry there was an error: #{cmd}" unless exit_status.success?
19
+ end
20
+
21
+ logger.info "Upload complete at: #{params[:remote_host]}:#{params[:remote_path]}"
22
+ end
23
+ end
24
+ end
@@ -1,3 +1,3 @@
1
1
  module RubyJmeter
2
- VERSION = '3.0.8'
2
+ VERSION = '3.0.9'
3
3
  end
@@ -5,7 +5,7 @@ describe 'http_request' do
5
5
  let(:doc) do
6
6
  test do
7
7
  threads count: 1 do
8
- get name: 'Home Page', url: 'http://google.com/'
8
+ get name: 'Home Page', url: 'https://flooded.io/'
9
9
  end
10
10
  end.to_doc
11
11
  end
@@ -37,7 +37,7 @@ describe 'http_request' do
37
37
  let(:doc) do
38
38
  test do
39
39
  threads count: 1 do
40
- get name: 'Home Page', url: 'http://google.com/', follow_redirects: false, use_keepalive: false
40
+ get name: 'Home Page', url: 'https://flooded.io/', follow_redirects: false, use_keepalive: false
41
41
  end
42
42
  end.to_doc
43
43
  end
@@ -57,7 +57,7 @@ describe 'http_request' do
57
57
  let(:doc) do
58
58
  test do
59
59
  threads count: 1 do
60
- visit name: 'Home Page', url: 'http://google.com/'
60
+ visit name: 'Home Page', url: 'https://flooded.io/'
61
61
  end
62
62
  end.to_doc
63
63
  end
@@ -149,7 +149,7 @@ describe 'http_request' do
149
149
  let(:doc) do
150
150
  test do
151
151
  threads count: 1 do
152
- post name: 'Home Page', url: 'http://google.com/'
152
+ post name: 'Home Page', url: 'https://flooded.io/'
153
153
  end
154
154
  end.to_doc
155
155
  end
@@ -199,7 +199,7 @@ describe 'http_request' do
199
199
  let(:doc) do
200
200
  test do
201
201
  threads count: 1 do
202
- submit name: 'Home Page', url: 'http://google.com/'
202
+ submit name: 'Home Page', url: 'https://flooded.io/'
203
203
  end
204
204
  end.to_doc
205
205
  end
@@ -259,7 +259,7 @@ describe 'http_request' do
259
259
  let(:doc) do
260
260
  test do
261
261
  threads count: 1 do
262
- patch name: 'Home Page', url: 'http://google.com/'
262
+ patch name: 'Home Page', url: 'https://flooded.io/'
263
263
  end
264
264
  end.to_doc
265
265
  end
@@ -275,7 +275,7 @@ describe 'http_request' do
275
275
  let(:doc) do
276
276
  test do
277
277
  threads count: 1 do
278
- head name: 'Home Page', url: 'http://google.com/'
278
+ head name: 'Home Page', url: 'https://flooded.io/'
279
279
  end
280
280
  end.to_doc
281
281
  end
@@ -291,7 +291,7 @@ describe 'http_request' do
291
291
  let(:doc) do
292
292
  test do
293
293
  threads count: 1 do
294
- put name: 'Home Page', url: 'http://google.com/'
294
+ put name: 'Home Page', url: 'https://flooded.io/'
295
295
  end
296
296
  end.to_doc
297
297
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-jmeter
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.8
4
+ version: 3.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Koopmans
@@ -89,6 +89,7 @@ files:
89
89
  - examples/regular_expression_extractor.rb
90
90
  - examples/response_assertion.rb
91
91
  - examples/response_time_percentiles_graph.rb
92
+ - examples/rsync.rb
92
93
  - examples/sample_transaction.rb
93
94
  - examples/simple_data_writer_listener.rb
94
95
  - examples/stepping_thread_group.rb
@@ -236,6 +237,7 @@ files:
236
237
  - lib/ruby-jmeter/extend/misc/aliases.rb
237
238
  - lib/ruby-jmeter/extend/misc/exists.rb
238
239
  - lib/ruby-jmeter/extend/misc/flood.rb
240
+ - lib/ruby-jmeter/extend/misc/rsync.rb
239
241
  - lib/ruby-jmeter/extend/misc/with_helpers.rb
240
242
  - lib/ruby-jmeter/extend/plugins/jmeter_plugins.rb
241
243
  - lib/ruby-jmeter/extend/processors/extract.rb