Sha256: c273f0d7ed72a10d0c040b1f48d855bb53f5062eabb779d75929f0c20620acf2
Contents?: true
Size: 1.32 KB
Versions: 5
Compression:
Stored size: 1.32 KB
Contents
module JmeterPerf class DSL # DSL method synonymous with the JMeter Element BSFAssertion # @param [Hash] params 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
5 entries across 5 versions & 1 rubygems