SlideShare a Scribd company logo
1 of 24
Download to read offline
Practiced Agile
Developer with TDD and
BDD
by Sakares Saengkaew
Software Development and Quality Improvement,
Asian Institute of Technology
How many hours testing of your
software? When will you perform
testing? What happens?
● 8 hours?
● 10 % of project work hours.
● before deployment 5 days and some bugs
still be unsolved left.
● complicate unsolvable bug.
● Need more time to debug.
● Just show to customer and wish they will not
see unexpected scene.
How should we make it
better?
- Change the way of coding
by TDD !
What's TDD ?
- abbreviated from "Test Driven Development".
- a programming technique based on a very
simple rule :
Only ever write code to fix a failing test.
What's TDD ?
- Test first, then code and design afterward.
What's TDD ?
- But It's not finished yet.
- We call it refactoring to better communicate
that the last step is about transforming the
current design toward a better design.
How to ?
- Using Unit Test. For example, JUnit in Java,
BoostTest in C++ or UnitTest in Ruby on Rails.
- Perform Red-Green-Refactor principle.
Red-Green-Refactor
- Firstly, write a test. Hence, it failed (Red)
since there is no functionality code at start.
- Secondly, make it pass by simply
implementing the missing functionality. Then it
turn pass (Green).
- Last, refactoring. As we improve the design of
the code without altering its external behavior,
all tests should pass and, thus, we should
remain green.
Brief summary : TDD
- TDD is when you use Automated Testing
(usually Unit Testing) as a design practice.
- TDD ensures high quality code.
- Release work with confident.
- Make a collective code ownership since unit
test suite is a clear document that every
developer in teams can read, follow and write
by individual.
But the defect of TDD
- The unit tests still test the behavior of the
method.
- It may be difficult to trace the behavior of the
method directly to the behavior that the external
stakeholders asked for and/or understand.
- Hence, we consider BDD .
What's BDD ?
- abbreviated from "Behavior Driven
Development".
- BDD is an extension/revision of TDD.
- BDD specifies that tests of any unit of
software should be specified in terms of the
desired behavior of the unit.
What's BDD ?
- Borrowing from agile software development
the "desired behavior" in this case consists of
the requirements set by the business.
- BDD utilizes a "Ubiquitous Language", a body
of knowledge that can be understood by both
the developer and the customer. Moreover, it is
used to shape and develop the requirements
and testing needed, at the level of the
customer's understanding.
How to ?
- Popular BDD tools include Cucumber, RSpec,
SpecFlow and others.
- To explain how to perform simply BDD, we
will illustrate from the Cucumber tool by Ruby
language .
BDD by Cucumber
1: Describe behaviour in plain text
BDD by Cucumber
2: Write a step definition in Ruby
BDD by Cucumber
3: Run and watch it fail
BDD by Cucumber
4: Write code to make the step pass
BDD by Cucumber
5: Run again and see the step pass
BDD by Cucumber
6: Repeat 2-5 until green like a cuke
Brief summary : BDD
- BDD is when you use Automated Testing to
flesh out & capture domain logic starting from
the (high-enough) functional testing down to the
domain unit logic.
- BDD ensures high cohesion between
technical implementation and the domain.
- makes sense to business via the domain units
and behaviour that domain experts understand.
Summary : What's different
between TDD and BDD ?
- BDD focuses on the behavioural aspect of the
system rather than the implementation aspect
of the system that TDD focuses on.
- BDD gives a clearer understanding as to what
the system should do from the perspective of
the developer and the customer.
- TDD only gives the developer an
understanding of what the system should do.
Summary
- One of the principles in agile, "Responding
to change over following a plan". This means
that do not know in advance what you have to
build.
- TDD and BDD support the change since you
can write exactly needed feature. Also prevent
overproduction.
Summary
- "Customer collaboration over contract
negotiation". It's clear by using BDD.
Customer become to cooperate in software
development. Sharpen the product requirement
in business aspect.
Reference
● Practices of an agile developer: working in the real world
by Venkat Subramaniam, Andy Hunt
● Test Driven: Practical TDD and Acceptance TDD for Java
Developers by Lasse Koskela
● The Cucumber Book: Behaviour-Driven Development for
Testers and Developers by Matt Wynne, Matt Wynne
● http://www.anitpatel.net/2012/06/14/what-is-the-difference-
between-tddatddbdd-in-agile-development/
● http://en.wikipedia.org/wiki/Behavior-driven_development
● http://programmers.stackexchange.
com/questions/21870/can-you-be-agile-without-doing-tdd-
test-driven-development
● http://cukes.info/

