Sha256: e9c9602c00d62b7d8c2a8e1d4bfef296094dd17b9948067d646a365a28c91d0b

Contents?: true

Size: 909 Bytes

Versions: 12

Compression:

Stored size: 909 Bytes

Contents

module JmeterPerf
  class ExtendedDSL < DSL
    def foreach_controller(params = {}, &)
      node = JmeterPerf::ForeachController.new(params).tap do |node|
        if params[:start_index]
          params[:startIndex] = params[:start_index]
          node.doc.children.first.add_child(
            Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
              <<-EOS
                <stringProp name="ForeachController.startIndex"/>
              EOS
            )).children
          )
        end

        if params[:end_index]
          params[:endIndex] = params[:end_index]
          node.doc.children.first.add_child(
            Nokogiri::XML(JmeterPerf::Helpers::String.strip_heredoc(
              <<-EOS
                <stringProp name="ForeachController.endIndex"/>
              EOS
            )).children
          )
        end
      end

      attach_node(node, &)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
jmeter_perf-1.1.1 lib/jmeter_perf/extend/controllers/foreach_controller.rb
jmeter_perf-1.1.0 lib/jmeter_perf/extend/controllers/foreach_controller.rb
jmeter_perf-1.0.10 lib/jmeter_perf/extend/controllers/foreach_controller.rb
jmeter_perf-1.0.9 lib/jmeter_perf/extend/controllers/foreach_controller.rb
jmeter_perf-1.0.8 lib/jmeter_perf/extend/controllers/foreach_controller.rb
jmeter_perf-1.0.7 lib/jmeter_perf/extend/controllers/foreach_controller.rb
jmeter_perf-1.0.6 lib/jmeter_perf/extend/controllers/foreach_controller.rb
jmeter_perf-1.0.5 lib/jmeter_perf/extend/controllers/foreach_controller.rb
jmeter_perf-1.0.4 lib/jmeter_perf/extend/controllers/foreach_controller.rb
jmeter_perf-1.0.2 lib/jmeter_perf/extend/controllers/foreach_controller.rb
jmeter_perf-1.0.1 lib/jmeter_perf/extend/controllers/foreach_controller.rb
jmeter_perf-1.0.0 lib/jmeter_perf/extend/controllers/foreach_controller.rb