Simple Cucumber Script – Add Two Numbers



You have completed Ruby, selenium, cucumber installation steps described at the beginning of the tutorial. You have also downloaded the template project, imported in RubyMine.



  1. Intent is to add two numbers a and b and output the sum (a+b)
  2. Write First cucumber feature file 
  3. Write first scenario in the feature file
  4. Execute the scenario as is (It will fail since we did not write step definitions)
  5. Complete the code-behind (aka. step definitions) each step for the scenario
  6. Execute the scenario again
  7. The scenario passes and all steps pass too (GREEN as in Cucumber)
  8. The entire video is posted at the end ofComplete First Automation Script


1. Open the template project in RubyMine



2. Run Tools -> bundler -> Install




3. Just click Install




4. bundler install should pass as below and Gemfile.lock is created



5.  Now right-click on features folder and click New -> File





6. Name as “addition.feature”




7. Copy and paste the below content in addition.feature file (Double click the addition.feature file to open on the right window)






8. Just run the scenario as is




9. You will notice the error as below (unimplemented step definitions). This is perfectly alright, since we have not written the automation code yet





At this point, we will start writing the automation scripts. Continue……