--- title: 'Why BDD: Behavioral Driven Development' tags: - Blog - Software-Development favourite: false created: '2022-03-11T11:23:27+07:00' published: '2022-03-11' modified: '2022-03-11T11:24:05+07:00' template: '[[General]]' feature: '[[Temp-15.jpg]]' --- # Why BDD: Behavioral Driven Development ![[Temp-15.jpg]] There are 2 main types of bugs - Regression Bugs: A type of software bug ​where a feature that has worked before stops working - New Feature Bugs: An incompleteness, unexpected behavior of new feature ## Example ![[Personal/my-contents/2022/attachments/image.jpg]] **Car’s Feature**​ – Drive point A to point B​ – Able to brake / lower speed​ – Able to turn left or right​ – Sending light signal​ – Controlling Temperature​ – Playing music​ ​ **Implement change / new feature**​ – Adding CNG system​ ​ **Bug Type**​ **– Regression Bug: **Car nolonger run on Gas/Petrol (old system)​ **– New Feature Bug: **CNG Gas leak ## How to prevent - Regression bug has HIGHER PRIORITY and can be prevent by Automated Regression Tests - New feature bug is just incompleteness, can be prevent by increase coverage of expected scenario ## BDD: Behavioral Driven Development A development concept that begin with desire expected behavior first. This can put PO: Product Owner into the loop of SLDC: Software development cycle. ![[Temp-14-1.jpg]] Before ![[Temp-15.jpg]] After ## Example tools of BDD ### Specflow ![[Personal/my-contents/2022/attachments/image.png]] **Reference:** https://specflow.org/ **LivingDoc Demo:** https://specflowoss.github.io/LivingDoc-Demo/BookShop.html#/document/Standalone/feature/f78656bac2b7f5a04acd33feeae5edd9