Sha256: f0f4154169fb88cb6979379a9a7deeb9ce91318769fb7540d477920fbf990123
Contents?: true
Size: 1.6 KB
Versions: 1
Compression:
Stored size: 1.6 KB
Contents
module JmeterPerf class DSL # DSL method synonymous with the JMeter Element HTTPAuthorizationManager # @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#httpauthorizationmanager # @param [Hash] params Parameters for the HTTPAuthorizationManager element (default: `{}`). # @yield block to attach to the HTTPAuthorizationManager element # @return [JmeterPerf::HTTPAuthorizationManager], a subclass of JmeterPerf::DSL that can be chained with other DSL methods. def http_authorization_manager(params = {}, &) node = JmeterPerf::HTTPAuthorizationManager.new(params) attach_node(node, &) end end class HTTPAuthorizationManager attr_accessor :doc include Helper def initialize(params = {}) testname = params.is_a?(Array) ? "HTTPAuthorizationManager" : (params[:name] || "HTTPAuthorizationManager") @doc = Nokogiri::XML(<<~EOS.strip_heredoc) <AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="#{testname}" enabled="true"> <collectionProp name="AuthManager.auth_list"> <elementProp name="" elementType="Authorization"> <stringProp name="Authorization.url"/> <stringProp name="Authorization.username"/> <stringProp name="Authorization.password"/> <stringProp name="Authorization.domain"/> <stringProp name="Authorization.realm"/> </elementProp> </collectionProp> </AuthManager> 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_authorization_manager.rb |