SlideShare a Scribd company logo
BDD in Action
HOW WE HAVE DONE IT IN OUR PROJECTS
About me
• Nguyen Xuan Kien
• Developer since 2006
• CurrentlyTechnical Leader at Shippo.vn
• Interested in Software Architecture
• Developing & managing 2 projects with BDD
BDD in action – how we have done it
• Why we choose BDD
• What is BDD
• BDD in Action
Why we use BDD
Bug cost
Bug cost in one of my previous project
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
Nov-15 Dec-15 Jan-16 Feb-16 Mar-16
Fixing bug time ratio in Seudo.vn
Bugs New features Others
After TDD applied
• Bugs reduced
• No serious hidden bug
• The user flow is still not as P.O expected
• P.O wasted time on write detailed feature specification
• Team members understand feature differently
More reasons
• Still not safe because of hidden “wrong feature”
• Manual regression test become bigger and bigger
• AcceptanceTest Automation needed
• Lack of documentation make training longer
• More different understanding betweenTester and Dev
What is BDD?
• Behavior Driven Development
• TDD (Test-driven-development)
• DDD (Domain-driven-design)
TDD
• Test-driven development
• A short development cycle
• Write a test first, write function after
• It’s not about test first, but about thinking first
• Make program do exactly as programmer want
DDD
• Domain-driven development
• Domain experts and Dev team understand the same
• Decoupling with domain
• And many pros in Software Architecture
BDD
• Use the ubiquitous language for both Business interests andTechnical
interest
• Write scenarios first (software behaviors)
• Scenarios could be use as living document
• Scenarios could be use asTesting Automation scripts
• Could be understand asTDD with AcceptanceTest, orAcceptance-
Test driven development with DDD in mind
BDD in Action
• Gherkin as test script language
• Cucumber for JVM as AutomationTools
• Selenium for Browser Automation, Appium for Mobile Apps
Automation
• Specification with examples
Gherkin
• Its meaning is one type of pickled cucumber
• A language for both Developer and Business
• Features, Scenarios and Steps
Example of Gherkin
Cucumber for JVM
• Execute Gherkin language as test script
• Could be in any layer
• View (use Selenium as Browser Driver)
• API (use your own custom API Client)
• Unit-test
• PerformanceTest
• There is alternative to Cucumber
BDD in Action workflow
• Business requirements from the domain experts
• Write specifications as Example
• Examples become living document
• Have test scripts as a by product
• Software development in a test-first approach
What is important to our Product?
Write Acceptance Criteria
• As a potential customer I want to collect products to shopping cart so
that I can order many products at once
How can I verify
that this story has
been fulfilled?
I would want to add a product
I would want to remove product
I would want to check how many
product I’ve added
I may add the same product
again to the cart
We need examples to these AC
Example Tests
Requirements
Consists of
Verify the fulfillmentDescribe
Further discussion of the AC
When I add to the
same product, its
quantity should be
increased
Add 3 “BDD in action” to cart
Open “BDD in action” detail
Input 2 in quantity input
Click “Add to cart”
Verify quantity in cart is 5
public voidTestAddToCart() {
….
}
Further discussion of the AC
What if I add too
many products?
No, the maximum
just need to equal to
our stock
But we warning him that
his money is not enough,
it would be wonderfulBut that would be
impossible for us to do it!
Again, we should care
about the performance if
too many products…
Collaboration of the 3 amigos
• Happy case
• Technical Possibility
• Exceptions, border cases
• Discover hidden assumptions between 3 of them
After an discussion we have an example
• Scenario: I should be able to add the same product to my cart
• Given I have 3 “BDD in action book” in my cart
• When I add 2 “BDD in action book” to my cart
• Then I should have 5 “BDD in action book” in my cart
A Scenario should be
• Use as “living” document for both Dev team and Business
• Use as AcceptanceTesting Automation Script
• Not trying to automate manual test
• Not trying to easy to automate but unreadable
• Not written after completing development
A Scenario format
• Title should describes what we want
• Given: the condition that we could be in this scenario
• When: what will trigger this scenario
• Then: the outcome we want
Workflow after that
Feature
Step defines
Writing step defines to automate test
• Context is important in each scenario
• Each scenario should be independence
• Steps should be reusable
• Each step is unique, understandable in only one way
Finally
• We could have user story done as customer really want
• Some User Story could break after completing others, but we could
handle it with less manual regression test
• We have the document for both Development and Business
• We face many challenges on the way, but we believe in the future
Our challenges
• Experimental ScenarioWriting
• Lack of documentation and Examples
• Limited suggestion from community
• Appium is not very stable yet (at least for React Native and iOS)
Gherkin Automation tools
Automation drivers
• Selenium for Browsers
• Appium forApplication Driver
• Unit-testing for internal logic layers
Do you want practice?
Questions and Answers
WITH SHOWCASES
THANKS FORYOUR ATTENTION
For further discussion contact me at:
koh2203@gmail.com
nguyenxuankien@shippo.vn
https://facebook.com/kiennx

