Class: RubyJmeter::JunitRequest
- Inherits:
-
Object
- Object
- RubyJmeter::JunitRequest
- Includes:
- Helper
- Defined in:
- lib/ruby-jmeter/dsl/junit_request.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
Returns the value of attribute doc.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ JunitRequest
constructor
A new instance of JunitRequest.
Methods included from Helper
#enabled, #enabled_disabled, #update, #update_at_xpath, #update_collection
Constructor Details
#initialize(params = {}) ⇒ JunitRequest
Returns a new instance of JunitRequest.
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/junit_request.rb', line 13 def initialize(params={}) testname = params.kind_of?(Array) ? 'JunitRequest' : (params[:name] || 'JunitRequest') @doc = Nokogiri::XML("<JUnitSampler guiclass=\"JUnitTestSamplerGui\" testclass=\"JUnitSampler\" testname=\"\#{testname}\" enabled=\"true\">\n <stringProp name=\"junitSampler.classname\">test.RerunTest</stringProp>\n <stringProp name=\"junitsampler.constructorstring\"/>\n <stringProp name=\"junitsampler.method\">testRerun</stringProp>\n <stringProp name=\"junitsampler.pkg.filter\"/>\n <stringProp name=\"junitsampler.success\">Test successful</stringProp>\n <stringProp name=\"junitsampler.success.code\">1000</stringProp>\n <stringProp name=\"junitsampler.failure\">Test failed</stringProp>\n <stringProp name=\"junitsampler.failure.code\">0001</stringProp>\n <stringProp name=\"junitsampler.error\">An unexpected error occured</stringProp>\n <stringProp name=\"junitsampler.error.code\">9999</stringProp>\n <stringProp name=\"junitsampler.exec.setup\">false</stringProp>\n <stringProp name=\"junitsampler.append.error\">false</stringProp>\n <stringProp name=\"junitsampler.append.exception\">false</stringProp>\n</JUnitSampler>)\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/junit_request.rb', line 10 def doc @doc end |