ruby-jmeter 2.11.20 → 2.11.21

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: ba607adc6f5aba491cf943b03531c8aa26ada8aa
4
- data.tar.gz: 207aa979afca804ab2222c2233c6ad3e0f19f744
3
+ metadata.gz: 0117119d62b9cf1fcc94d963cfb5a857d3d57e30
4
+ data.tar.gz: 80a32010847a48c985738b9f09cef937cea0def7
5
5
  SHA512:
6
- metadata.gz: 2226041404c7cdbae95f6307250a2becbec5ec2abff17b6cf47638a251236bdf1759d559e3464ee84bf0e93b1c8371d0eeb3b558d4bb7119a6f8354158bc7368
7
- data.tar.gz: f8e508f4fdc2628b70411e6da0de7e147ab9bf549fec10b3f1c7b903d9cfb5e38e7734538fdf731357b147392112c4e0f5cabcbf39636aaf5a3f8af949e66748
6
+ metadata.gz: d8fa2f5b80e4284f1993a978b46658946b97901281dc0093f57ecc1ecc298cd31f36c149f3a69a8453ae035a037b5cd5b50f79e3785faab3b3992387a7753b51
7
+ data.tar.gz: f2d2683d097a4e21c67a9be728bd3dbea3d7c1df46e6e2f595e46b1340a356547b70cb33785a2912347db051e8b933ffc07aa0fc6939ce541520382c72386bd6
@@ -0,0 +1,7 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ require 'ruby-jmeter'
3
+
4
+ test do
5
+ # Simulate user agent, accept and accept-encodings of typical browsers
6
+ with_browser :ie9
7
+ end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)
@@ -58,6 +58,15 @@ module RubyJmeter
58
58
  value: RubyJmeter::UserAgent.new(device).string
59
59
  end
60
60
 
61
+ def with_browser(device)
62
+ http_header_manager name: 'User-Agent',
63
+ value: RubyJmeter::UserAgent.new(device).string
64
+ http_header_manager [
65
+ { name: 'Accept-Encoding', value: 'gzip,deflate,sdch' },
66
+ { name: 'Accept', value: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' }
67
+ ]
68
+ end
69
+
61
70
  def http_header_manager(params, &block)
62
71
  if params.is_a?(Hash)
63
72
  params['Header.name'] = params[:name]
@@ -1,3 +1,3 @@
1
1
  module RubyJmeter
2
- VERSION = "2.11.20"
2
+ VERSION = "2.11.21"
3
3
  end
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: 2.11.20
4
+ version: 2.11.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Koopmans
@@ -58,6 +58,7 @@ files:
58
58
  - bin/flood
59
59
  - examples/basic_assertion.rb
60
60
  - examples/basic_auth.rb
61
+ - examples/basic_browser_headers.rb
61
62
  - examples/basic_cache.rb
62
63
  - examples/basic_cookies.rb
63
64
  - examples/basic_counter.rb