Class: JmeterPerf::Plugins::DummySampler
- Inherits:
-
Object
- Object
- JmeterPerf::Plugins::DummySampler
- Includes:
- Helpers::XmlDocumentUpdater
- Defined in:
- lib/jmeter_perf/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.
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 24 25 26 27 |
# File 'lib/jmeter_perf/plugins/dummy_sampler.rb', line 6 def initialize(params = {}) testname = params.is_a?(Array) ? "DummySampler" : (params[:name] || "DummySampler") @doc = Nokogiri::XML( JmeterPerf::Helpers::String.strip_heredoc( " <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 )\n )\n upcased_params = {}\n params.each { |k, v| upcased_params[k.to_s.upcase] = v }\n update upcased_params\nend\n" |
Instance Attribute Details
#doc ⇒ Object
Returns the value of attribute doc.
4 5 6 |
# File 'lib/jmeter_perf/plugins/dummy_sampler.rb', line 4 def doc @doc end |