Sha256: 5d3fbd4c4bb576b082cb0e9a5f451d76299811afc2e0f8d1cf52257b2f17575a

Contents?: true

Size: 765 Bytes

Versions: 2

Compression:

Stored size: 765 Bytes

Contents

module JmeterPerf
  class DSL
    def include_controller(params = {}, &)
      node = JmeterPerf::IncludeController.new(params)
      attach_node(node, &)
    end
  end

  class IncludeController
    attr_accessor :doc
    include Helper

    def initialize(params = {})
      testname = params.is_a?(Array) ? "IncludeController" : (params[:name] || "IncludeController")
      @doc = Nokogiri::XML(<<~EOS.strip_heredoc)
        <IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="#{testname}" enabled="true">
          <stringProp name="IncludeController.includepath"/>
        </IncludeController>
      EOS
      update params
      update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jmeter_perf-0.0.6 lib/jmeter_perf/dsl/include_controller.rb
jmeter_perf-0.0.2 lib/jmeter_perf/dsl/include_controller.rb