ruby-jmeter 3.0.10 → 3.0.11

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: b4785d4a5ace5391994c0a2817ff9765313458c0
4
- data.tar.gz: 4a033a8abeb542553085a0c588e79611b040b69d
3
+ metadata.gz: c41d4b20c8c48445ebfc213c9ab7a19f979f2c49
4
+ data.tar.gz: aefcd31bd8b7d721b18aba6efc344382d4c21697
5
5
  SHA512:
6
- metadata.gz: fc951df3c6b8d3115117211b1d02b9339dded389397e88a164976c340754d3d8388885c140f649170b5fc48340233aebbc85a132d2e484d1de89dd4302507cc0
7
- data.tar.gz: 8d77801b337ce12781875ee22e3f1d3d09b7a2f90f6fea40c78b56fd4c8a888dd1d0a70814d3c67448e77ac014ff1f1adcdd094e8f4e62f9acaec198d8af005a
6
+ metadata.gz: 6072a542c8fbd59152b74eef20e3b30eaf566ccbcd3f65121ed4590aad09fdc5596a54c076737d607c8a618b71ec686f02d33f08d2977ca3852154ba2724ac20
7
+ data.tar.gz: b396ab791eca825fcb78187dafcac53cab6c5325df42afa8b13f8a03499315b3ff1a5ddaf9c05ea811e20ff2f71ab231b6fc283dbf0d57faccc46cf4f81a6753
@@ -0,0 +1,19 @@
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',
14
+ files: [
15
+ "#{Dir.pwd}/data1.csv",
16
+ "#{Dir.pwd}/data2.csv",
17
+ "#{Dir.pwd}/data3.csv",
18
+ "#{Dir.pwd}/data4.csv"
19
+ ]
@@ -0,0 +1,10 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ require 'ruby-jmeter'
3
+
4
+ test do
5
+ threads count: 1, loop: 1 do
6
+ visit 'https://api.github.com/orgs/flood-io/repos' do
7
+ json_path_postprocessor referenceNames: 'name', jsonPathExprs: '.name', match_numbers: 1
8
+ end
9
+ end
10
+ end.run(path: '/usr/share/jmeter/bin/', gui: true)
@@ -161,6 +161,8 @@
161
161
  `debug_postprocessor`
162
162
  - JDBC PostProcessor
163
163
  `jdbc_postprocessor`
164
+ - JSON Path PostProcessor
165
+ `json_path_postprocessor`
164
166
  - JSR223 PostProcessor
165
167
  `jsr223_postprocessor`
166
168
  - Regular Expression Extractor
@@ -0,0 +1,27 @@
1
+ module RubyJmeter
2
+ class DSL
3
+ def json_path_postprocessor(params={}, &block)
4
+ node = RubyJmeter::JsonPathPostprocessor.new(params)
5
+ attach_node(node, &block)
6
+ end
7
+ end
8
+
9
+ class JsonPathPostprocessor
10
+ attr_accessor :doc
11
+ include Helper
12
+
13
+ def initialize(params={})
14
+ testname = params.kind_of?(Array) ? 'JsonPathPostprocessor' : (params[:name] || 'JsonPathPostprocessor')
15
+ @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
16
+ <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="#{testname}" enabled="true">
17
+ <stringProp name="JSONPostProcessor.referenceNames"/>
18
+ <stringProp name="JSONPostProcessor.jsonPathExprs"/>
19
+ <stringProp name="JSONPostProcessor.match_numbers"/>
20
+ </JSONPostProcessor>)
21
+ EOS
22
+ update params
23
+ update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
24
+ end
25
+ end
26
+
27
+ end
@@ -847,6 +847,12 @@
847
847
  <stringProp name="resultSetHandler">Store as String</stringProp>
848
848
  </JDBCPostProcessor>
849
849
  <hashTree/>
850
+ <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Path PostProcessor" enabled="true">
851
+ <stringProp name="JSONPostProcessor.referenceNames"></stringProp>
852
+ <stringProp name="JSONPostProcessor.jsonPathExprs"></stringProp>
853
+ <stringProp name="JSONPostProcessor.match_numbers"></stringProp>
854
+ </JSONPostProcessor>
855
+ <hashTree/>
850
856
  <JSR223PostProcessor guiclass="TestBeanGUI" testclass="JSR223PostProcessor" testname="JSR223 PostProcessor" enabled="true">
851
857
  <stringProp name="cacheKey"></stringProp>
852
858
  <stringProp name="filename"></stringProp>
@@ -1,3 +1,3 @@
1
1
  module RubyJmeter
2
- VERSION = '3.0.10'
2
+ VERSION = '3.0.11'
3
3
  end
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: 3.0.10
4
+ version: 3.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Koopmans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-10 00:00:00.000000000 Z
11
+ date: 2016-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -67,6 +67,7 @@ files:
67
67
  - examples/etsy_login_browse.rb
68
68
  - examples/extract.rb
69
69
  - examples/flood.rb
70
+ - examples/flood_files.rb
70
71
  - examples/flood_grids.rb
71
72
  - examples/foreach_controller.rb
72
73
  - examples/header_manager.rb
@@ -79,6 +80,7 @@ files:
79
80
  - examples/jmeter_plugins_graphs.rb
80
81
  - examples/json_path_assertions.rb
81
82
  - examples/json_path_extractor.rb
83
+ - examples/json_path_postprocessor.rb
82
84
  - examples/jsr223_assertion.rb
83
85
  - examples/ldap_sampler.rb
84
86
  - examples/loadosophia.rb
@@ -162,6 +164,7 @@ files:
162
164
  - lib/ruby-jmeter/dsl/jms_pointtopoint.rb
163
165
  - lib/ruby-jmeter/dsl/jms_publisher.rb
164
166
  - lib/ruby-jmeter/dsl/jms_subscriber.rb
167
+ - lib/ruby-jmeter/dsl/json_path_postprocessor.rb
165
168
  - lib/ruby-jmeter/dsl/jsr223_assertion.rb
166
169
  - lib/ruby-jmeter/dsl/jsr223_listener.rb
167
170
  - lib/ruby-jmeter/dsl/jsr223_postprocessor.rb