In the previous tutorial, we discussed an introduction to Behaviour Driven Development (BDD). BDD simply acts as the bridge between Developers, Testers, Business stakeholders and Client. Hence, it works on the basis of mutual collaboration with continuous feedback in the loop. We can say that Behaviour Driven Development (BDD) appreciates the Agile methodology. Today we will discuss on Cucumber which is known as the premier BDD tool. Therefore, we will have an introduction to the Cucumber BDD tool and then its installation guide.
Before we jump to the today’s agenda I’d like to suggest some of the tutorials on Selenium and TestNG so that you could refresh your knowledge.
- Selenium Tutorials
- TestNG Tutorials
- Parameterization in Selenium
- Logging and Reporting in Selenium
- Listeners
- Continuous Integration
- BDD Tutorials
What is the Cucumber testing tool?
Cucumber is a Behaviour Driven Development (BDD) tool which supports plain English (using Gherkin syntax) language to write the automation tests. It supports various software platforms like Ruby, Java, .Net, Python, Selenium, etc.
Initially, Cucumber was the command line tool for Ruby, but further, it converted to the development environment.
Why the Cucumber BDD tool only?
There are many BDD tools that we have discussed in the previous tutorial on BDD, but still, why do we need Cucumber only. Here are listed some of the significances of using Cucumber BDD tool which will give the answer to the above question.
- Cucumber is an open source BBD tool which is freely available for all
- A non-technical person can easily understand the steps written with Cucumber BDD tool
- It is available for various programming platform like Ruby, .Net, Java, etc
- Cucumber appreciates 100% flexibility to reuse the code
- A non-technical user can write scenarios for cucumber tests in plain English by using the syntax of the Gherkin
- Its execution is very quick
- Cucumber acts as the breeze between technical team and the business team
- It improves the efficiency of the testing processes
- Feature files created with Cucumber is like a living document which defines the current state of the project
How is Cucumber feature file a source of truth?
We say feature file is the source of truth of the current state of the project. Here are some of the explanations of it:
- All the stakeholders like developers, testers, analysts and customer sit around the same table and discuss the requirement. The result of a common conclusion or say acceptance criteria is the Cucumber feature file. Hence, it is a source of truth that everyone agrees to it.
- A team as a whole come up with an example which is ultimately the solution to the problem statement. Thus, a team can make a thin difference between the example which got implementation, and which didn’t.
How Does Cucumber work?
We have discussed a lot more on Cucumber so far. Now you must be curious to know about the working of this magical Behaviour Driven Development tool which we call it as Cucumber. Right?
Let’s discuss them…
We discussed that Cucumber based development and test project involves Business, Customer, Delivery, Developers, Tester and other required stakeholders in a closed loop. Hence, we can divide the working side of Cucumber as below:
- Business Centric
- Technical Centric
In Business Centric face of the Cucumber, we develop Features, Scenarios, and Steps, which comes under the Acceptance Criteria. Whereas, in Technical Centric face of the Cucumber BDD tool, we develop test steps, Business functional code and Automation library.
So, this was all about Introduction of Cucumber BDD tool. In the next tutorial, we will discuss the installation processes of the Cucumber with Eclipse.