ruby-jmeter 3.0.9 → 3.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/flood.rb +13 -0
- data/examples/flood_grids.rb +21 -0
- data/examples/regular_expression_extractor.rb +1 -1
- data/lib/ruby-jmeter/extend/misc/flood.rb +6 -4
- data/lib/ruby-jmeter/version.rb +1 -1
- 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: b4785d4a5ace5391994c0a2817ff9765313458c0
|
4
|
+
data.tar.gz: 4a033a8abeb542553085a0c588e79611b040b69d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc951df3c6b8d3115117211b1d02b9339dded389397e88a164976c340754d3d8388885c140f649170b5fc48340233aebbc85a132d2e484d1de89dd4302507cc0
|
7
|
+
data.tar.gz: 8d77801b337ce12781875ee22e3f1d3d09b7a2f90f6fea40c78b56fd4c8a888dd1d0a70814d3c67448e77ac014ff1f1adcdd094e8f4e62f9acaec198d8af005a
|
data/examples/flood.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
require 'ruby-jmeter'
|
3
|
+
|
4
|
+
test do
|
5
|
+
threads count: 1 do
|
6
|
+
visit name: 'Home', url: 'https://flooded.io'
|
7
|
+
end
|
8
|
+
end.flood ENV['FLOOD_API_TOKEN'],
|
9
|
+
privacy: 'public',
|
10
|
+
name: ENV['FLOOD_NAME'] ||= 'Simple Demo',
|
11
|
+
project: 'workspace',
|
12
|
+
region: ENV['REGION'] ||= 'us-west-2',
|
13
|
+
override_parameters: '-Dsun.net.inetaddr.ttl=30'
|
@@ -0,0 +1,21 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
require 'ruby-jmeter'
|
3
|
+
|
4
|
+
test do
|
5
|
+
threads count: 1 do
|
6
|
+
visit name: 'Home', url: 'https://flooded.io'
|
7
|
+
end
|
8
|
+
end.flood ENV['FLOOD_API_TOKEN'],
|
9
|
+
privacy: 'public',
|
10
|
+
name: ENV['FLOOD_NAME'] ||= 'Simple Demo',
|
11
|
+
project: 'Workspace',
|
12
|
+
override_parameters: '-Dsun.net.inetaddr.ttl=30',
|
13
|
+
grids: [
|
14
|
+
{
|
15
|
+
infrastructure: 'demand',
|
16
|
+
instance_type: 'm4.xlarge',
|
17
|
+
instance_quantity: 1,
|
18
|
+
region: 'us-west-2',
|
19
|
+
stop_after: 60
|
20
|
+
}
|
21
|
+
]
|
@@ -3,7 +3,7 @@ require 'ruby-jmeter'
|
|
3
3
|
|
4
4
|
test do
|
5
5
|
threads count: 1 do
|
6
|
-
visit name: 'Home', url: 'https://
|
6
|
+
visit name: 'Home', url: 'https://flooded.io' do
|
7
7
|
regex pattern: "content='(.+?)' name='csrf-token'", name: 'csrf-token', match_number: 1, default: '424242'
|
8
8
|
regex pattern: 'pattern', name: 'jmeter_variable_regex', variable: 'test'
|
9
9
|
end
|
@@ -16,8 +16,7 @@ module RubyJmeter
|
|
16
16
|
params.delete(:files)
|
17
17
|
end
|
18
18
|
|
19
|
-
|
20
|
-
{
|
19
|
+
post_params = {
|
21
20
|
flood: {
|
22
21
|
tool: 'jmeter',
|
23
22
|
name: params[:name],
|
@@ -31,12 +30,15 @@ module RubyJmeter
|
|
31
30
|
started: params[:started],
|
32
31
|
stopped: params[:stopped],
|
33
32
|
privacy_flag: params[:privacy] || 'private',
|
34
|
-
|
33
|
+
grids: params[:grids]
|
34
|
+
}.select { |_, value| !value.nil? },
|
35
35
|
flood_files: flood_files,
|
36
36
|
region: params[:region],
|
37
37
|
multipart: true,
|
38
38
|
content_type: 'application/octet-stream'
|
39
|
-
}.merge(params)
|
39
|
+
}.merge(params).select { |_, value| !value.nil? }
|
40
|
+
|
41
|
+
response = RestClient.post "#{params[:endpoint] ? params[:endpoint] : 'https://api.flood.io'}/floods?auth_token=#{token}", post_params
|
40
42
|
if response.code == 201
|
41
43
|
logger.info "Flood results at: #{JSON.parse(response)["permalink"]}"
|
42
44
|
else
|
data/lib/ruby-jmeter/version.rb
CHANGED
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.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Koopmans
|
@@ -66,6 +66,8 @@ files:
|
|
66
66
|
- examples/duration_assertion.rb
|
67
67
|
- examples/etsy_login_browse.rb
|
68
68
|
- examples/extract.rb
|
69
|
+
- examples/flood.rb
|
70
|
+
- examples/flood_grids.rb
|
69
71
|
- examples/foreach_controller.rb
|
70
72
|
- examples/header_manager.rb
|
71
73
|
- examples/http_cache_manager.rb
|