gridinit-jmeter 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -166,6 +166,13 @@ module Gridinit
166
166
  attach_node(node, &block)
167
167
  end
168
168
 
169
+ def soap(name="SOAP Request", params={}, &block)
170
+ params[:method] = 'POST' if params[:method] == nil
171
+ node = Gridinit::Jmeter::SoapSampler.new(name, params)
172
+ attach_to_last(node, caller)
173
+ self.instance_exec(&block) if block
174
+ end
175
+
169
176
  alias_method :get, :visit
170
177
 
171
178
  def submit(name="HTTP Request", url="", params={}, &block)
@@ -0,0 +1,26 @@
1
+ module Gridinit
2
+ module Jmeter
3
+
4
+ class SoapSampler
5
+ attr_accessor :doc
6
+ include Helper
7
+ def initialize(name, params={})
8
+ @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
9
+ <SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="#{name}" enabled="true">
10
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
11
+ <collectionProp name="Arguments.arguments"/>
12
+ </elementProp>
13
+ <stringProp name="SoapSampler.URL_DATA"></stringProp>
14
+ <stringProp name="HTTPSamper.xml_data"></stringProp>
15
+ <stringProp name="SoapSampler.xml_data_file"></stringProp>
16
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
17
+ <stringProp name="SoapSampler.SEND_SOAP_ACTION">true</stringProp>
18
+ <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
19
+ </SoapSampler>
20
+ EOF
21
+ update params
22
+ end
23
+ end
24
+
25
+ end
26
+ end
@@ -1,5 +1,5 @@
1
1
  module Gridinit
2
2
  module Jmeter
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.2"
4
4
  end
5
5
  end
@@ -114,3 +114,4 @@ require 'gridinit-jmeter/config/random_variable'
114
114
  # SAMPLERS
115
115
  require 'gridinit-jmeter/samplers/http_sampler'
116
116
  require 'gridinit-jmeter/samplers/ldap_ext_sampler'
117
+ require 'gridinit-jmeter/samplers/soap_sampler'
data/spec/dsl_spec.rb CHANGED
@@ -14,6 +14,10 @@ describe "DSL" do
14
14
  test {}.should respond_to :visit
15
15
  end
16
16
 
17
+ it "test plan should respond to soap" do
18
+ test {}.should respond_to :soap
19
+ end
20
+
17
21
  it "test plan should respond to submit" do
18
22
  test {}.should respond_to :submit
19
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gridinit-jmeter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
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-05-13 00:00:00.000000000 Z
12
+ date: 2013-05-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -249,6 +249,7 @@ files:
249
249
  - lib/gridinit-jmeter/pre_processors/bean_shell_pre_processor.rb
250
250
  - lib/gridinit-jmeter/samplers/http_sampler.rb
251
251
  - lib/gridinit-jmeter/samplers/ldap_ext_sampler.rb
252
+ - lib/gridinit-jmeter/samplers/soap_sampler.rb
252
253
  - lib/gridinit-jmeter/test_plan/test_plan.rb
253
254
  - lib/gridinit-jmeter/threads/thread_group.rb
254
255
  - lib/gridinit-jmeter/timers/gaussian_random_timer.rb