Why Use Cucumber ?
All time I use cucumber in my applications regularly So I thought to share some of the very good experience with cucumber
Before 2 years back I started working with a project. My work was to build APIs in Ruby On Rails. These APIs consumed by IPhone and Android application. So I created API's first version with automated cucumber test cases. Then the application goes live with the version then I created 4 version of APIs with all Cucumber test coverage. It takes a lots time and hard work to write the test cases that time But I will explain how this helps me and my team to save our time later.
Advantages to team of cucumber use
- We upgrade our rails application version from 3.2 to 4.2 with in a week and without breaking any features.
- We have successfully released our 4 APIs version without breaking any feature in existing Or Live API version.
- We have saved a lot of time for our QA Team to check previous live builds are working fine and they have not affected with the new APIs changes. Take an example: Facebook has released 5th APIs but all the version also live in market so they need to make sure the live version of APIs should work same as previous. For that either there QA keep testing the previous FB app builds to check they are working fine or QA/Dev should write a test suit for that.
- We refactor our code to make it more readable ,optimised and using rails new syntax and functions without breaking any feature.
- We saved a lot time to check APIs from browser and then doing the same thing again and again till the problem is not fixed or re-produce.
- We create APIs but how APIs clients(IPhone and Android Developers) know this API url will give this response. Here is why I choose cucumber over all the testing framework because it generate a very beautiful and detail API documentation with a single command.
These benefits I found from my personal experience there are lot more advantages of using cucumber.
If you want to see the example code for how to use cucumber with your ruby code Please visit this link cucumber_example . This is my first post please leave you valuable comments below.
Happy Testing