class RubyJmeter::LoopController

Attributes

doc[RW]

Public Class Methods

new(params={}) click to toggle source
# File lib/ruby-jmeter/dsl/loop_controller.rb, line 13
    def initialize(params={})
      testname = params.kind_of?(Array) ? 'LoopController' : (params[:name] || 'LoopController')
      @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="#{testname}" enabled="true">
  <boolProp name="LoopController.continue_forever">true</boolProp>
  <stringProp name="LoopController.loops">1</stringProp>
</LoopController>)
      EOS
      update params
      update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
    end