More Related Content

What's hot

Test Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and CucumberTest Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and Cucumber
Rhoynar Software Consulting
 
Cucumber & gherkin language
Cucumber & gherkin languageCucumber & gherkin language
Cucumber & gherkin language
selvanathankapilan
 
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
Alvaro Sanchez-Mariscal
 
Gherkin /BDD intro
Gherkin /BDD introGherkin /BDD intro
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
KMS Technology
 
Cucumber Tool
Cucumber ToolCucumber Tool
Cucumber Tool
Sohail Ahmed
 
Cucumber presenation
Cucumber presenationCucumber presenation
Cucumber presenation
Oussama BEN WAFI
 
TDD and BDD in Sky Deutschland
TDD and BDD in Sky DeutschlandTDD and BDD in Sky Deutschland
TDD and BDD in Sky Deutschland
Murphy Meng
 
Collaborative Contract Driven Development
Collaborative Contract Driven DevelopmentCollaborative Contract Driven Development
Collaborative Contract Driven Development
Billy Korando
 
Cucumber ppt
Cucumber pptCucumber ppt
Cucumber ppt
Qwinix Technologies
 
Behavior Driven Testing - A paradigm shift
Behavior Driven Testing - A paradigm shiftBehavior Driven Testing - A paradigm shift
Behavior Driven Testing - A paradigm shift
Aspire Systems
 
Getting started with mobile application development
Getting started with mobile application developmentGetting started with mobile application development
Getting started with mobile application development
ColdFusionConference
 
Web based automation testing on Node.js environment
Web based automation testing on Node.js environmentWeb based automation testing on Node.js environment
Web based automation testing on Node.js environment
Yu-Lin Huang
 
Behaviour driven development aka bdd
Behaviour driven development aka bddBehaviour driven development aka bdd
Behaviour driven development aka bdd
Prince Gupta
 
Trunk-Based Development and Toggling
Trunk-Based Development and TogglingTrunk-Based Development and Toggling
Trunk-Based Development and Toggling
Bryan Liu
 
BDD & Beyond: The Past, Present, & Future of Test Automation
BDD & Beyond: The Past, Present, & Future of Test AutomationBDD & Beyond: The Past, Present, & Future of Test Automation
BDD & Beyond: The Past, Present, & Future of Test Automation
Ford Prior
 
Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 apps
Phil Leggetter
 
Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013
Brian Sam-Bodden
 
Story Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkStory Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium Framework
Oleksiy Rezchykov
 
Automated testing for real
Automated testing for realAutomated testing for real
Automated testing for real
Markko Paas
 

What's hot (20)

Test Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and CucumberTest Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and Cucumber
 
Cucumber & gherkin language
Cucumber & gherkin languageCucumber & gherkin language
Cucumber & gherkin language
 
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
 
