Sha256: 3ce284bbc84170f1e9d367b69de983d8e9c0adbca40c4b84b26ae5074d1791dc
Contents?: true
Size: 1.3 KB
Versions: 1
Compression:
Stored size: 1.3 KB
Contents
module JmeterPerf class DSL # DSL method synonymous with the JMeter Element ForEachController # @see https://github.com/jlurena/jmeter_perf/wiki/1.-DSL-Documentation#foreachcontroller # @param [Hash] params Parameters for the ForEachController element (default: `{}`). # @yield block to attach to the ForEachController element # @return [JmeterPerf::ForEachController], a subclass of JmeterPerf::DSL that can be chained with other DSL methods. def for_each_controller(params = {}, &) node = JmeterPerf::ForEachController.new(params) attach_node(node, &) end end class ForEachController attr_accessor :doc include Helper def initialize(params = {}) testname = params.is_a?(Array) ? "ForEachController" : (params[:name] || "ForEachController") @doc = Nokogiri::XML(<<~EOS.strip_heredoc) <ForeachController guiclass="ForeachControlPanel" testclass="ForeachController" testname="#{testname}" enabled="true"> <stringProp name="ForeachController.inputVal"/> <stringProp name="ForeachController.returnVal"/> <boolProp name="ForeachController.useSeparator">true</boolProp> </ForeachController> 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/for_each_controller.rb |