ruby-jmeter 2.11.19 → 2.11.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/basic_flood_with_csv.rb +16 -0
- data/examples/demo.csv +3 -0
- data/lib/ruby-jmeter/dsl.rb +6 -3
- data/lib/ruby-jmeter/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba607adc6f5aba491cf943b03531c8aa26ada8aa
|
4
|
+
data.tar.gz: 207aa979afca804ab2222c2233c6ad3e0f19f744
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2226041404c7cdbae95f6307250a2becbec5ec2abff17b6cf47638a251236bdf1759d559e3464ee84bf0e93b1c8371d0eeb3b558d4bb7119a6f8354158bc7368
|
7
|
+
data.tar.gz: f8e508f4fdc2628b70411e6da0de7e147ab9bf549fec10b3f1c7b903d9cfb5e38e7734538fdf731357b147392112c4e0f5cabcbf39636aaf5a3f8af949e66748
|
@@ -0,0 +1,16 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
require 'ruby-jmeter'
|
3
|
+
|
4
|
+
test do
|
5
|
+
csv_data_set_config filename: 'demo.csv',
|
6
|
+
variableNames: 'fruit'
|
7
|
+
|
8
|
+
threads count: 1 do
|
9
|
+
visit name: 'Home Page', url: 'http://127.0.0.1/?fruit=${fruit}'
|
10
|
+
end
|
11
|
+
end.flood('fyxequ4bsLhjgvGqQnD1', {
|
12
|
+
name: 'Fruity demo with additional CSV',
|
13
|
+
region: 'us-west-2',
|
14
|
+
endpoint: 'dev.api.flood.io:8000',
|
15
|
+
files: ["#{Dir.pwd}/examples/demo.csv"]
|
16
|
+
})
|
data/examples/demo.csv
ADDED
data/lib/ruby-jmeter/dsl.rb
CHANGED
@@ -507,6 +507,11 @@ module RubyJmeter
|
|
507
507
|
file.write(doc.to_xml(:indent => 2))
|
508
508
|
file.rewind
|
509
509
|
|
510
|
+
flood_files = {
|
511
|
+
file: File.new("#{file.path}", 'rb')
|
512
|
+
}.merge(Hash[params[:files].map.with_index { |value, index| [index, File.new(value, 'rb')] }])
|
513
|
+
params.delete(:files)
|
514
|
+
|
510
515
|
response = RestClient.post "#{params[:endpoint] ? params[:endpoint] : 'https://api.flood.io'}/floods?auth_token=#{token}",
|
511
516
|
{
|
512
517
|
:flood => {
|
@@ -524,9 +529,7 @@ module RubyJmeter
|
|
524
529
|
:started => params[:started],
|
525
530
|
:stopped => params[:stopped]
|
526
531
|
},
|
527
|
-
:flood_files =>
|
528
|
-
:file => File.new("#{file.path}", 'rb')
|
529
|
-
},
|
532
|
+
:flood_files => flood_files,
|
530
533
|
:results => (File.new("#{params[:jtl] ? params[:jtl] : 'jmeter.jtl'}", 'rb') if params[:region] == 'local'),
|
531
534
|
:region => params[:region],
|
532
535
|
:multipart => true,
|
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.20
|
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-
|
11
|
+
date: 2014-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- examples/basic_extract.rb
|
65
65
|
- examples/basic_flood.rb
|
66
66
|
- examples/basic_flood_real.rb
|
67
|
+
- examples/basic_flood_with_csv.rb
|
67
68
|
- examples/basic_foreach.rb
|
68
69
|
- examples/basic_gc_dummy_sampler.rb
|
69
70
|
- examples/basic_gc_results.rb
|
@@ -89,6 +90,7 @@ files:
|
|
89
90
|
- examples/basic_throughput_controller.rb
|
90
91
|
- examples/basic_throughput_shaping_timer.rb
|
91
92
|
- examples/basic_user_defined_variables.rb
|
93
|
+
- examples/demo.csv
|
92
94
|
- examples/etsy_login_browse.rb
|
93
95
|
- examples/real_flood_test_data.rb
|
94
96
|
- examples/real_immi.gov.au_visa.rb
|