Class: RubyJmeter::AssertionResults

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

Returns a new instance of AssertionResults.



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
# File 'lib/ruby-jmeter/dsl/assertion_results.rb', line 13

def initialize(params={})
  testname = params.kind_of?(Array) ? 'AssertionResults' : (params[:name] || 'AssertionResults')
  @doc = Nokogiri::XML("<ResultCollector guiclass=\"AssertionVisualizer\" testclass=\"ResultCollector\" testname=\"\#{testname}\" enabled=\"true\">\n<boolProp name=\"ResultCollector.error_logging\">false</boolProp>\n<objProp>\n<name>saveConfig</name>\n<value class=\"SampleSaveConfiguration\">\n<time>true</time>\n<latency>true</latency>\n<timestamp>true</timestamp>\n<success>true</success>\n<label>true</label>\n<code>true</code>\n<message>false</message>\n<threadName>true</threadName>\n<dataType>false</dataType>\n<encoding>false</encoding>\n<assertions>false</assertions>\n<subresults>false</subresults>\n<responseData>false</responseData>\n<samplerData>false</samplerData>\n<xml>false</xml>\n<fieldNames>false</fieldNames>\n<responseHeaders>false</responseHeaders>\n<requestHeaders>false</requestHeaders>\n<responseDataOnError>false</responseDataOnError>\n<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>\n<assertionsResultsToSave>0</assertionsResultsToSave>\n<bytes>true</bytes>\n<threadCounts>true</threadCounts>\n<sampleCount>true</sampleCount>\n</value>\n</objProp>\n<stringProp name=\"filename\"/>\n</ResultCollector>)\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/assertion_results.rb', line 10

def doc
  @doc
end