Gherkin /BDD intro
Gherkin /BDD introGherkin /BDD intro
Gherkin /BDD intro
 
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
 
Cucumber Tool
Cucumber ToolCucumber Tool
Cucumber Tool
 
Cucumber presenation
Cucumber presenationCucumber presenation
Cucumber presenation
 
TDD and BDD in Sky Deutschland
TDD and BDD in Sky DeutschlandTDD and BDD in Sky Deutschland
TDD and BDD in Sky Deutschland
 
Collaborative Contract Driven Development
Collaborative Contract Driven DevelopmentCollaborative Contract Driven Development
Collaborative Contract Driven Development
 
Cucumber ppt
Cucumber pptCucumber ppt
Cucumber ppt
 
Behavior Driven Testing - A paradigm shift
Behavior Driven Testing - A paradigm shiftBehavior Driven Testing - A paradigm shift
Behavior Driven Testing - A paradigm shift
 
Getting started with mobile application development
Getting started with mobile application developmentGetting started with mobile application development
Getting started with mobile application development
 
Web based automation testing on Node.js environment
Web based automation testing on Node.js environmentWeb based automation testing on Node.js environment
Web based automation testing on Node.js environment
 
Behaviour driven development aka bdd
Behaviour driven development aka bddBehaviour driven development aka bdd
Behaviour driven development aka bdd
 
Trunk-Based Development and Toggling
Trunk-Based Development and TogglingTrunk-Based Development and Toggling
Trunk-Based Development and Toggling
 
BDD & Beyond: The Past, Present, & Future of Test Automation
BDD & Beyond: The Past, Present, & Future of Test AutomationBDD & Beyond: The Past, Present, & Future of Test Automation
BDD & Beyond: The Past, Present, & Future of Test Automation
 
Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 apps
 
Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013
 
Story Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkStory Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium Framework
 
Automated testing for real
Automated testing for realAutomated testing for real
Automated testing for real
 

Similar to Bdd in action

Behavior Driven Development - TdT@Cluj #15
Behavior Driven Development - TdT@Cluj #15Behavior Driven Development - TdT@Cluj #15
Behavior Driven Development - TdT@Cluj #15
Tabăra de Testare
 
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
Pankaj Nakhat
 
Acceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkAcceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot Framework
Steve Zhang
 
Bahaviour Driven Development
Bahaviour Driven DevelopmentBahaviour Driven Development
Bahaviour Driven Development
buildmaster
 
Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD
Gervais Johnson, Advisor
 
BDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User StoriesBDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User Stories
Sauce Labs
 
Testing with cucumber testing framework
Testing with cucumber testing frameworkTesting with cucumber testing framework
Testing with cucumber testing framework
AIMDek Technologies
 
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Synerzip
 
You cant be agile if your code sucks
You cant be agile if your code sucksYou cant be agile if your code sucks
You cant be agile if your code sucks
Peter Gfader
 
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
Xebia India
 
Understanding Why Testing is Importaint
Understanding Why Testing is ImportaintUnderstanding Why Testing is Importaint
Understanding Why Testing is Importaint
Sana Nasar
 
Tdd and bdd
Tdd and bddTdd and bdd
Tdd and bdd
MohamedSubhiBouchi
 
Test Driven Development using QUnit
Test Driven Development using QUnitTest Driven Development using QUnit
Test Driven Development using QUnit
satejsahu
 
Design your tests to behave - An introduction To BDD!
Design your tests to behave - An introduction To BDD!Design your tests to behave - An introduction To BDD!
Design your tests to behave - An introduction To BDD!
Aparna A Gopalakrishnan
 
[@NaukriEngineering] BDD implementation using Cucumber
[@NaukriEngineering] BDD implementation using Cucumber[@NaukriEngineering] BDD implementation using Cucumber
[@NaukriEngineering] BDD implementation using Cucumber
Naukri.com
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill Ayers
SPC Adriatics
 