More Related Content

What's hot

Behavior Driven Development with AngularJS & Jasmine
Behavior Driven Development with AngularJS & JasmineBehavior Driven Development with AngularJS & Jasmine
Behavior Driven Development with AngularJS & JasmineRemus Langu
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven DevelopmentAdam Englander
 
Java Code Quality Improvements - DevWeek
Java Code Quality Improvements - DevWeekJava Code Quality Improvements - DevWeek
Java Code Quality Improvements - DevWeekZoltan Iszlai
 
Topic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionTopic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionHoa Le
 
Extreme Programming
Extreme ProgrammingExtreme Programming
Extreme ProgrammingKnoldus Inc.
 
Behavior driven development (bdd)
Behavior driven development (bdd)Behavior driven development (bdd)
Behavior driven development (bdd)Rohit Bisht
 
Moving to tdd bdd
Moving to tdd bddMoving to tdd bdd
Moving to tdd bddKim Carter
 
Agile Simplified
Agile SimplifiedAgile Simplified
Agile SimplifiedWalaa Atef
 
Practical Programming It Awareness Advocacy
Practical Programming   It Awareness AdvocacyPractical Programming   It Awareness Advocacy
Practical Programming It Awareness AdvocacyMarie Claire Ponsaran
 
Automated agile testing using Cucumber
Automated agile testing using CucumberAutomated agile testing using Cucumber
Automated agile testing using CucumberNaveen Kumar Singh
 
Bdd. Automate your requirements
Bdd. Automate your requirementsBdd. Automate your requirements
Bdd. Automate your requirementsjugkaraganda
 
Behavior Driven Development (BDD)
Behavior Driven Development (BDD)Behavior Driven Development (BDD)
Behavior Driven Development (BDD)Ajay Danait
 
The Essentials Of Test Driven Development
The Essentials Of Test Driven Development The Essentials Of Test Driven Development
The Essentials Of Test Driven Development Rock Interview
 
extreme Programming
extreme Programmingextreme Programming
extreme ProgrammingBilal Shah
 
Scrum + Behavior Driven Development (BDD) - Colombo
Scrum + Behavior Driven Development (BDD) - ColomboScrum + Behavior Driven Development (BDD) - Colombo
Scrum + Behavior Driven Development (BDD) - ColomboNaveen Kumar Singh
 

What's hot (20)

Behavior Driven Development with AngularJS & Jasmine
Behavior Driven Development with AngularJS & JasmineBehavior Driven Development with AngularJS & Jasmine
Behavior Driven Development with AngularJS & Jasmine
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
Java Code Quality Improvements - DevWeek
Java Code Quality Improvements - DevWeekJava Code Quality Improvements - DevWeek
Java Code Quality Improvements - DevWeek
 
Topic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionTopic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolution
 
Extreme Programming
Extreme ProgrammingExtreme Programming
Extreme Programming
 
Behavior driven development (bdd)
Behavior driven development (bdd)Behavior driven development (bdd)
Behavior driven development (bdd)
 
BDD-Driven Microservices
BDD-Driven MicroservicesBDD-Driven Microservices
BDD-Driven Microservices
 
Scrum
ScrumScrum
Scrum
 
Moving to tdd bdd
Moving to tdd bddMoving to tdd bdd
Moving to tdd bdd
 
Agile Simplified
Agile SimplifiedAgile Simplified
Agile Simplified
 
Practical Programming It Awareness Advocacy
Practical Programming   It Awareness AdvocacyPractical Programming   It Awareness Advocacy
Practical Programming It Awareness Advocacy
 
Automated agile testing using Cucumber
Automated agile testing using CucumberAutomated agile testing using Cucumber
Automated agile testing using Cucumber
 
What is BDD
What is BDDWhat is BDD
What is BDD
 
Bdd. Automate your requirements
Bdd. Automate your requirementsBdd. Automate your requirements
Bdd. Automate your requirements
 
BDD with JBehave
BDD with JBehaveBDD with JBehave
BDD with JBehave
 
Xtreme Programming
Xtreme ProgrammingXtreme Programming
Xtreme Programming
 
