Sha256: ea471aca1deeaec4b1892ec141c0111fda55be334a184b9ce24957e301de7418

Contents?: true

Size: 522 Bytes

Versions: 5

Compression:

Stored size: 522 Bytes

Contents

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

# Define your page objects
class HomePage
  def initialize(dsl)
    @dsl = dsl
  end

  def visit
    get name: 'home', url: '/'
  end

  private

  def method_missing method, *args, &block
    @dsl.__send__ method, *args, &block
  end
end

test do
  threads count: 1 do
    # then re-use your page objects in your test plan
    home = HomePage.new(self)
    home.visit
  end
end.run(path: '/usr/share/jmeter-2.11/bin/', gui: true)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ruby-jmeter-2.11.13 examples/real_page_objects.rb
ruby-jmeter-2.11.11 examples/real_page_objects.rb
ruby-jmeter-2.11.10 examples/real_page_objects.rb
ruby-jmeter-2.11.9 examples/real_page_objects.rb
ruby-jmeter-2.11.8 examples/real_page_objects.rb