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