ruby-jmeter 2.0.8 → 2.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,11 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ require 'ruby-jmeter'
3
+
4
+ test do
5
+ defaults domain: 'example.com',
6
+ protocol: 'https',
7
+ image_parser: true,
8
+ implementation: 'HttpClient3.1',
9
+ concurrentDwn: true,
10
+ concurrentPool: 4
11
+ end.run(path: '/usr/share/jmeter/bin/', gui: true)
@@ -31,6 +31,7 @@ module RubyJmeter
31
31
  <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
32
32
  <boolProp name="HTTPSampler.monitor">false</boolProp>
33
33
  <stringProp name="HTTPSampler.embedded_url_re"/>
34
+ <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
34
35
  </HTTPSamplerProxy>)
35
36
  EOS
36
37
  update params
@@ -34,6 +34,7 @@ module RubyJmeter
34
34
  <stringProp name="HTTPSampler.embedded_url_re"/>
35
35
  <boolProp name="HTTPSampler.concurrentDwn">false</boolProp>
36
36
  <stringProp name="HTTPSampler.concurrentPool">4</stringProp>
37
+ <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
37
38
  </ConfigTestElement>)
38
39
  EOS
39
40
  update params
@@ -96,6 +96,7 @@
96
96
  <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
97
97
  <boolProp name="HTTPSampler.concurrentDwn">false</boolProp>
98
98
  <stringProp name="HTTPSampler.concurrentPool">4</stringProp>
99
+ <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
99
100
  </ConfigTestElement>
100
101
  <hashTree/>
101
102
  <JavaConfig guiclass="JavaConfigGui" testclass="JavaConfig" testname="Java Request Defaults" enabled="true">
@@ -526,6 +527,7 @@
526
527
  <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
527
528
  <boolProp name="HTTPSampler.monitor">false</boolProp>
528
529
  <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
530
+ <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
529
531
  </HTTPSamplerProxy>
530
532
  <hashTree/>
531
533
  <JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="Java Request" enabled="true">
@@ -1,3 +1,3 @@
1
1
  module RubyJmeter
2
- VERSION = "2.0.8"
2
+ VERSION = "2.0.9"
3
3
  end
@@ -50,6 +50,28 @@ describe "DSL" do
50
50
  end
51
51
 
52
52
 
53
+ describe 'http request defaults' do
54
+ let(:doc) do
55
+ test do
56
+ defaults domain: 'example.com',
57
+ protocol: 'https',
58
+ image_parser: true,
59
+ implementation: 'HttpClient3.1',
60
+ concurrentDwn: true,
61
+ concurrentPool: 4
62
+ end.to_doc
63
+ end
64
+
65
+ let(:fragment) { doc.search("//ConfigTestElement").first }
66
+
67
+ it 'should match on defaults' do
68
+ fragment.search(".//stringProp[@name='HTTPSampler.domain']").text.should == 'example.com'
69
+ fragment.search(".//stringProp[@name='HTTPSampler.protocol']").text.should == 'https'
70
+ fragment.search(".//stringProp[@name='HTTPSampler.implementation']").text.should == 'HttpClient3.1'
71
+ end
72
+ end
73
+
74
+
53
75
  describe 'header manager' do
54
76
  let(:doc) do
55
77
  test do
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.0.8
4
+ version: 2.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-19 00:00:00.000000000 Z
12
+ date: 2013-09-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -72,6 +72,7 @@ files:
72
72
  - examples/basic_gc_results.rb
73
73
  - examples/basic_google.rb
74
74
  - examples/basic_header.rb
75
+ - examples/basic_http_request_defaults.rb
75
76
  - examples/basic_ldap_ext.rb
76
77
  - examples/basic_post.rb
77
78
  - examples/basic_query_params.rb