Behavior Driven Development (BDD)
Behavior Driven Development (BDD)Behavior Driven Development (BDD)
Behavior Driven Development (BDD)
 
The Essentials Of Test Driven Development
The Essentials Of Test Driven Development The Essentials Of Test Driven Development
The Essentials Of Test Driven Development
 
extreme Programming
extreme Programmingextreme Programming
extreme Programming
 
Scrum + Behavior Driven Development (BDD) - Colombo
Scrum + Behavior Driven Development (BDD) - ColomboScrum + Behavior Driven Development (BDD) - Colombo
Scrum + Behavior Driven Development (BDD) - Colombo
 

Similar to Practiced agile developer with tdd & bdd

Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...Katy Slemon
 
BDD presentation
BDD presentationBDD presentation
BDD presentationtemebele
 
Bdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propriBdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propriCommit University
 
Behavioral tests with behat for qa
Behavioral tests with behat for qaBehavioral tests with behat for qa
Behavioral tests with behat for qaSergey Bielanovskiy
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Developmentbhochhi
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWDVikas Sarin
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia eventXebia India
 
The BDD Process (Behavior-driven development)
The BDD Process (Behavior-driven development)The BDD Process (Behavior-driven development)
The BDD Process (Behavior-driven development)GleecusTechlabs1
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanQA or the Highway
 
Introducing BDD and TDD with Cucumber
Introducing BDD and TDD with CucumberIntroducing BDD and TDD with Cucumber
Introducing BDD and TDD with CucumberKnoldus Inc.
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Developmentnikhil sreeni
 
Myths and Challenges of Behaviour Driven Development
Myths and Challenges of Behaviour Driven DevelopmentMyths and Challenges of Behaviour Driven Development
Myths and Challenges of Behaviour Driven DevelopmentPankaj Nakhat
 
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...BA and Beyond
 
Data Engineer's Lunch #68: DevOps Fundamentals
Data Engineer's Lunch #68: DevOps FundamentalsData Engineer's Lunch #68: DevOps Fundamentals
Data Engineer's Lunch #68: DevOps FundamentalsAnant Corporation
 
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...Agile Testing Alliance
 
TDD vs. ATDD - What, Why, Which, When & Where
TDD vs. ATDD - What, Why, Which, When & WhereTDD vs. ATDD - What, Why, Which, When & Where
TDD vs. ATDD - What, Why, Which, When & WhereDaniel Davis
 

Similar to Practiced agile developer with tdd & bdd (20)

Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
 
BDD presentation
BDD presentationBDD presentation
BDD presentation
 
Introduction to TDD and BDD
Introduction to TDD and BDDIntroduction to TDD and BDD
Introduction to TDD and BDD
 
Bdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propriBdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propri
 
Behavioral tests with behat for qa
Behavioral tests with behat for qaBehavioral tests with behat for qa
Behavioral tests with behat for qa
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWD
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia event
 
The BDD Process (Behavior-driven development)
The BDD Process (Behavior-driven development)The BDD Process (Behavior-driven development)
The BDD Process (Behavior-driven development)
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
 
Introducing BDD and TDD with Cucumber
Introducing BDD and TDD with CucumberIntroducing BDD and TDD with Cucumber
Introducing BDD and TDD with Cucumber
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Myths and Challenges of Behaviour Driven Development
Myths and Challenges of Behaviour Driven DevelopmentMyths and Challenges of Behaviour Driven Development
Myths and Challenges of Behaviour Driven Development
 
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
 
Data Engineer's Lunch #68: DevOps Fundamentals
Data Engineer's Lunch #68: DevOps FundamentalsData Engineer's Lunch #68: DevOps Fundamentals
Data Engineer's Lunch #68: DevOps Fundamentals
 
What is jad_session
What is jad_sessionWhat is jad_session
What is jad_session
 
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
 
Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD
 
TDD vs. ATDD - What, Why, Which, When & Where
TDD vs. ATDD - What, Why, Which, When & WhereTDD vs. ATDD - What, Why, Which, When & Where
TDD vs. ATDD - What, Why, Which, When & Where
 
Test Policy and Practices
Test Policy and PracticesTest Policy and Practices
Test Policy and Practices
 

Recently uploaded

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

