What is Behavior Driven Development (BDD)?
Behavior Driven Development (BDD) is an Agile Software Development process that enhances collaboration among developers, QA and or business participants in a software project.
BDD uses examples to illustrate the behavior of the system that is written in a readable and understandable language for everyone involved in the development.
At its core, Behavior Driven Development is a software development methodology that joins best practices gotten from development (TDD) and design (DDD) to simplify development through the use of a common language (DSL) to understand natural language sentences and convert them into executable tests, an example is the testing framework on ruby on rails.
Benefits of Behaviour Driven Development:
The benefits of developments are countless, some of which are:
- The user needs are achieved through software development.
- BDD improves code quality thereby reducing the cost of maintaining the project.
- BDD makes sure that the software is designed based on the client's business principle.
- Teams using BDD are more confident in their code.
- High visibility.
- Strong collaboration.
- It's a ubiquitous language.
- BDD focus on user needs.
- Better communication between developers, testers and product owners.
- Because BDD is explained using simple language, the learning curve will be much shorter.
- Being non-technical in nature, it can reach a wider audience.
- The behavioral approach defines acceptance criteria prior to development.
- You are no longer defining ‘test’, but are defining ‘behavior’.
- BDD lets us develop, test and think about the code from the view of the business owner.
Features of Behaviour Driven Development:
Below are some of the features of a few Behaviour Driven Development tools:
CUCUMBER: Cucumber is a test framework that supports BDD, and some of its features are:
- Integration with all the most popular testing libraries.
- Specifying the behavior looking at the system from the outside.
- Defining executable specifications in different ways like lists, prose and tabular data.
- The plain text files can be stored in any version control system.
- Collaboration and coming up with a good and clear set of Acceptance Criteria.
JBEHAVE: is a similar alternative to Cucumber, and some of its features are:
- Pure Java implementation, which plays well with or when interfacing any environment that exposes a Java API.
- Users can choose and run text-based user stories, "out-in" development.
- User stories can be written in JBehave syntax Gherkin syntax.
- User stories can be documented via generic user-defined meta information that allows easy story filtering and into story maps.
- Dependency Injection support allowing both configuration and Steps instances composed via your container (Guice, Needle, PicoContainer, Spring, Weld).
- Localization of user stories, allowing them to be written in any language.
- Groovy scripting supported for writing configuration and Steps instances
- Pluggable step strategy. Strategies bundled in include: by priority field and by Levenshtein Distance.
- Auto-generation of pending steps so the build is not broken missing step, but has to configure breaking build.
- IDE integration: stories can be run as JUnit tests or unit test frameworks, providing easy integration IDE.
- Ant integration: allows stories to be run via Ant task
- Annotation-based binding of textual steps to Java methods, with auto-conversion of string arguments to any parameter type (including generic types) via custom parameter converters.
- Story report format in JSON and XML, consumable by external applications.
Behavior Driven Development (BDD) Course Outline:
Behavior Driven Development - Introduction
Behavior Driven Development - Development
Behavior Driven Development - TDD in a BDD Way
Behavior Driven Development - Specifications by Example
Behavior Driven Development - Tools
Behavior Driven Development - Cucumber
Behavior Driven Development - Gherkin
Behavior Driven Development - SpecFlow
Behavior Driven Development - Exams and Certification