Requirements the Last Bottleneck
Requirements the Last BottleneckRequirements the Last Bottleneck
Requirements the Last Bottleneck
Karwin Software Solutions LLC
 
Code stock
Code stockCode stock
Code stock
Erin Page
 
Agile Gurugram 2016 | Conference | Built-in Quality through Vertical Slicing ...
Agile Gurugram 2016 | Conference | Built-in Quality through Vertical Slicing ...Agile Gurugram 2016 | Conference | Built-in Quality through Vertical Slicing ...
Agile Gurugram 2016 | Conference | Built-in Quality through Vertical Slicing ...
AgileNetwork
 
Successfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile WorldSuccessfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile World
SmartBear
 

Similar to Bdd in action (20)

Behavior Driven Development - TdT@Cluj #15
Behavior Driven Development - TdT@Cluj #15Behavior Driven Development - TdT@Cluj #15
Behavior Driven Development - TdT@Cluj #15
 
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
 
Acceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkAcceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot Framework
 
Bahaviour Driven Development
Bahaviour Driven DevelopmentBahaviour Driven Development
Bahaviour Driven Development
 
Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD
 
BDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User StoriesBDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User Stories
 
Testing with cucumber testing framework
Testing with cucumber testing frameworkTesting with cucumber testing framework
Testing with cucumber testing framework
 
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
 
You cant be agile if your code sucks
You cant be agile if your code sucksYou cant be agile if your code sucks
You cant be agile if your code sucks
 
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
 
Understanding Why Testing is Importaint
Understanding Why Testing is ImportaintUnderstanding Why Testing is Importaint
Understanding Why Testing is Importaint
 
Tdd and bdd
Tdd and bddTdd and bdd
Tdd and bdd
 
Test Driven Development using QUnit
Test Driven Development using QUnitTest Driven Development using QUnit
Test Driven Development using QUnit
 
Design your tests to behave - An introduction To BDD!
Design your tests to behave - An introduction To BDD!Design your tests to behave - An introduction To BDD!
Design your tests to behave - An introduction To BDD!
 
[@NaukriEngineering] BDD implementation using Cucumber
[@NaukriEngineering] BDD implementation using Cucumber[@NaukriEngineering] BDD implementation using Cucumber
[@NaukriEngineering] BDD implementation using Cucumber
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill Ayers
 
Requirements the Last Bottleneck
Requirements the Last BottleneckRequirements the Last Bottleneck
Requirements the Last Bottleneck
 
Code stock
Code stockCode stock
Code stock
 
Agile Gurugram 2016 | Conference | Built-in Quality through Vertical Slicing ...
Agile Gurugram 2016 | Conference | Built-in Quality through Vertical Slicing ...Agile Gurugram 2016 | Conference | Built-in Quality through Vertical Slicing ...
Agile Gurugram 2016 | Conference | Built-in Quality through Vertical Slicing ...
 
Successfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile WorldSuccessfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile World
 

Recently uploaded

Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 

Recently uploaded (20)

Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 

