Sha256: b0e0ffb853d37819407e6df8791fdda6d29256bb4b0fb2903a1f2687188f3add
Contents?: true
Size: 825 Bytes
Versions: 12
Compression:
Stored size: 825 Bytes
Contents
module JmeterPerf class ExtendedDSL < DSL def regular_expression_extractor(params, &) params[:refname] = params[:name] params[:regex] = params[:pattern] params[:template] = params[:template] || "$1$" node = JmeterPerf::DSL::RegularExpressionExtractor.new(params).tap do |node| if params[:variable] node.doc.xpath("//stringProp[@name='Sample.scope']").first.content = "variable" node.doc.children.first.add_child( Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc( <<-EOS <stringProp name="Scope.variable">#{params[:variable]}</stringProp> EOS )).children ) end end attach_node(node, &) end alias_method :regex, :regular_expression_extractor end end
Version data entries
12 entries across 12 versions & 1 rubygems