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 +4 -4
- data/README.md +27 -0
- data/lib/ruby-jmeter/dsl/http_request_defaults.rb +1 -1
- data/lib/ruby-jmeter/idl.xml +1 -1
- data/lib/ruby-jmeter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5bc1f6b2c1312ab7e9922978ee213d39deef0a8
|
4
|
+
data.tar.gz: 0e8446660a68a200b541c13ba7db7217a66cf377
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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"
|
31
|
+
<stringProp name="HTTPSampler.embedded_url_re"/>
|
32
32
|
</ConfigTestElement>)
|
33
33
|
EOS
|
34
34
|
update params
|
data/lib/ruby-jmeter/idl.xml
CHANGED
@@ -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"
|
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">
|
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.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-
|
11
|
+
date: 2014-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|