Class: RubyJmeter::Plugins::DummySampler

Inherits:
Object
  • Object
show all
Includes:
Helper
Defined in:
lib/ruby-jmeter/plugins/dummy_sampler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helper

#enabled, #enabled_disabled, #update, #update_at_xpath, #update_collection

Constructor Details

#initialize(name, params = {}) ⇒ DummySampler

Returns a new instance of DummySampler.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/ruby-jmeter/plugins/dummy_sampler.rb', line 6

def initialize(name, params={})
  @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
    <kg.apc.jmeter.samplers.DummySampler guiclass="kg.apc.jmeter.samplers.DummySamplerGui" testclass="kg.apc.jmeter.samplers.DummySampler" testname="#{name}" enabled="true">
    <boolProp name="WAITING">true</boolProp>
    <boolProp name="SUCCESFULL">true</boolProp>
    <stringProp name="RESPONSE_CODE">200</stringProp>
    <stringProp name="RESPONSE_MESSAGE">OK</stringProp>
    <stringProp name="REQUEST_DATA"></stringProp>
    <stringProp name="RESPONSE_DATA"></stringProp>
    <stringProp name="RESPONSE_TIME">0</stringProp>
    <stringProp name="LATENCY">0</stringProp>
  </kg.apc.jmeter.samplers.DummySampler>
  EOF
  update params
end

Instance Attribute Details

#docObject

Returns the value of attribute doc.



4
5
6
# File 'lib/ruby-jmeter/plugins/dummy_sampler.rb', line 4

def doc
  @doc
end