Sha256: 332557891012e13c68935731825471db8237dab06164b36de282c4470b841e54
Contents?: true
Size: 1.2 KB
Versions: 1
Compression:
Stored size: 1.2 KB
Contents
module JmeterPerf class DSL # DSL method synonymous with the JMeter Element HTTPCacheManager # @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#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. def http_cache_manager(params = {}, &) node = JmeterPerf::HTTPCacheManager.new(params) attach_node(node, &) end end class HTTPCacheManager attr_accessor :doc include Helper def initialize(params = {}) testname = params.is_a?(Array) ? "HTTPCacheManager" : (params[:name] || "HTTPCacheManager") @doc = Nokogiri::XML(<<~EOS.strip_heredoc) <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
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jmeter_perf-0.0.7 | lib/jmeter_perf/dsl/http_cache_manager.rb |