Sha256: dd68a66b0a8fcb4555728b648d7807de99a1649805ca4017940bc50b8bc7763a

Contents?: true

Size: 793 Bytes

Versions: 6

Compression:

Stored size: 793 Bytes

Contents

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'ruby-jmeter'

build_args = ->(args) do
  args.collect do |arg|
    {
      xpath: "//collectionProp[@name='Arguments.arguments']",
      value: Nokogiri::XML(<<-EOF.strip_heredoc).children
              <elementProp name="" elementType="Argument">
                <stringProp name="Argument.name"></stringProp>
                <stringProp name="Argument.value">#{arg}</stringProp>
                <stringProp name="Argument.metadata">=</stringProp>
              </elementProp>
            EOF
    }
  end
end


test do
  os_process_sampler 'SystemSampler.command' => 'git',
                      update_at_xpath: build_args.call(['push', 'origin', 'master'])

end.run(path: '/usr/share/jmeter-2.13/bin/', gui: true)

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruby-jmeter-2.13.10 examples/basic_os_process_sampler.rb
ruby-jmeter-2.13.9 examples/basic_os_process_sampler.rb
ruby-jmeter-2.13.8 examples/basic_os_process_sampler.rb
ruby-jmeter-2.13.7 examples/basic_os_process_sampler.rb
ruby-jmeter-2.13.6 examples/basic_os_process_sampler.rb
ruby-jmeter-2.13.5 examples/basic_os_process_sampler.rb