Sha256: 29a2d576b00b276ba5b3cda4f2e17e8aeb213e48f6e7c563987709d4b807ed3c
Contents?: true
Size: 1.33 KB
Versions: 7
Compression:
Stored size: 1.33 KB
Contents
module JmeterPerf class DSL # DSL method synonymous with the JMeter Element ResultStatusActionHandler # @param params [Hash] Parameters for the ResultStatusActionHandler element (default: `{}`). # @yield block to attach to the ResultStatusActionHandler element # @return [JmeterPerf::ResultStatusActionHandler], a subclass of JmeterPerf::DSL that can be chained with other DSL methods. # @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#resultstatusactionhandler def result_status_action_handler(params = {}, &) node = ResultStatusActionHandler.new(params) attach_node(node, &) end class ResultStatusActionHandler attr_accessor :doc include JmeterPerf::Helpers::XmlDocumentUpdater def initialize(params = {}) testname = params.is_a?(Array) ? "ResultStatusActionHandler" : (params[:name] || "ResultStatusActionHandler") @doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc( <<~EOS <ResultAction guiclass="ResultActionGui" testclass="ResultAction" testname="#{testname}" enabled="true"> <intProp name="OnError.action">0</intProp> </ResultAction> EOS )) update params update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath] end end end end
Version data entries
7 entries across 7 versions & 1 rubygems