SlideShare a Scribd company logo
1 of 30
Behaviour Driven Development
with Cucumber for Java
BDD
Domain Driven Design - DDD
● Common understanding
● Common language
● Test Driven Development - TDD
● Good technical practices
● Small steps
● Combined → Behaviour Driven Development
Test automation
 Test Driven Development, TDD – Develop it the
right way
 Behaviour Driven Development, BDD –
Develop the right thing
Three core principles
• Business and Technology should refer to the same system in
the same way
• Any system should have an identified, verifiable value
• Up-front analysis, design and planning all have a diminishing
return
Common language
Used by all involved
• Customer
• Developers
• Others?
Verifiable value
• Protect revenue
• Increase revenue
• Manage cost
• Increase brand value
• Make the product remarkable
• Provide more value to your customer
Big design up-front
• No big design up-front
• The further you plan ahead, the less accurate you will be
Three questions
• What is the most important thing the system should do?
• What is the next most important thing the system doesn't do
yet?
• If we were to switch off the system, where and what would be
the biggest impact?
Time to create a specification
Time to create a specification
When are we done?
Interpret and translate
 We need to read the spec.
 Understand it
 Translate it into code
 Parse and execute it?
 No, not all specs are created equal
Solution
Write specifications so
 Translations isn't needed
 It is possible to execute them
Format
• Given – Setup the system
• When – Change the state of the system
• Then – Verify the new state
Tools
Audience
Readers
 Customers
 Developers
Maintainers
 Product owner
 Developers
Why Cucumber
 It is one of the least technical tools
 It is a very active open source project
 It supports a variety of languages
A concrete example
Feature: Life of IT guys
In order to get good salary
As a it guy
I want to keep my boss happy
Scenario: I am a tester
Given I am a bad tester
When I go to work
Then I mess with it
And my boss fires me
But the developer likes me
Advantages
The format is
● Easy to read
● Easy to understand
● Easy to discuss
● Easy to parse
Parse and execute
● A parser is developed
● Add native code to implement the steps
 Setup – Given
 Execute – When
 Assert - Then
Write a step definition in Java
@Given("^I am a bad tester$")
public void I_am_a_bad_tester(){
System.out.println("@Given--I am a bad tester");
}
@When("^I go to work$")
public void I_go_to_work(){
System.out.println("@When---I go o work");
}
@Then("^I mess it$")
public void I_mess_with_it(){
System.out.println("@Then--I mess it");
}
@And("^my boss fires me$")
public void my_boss_fires_me(){
System.out.println("@And---my boss fires me");
}
@But("^the developer likes me$")
public void the_developer_likes_me(){
System.out.println("@But--the developer likes me");
Assert.assertTrue(false);
}
Run it and watch it fail
Write code to make the step pass
@Given("^I am a [a-zA-Z]{1,} tester$")
public void I_am_a_bad_tester(){
System.out.println("@Given--I am a bad tester");
}
@When("^I go to work$")
public void I_go_to_work(){
System.out.println("@When---I go o work");
}
@Then("^I [a-zA-Z]{1,} it$")
public void I_mess_with_it(){
System.out.println("@Then--I mess it");
}
@And("^my boss [a-zA-Z]{1,} me$")
public void my_boss_fires_me(){
System.out.println("@And---my boss fires me");
}
@But("^the developer [a-zA-Z]{1,} me$")
public void the_developer_likes_me(){
System.out.println("@But--the developer likes me");
}
Run it again and see the step
pass
Why is Cucumber better
● Compared to well known tools like JUnit?
● It isn't, it's just easier to read for non coders
● The readability has increased
● Communication is easier
Benefits
● Less unnecessary work
● Better regression tests
● Less speculative work
● Less re-work
Maintenance
 Maintained together
● Specs
● Tests
● Code
 Maven
 Continuous Integration, CI
Tips
 Always use the a common language
 Don't over specify – start easy
 Never specify implementation details
Do not focus on tools
• They will never solve the problem
• A fool with a tool is still a fool
Resources
 Cucumber - http://cukes.info/
 Selenium - http://seleniumhq.org/
 Maven - http://maven.apache.org/
 Jenkins - http://jenkins-ci.org/
 Blog -http://thomassundberg.wordpress.com/
Thank You

More Related Content

What's hot

Sql server baselines
Sql server baselinesSql server baselines
Sql server baselinesMike Walsh
 
