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.


  1. Page Object Framework section
  2. JRuby setup


  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


2) Run bundle install


3)Execute shopping cart workflow

bundle exec cucumber features\Confirm_order.feature | wac


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.