Sha256: 660769d54b30931bb6de56f51d7dd6c41df915c8bf7a24c9e03f97e0a05e1708

Contents?: true

Size: 1.26 KB

Versions: 12

Compression:

Stored size: 1.26 KB

Contents

module JmeterPerf
  module Plugins
    class DummySampler
      attr_accessor :doc
      include JmeterPerf::Helpers::XmlDocumentUpdater
      def initialize(params = {})
        testname = params.is_a?(Array) ? "DummySampler" : (params[:name] || "DummySampler")
        @doc = Nokogiri::XML(
          JmeterPerf::Helpers::String.strip_heredoc(
            <<-EOF
              <kg.apc.jmeter.samplers.DummySampler guiclass="kg.apc.jmeter.samplers.DummySamplerGui" testclass="kg.apc.jmeter.samplers.DummySampler" testname="#{testname}" enabled="true">
                <boolProp name="WAITING">true</boolProp>
                <boolProp name="SUCCESFULL">true</boolProp>
                <stringProp name="RESPONSE_CODE">200</stringProp>
                <stringProp name="RESPONSE_MESSAGE">OK</stringProp>
                <stringProp name="REQUEST_DATA"></stringProp>
                <stringProp name="RESPONSE_DATA"></stringProp>
                <stringProp name="RESPONSE_TIME">0</stringProp>
                <stringProp name="LATENCY">0</stringProp>
              </kg.apc.jmeter.samplers.DummySampler>
            EOF
          )
        )
        upcased_params = {}
        params.each { |k, v| upcased_params[k.to_s.upcase] = v }
        update upcased_params
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

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