Never fear, the customizer is here!
Never fear, the customizer is here!Never fear, the customizer is here!
Never fear, the customizer is here!Cameron Jones
 
The Art of Gherkin Scripting - Matt Eakin
The Art of Gherkin Scripting - Matt EakinThe Art of Gherkin Scripting - Matt Eakin
The Art of Gherkin Scripting - Matt EakinQA or the Highway
 
Bdd – with cucumber and gherkin
Bdd – with cucumber and gherkinBdd – with cucumber and gherkin
Bdd – with cucumber and gherkinArati Joshi
 
JavaScript Unit Testing
JavaScript Unit TestingJavaScript Unit Testing
JavaScript Unit TestingMihail Gaberov
 
Zen And the Art of Test Maintenance Presentation
Zen And the Art of Test Maintenance PresentationZen And the Art of Test Maintenance Presentation
Zen And the Art of Test Maintenance PresentationGil Zilberfeld
 
Unit testing for Grown-ups
Unit testing for Grown-upsUnit testing for Grown-ups
Unit testing for Grown-upsGil Zilberfeld
 
Introduction to Bdd and cucumber
Introduction to Bdd and cucumberIntroduction to Bdd and cucumber
Introduction to Bdd and cucumberNibu Baby
 
WordPress maintenance - Keeping it all running smoothly
WordPress maintenance - Keeping it all running smoothlyWordPress maintenance - Keeping it all running smoothly
WordPress maintenance - Keeping it all running smoothlyKelli Wise
 
Test-driven development with Node.js
Test-driven development with Node.jsTest-driven development with Node.js
Test-driven development with Node.jsMirko Kiefer
 

What's hot (15)

Defensive Apex Programming
Defensive Apex ProgrammingDefensive Apex Programming
Defensive Apex Programming
 
Gherkin model BDD
Gherkin model BDDGherkin model BDD
Gherkin model BDD
 
Gherkin model1
Gherkin model1Gherkin model1
Gherkin model1
 
Sql server baselines
Sql server baselinesSql server baselines
Sql server baselines
 
Never fear, the customizer is here!
Never fear, the customizer is here!Never fear, the customizer is here!
Never fear, the customizer is here!
 
Agile Testing
Agile TestingAgile Testing
Agile Testing
 
Jasmine
JasmineJasmine
Jasmine
 
The Art of Gherkin Scripting - Matt Eakin
The Art of Gherkin Scripting - Matt EakinThe Art of Gherkin Scripting - Matt Eakin
The Art of Gherkin Scripting - Matt Eakin
 
Bdd – with cucumber and gherkin
Bdd – with cucumber and gherkinBdd – with cucumber and gherkin
Bdd – with cucumber and gherkin
 
JavaScript Unit Testing
JavaScript Unit TestingJavaScript Unit Testing
JavaScript Unit Testing
 
Zen And the Art of Test Maintenance Presentation
Zen And the Art of Test Maintenance PresentationZen And the Art of Test Maintenance Presentation
Zen And the Art of Test Maintenance Presentation
 
Unit testing for Grown-ups
Unit testing for Grown-upsUnit testing for Grown-ups
Unit testing for Grown-ups
 
Introduction to Bdd and cucumber
Introduction to Bdd and cucumberIntroduction to Bdd and cucumber
Introduction to Bdd and cucumber
 
WordPress maintenance - Keeping it all running smoothly
WordPress maintenance - Keeping it all running smoothlyWordPress maintenance - Keeping it all running smoothly
WordPress maintenance - Keeping it all running smoothly
 
Test-driven development with Node.js
Test-driven development with Node.jsTest-driven development with Node.js
Test-driven development with Node.js
 

Viewers also liked

Google mock for dummies
Google mock for dummiesGoogle mock for dummies
Google mock for dummiesFraboni Ec
 
Data visualization
Data visualizationData visualization
Data visualizationFraboni Ec
 
Xml and webdata
Xml and webdataXml and webdata
Xml and webdataFraboni Ec
 
Test driven development
Test driven developmentTest driven development
Test driven developmentFraboni Ec
 
Nlp naive bayes
Nlp naive bayesNlp naive bayes
Nlp naive bayesFraboni Ec
 
Exception handling
Exception handlingException handling
Exception handlingFraboni Ec
 
Decision analysis
Decision analysisDecision analysis
Decision analysisFraboni Ec
 
