Class: RubyJmeter::MailerVisualizer

Inherits:
Object
  • Object
show all
Includes:
Helper
Defined in:
lib/ruby-jmeter/dsl/mailer_visualizer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helper

#enabled, #enabled_disabled, #update, #update_at_xpath, #update_collection

Constructor Details

#initialize(params = {}) ⇒ MailerVisualizer

Returns a new instance of MailerVisualizer.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/ruby-jmeter/dsl/mailer_visualizer.rb', line 13

def initialize(params={})
  testname = params.kind_of?(Array) ? 'MailerVisualizer' : (params[:name] || 'MailerVisualizer')
  @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<MailerResultCollector guiclass="MailerVisualizer" testclass="MailerResultCollector" testname="#{testname}" enabled="true">
  <boolProp name="ResultCollector.error_logging">false</boolProp>
  <objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
  <time>true</time>
  <latency>true</latency>
  <timestamp>true</timestamp>
  <success>true</success>
  <label>true</label>
  <code>true</code>
  <message>false</message>
  <threadName>true</threadName>
  <dataType>false</dataType>
  <encoding>false</encoding>
  <assertions>false</assertions>
  <subresults>false</subresults>
  <responseData>false</responseData>
  <samplerData>false</samplerData>
  <xml>false</xml>
  <fieldNames>false</fieldNames>
  <responseHeaders>false</responseHeaders>
  <requestHeaders>false</requestHeaders>
  <responseDataOnError>false</responseDataOnError>
  <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
  <assertionsResultsToSave>0</assertionsResultsToSave>
  <bytes>true</bytes>
  <threadCounts>true</threadCounts>
  <sampleCount>true</sampleCount>
</value>
  </objProp>
  <elementProp name="MailerResultCollector.mailer_model" elementType="MailerModel">
<stringProp name="MailerModel.successLimit">2</stringProp>
<stringProp name="MailerModel.failureLimit">2</stringProp>
<stringProp name="MailerModel.failureSubject"/>
<stringProp name="MailerModel.fromAddress"/>
<stringProp name="MailerModel.smtpHost"/>
<stringProp name="MailerModel.successSubject"/>
<stringProp name="MailerModel.addressie"/>
  </elementProp>
  <stringProp name="filename"/>
</MailerResultCollector>)
  EOS
  update params
  update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
end

Instance Attribute Details

#docObject

Returns the value of attribute doc.



10
11
12
# File 'lib/ruby-jmeter/dsl/mailer_visualizer.rb', line 10

def doc
  @doc
end