Sha256: 5b69b5c157fd02ca83fd0a5641a92845988b469fa02f807dc2c22818aa8b2ba7

Contents?: true

Size: 761 Bytes

Versions: 11

Compression:

Stored size: 761 Bytes

Contents

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

module RubyJmeter
  class ExtendedDSL < DSL
    def test_method_here
      puts "here be dragons"
    end
  end
end

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

  def test_method_unreachable
    puts "I can never be reached from ExtendedDSL"
  end

  def visit
    get name: 'home', url: '/' do
      test_method_here
    end
  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.13/bin/', gui: true)

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ruby-jmeter-2.13.10 examples/real_page_objects.rb
ruby-jmeter-2.13.9 examples/real_page_objects.rb
ruby-jmeter-2.13.8 examples/real_page_objects.rb
ruby-jmeter-2.13.7 examples/real_page_objects.rb
ruby-jmeter-2.13.6 examples/real_page_objects.rb
ruby-jmeter-2.13.5 examples/real_page_objects.rb
ruby-jmeter-2.13.4 examples/real_page_objects.rb
ruby-jmeter-2.13.3 examples/real_page_objects.rb
ruby-jmeter-2.13.2 examples/real_page_objects.rb
ruby-jmeter-2.13.1 examples/real_page_objects.rb
ruby-jmeter-2.13.0 examples/real_page_objects.rb