Class: RubyJmeter::JdbcConnectionConfiguration

Inherits:
Object
  • Object
show all
Includes:
Helper
Defined in:
lib/ruby-jmeter/dsl/jdbc_connection_configuration.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 = {}) ⇒ JdbcConnectionConfiguration

Returns a new instance of JdbcConnectionConfiguration.



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

def initialize(params={})
  testname = params.kind_of?(Array) ? 'JdbcConnectionConfiguration' : (params[:name] || 'JdbcConnectionConfiguration')
  @doc = Nokogiri::XML("<JDBCDataSource guiclass=\"TestBeanGUI\" testclass=\"JDBCDataSource\" testname=\"\#{testname}\" enabled=\"true\">\n<boolProp name=\"autocommit\">true</boolProp>\n<stringProp name=\"checkQuery\">Select 1</stringProp>\n<stringProp name=\"connectionAge\">5000</stringProp>\n<stringProp name=\"dataSource\"/>\n<stringProp name=\"dbUrl\"/>\n<stringProp name=\"driver\"/>\n<boolProp name=\"keepAlive\">true</boolProp>\n<stringProp name=\"password\"/>\n<stringProp name=\"poolMax\">10</stringProp>\n<stringProp name=\"timeout\">10000</stringProp>\n<stringProp name=\"transactionIsolation\">DEFAULT</stringProp>\n<stringProp name=\"trimInterval\">60000</stringProp>\n<stringProp name=\"username\"/>\n</JDBCDataSource>)\n".strip_heredoc)
  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/jdbc_connection_configuration.rb', line 10

def doc
  @doc
end