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