Practiced agile developer with tdd & bdd

  • 1. Practiced Agile Developer with TDD and BDD by Sakares Saengkaew Software Development and Quality Improvement, Asian Institute of Technology
  • 2. How many hours testing of your software? When will you perform testing? What happens? ● 8 hours? ● 10 % of project work hours. ● before deployment 5 days and some bugs still be unsolved left. ● complicate unsolvable bug. ● Need more time to debug. ● Just show to customer and wish they will not see unexpected scene.
  • 3. How should we make it better? - Change the way of coding by TDD !
  • 4. What's TDD ? - abbreviated from "Test Driven Development". - a programming technique based on a very simple rule : Only ever write code to fix a failing test.
  • 5. What's TDD ? - Test first, then code and design afterward.
  • 6. What's TDD ? - But It's not finished yet. - We call it refactoring to better communicate that the last step is about transforming the current design toward a better design.
  • 7. How to ? - Using Unit Test. For example, JUnit in Java, BoostTest in C++ or UnitTest in Ruby on Rails. - Perform Red-Green-Refactor principle.
  • 8. Red-Green-Refactor - Firstly, write a test. Hence, it failed (Red) since there is no functionality code at start. - Secondly, make it pass by simply implementing the missing functionality. Then it turn pass (Green). - Last, refactoring. As we improve the design of the code without altering its external behavior, all tests should pass and, thus, we should remain green.
  • 9. Brief summary : TDD - TDD is when you use Automated Testing (usually Unit Testing) as a design practice. - TDD ensures high quality code. - Release work with confident. - Make a collective code ownership since unit test suite is a clear document that every developer in teams can read, follow and write by individual.
  • 10. But the defect of TDD - The unit tests still test the behavior of the method. - It may be difficult to trace the behavior of the method directly to the behavior that the external stakeholders asked for and/or understand. - Hence, we consider BDD .
  • 11. What's BDD ? - abbreviated from "Behavior Driven Development". - BDD is an extension/revision of TDD. - BDD specifies that tests of any unit of software should be specified in terms of the desired behavior of the unit.
  • 12. What's BDD ? - Borrowing from agile software development the "desired behavior" in this case consists of the requirements set by the business. - BDD utilizes a "Ubiquitous Language", a body of knowledge that can be understood by both the developer and the customer. Moreover, it is used to shape and develop the requirements and testing needed, at the level of the customer's understanding.
  • 13. How to ? - Popular BDD tools include Cucumber, RSpec, SpecFlow and others. - To explain how to perform simply BDD, we will illustrate from the Cucumber tool by Ruby language .
  • 14. BDD by Cucumber 1: Describe behaviour in plain text
  • 15. BDD by Cucumber 2: Write a step definition in Ruby
  • 16. BDD by Cucumber 3: Run and watch it fail
  • 17. BDD by Cucumber 4: Write code to make the step pass
  • 18. BDD by Cucumber 5: Run again and see the step pass
  • 19. BDD by Cucumber 6: Repeat 2-5 until green like a cuke
  • 20. Brief summary : BDD - BDD is when you use Automated Testing to flesh out & capture domain logic starting from the (high-enough) functional testing down to the domain unit logic. - BDD ensures high cohesion between technical implementation and the domain. - makes sense to business via the domain units and behaviour that domain experts understand.
  • 21. Summary : What's different between TDD and BDD ? - BDD focuses on the behavioural aspect of the system rather than the implementation aspect of the system that TDD focuses on. - BDD gives a clearer understanding as to what the system should do from the perspective of the developer and the customer. - TDD only gives the developer an understanding of what the system should do.
  • 22. Summary - One of the principles in agile, "Responding to change over following a plan". This means that do not know in advance what you have to build. - TDD and BDD support the change since you can write exactly needed feature. Also prevent overproduction.
  • 23. Summary - "Customer collaboration over contract negotiation". It's clear by using BDD. Customer become to cooperate in software development. Sharpen the product requirement in business aspect.
  • 24. Reference ● Practices of an agile developer: working in the real world by Venkat Subramaniam, Andy Hunt ● Test Driven: Practical TDD and Acceptance TDD for Java Developers by Lasse Koskela ● The Cucumber Book: Behaviour-Driven Development for Testers and Developers by Matt Wynne, Matt Wynne ● http://www.anitpatel.net/2012/06/14/what-is-the-difference- between-tddatddbdd-in-agile-development/ ● http://en.wikipedia.org/wiki/Behavior-driven_development ● http://programmers.stackexchange. com/questions/21870/can-you-be-agile-without-doing-tdd- test-driven-development ● http://cukes.info/