Page Object on JRuby

In this section, we will see how easy it is to switch our existing MRI ruby code base to JRuby. I will take my page-object_framework codebase that was entirely written with MRI, step by step, incrementally and vetted enough with MRI. Then switch my environment to JRuby and execute it.

Pre-Requisites

  1. Page Object Framework section
  2. JRuby setup

Agenda:

  1. Checkout project codebase
  2. Run bundler to get JRuby gems
  3. Execute the shopping cart workflow
  4. Closing Thoughts

1) Checkout project codebase

Checkout project code base from my github repo

github

2) Run bundle install

bundle_install

3)Execute shopping cart workflow

bundle exec cucumber features\Confirm_order.feature | wac

jruby_executed

Closing Thoughts

So it is as easy as switching between MRI and JRuby and executing your code base without too much PITA.

One interesting observation if I may – When we executed the same feature before with MRI, it took around 48 -ish seconds. Now you can see it took 22 -ish seconds with JRuby.