Sha256: 4615d346e420ca48002c212f917c490f4104508c2c5d718b5f7f98e06cc49f99
Contents?: true
Size: 1.46 KB
Versions: 28
Compression:
Stored size: 1.46 KB
Contents
module RubyJmeter class DSL def setup_thread_group(params={}, &block) node = RubyJmeter::SetupThreadGroup.new(params) attach_node(node, &block) end end class SetupThreadGroup attr_accessor :doc include Helper def initialize(params={}) testname = params.kind_of?(Array) ? 'SetupThreadGroup' : (params[:name] || 'SetupThreadGroup') @doc = Nokogiri::XML(<<-EOS.strip_heredoc) <SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="#{testname}" enabled="true"> <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="#{testname}" enabled="true"> <boolProp name="LoopController.continue_forever">false</boolProp> <stringProp name="LoopController.loops">-1</stringProp> </elementProp> <stringProp name="ThreadGroup.num_threads">1</stringProp> <stringProp name="ThreadGroup.ramp_time">1</stringProp> <longProp name="ThreadGroup.start_time">1442954623000</longProp> <longProp name="ThreadGroup.end_time">1442954623000</longProp> <boolProp name="ThreadGroup.scheduler">true</boolProp> <stringProp name="ThreadGroup.duration"></stringProp> <stringProp name="ThreadGroup.delay"></stringProp> </SetupThreadGroup>) EOS update params update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath] end end end
Version data entries
28 entries across 28 versions & 1 rubygems