Class: RubyJmeter::SmtpSampler
- Inherits:
-
Object
- Object
- RubyJmeter::SmtpSampler
- Includes:
- Helper
- Defined in:
- lib/ruby-jmeter/dsl/smtp_sampler.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
Returns the value of attribute doc.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ SmtpSampler
constructor
A new instance of SmtpSampler.
Methods included from Helper
#enabled, #enabled_disabled, #update, #update_at_xpath, #update_collection
Constructor Details
#initialize(params = {}) ⇒ SmtpSampler
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 |
# File 'lib/ruby-jmeter/dsl/smtp_sampler.rb', line 13 def initialize(params={}) testname = params.kind_of?(Array) ? 'SmtpSampler' : (params[:name] || 'SmtpSampler') @doc = Nokogiri::XML("<SmtpSampler guiclass=\"SmtpSamplerGui\" testclass=\"SmtpSampler\" testname=\"\#{testname}\" enabled=\"true\">\n <stringProp name=\"SMTPSampler.server\"/>\n <stringProp name=\"SMTPSampler.serverPort\"/>\n <stringProp name=\"SMTPSampler.mailFrom\"/>\n <stringProp name=\"SMTPSampler.replyTo\"/>\n <stringProp name=\"SMTPSampler.receiverTo\"/>\n <stringProp name=\"SMTPSampler.receiverCC\"/>\n <stringProp name=\"SMTPSampler.receiverBCC\"/>\n <stringProp name=\"SMTPSampler.subject\"/>\n <stringProp name=\"SMTPSampler.suppressSubject\">false</stringProp>\n <stringProp name=\"SMTPSampler.include_timestamp\">false</stringProp>\n <stringProp name=\"SMTPSampler.message\"/>\n <stringProp name=\"SMTPSampler.plainBody\">false</stringProp>\n <stringProp name=\"SMTPSampler.attachFile\"/>\n <stringProp name=\"SMTPSampler.useSSL\">false</stringProp>\n <stringProp name=\"SMTPSampler.useStartTLS\">false</stringProp>\n <stringProp name=\"SMTPSampler.trustAllCerts\">false</stringProp>\n <stringProp name=\"SMTPSampler.enforceStartTLS\">false</stringProp>\n <stringProp name=\"SMTPSampler.useLocalTrustStore\">false</stringProp>\n <stringProp name=\"SMTPSampler.trustStoreToUse\"/>\n <boolProp name=\"SMTPSampler.use_eml\">false</boolProp>\n <stringProp name=\"SMTPSampler.emlMessageToSend\"/>\n <stringProp name=\"SMTPSampler.useAuth\">false</stringProp>\n <stringProp name=\"SMTPSampler.password\"/>\n <stringProp name=\"SMTPSampler.username\"/>\n <stringProp name=\"SMTPSampler.messageSizeStatistics\">false</stringProp>\n <stringProp name=\"SMTPSampler.enableDebug\">false</stringProp>\n <collectionProp name=\"SMTPSampler.headerFields\"/>\n</SmtpSampler>)\n EOS\n update params\n update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]\nend\n".strip_heredoc) |
Instance Attribute Details
#doc ⇒ Object
Returns the value of attribute doc.
10 11 12 |
# File 'lib/ruby-jmeter/dsl/smtp_sampler.rb', line 10 def doc @doc end |