module JmeterPerf class DSL def java_request_defaults(params = {}, &) node = JmeterPerf::JavaRequestDefaults.new(params) attach_node(node, &) end end class JavaRequestDefaults attr_accessor :doc include Helper def initialize(params = {}) testname = params.is_a?(Array) ? "JavaRequestDefaults" : (params[:name] || "JavaRequestDefaults") @doc = Nokogiri::XML(<<~EOS.strip_heredoc) Sleep_Time 100 = Sleep_Mask 0xFF = Label = ResponseCode = ResponseMessage = Status OK = SamplerData = ResultData = org.apache.jmeter.protocol.java.test.JavaTest EOS update params update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath] end end end