Class: Gridinit::Jmeter::MailReaderSampler

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helper

#enabled, #update, #update_at_xpath

Constructor Details

#initialize(params = {}) ⇒ MailReaderSampler

Returns a new instance of MailReaderSampler.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/gridinit-jmeter/dsl/mail_reader_sampler.rb', line 15

def initialize(params={})
  params[:name] ||= 'MailReaderSampler'
  @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<MailReaderSampler guiclass="MailReaderSamplerGui" testclass="MailReaderSampler" testname="#{params[:name]}" enabled="true">
  <stringProp name="host_type">pop3</stringProp>
  <stringProp name="folder">INBOX</stringProp>
  <stringProp name="host"/>
  <stringProp name="username"/>
  <stringProp name="password"/>
  <intProp name="num_messages">-1</intProp>
  <boolProp name="delete">false</boolProp>
  <stringProp name="SMTPSampler.useSSL">false</stringProp>
  <stringProp name="SMTPSampler.useStartTLS">false</stringProp>
  <stringProp name="SMTPSampler.trustAllCerts">false</stringProp>
  <stringProp name="SMTPSampler.enforceStartTLS">false</stringProp>
  <stringProp name="SMTPSampler.useLocalTrustStore">false</stringProp>
  <stringProp name="SMTPSampler.trustStoreToUse"/>
</MailReaderSampler>)
  EOS
  update params
  update_at_xpath params if params[:update_at_xpath]
end

Instance Attribute Details

#docObject

Returns the value of attribute doc.



12
13
14
# File 'lib/gridinit-jmeter/dsl/mail_reader_sampler.rb', line 12

def doc
  @doc
end