Class: Gridinit::Jmeter::BeanShellPreProcessor

Inherits:
Object
  • Object
show all
Includes:
Helper
Defined in:
lib/gridinit-jmeter/pre_processors/bean_shell_pre_processor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helper

#enabled, #update

Constructor Details

#initialize(script, params = {}) ⇒ BeanShellPreProcessor

Returns a new instance of BeanShellPreProcessor.



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/gridinit-jmeter/pre_processors/bean_shell_pre_processor.rb', line 7

def initialize(script, params={})
  @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
    <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor" enabled="true">
      <stringProp name="filename"></stringProp>
      <stringProp name="parameters"></stringProp>
      <boolProp name="resetInterpreter">false</boolProp>
      <stringProp name="script"><![CDATA[
#{script}
      ]]></stringProp>
    </BeanShellPreProcessor>
  EOF
  update params
end

Instance Attribute Details

#docObject

Returns the value of attribute doc.



5
6
7
# File 'lib/gridinit-jmeter/pre_processors/bean_shell_pre_processor.rb', line 5

def doc
  @doc
end