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 +4 -4
- data/examples/basic_auth.rb +2 -2
- data/examples/composite_graph.rb +2 -2
- data/examples/header_manager.rb +3 -3
- data/examples/http_cache_manager.rb +2 -2
- data/examples/http_cookie_manager.rb +2 -2
- data/examples/jmeter_plugins_graphs.rb +2 -2
- data/examples/loadosophia.rb +1 -1
- data/examples/loop_controller.rb +1 -1
- data/examples/loops_with_counter.rb +1 -1
- data/examples/perfmon.rb +1 -1
- data/examples/rsync.rb +16 -0
- data/examples/simple_data_writer_listener.rb +1 -1
- data/examples/think_time.rb +1 -1
- data/examples/throughput_shaping_timer.rb +1 -1
- data/examples/user_parameters.rb +1 -1
- data/lib/ruby-jmeter/extend/misc/rsync.rb +24 -0
- data/lib/ruby-jmeter/version.rb +1 -1
- data/spec/http_request_spec.rb +8 -8
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78108c12eef77ede9a55c1b424a21db222942f61
|
4
|
+
data.tar.gz: 340a7d5fe1226b8903741f07cf234d24b916a157
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ce5be696ae8cf5dc7d8bdeb46b806abf6cf622d39ad02e416cbf71e2d439769fe99e35ff3d6873773db54d97f2e43a6f641c877737581d04a94f9a79fa3ad6a
|
7
|
+
data.tar.gz: d1d0f3ec729b2273f8e010abeb98a4abb37a50351aef53c79030ab739e5469ce67026d7a9a7d31e9c468041fbaff343b4622b56373b7f2e460117298afb13de3
|
data/examples/basic_auth.rb
CHANGED
@@ -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: '
|
8
|
-
visit name: 'Home Page', url: '
|
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)
|
data/examples/composite_graph.rb
CHANGED
@@ -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: '
|
8
|
-
visit name: 'Home Page', url: '
|
7
|
+
transaction name: 'Home' do
|
8
|
+
visit name: 'Home Page', url: 'https://flooded.io/'
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
data/examples/header_manager.rb
CHANGED
@@ -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: '
|
14
|
+
visit name: 'Home Page', url: 'https://flooded.io/'
|
15
15
|
end
|
16
16
|
|
17
|
-
transaction name: '
|
18
|
-
visit name: 'Home Page', url: '
|
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: '
|
8
|
-
visit name: 'Home Page', url: '
|
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: '
|
8
|
-
visit name: 'Home Page', url: '
|
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: '
|
8
|
-
visit name: 'Home Page', url: '
|
7
|
+
transaction name: 'Home' do
|
8
|
+
visit name: 'Home Page', url: 'https://flooded.io/'
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
data/examples/loadosophia.rb
CHANGED
data/examples/loop_controller.rb
CHANGED
data/examples/perfmon.rb
CHANGED
data/examples/rsync.rb
ADDED
@@ -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: '
|
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
|
data/examples/think_time.rb
CHANGED
data/examples/user_parameters.rb
CHANGED
@@ -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
|
data/lib/ruby-jmeter/version.rb
CHANGED
data/spec/http_request_spec.rb
CHANGED
@@ -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: '
|
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: '
|
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: '
|
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: '
|
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: '
|
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: '
|
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: '
|
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: '
|
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.
|
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
|