Skip to content

Commit d97efd4

Browse files
committed
fix bug in sample being injected into collection props
1 parent 884eae8 commit d97efd4

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

examples/sample_transaction.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,14 @@
55
threads count: 1 do
66
# this will let you sample 1 in every N (e.g. 100) transactions on Flood IO
77
get name: 'Home Page', sample: 100, url: 'http://google.com/'
8+
9+
post name: 'create session', url: '/api/oauth', sample: 100,
10+
fill_in: {
11+
username: 'Michel Rosen',
12+
password: 4141414141
13+
} do
14+
extract json: '.access_token', name: 'access_token'
15+
with_xhr
16+
end
817
end
918
end.run(path: '/usr/share/jmeter/bin/', gui: true)

lib/ruby-jmeter/extend/samplers/http_request.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def http_request(*args, &block)
2020
if params[:sample]
2121
transaction name: params[:name], parent: true do
2222
loops count: params[:sample].to_i do
23+
params.delete(:sample)
2324
attach_node(http_request_node(params), &block)
2425
end
2526
end

lib/ruby-jmeter/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module RubyJmeter
2-
VERSION = '3.0.2'
2+
VERSION = '3.0.3'
33
end

0 commit comments

Comments
 (0)