Cucumber was first written in Ruby and supported multiple languages, though we know that generally a library written using a programming language aligns much better with that programming world. For example, if you ask me to use a .dll file in my java program as an api layer – I would have one of those faces..yeah “wtf” faces.
Does that mean I can never use a dll in a java program? No ! There are situations where we might have to have bridges between programming language barriers and java does that with JNI. So it is not to say it is impossible. It would just not be a great idea.
Hence Cucumber was used extensively in Ruby world and not much adopted in the Java world or .NET world for example.
Java world is too big and there are so many solutions, libraries and Test Automation solutions. Anyways, to whittle it down to our discussion on the web automation side, some of the tools that work well hand in hand with a Java based solution are Selenium, TestNG, Apache POI, jax and jars that can be plugged in any time.
Hence cucumber was NOT that popular in Java world. But does that mean we did not have a way to execute Java via cucumber at all .
cucumber-jvm
cucumber-jvm is a pure Java implementation of Cucumber and runs on a jvm with JIT compiler. At this point in time [Dec 2014], we don’t find many articles or information or documentation on how to set up a simple Java project, use cucumber-jvm library and get the smooth experience what we have with cucumber and ruby in general.
I find the gihub source code for cucumber-jvm as the most up to date source of information i.e. dig through the code and learn by reverse engineering more or less. This is generally not a comfortable idea for most of us right ! So I will try my best to present the information I learn in a succinct manner on this website.
cucumber-jvm is on a very ambitious route to support so many languages and frameworks. Just take a look at the github repo – android, clojure, gosu, groovy, guice, java8, jruby, jython…..
No comments:
Post a Comment