Sha256: ddf4b8f8981f9bd9cd19d6ed280cf2876bc608c3799826dbeb99e6e5b1ccc72b

Contents?: true

Size: 1.1 KB

Versions: 3

Compression:

Stored size: 1.1 KB

Contents

module JmeterPerf
  module Plugins
    class DummySampler
      attr_accessor :doc
      include Helper
      def initialize(params = {})
        testname = params.is_a?(Array) ? "DummySampler" : (params[:name] || "DummySampler")
        @doc = Nokogiri::XML(<<-EOF.strip_heredoc)
          <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

3 entries across 3 versions & 1 rubygems

Version Path
jmeter_perf-0.0.7 lib/jmeter_perf/plugins/dummy_sampler.rb
jmeter_perf-0.0.6 lib/jmeter_perf/plugins/dummy_sampler.rb
jmeter_perf-0.0.2 lib/jmeter_perf/plugins/dummy_sampler.rb