Class: RubyJmeter::Plugins::DummySampler
- Inherits:
-
Object
- Object
- RubyJmeter::Plugins::DummySampler
- Includes:
- Helper
- Defined in:
- lib/ruby-jmeter/plugins/dummy_sampler.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
Returns the value of attribute doc.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ DummySampler
constructor
A new instance of DummySampler.
Methods included from Helper
#enabled, #enabled_disabled, #update, #update_at_xpath, #update_collection
Constructor Details
#initialize(params = {}) ⇒ DummySampler
Returns a new instance of DummySampler.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ruby-jmeter/plugins/dummy_sampler.rb', line 6 def initialize(params={}) testname = params.kind_of?(Array) ? 'DummySampler' : (params[:name] || 'DummySampler') @doc = Nokogiri::XML(" <kg.apc.jmeter.samplers.DummySampler guiclass=\"kg.apc.jmeter.samplers.DummySamplerGui\" testclass=\"kg.apc.jmeter.samplers.DummySampler\" testname=\"\#{testname}\" enabled=\"true\">\n <boolProp name=\"WAITING\">true</boolProp>\n <boolProp name=\"SUCCESFULL\">true</boolProp>\n <stringProp name=\"RESPONSE_CODE\">200</stringProp>\n <stringProp name=\"RESPONSE_MESSAGE\">OK</stringProp>\n <stringProp name=\"REQUEST_DATA\"></stringProp>\n <stringProp name=\"RESPONSE_DATA\"></stringProp>\n <stringProp name=\"RESPONSE_TIME\">0</stringProp>\n <stringProp name=\"LATENCY\">0</stringProp>\n </kg.apc.jmeter.samplers.DummySampler>\n EOF\n upcased_params = {}\n params.each {|k,v| upcased_params[k.to_s.upcase] = v}\n update upcased_params\nend\n".strip_heredoc) |
Instance Attribute Details
#doc ⇒ Object
Returns the value of attribute doc.
4 5 6 |
# File 'lib/ruby-jmeter/plugins/dummy_sampler.rb', line 4 def doc @doc end |