Sha256: eb495b964121fccb8b219690f086e9ced98e4a36403a41992b7d810d1621fe62
Contents?: true
Size: 1.32 KB
Versions: 7
Compression:
Stored size: 1.32 KB
Contents
module JmeterPerf class DSL # DSL method synonymous with the JMeter Element BSFAssertion # @param params [Hash] Parameters for the BSFAssertion element (default: `{}`). # @yield block to attach to the BSFAssertion element # @return [JmeterPerf::BSFAssertion], a subclass of JmeterPerf::DSL that can be chained with other DSL methods. # @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#bsfassertion def bsf_assertion(params = {}, &) node = BSFAssertion.new(params) attach_node(node, &) end class BSFAssertion attr_accessor :doc include JmeterPerf::Helpers::XmlDocumentUpdater def initialize(params = {}) testname = params.is_a?(Array) ? "BSFAssertion" : (params[:name] || "BSFAssertion") @doc = Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc( <<~EOS <BSFAssertion guiclass="TestBeanGUI" testclass="BSFAssertion" testname="#{testname}" enabled="true"> <stringProp name="filename"/> <stringProp name="parameters"/> <stringProp name="script"/> <stringProp name="scriptLanguage"/> </BSFAssertion> 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