Class: JmeterPerf::Plugins::UltimateThreadGroup

Inherits:
Object
  • Object
show all
Includes:
Helpers::XmlDocumentUpdater
Defined in:
lib/jmeter_perf/plugins/ultimate_thread_group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ UltimateThreadGroup

Returns a new instance of UltimateThreadGroup.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/jmeter_perf/plugins/ultimate_thread_group.rb', line 6

def initialize(params = {})
  testname = params.is_a?(Array) ? "UltimateThreadGroup" : (params[:name] || "UltimateThreadGroup")
  @doc = Nokogiri::XML(
    JmeterPerf::Helpers::String.strip_heredoc(
      "        <kg.apc.jmeter.threads.UltimateThreadGroup guiclass=\"kg.apc.jmeter.threads.UltimateThreadGroupGui\" testclass=\"kg.apc.jmeter.threads.UltimateThreadGroup\" testname=\"\#{testname}\" enabled=\"true\">\n        <collectionProp name=\"ultimatethreadgroupdata\">\n        </collectionProp>\n        <elementProp name=\"ThreadGroup.main_controller\" elementType=\"LoopController\" guiclass=\"LoopControlPanel\" testclass=\"LoopController\" testname=\"Loop Controller\" enabled=\"true\">\n          <boolProp name=\"LoopController.continue_forever\">false</boolProp>\n          <intProp name=\"LoopController.loops\">-1</intProp>\n        </elementProp>\n        <stringProp name=\"ThreadGroup.on_sample_error\">continue</stringProp>\n      </kg.apc.jmeter.threads.UltimateThreadGroup>\n      EOF\n    )\n  )\n\n  update params\nend\n"

Instance Attribute Details

#docObject

Returns the value of attribute doc.



4
5
6
# File 'lib/jmeter_perf/plugins/ultimate_thread_group.rb', line 4

def doc
  @doc
end