Cucumber Behaviour Driven Development Framework
Posted By : Neha Dahiya | 31-Oct-2018
To make the best use of software testing, nowadays organizations are taking a forward step. Most important scenarios of acceptance testing are implemented while the development is in progress. This kind of approach is commonly called Behaviour Driven Development (BDD).
This type of approach gives both the developer and customer an opportunity so as to create the test scripts. So this is planned at the very beginning by the team i.e managers, developers, product owner(stockholder), QA’s, brainstorming altogether about the test scenarios which all should be passed so that we call the software or the application to be successful. These test scenarios are in simple language so that these can also be used for the documentation purpose.
Let’s take an example
For the purpose of developing an authentication feature, the following can be some test scenarios, which can be passed in order to say
- The user should be able to login with the correct username and password.
- The user should be able to login with the wrong username and password.
- The user should not be able to login with valid username and an incorrect password.
How it Works
Code and test scripts are ready for execution at the same time. Now the code will have to pass all the test scripts which were defined in the BDD. Only after the successful execution of the test scripts, the code gets
For the implementation of such a concept, we need Behavior Driven Development (BDD) Framework. The answer is Cucumber, an open source tool which can support Behaviour Driven Development. It is defined as a testing framework which is driven by simple English text. This can serve as documentation, development aid, automation test scripts i.e all in one.
Let’s look at what can cucumber can do:
- Cucumber can read the code which is written in simple English text.
- It has the ability to find the exact match defined for each step.
- The code to be executed can be different frameworks such as Ruby on Rails, Selenium. All the tools do not support BDD framework.
- This is why Cucumber is more popular over other frameworks.
Advantages of Cucumber Over Other Tools
- It supports many different languages such as Ruby, Java, .net etc.
- It allows us to write test cases without the knowledge of code, as well as it allows other programmers involvement.
- It supports an end to end test framework
- It provides reusability due to simple test script architecture
Thanks!!
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Neha Dahiya
Neha is a bright QA Engineer with skills in manual testing . Apart from finding bugs in application, she loves sketching and painting.