Class: RubyJmeter::SetupThreadGroup
- Inherits:
-
Object
- Object
- RubyJmeter::SetupThreadGroup
- Includes:
- Helper
- Defined in:
- lib/ruby-jmeter/dsl/setup_thread_group.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
Returns the value of attribute doc.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ SetupThreadGroup
constructor
A new instance of SetupThreadGroup.
Methods included from Helper
#enabled, #enabled_disabled, #update, #update_at_xpath, #update_collection
Constructor Details
#initialize(params = {}) ⇒ SetupThreadGroup
Returns a new instance of SetupThreadGroup.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/ruby-jmeter/dsl/setup_thread_group.rb', line 13 def initialize(params={}) testname = params.kind_of?(Array) ? 'SetupThreadGroup' : (params[:name] || 'SetupThreadGroup') @doc = Nokogiri::XML("<SetupThreadGroup guiclass=\"SetupThreadGroupGui\" testclass=\"SetupThreadGroup\" testname=\"\#{testname}\" enabled=\"true\">\n <stringProp name=\"ThreadGroup.on_sample_error\">continue</stringProp>\n <elementProp name=\"ThreadGroup.main_controller\" elementType=\"LoopController\" guiclass=\"LoopControlPanel\" testclass=\"LoopController\" testname=\"\#{testname}\" enabled=\"true\">\n<boolProp name=\"LoopController.continue_forever\">false</boolProp>\n<stringProp name=\"LoopController.loops\">-1</stringProp>\n </elementProp>\n <stringProp name=\"ThreadGroup.num_threads\">1</stringProp>\n <stringProp name=\"ThreadGroup.ramp_time\">1</stringProp>\n <longProp name=\"ThreadGroup.start_time\">1442954623000</longProp>\n <longProp name=\"ThreadGroup.end_time\">1442954623000</longProp>\n <boolProp name=\"ThreadGroup.scheduler\">true</boolProp>\n <stringProp name=\"ThreadGroup.duration\"></stringProp>\n <stringProp name=\"ThreadGroup.delay\"></stringProp>\n</SetupThreadGroup>)\n EOS\n update params\n update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]\nend\n".strip_heredoc) |
Instance Attribute Details
#doc ⇒ Object
Returns the value of attribute doc.
10 11 12 |
# File 'lib/ruby-jmeter/dsl/setup_thread_group.rb', line 10 def doc @doc end |