Text categorization as a graph
Text categorization as a graphText categorization as a graph
Text categorization as a graphFraboni Ec
 
Text classificationmethods
Text classificationmethodsText classificationmethods
Text classificationmethodsFraboni Ec
 
Database introduction
Database introductionDatabase introduction
Database introductionFraboni Ec
 
Sql database object
Sql database objectSql database object
Sql database objectFraboni Ec
 
Overview prolog
Overview prologOverview prolog
Overview prologFraboni Ec
 

Viewers also liked (20)

Prolog resume
Prolog resumeProlog resume
Prolog resume
 
Google mock for dummies
Google mock for dummiesGoogle mock for dummies
Google mock for dummies
 
Data visualization
Data visualizationData visualization
Data visualization
 
Network
NetworkNetwork
Network
 
Exception
ExceptionException
Exception
 
Xml and webdata
Xml and webdataXml and webdata
Xml and webdata
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Reflection
ReflectionReflection
Reflection
 
Nlp naive bayes
Nlp naive bayesNlp naive bayes
Nlp naive bayes
 
Exception handling
Exception handlingException handling
Exception handling
 
Html5
Html5Html5
Html5
 
Decision analysis
Decision analysisDecision analysis
Decision analysis
 
Text categorization as a graph
Text categorization as a graphText categorization as a graph
Text categorization as a graph
 
Text classificationmethods
Text classificationmethodsText classificationmethods
Text classificationmethods
 
Database introduction
Database introductionDatabase introduction
Database introduction
 
Sql database object
Sql database objectSql database object
Sql database object
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
Basic dns-mod
Basic dns-modBasic dns-mod
Basic dns-mod
 
Cryptography
CryptographyCryptography
Cryptography
 
Overview prolog
Overview prologOverview prolog
Overview prolog
 

Similar to Behaviour driven development

Beyond TDD: Enabling Your Team to Continuously Deliver Software
Beyond TDD: Enabling Your Team to Continuously Deliver SoftwareBeyond TDD: Enabling Your Team to Continuously Deliver Software
Beyond TDD: Enabling Your Team to Continuously Deliver SoftwareChris Weldon
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven developmentEinar Ingebrigtsen
 
How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018
How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018
How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018Mike Harris
 
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 StoriesSauce Labs
 
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
 
Rubyconf2016 - Solving communication problems in distributed teams with BDD
Rubyconf2016 - Solving communication problems in distributed teams with BDDRubyconf2016 - Solving communication problems in distributed teams with BDD
Rubyconf2016 - Solving communication problems in distributed teams with BDDRodrigo Urubatan
 
2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratie2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratiehcderaad
 
