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