ruby-jmeter 2.11.3 → 2.11.4

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: c25cdc0a1803626f683087bfe65bf71ed90abc90
4
- data.tar.gz: 8e3a52a0e847b9d31d055ca800ef9622a96932e7
3
+ metadata.gz: b5bc1f6b2c1312ab7e9922978ee213d39deef0a8
4
+ data.tar.gz: 0e8446660a68a200b541c13ba7db7217a66cf377
5
5
  SHA512:
6
- metadata.gz: 09591d36e8fd0cacf739b1558429c2b778a11ec299d2951834d2dfe3733071e98d851d251c2a3607abb528664a54cc1a030ace4bdcfc4365c247a60075aaaeaf
7
- data.tar.gz: b40f66552d2e4b8c24c9431d9f4b2341593364de0a93f87e75ffa42943f8292ac902547fd0e0e684c89df718784733745c26d76c3df8ff6345c59e5d249f7192
6
+ metadata.gz: 071962a0464223aecd0ad7314e631affc67ac582fb321172051cbce5e72c4533e71e57f2a503d7ea61ceea7964d87bfc14d60449e6f3cf051cab9001ae17bf00
7
+ data.tar.gz: 6693613ecb51856faa38aefa2ca33c40516cc76ce1f316af497c59d824fcf126d29c3620442755604089bbdb6ae8aedf8860ad4c3e0466a32950e8ab9dc92a96
data/README.md CHANGED
@@ -253,6 +253,22 @@ submit name: 'Submit Form', url: 'http://altentee.com/',
253
253
 
254
254
  This method makes a single request. The fill_in parameter lets you specify key/value pairs for form field parameters. You can also use the built in JMeter `${expression}` language to access run time variables extracted from previous responses.
255
255
 
256
+ ### POST JSON
257
+
258
+ ```ruby
259
+ header [
260
+ { name: 'Content-Type', value: 'application/json' }
261
+ ]
262
+
263
+ person = { name: "Tom" }
264
+
265
+ post name: 'Create Person',
266
+ url: "https://example.com/people.json",
267
+ raw_body: person.to_json do
268
+ with_xhr
269
+ end
270
+ ```
271
+
256
272
  ### Think Time
257
273
 
258
274
  You can use the `think_time` method to insert pauses into the simulation. This method is aliased as `random_timer`.
@@ -297,6 +313,17 @@ visit name: "Altentee", url: "http://altentee.com" do
297
313
  match_number: 0 # random
298
314
  end
299
315
  ```
316
+ You can later use the extracted values with subsequent requests:
317
+
318
+ ```ruby
319
+ post name: 'Authenticate', url: 'http://example.com/api/authentication/facebook', raw_body: '{"auth_token": "FB_TOKEN"}' do
320
+ extract name: 'auth_token', regex: %q{.*"token":"([^"]+)".*}
321
+ extract name: 'user_id', regex: %q{.*"user_id":([^,]+),.*}
322
+ end
323
+
324
+ header({name: 'X-Auth-Token', value: '${auth_token}'})
325
+ visit name: 'User profile', url: 'http://example.com/api/users/${user_id}'
326
+ ```
300
327
 
301
328
  ### Response Assertion
302
329
 
@@ -28,7 +28,7 @@ module RubyJmeter
28
28
  <boolProp name="HTTPSampler.image_parser">true</boolProp>
29
29
  <boolProp name="HTTPSampler.concurrentDwn">true</boolProp>
30
30
  <stringProp name="HTTPSampler.concurrentPool">4</stringProp>
31
- <stringProp name="HTTPSampler.embedded_url_re"> </stringProp>
31
+ <stringProp name="HTTPSampler.embedded_url_re"/>
32
32
  </ConfigTestElement>)
33
33
  EOS
34
34
  update params
@@ -90,7 +90,7 @@
90
90
  <boolProp name="HTTPSampler.image_parser">true</boolProp>
91
91
  <boolProp name="HTTPSampler.concurrentDwn">true</boolProp>
92
92
  <stringProp name="HTTPSampler.concurrentPool">4</stringProp>
93
- <stringProp name="HTTPSampler.embedded_url_re"> </stringProp>
93
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
94
94
  </ConfigTestElement>
95
95
  <hashTree/>
96
96
  <JavaConfig guiclass="JavaConfigGui" testclass="JavaConfig" testname="Java Request Defaults" enabled="true">
@@ -1,3 +1,3 @@
1
1
  module RubyJmeter
2
- VERSION = "2.11.3"
2
+ VERSION = "2.11.4"
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: 2.11.3
4
+ version: 2.11.4
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-03-13 00:00:00.000000000 Z
11
+ date: 2014-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client