ruby-jmeter 2.11.11 → 2.11.13
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe5937907349b4ede5934ae13e9e5302bc0343eb
|
4
|
+
data.tar.gz: 39ce5f34554cab1480d37aad306a761ac2111ce8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb677c96181b33dfe5d0aa75a4553255fbf3add341b59bcb24ef2a06fde5fc83f7cc5869961d238dd73fe49181fa311071c0fc95749e695ed4e32b778878c93e
|
7
|
+
data.tar.gz: a1ee997c5b54e2f946ab5c09afa745f5cc46b36441e3228c9d926f55c58c3e2608d8de7c65f4b9168f1f72abf6ce188ac50423372d4033f7c6ff1c822a78e61c
|
data/CHANGES.md
CHANGED
@@ -1,11 +1,15 @@
|
|
1
1
|
# Changes
|
2
2
|
|
3
|
-
## v2.
|
3
|
+
## v2.11.11
|
4
|
+
|
5
|
+
- 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).
|
6
|
+
|
7
|
+
## v2.11.5
|
4
8
|
|
5
9
|
- HTTP Request Defaults now have more intuitive key names:
|
6
10
|
|
7
11
|
```ruby
|
8
|
-
defaults domain: 'example.com',
|
12
|
+
defaults domain: 'example.com',
|
9
13
|
protocol: 'https',
|
10
14
|
download_resources: true,
|
11
15
|
use_concurrent_pool: 5,
|
@@ -0,0 +1,31 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
require 'ruby-jmeter'
|
3
|
+
|
4
|
+
test do
|
5
|
+
|
6
|
+
defaults domain: 'example.com'
|
7
|
+
|
8
|
+
with_user_agent :chrome
|
9
|
+
|
10
|
+
header [
|
11
|
+
{ name: 'Accept-Encoding', value: 'gzip,deflate,sdch' },
|
12
|
+
{ name: 'Accept', value: 'text/javascript, text/html, application/xml, text/xml, */*' }
|
13
|
+
]
|
14
|
+
|
15
|
+
step total_threads: 200,
|
16
|
+
initial_delay: 0,
|
17
|
+
start_threads: 20,
|
18
|
+
add_threads: 0,
|
19
|
+
start_every: 30,
|
20
|
+
stop_threads: 50,
|
21
|
+
stop_every: 5,
|
22
|
+
flight_time: 1800,
|
23
|
+
rampup: 5 do
|
24
|
+
|
25
|
+
random_timer 1000, 3000
|
26
|
+
|
27
|
+
get name: 'home', url: '/'
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)
|
data/lib/ruby-jmeter/dsl.rb
CHANGED
@@ -6,7 +6,7 @@ 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.
|
9
|
+
<jmeterTestPlan version="1.2" properties="2.6" jmeter="2.11 r1554548">
|
10
10
|
<hashTree>
|
11
11
|
</hashTree>
|
12
12
|
</jmeterTestPlan>
|
@@ -419,6 +419,13 @@ module RubyJmeter
|
|
419
419
|
|
420
420
|
alias_method :dummy, :dummy_sampler
|
421
421
|
|
422
|
+
def stepping_thread_group(params={}, &block)
|
423
|
+
node = RubyJmeter::Plugins::SteppingThreadGroup.new(params)
|
424
|
+
attach_node(node, &block)
|
425
|
+
end
|
426
|
+
|
427
|
+
alias_method :step, :stepping_thread_group
|
428
|
+
|
422
429
|
# API Methods
|
423
430
|
|
424
431
|
def out(params={})
|
@@ -489,7 +496,7 @@ module RubyJmeter
|
|
489
496
|
:notes => params[:notes],
|
490
497
|
:tag_list => params[:tag_list],
|
491
498
|
:threads => params[:threads],
|
492
|
-
:rampup => params[:
|
499
|
+
:rampup => params[:rampup],
|
493
500
|
:duration => params[:duration],
|
494
501
|
:override_hosts => params[:override_hosts],
|
495
502
|
:override_parameters => params[:override_parameters],
|
@@ -17,7 +17,8 @@ module RubyJmeter
|
|
17
17
|
<stringProp name="ForeachController.inputVal"/>
|
18
18
|
<stringProp name="ForeachController.returnVal"/>
|
19
19
|
<boolProp name="ForeachController.useSeparator">true</boolProp>
|
20
|
-
<stringProp name="ForeachController.
|
20
|
+
#{'<stringProp name="ForeachController.startIndex"/>' if params[:startIndex]}
|
21
|
+
#{'<stringProp name="ForeachController.endIndex"/>' if params[:endIndex]}
|
21
22
|
</ForeachController>)
|
22
23
|
EOS
|
23
24
|
update params
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module RubyJmeter
|
2
|
+
module Plugins
|
3
|
+
class SteppingThreadGroup
|
4
|
+
attr_accessor :doc
|
5
|
+
include Helper
|
6
|
+
def initialize(params={})
|
7
|
+
@doc = Nokogiri::XML(<<-EOF.strip_heredoc)
|
8
|
+
<kg.apc.jmeter.threads.SteppingThreadGroup guiclass="kg.apc.jmeter.threads.SteppingThreadGroupGui" testclass="kg.apc.jmeter.threads.SteppingThreadGroup" testname="jp@gc - Stepping Thread Group" enabled="true">
|
9
|
+
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
|
10
|
+
<stringProp name="ThreadGroup.num_threads">#{params[:total_threads]}</stringProp>
|
11
|
+
<stringProp name="Threads initial delay">#{params[:initial_delay]}</stringProp>
|
12
|
+
<stringProp name="Start users count">#{params[:start_threads]}</stringProp>
|
13
|
+
<stringProp name="Start users count burst">#{params[:add_threads]}</stringProp>
|
14
|
+
<stringProp name="Start users period">#{params[:start_every]}</stringProp>
|
15
|
+
<stringProp name="Stop users count">#{params[:stop_threads]}</stringProp>
|
16
|
+
<stringProp name="Stop users period">#{params[:stop_every]}</stringProp>
|
17
|
+
<stringProp name="flighttime">#{params[:flight_time]}</stringProp>
|
18
|
+
<stringProp name="rampUp">#{params[:rampup]}</stringProp>
|
19
|
+
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
|
20
|
+
<boolProp name="LoopController.continue_forever">false</boolProp>
|
21
|
+
<intProp name="LoopController.loops">-1</intProp>
|
22
|
+
</elementProp>
|
23
|
+
</kg.apc.jmeter.threads.SteppingThreadGroup>
|
24
|
+
EOF
|
25
|
+
# update params
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/ruby-jmeter/version.rb
CHANGED
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.11.
|
4
|
+
version: 2.11.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Koopmans
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -80,6 +80,7 @@ files:
|
|
80
80
|
- examples/basic_query_params.rb
|
81
81
|
- examples/basic_run.rb
|
82
82
|
- examples/basic_simple_data_writer.rb
|
83
|
+
- examples/basic_stepping_thread_group.rb
|
83
84
|
- examples/basic_test_fragment.rb
|
84
85
|
- examples/basic_testdata.rb
|
85
86
|
- examples/basic_think_time.rb
|
@@ -227,6 +228,7 @@ files:
|
|
227
228
|
- lib/ruby-jmeter/plugins/response_times_distribution.rb
|
228
229
|
- lib/ruby-jmeter/plugins/response_times_over_time.rb
|
229
230
|
- lib/ruby-jmeter/plugins/response_times_percentiles.rb
|
231
|
+
- lib/ruby-jmeter/plugins/stepping_thread_group.rb
|
230
232
|
- lib/ruby-jmeter/plugins/transactions_per_second.rb
|
231
233
|
- lib/ruby-jmeter/plugins/variable_throughput_timer.rb
|
232
234
|
- lib/ruby-jmeter/version.rb
|