SlideShare a Scribd company logo
BDD in JavaScriptBDD in JavaScript
SUMMARYSUMMARY
Origins
TDD & BDD or TDD vs BDD ?
Demo
Pros/cons
BDD comes from TDDBDD comes from TDD
Introduces in 2006 in Better Software
magazine
- Dan North
TDD was too hard to explainTDD was too hard to explain
Developers didn't use TDD
Yeah, keep in mind theyYeah, keep in mind they
were Java Developerwere Java Developer
BDD must be simplerBDD must be simpler
to understandto understand
BBehaviorehavior DDrivenriven DDevelopmentevelopment
Don't write a test, describe a behaviour !
Use a natural langageUse a natural langage
GherkinGherkin
Feature: getNumberOfSuperLi
Scenario: There is no Super li elements
Given QuerySelector API returns an empty array
When it returns the number of found elements
Then the number of found elements should be 0
Natural langageNatural langage
™
Actually, the well known solution to write
BDD scenario in "natural language"
BDD is testing forBDD is testing for
non-developernon-developer
So, I can make TDD with BDD ?So, I can make TDD with BDD ?
Yes !Yes !
But, you should not do thatBut, you should not do that
BDD is too fat for unit testingBDD is too fat for unit testing
Natural langage to codeNatural langage to code
Is expensiveIs expensive
Unit DemoUnit Demo
github.com/js-republic/cucumber-slice-by-slice
BDD is for high level checkingBDD is for high level checking
like User Interfacelike User Interface
or APIor API
UI DemoUI Demo
github.com/js-republic/nightwatch-cucumber-example
BDD & TDD can beBDD & TDD can be
used togetherused together
BDD in Javascript
ProsPros
More comprehensive
Can be written by every one, including PO !
Ensure all pieces work well together
CONSCONS
Ask a strong investissement
CONCLUSIONCONCLUSION
BDD is really powerful in an
agile organisation
 
Like TDD, it should not be a
dogma
 
Can be seen like write it own
testing framework ...
Some questions ?Some questions ?
github.com/js-republic/nightwatch-cucumber-example
github.com/js-republic/cucumber-slice-by-slice
slides.com/mbreton/tdd-in-javascript
mucsi96.github.io/nightwatch-cucumber/

More Related Content

PDF
JavaScript Speech Recognition
PDF
Coding DOJO
PPTX
Innoveo coding dojo
PDF
Deliberate Practice (2014)
PDF
Introducing BDD and TDD with Cucumber
PPTX
Test-driven development & Behavior-driven development basics
PDF
Introduction to BDD - SQUID 2018
JavaScript Speech Recognition
Coding DOJO
Innoveo coding dojo
Deliberate Practice (2014)
Introducing BDD and TDD with Cucumber
Test-driven development & Behavior-driven development basics
Introduction to BDD - SQUID 2018

Similar to BDD in Javascript (20)

PPTX
Topic tdd-and-bdd b4usolution
ODP
Test Automation Framework using Cucumber BDD overview (part 1)
PDF
Practiced agile developer with tdd & bdd
PDF
BDD with Gauge
PDF
Gauge your BDD Test (vodQA Hyderabad)
PDF
Gauge your BDD Test (vodQA Hyderabad)
PPTX
The Power of BDD
PPTX
Lets cook cucumber !!
PDF
10 things about BDD, Cucumber and SpecFlow - Long Version 2016
PDF
TDD and BDD and ATDD
PPTX
Behavior-Driven Design: One Team's Exploration
PDF
Behavior Driven Development with Cucumber
PDF
Mastering BDD - Eran Kinsbruner Workshop Quest 2018
PDF
BDD & Cucumber
PPTX
Behavior-Driven Development (BDD) and Its Impact on Software Testing.pptx
PDF
Intro to TDD & BDD
PDF
ITB2015 - Behavior Driven Development, Automation and Continuous Integration
PDF
2015 in tothebox-introtddbdd
PDF
Behavior Driven Development—A Guide to Agile Practices
PDF
TDD and BDD in Sky Deutschland
Topic tdd-and-bdd b4usolution
Test Automation Framework using Cucumber BDD overview (part 1)
Practiced agile developer with tdd & bdd
BDD with Gauge
Gauge your BDD Test (vodQA Hyderabad)
Gauge your BDD Test (vodQA Hyderabad)
The Power of BDD
Lets cook cucumber !!
10 things about BDD, Cucumber and SpecFlow - Long Version 2016
TDD and BDD and ATDD
Behavior-Driven Design: One Team's Exploration
Behavior Driven Development with Cucumber
Mastering BDD - Eran Kinsbruner Workshop Quest 2018
BDD & Cucumber
Behavior-Driven Development (BDD) and Its Impact on Software Testing.pptx
Intro to TDD & BDD
ITB2015 - Behavior Driven Development, Automation and Continuous Integration
2015 in tothebox-introtddbdd
Behavior Driven Development—A Guide to Agile Practices
TDD and BDD in Sky Deutschland
Ad

More from Mathieu Breton (8)

PDF
TDD in Javascript
PDF
Meet VueJs
PDF
FalcorJS
PDF
NodeJS Spring style Inversifyjs
PDF
Clean code in JavaScript
PDF
Rollup.js
PDF
Présentation de Dart
PDF
JavaScript the-next-big...bytecode
TDD in Javascript
Meet VueJs
FalcorJS
NodeJS Spring style Inversifyjs
Clean code in JavaScript
Rollup.js
Présentation de Dart
JavaScript the-next-big...bytecode
Ad

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Machine learning based COVID-19 study performance prediction
PPT
Teaching material agriculture food technology
PPTX
Cloud computing and distributed systems.
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Approach and Philosophy of On baking technology
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Empathic Computing: Creating Shared Understanding
Unlocking AI with Model Context Protocol (MCP)
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Programs and apps: productivity, graphics, security and other tools
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Understanding_Digital_Forensics_Presentation.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Machine learning based COVID-19 study performance prediction
Teaching material agriculture food technology
Cloud computing and distributed systems.
Network Security Unit 5.pdf for BCA BBA.
Approach and Philosophy of On baking technology
NewMind AI Weekly Chronicles - August'25 Week I
Building Integrated photovoltaic BIPV_UPV.pdf
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity
Review of recent advances in non-invasive hemoglobin estimation
Advanced methodologies resolving dimensionality complications for autism neur...
sap open course for s4hana steps from ECC to s4
Empathic Computing: Creating Shared Understanding

BDD in Javascript