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.
- Checkout project codebase
- Run bundler to get JRuby gems
- Execute the shopping cart workflow
- 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
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.