Bdd in action

  • 1. BDD in Action HOW WE HAVE DONE IT IN OUR PROJECTS
  • 2. About me • Nguyen Xuan Kien • Developer since 2006 • CurrentlyTechnical Leader at Shippo.vn • Interested in Software Architecture • Developing & managing 2 projects with BDD
  • 3. BDD in action – how we have done it • Why we choose BDD • What is BDD • BDD in Action
  • 6. Bug cost in one of my previous project 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Nov-15 Dec-15 Jan-16 Feb-16 Mar-16 Fixing bug time ratio in Seudo.vn Bugs New features Others
  • 7. After TDD applied • Bugs reduced • No serious hidden bug • The user flow is still not as P.O expected • P.O wasted time on write detailed feature specification • Team members understand feature differently
  • 8. More reasons • Still not safe because of hidden “wrong feature” • Manual regression test become bigger and bigger • AcceptanceTest Automation needed • Lack of documentation make training longer • More different understanding betweenTester and Dev
  • 9. What is BDD? • Behavior Driven Development • TDD (Test-driven-development) • DDD (Domain-driven-design)
  • 10. TDD • Test-driven development • A short development cycle • Write a test first, write function after • It’s not about test first, but about thinking first • Make program do exactly as programmer want
  • 11. DDD • Domain-driven development • Domain experts and Dev team understand the same • Decoupling with domain • And many pros in Software Architecture
  • 12. BDD • Use the ubiquitous language for both Business interests andTechnical interest • Write scenarios first (software behaviors) • Scenarios could be use as living document • Scenarios could be use asTesting Automation scripts • Could be understand asTDD with AcceptanceTest, orAcceptance- Test driven development with DDD in mind
  • 13. BDD in Action • Gherkin as test script language • Cucumber for JVM as AutomationTools • Selenium for Browser Automation, Appium for Mobile Apps Automation • Specification with examples
  • 14. Gherkin • Its meaning is one type of pickled cucumber • A language for both Developer and Business • Features, Scenarios and Steps
  • 16. Cucumber for JVM • Execute Gherkin language as test script • Could be in any layer • View (use Selenium as Browser Driver) • API (use your own custom API Client) • Unit-test • PerformanceTest • There is alternative to Cucumber
  • 17. BDD in Action workflow • Business requirements from the domain experts • Write specifications as Example • Examples become living document • Have test scripts as a by product • Software development in a test-first approach
  • 18. What is important to our Product?
  • 19. Write Acceptance Criteria • As a potential customer I want to collect products to shopping cart so that I can order many products at once How can I verify that this story has been fulfilled? I would want to add a product I would want to remove product I would want to check how many product I’ve added I may add the same product again to the cart
  • 20. We need examples to these AC Example Tests Requirements Consists of Verify the fulfillmentDescribe
  • 21. Further discussion of the AC When I add to the same product, its quantity should be increased Add 3 “BDD in action” to cart Open “BDD in action” detail Input 2 in quantity input Click “Add to cart” Verify quantity in cart is 5 public voidTestAddToCart() { …. }
  • 22. Further discussion of the AC What if I add too many products? No, the maximum just need to equal to our stock But we warning him that his money is not enough, it would be wonderfulBut that would be impossible for us to do it! Again, we should care about the performance if too many products…
  • 23. Collaboration of the 3 amigos • Happy case • Technical Possibility • Exceptions, border cases • Discover hidden assumptions between 3 of them
  • 24. After an discussion we have an example • Scenario: I should be able to add the same product to my cart • Given I have 3 “BDD in action book” in my cart • When I add 2 “BDD in action book” to my cart • Then I should have 5 “BDD in action book” in my cart
  • 25. A Scenario should be • Use as “living” document for both Dev team and Business • Use as AcceptanceTesting Automation Script • Not trying to automate manual test • Not trying to easy to automate but unreadable • Not written after completing development
  • 26. A Scenario format • Title should describes what we want • Given: the condition that we could be in this scenario • When: what will trigger this scenario • Then: the outcome we want
  • 30. Writing step defines to automate test • Context is important in each scenario • Each scenario should be independence • Steps should be reusable • Each step is unique, understandable in only one way
  • 31. Finally • We could have user story done as customer really want • Some User Story could break after completing others, but we could handle it with less manual regression test • We have the document for both Development and Business • We face many challenges on the way, but we believe in the future
  • 32. Our challenges • Experimental ScenarioWriting • Lack of documentation and Examples • Limited suggestion from community • Appium is not very stable yet (at least for React Native and iOS)
  • 34. Automation drivers • Selenium for Browsers • Appium forApplication Driver • Unit-testing for internal logic layers
  • 35. Do you want practice?
  • 37. THANKS FORYOUR ATTENTION For further discussion contact me at: koh2203@gmail.com nguyenxuankien@shippo.vn https://facebook.com/kiennx