{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptx{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptxAmalEldhose2
 
A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5SSW
 
Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comAviran Mordo
 
Developing a Culture of Quality Code (Midwest PHP 2020)
Developing a Culture of Quality Code (Midwest PHP 2020)Developing a Culture of Quality Code (Midwest PHP 2020)
Developing a Culture of Quality Code (Midwest PHP 2020)Scott Keck-Warren
 
The Challenges & Pitfalls of Database Continuous Delivery
The Challenges & Pitfalls of Database Continuous DeliveryThe Challenges & Pitfalls of Database Continuous Delivery
The Challenges & Pitfalls of Database Continuous DeliveryPerforce
 
Software development best practices & coding guidelines
Software development best practices & coding guidelinesSoftware development best practices & coding guidelines
Software development best practices & coding guidelinesAnkur Goyal
 
MongoDB World 2018: How an Idea Becomes a MongoDB Feature
MongoDB World 2018: How an Idea Becomes a MongoDB FeatureMongoDB World 2018: How an Idea Becomes a MongoDB Feature
MongoDB World 2018: How an Idea Becomes a MongoDB FeatureMongoDB
 
TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019Paulo Clavijo
 
A Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentA Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentShawn Jones
 

Similar to Behaviour driven development (20)

Beyond TDD: Enabling Your Team to Continuously Deliver Software
Beyond TDD: Enabling Your Team to Continuously Deliver SoftwareBeyond TDD: Enabling Your Team to Continuously Deliver Software
Beyond TDD: Enabling Your Team to Continuously Deliver Software
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
 
How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018
How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018
How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018
 
BDD Primer
BDD PrimerBDD Primer
BDD Primer
 
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
 
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
 
Agile
AgileAgile
Agile
 
Introduction to Software Engineering
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software Engineering
 
Rubyconf2016 - Solving communication problems in distributed teams with BDD
Rubyconf2016 - Solving communication problems in distributed teams with BDDRubyconf2016 - Solving communication problems in distributed teams with BDD
Rubyconf2016 - Solving communication problems in distributed teams with BDD
 
2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratie2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratie
 
{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptx{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptx
 
A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5
 
Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.com
 
Developing a Culture of Quality Code (Midwest PHP 2020)
Developing a Culture of Quality Code (Midwest PHP 2020)Developing a Culture of Quality Code (Midwest PHP 2020)
Developing a Culture of Quality Code (Midwest PHP 2020)
 
The Challenges & Pitfalls of Database Continuous Delivery
The Challenges & Pitfalls of Database Continuous DeliveryThe Challenges & Pitfalls of Database Continuous Delivery
The Challenges & Pitfalls of Database Continuous Delivery
 
Software development best practices & coding guidelines
Software development best practices & coding guidelinesSoftware development best practices & coding guidelines
Software development best practices & coding guidelines
 
MongoDB World 2018: How an Idea Becomes a MongoDB Feature
MongoDB World 2018: How an Idea Becomes a MongoDB FeatureMongoDB World 2018: How an Idea Becomes a MongoDB Feature
MongoDB World 2018: How an Idea Becomes a MongoDB Feature
 
TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019
 
Usable Software Design
Usable Software DesignUsable Software Design
Usable Software Design
 
A Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentA Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven Development
 

More from Fraboni Ec

Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreadingFraboni Ec
 
What is simultaneous multithreading
What is simultaneous multithreadingWhat is simultaneous multithreading
What is simultaneous multithreadingFraboni Ec
 
Directory based cache coherence
Directory based cache coherenceDirectory based cache coherence
Directory based cache coherenceFraboni Ec
 
Business analytics and data mining
Business analytics and data miningBusiness analytics and data mining
Business analytics and data miningFraboni Ec
 
Big picture of data mining
Big picture of data miningBig picture of data mining
Big picture of data miningFraboni Ec
 
Data mining and knowledge discovery
Data mining and knowledge discoveryData mining and knowledge discovery
Data mining and knowledge discoveryFraboni Ec
 
How analysis services caching works
How analysis services caching worksHow analysis services caching works
How analysis services caching worksFraboni Ec
 
Hardware managed cache
Hardware managed cacheHardware managed cache
Hardware managed cacheFraboni Ec
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithmsFraboni Ec
 
Cobol, lisp, and python
Cobol, lisp, and pythonCobol, lisp, and python
Cobol, lisp, and pythonFraboni Ec
 
Abstract data types
Abstract data typesAbstract data types
Abstract data typesFraboni Ec
 
Optimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessorsOptimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessorsFraboni Ec
 
Abstraction file
Abstraction fileAbstraction file
Abstraction fileFraboni Ec
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysisFraboni Ec
 
Abstract class
Abstract classAbstract class
Abstract classFraboni Ec
 
Concurrency with java
Concurrency with javaConcurrency with java
Concurrency with javaFraboni Ec
 

More from Fraboni Ec (20)

Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreading
 
Lisp
LispLisp
Lisp
 
What is simultaneous multithreading
What is simultaneous multithreadingWhat is simultaneous multithreading
What is simultaneous multithreading
 
Directory based cache coherence
Directory based cache coherenceDirectory based cache coherence
Directory based cache coherence
 
Business analytics and data mining
Business analytics and data miningBusiness analytics and data mining
Business analytics and data mining
 
Big picture of data mining
Big picture of data miningBig picture of data mining
Big picture of data mining
 
Data mining and knowledge discovery
Data mining and knowledge discoveryData mining and knowledge discovery
Data mining and knowledge discovery
 
Cache recap
Cache recapCache recap
Cache recap
 
How analysis services caching works
How analysis services caching worksHow analysis services caching works
How analysis services caching works
 
Hardware managed cache
Hardware managed cacheHardware managed cache
Hardware managed cache
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 
Cobol, lisp, and python
Cobol, lisp, and pythonCobol, lisp, and python
Cobol, lisp, and python
 
Abstract data types
Abstract data typesAbstract data types
Abstract data types
 
Optimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessorsOptimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessors
 
Abstraction file
Abstraction fileAbstraction file
Abstraction file
 
Object model
Object modelObject model
Object model
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysis
 
Abstract class
Abstract classAbstract class
Abstract class
 
Concurrency with java
Concurrency with javaConcurrency with java
Concurrency with java
 
Inheritance
InheritanceInheritance
Inheritance
 

Recently uploaded

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Recently uploaded (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

Behaviour driven development

  • 2. BDD Domain Driven Design - DDD ● Common understanding ● Common language ● Test Driven Development - TDD ● Good technical practices ● Small steps ● Combined → Behaviour Driven Development
  • 3. Test automation  Test Driven Development, TDD – Develop it the right way  Behaviour Driven Development, BDD – Develop the right thing
  • 4. Three core principles • Business and Technology should refer to the same system in the same way • Any system should have an identified, verifiable value • Up-front analysis, design and planning all have a diminishing return
  • 5. Common language Used by all involved • Customer • Developers • Others?
  • 6. Verifiable value • Protect revenue • Increase revenue • Manage cost • Increase brand value • Make the product remarkable • Provide more value to your customer
  • 7. Big design up-front • No big design up-front • The further you plan ahead, the less accurate you will be
  • 8. Three questions • What is the most important thing the system should do? • What is the next most important thing the system doesn't do yet? • If we were to switch off the system, where and what would be the biggest impact?
  • 9. Time to create a specification
  • 10. Time to create a specification When are we done?
  • 11. Interpret and translate  We need to read the spec.  Understand it  Translate it into code  Parse and execute it?  No, not all specs are created equal
  • 12. Solution Write specifications so  Translations isn't needed  It is possible to execute them
  • 13. Format • Given – Setup the system • When – Change the state of the system • Then – Verify the new state
  • 14. Tools
  • 16. Why Cucumber  It is one of the least technical tools  It is a very active open source project  It supports a variety of languages
  • 17. A concrete example Feature: Life of IT guys In order to get good salary As a it guy I want to keep my boss happy Scenario: I am a tester Given I am a bad tester When I go to work Then I mess with it And my boss fires me But the developer likes me
  • 18. Advantages The format is ● Easy to read ● Easy to understand ● Easy to discuss ● Easy to parse
  • 19. Parse and execute ● A parser is developed ● Add native code to implement the steps  Setup – Given  Execute – When  Assert - Then
  • 20. Write a step definition in Java @Given("^I am a bad tester$") public void I_am_a_bad_tester(){ System.out.println("@Given--I am a bad tester"); } @When("^I go to work$") public void I_go_to_work(){ System.out.println("@When---I go o work"); } @Then("^I mess it$") public void I_mess_with_it(){ System.out.println("@Then--I mess it"); } @And("^my boss fires me$") public void my_boss_fires_me(){ System.out.println("@And---my boss fires me"); } @But("^the developer likes me$") public void the_developer_likes_me(){ System.out.println("@But--the developer likes me"); Assert.assertTrue(false); }
  • 21. Run it and watch it fail
  • 22. Write code to make the step pass @Given("^I am a [a-zA-Z]{1,} tester$") public void I_am_a_bad_tester(){ System.out.println("@Given--I am a bad tester"); } @When("^I go to work$") public void I_go_to_work(){ System.out.println("@When---I go o work"); } @Then("^I [a-zA-Z]{1,} it$") public void I_mess_with_it(){ System.out.println("@Then--I mess it"); } @And("^my boss [a-zA-Z]{1,} me$") public void my_boss_fires_me(){ System.out.println("@And---my boss fires me"); } @But("^the developer [a-zA-Z]{1,} me$") public void the_developer_likes_me(){ System.out.println("@But--the developer likes me"); }
  • 23. Run it again and see the step pass
  • 24. Why is Cucumber better ● Compared to well known tools like JUnit? ● It isn't, it's just easier to read for non coders ● The readability has increased ● Communication is easier
  • 25. Benefits ● Less unnecessary work ● Better regression tests ● Less speculative work ● Less re-work
  • 26. Maintenance  Maintained together ● Specs ● Tests ● Code  Maven  Continuous Integration, CI
  • 27. Tips  Always use the a common language  Don't over specify – start easy  Never specify implementation details
  • 28. Do not focus on tools • They will never solve the problem • A fool with a tool is still a fool
  • 29. Resources  Cucumber - http://cukes.info/  Selenium - http://seleniumhq.org/  Maven - http://maven.apache.org/  Jenkins - http://jenkins-ci.org/  Blog -http://thomassundberg.wordpress.com/