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

Sterling Villa Grande Brochure - Zricks.com
Sterling Villa Grande Brochure - Zricks.comSterling Villa Grande Brochure - Zricks.com
Sterling Villa Grande Brochure - Zricks.comZricks.com
 
Godrej Eternity Brochure - Zricks.com
Godrej Eternity Brochure - Zricks.comGodrej Eternity Brochure - Zricks.com
Godrej Eternity Brochure - Zricks.comZricks.com
 
Unishire Esplanade Brochure - Zricks.com
Unishire Esplanade Brochure - Zricks.comUnishire Esplanade Brochure - Zricks.com
Unishire Esplanade Brochure - Zricks.comZricks.com
 
Shriram Suhaana Brochure - Zricks.com
Shriram Suhaana Brochure - Zricks.comShriram Suhaana Brochure - Zricks.com
Shriram Suhaana Brochure - Zricks.comZricks.com
 
Asset Placid Brochure - Zricks.com
Asset Placid Brochure - Zricks.comAsset Placid Brochure - Zricks.com
Asset Placid Brochure - Zricks.comZricks.com
 
Phoenix One Bangalore West Ebrochure - Zricks.com
Phoenix One Bangalore West Ebrochure - Zricks.comPhoenix One Bangalore West Ebrochure - Zricks.com
Phoenix One Bangalore West Ebrochure - Zricks.comZricks.com
 
Rmz Sawaan Brochure - Zricks.com
Rmz Sawaan Brochure - Zricks.comRmz Sawaan Brochure - Zricks.com
Rmz Sawaan Brochure - Zricks.comZricks.com
 
Prestige Silver Crest Brochure - Zricks.com
Prestige Silver Crest Brochure - Zricks.comPrestige Silver Crest Brochure - Zricks.com
Prestige Silver Crest Brochure - Zricks.comZricks.com
 
Assetz 27 Park Avenue Brochure - Zricks.com
Assetz 27 Park Avenue Brochure - Zricks.comAssetz 27 Park Avenue Brochure - Zricks.com
Assetz 27 Park Avenue Brochure - Zricks.comZricks.com
 
Rohan Iksha Brochure - Zricks.com
Rohan Iksha Brochure - Zricks.comRohan Iksha Brochure - Zricks.com
Rohan Iksha Brochure - Zricks.comZricks.com
 
Legacy Tierra Brochure - Zricks.com
Legacy Tierra Brochure - Zricks.comLegacy Tierra Brochure - Zricks.com
Legacy Tierra Brochure - Zricks.comZricks.com
 
Mayfair Astral Brochure - Zricks.com
Mayfair Astral Brochure - Zricks.comMayfair Astral Brochure - Zricks.com
Mayfair Astral Brochure - Zricks.comZricks.com
 
Adroit Imperia Brochure - Zricks.com
Adroit Imperia Brochure - Zricks.comAdroit Imperia Brochure - Zricks.com
Adroit Imperia Brochure - Zricks.comZricks.com
 
Tvs Emerald Green Hills Brochure - Zricks.com
Tvs Emerald Green Hills Brochure - Zricks.comTvs Emerald Green Hills Brochure - Zricks.com
Tvs Emerald Green Hills Brochure - Zricks.comZricks.com
 
Sterling Ascentia Brochure - Zricks.com
Sterling Ascentia Brochure - Zricks.comSterling Ascentia Brochure - Zricks.com
Sterling Ascentia Brochure - Zricks.comZricks.com
 
Salarpuria Sattva Casa Irene Brochure - Zricks.com
Salarpuria Sattva Casa Irene Brochure - Zricks.comSalarpuria Sattva Casa Irene Brochure - Zricks.com
Salarpuria Sattva Casa Irene Brochure - Zricks.comZricks.com
 
Oberoi Priviera Brochure - Zricks.com
Oberoi Priviera Brochure - Zricks.comOberoi Priviera Brochure - Zricks.com
Oberoi Priviera Brochure - Zricks.comZricks.com
 
Unishire Panamera Brochure - Zricks.com
Unishire Panamera Brochure - Zricks.comUnishire Panamera Brochure - Zricks.com
Unishire Panamera Brochure - Zricks.comZricks.com
 

Viewers also liked (18)

Sterling Villa Grande Brochure - Zricks.com
Sterling Villa Grande Brochure - Zricks.comSterling Villa Grande Brochure - Zricks.com
Sterling Villa Grande Brochure - Zricks.com
 
Godrej Eternity Brochure - Zricks.com
Godrej Eternity Brochure - Zricks.comGodrej Eternity Brochure - Zricks.com
Godrej Eternity Brochure - Zricks.com
 
Unishire Esplanade Brochure - Zricks.com
Unishire Esplanade Brochure - Zricks.comUnishire Esplanade Brochure - Zricks.com
Unishire Esplanade Brochure - Zricks.com
 
Shriram Suhaana Brochure - Zricks.com
Shriram Suhaana Brochure - Zricks.comShriram Suhaana Brochure - Zricks.com
Shriram Suhaana Brochure - Zricks.com
 
Asset Placid Brochure - Zricks.com
Asset Placid Brochure - Zricks.comAsset Placid Brochure - Zricks.com
Asset Placid Brochure - Zricks.com
 
Phoenix One Bangalore West Ebrochure - Zricks.com
Phoenix One Bangalore West Ebrochure - Zricks.comPhoenix One Bangalore West Ebrochure - Zricks.com
Phoenix One Bangalore West Ebrochure - Zricks.com
 
Rmz Sawaan Brochure - Zricks.com
Rmz Sawaan Brochure - Zricks.comRmz Sawaan Brochure - Zricks.com
Rmz Sawaan Brochure - Zricks.com
 
Prestige Silver Crest Brochure - Zricks.com
Prestige Silver Crest Brochure - Zricks.comPrestige Silver Crest Brochure - Zricks.com
Prestige Silver Crest Brochure - Zricks.com
 
Assetz 27 Park Avenue Brochure - Zricks.com
Assetz 27 Park Avenue Brochure - Zricks.comAssetz 27 Park Avenue Brochure - Zricks.com
Assetz 27 Park Avenue Brochure - Zricks.com
 
Rohan Iksha Brochure - Zricks.com
Rohan Iksha Brochure - Zricks.comRohan Iksha Brochure - Zricks.com
Rohan Iksha Brochure - Zricks.com
 
Legacy Tierra Brochure - Zricks.com
Legacy Tierra Brochure - Zricks.comLegacy Tierra Brochure - Zricks.com
Legacy Tierra Brochure - Zricks.com
 
Mayfair Astral Brochure - Zricks.com
Mayfair Astral Brochure - Zricks.comMayfair Astral Brochure - Zricks.com
Mayfair Astral Brochure - Zricks.com
 
Adroit Imperia Brochure - Zricks.com
Adroit Imperia Brochure - Zricks.comAdroit Imperia Brochure - Zricks.com
Adroit Imperia Brochure - Zricks.com
 
Tvs Emerald Green Hills Brochure - Zricks.com
Tvs Emerald Green Hills Brochure - Zricks.comTvs Emerald Green Hills Brochure - Zricks.com
Tvs Emerald Green Hills Brochure - Zricks.com
 
Sterling Ascentia Brochure - Zricks.com
Sterling Ascentia Brochure - Zricks.comSterling Ascentia Brochure - Zricks.com
Sterling Ascentia Brochure - Zricks.com
 
Salarpuria Sattva Casa Irene Brochure - Zricks.com
Salarpuria Sattva Casa Irene Brochure - Zricks.comSalarpuria Sattva Casa Irene Brochure - Zricks.com
Salarpuria Sattva Casa Irene Brochure - Zricks.com
 
Oberoi Priviera Brochure - Zricks.com
Oberoi Priviera Brochure - Zricks.comOberoi Priviera Brochure - Zricks.com
Oberoi Priviera Brochure - Zricks.com
 
Unishire Panamera Brochure - Zricks.com
Unishire Panamera Brochure - Zricks.comUnishire Panamera Brochure - Zricks.com
Unishire Panamera Brochure - Zricks.com
 

Similar to Behaviour drivendevelopment

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 drivendevelopment (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 Young Alista

Google appenginejava.ppt
Google appenginejava.pptGoogle appenginejava.ppt
Google appenginejava.pptYoung Alista
 
Motivation for multithreaded architectures
Motivation for multithreaded architecturesMotivation for multithreaded architectures
Motivation for multithreaded architecturesYoung Alista
 
Serialization/deserialization
Serialization/deserializationSerialization/deserialization
Serialization/deserializationYoung Alista
 
Big picture of data mining
Big picture of data miningBig picture of data mining
Big picture of data miningYoung Alista
 
Business analytics and data mining
Business analytics and data miningBusiness analytics and data mining
Business analytics and data miningYoung Alista
 
Data mining and knowledge discovery
Data mining and knowledge discoveryData mining and knowledge discovery
Data mining and knowledge discoveryYoung Alista
 
Directory based cache coherence
Directory based cache coherenceDirectory based cache coherence
Directory based cache coherenceYoung Alista
 
Hardware managed cache
Hardware managed cacheHardware managed cache
Hardware managed cacheYoung Alista
 
How analysis services caching works
How analysis services caching worksHow analysis services caching works
How analysis services caching worksYoung Alista
 
Optimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessorsOptimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessorsYoung Alista
 
Abstract data types
Abstract data typesAbstract data types
Abstract data typesYoung Alista
 
Concurrency with java
Concurrency with javaConcurrency with java
Concurrency with javaYoung Alista
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithmsYoung Alista
 
Cobol, lisp, and python
Cobol, lisp, and pythonCobol, lisp, and python
Cobol, lisp, and pythonYoung Alista
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysisYoung Alista
 

More from Young Alista (20)

Google appenginejava.ppt
Google appenginejava.pptGoogle appenginejava.ppt
Google appenginejava.ppt
 
Motivation for multithreaded architectures
Motivation for multithreaded architecturesMotivation for multithreaded architectures
Motivation for multithreaded architectures
 
Serialization/deserialization
Serialization/deserializationSerialization/deserialization
Serialization/deserialization
 
Big picture of data mining
Big picture of data miningBig picture of data mining
Big picture of data mining
 
Business analytics and data mining
Business analytics and data miningBusiness analytics and data mining
Business analytics and data mining
 
Data mining and knowledge discovery
Data mining and knowledge discoveryData mining and knowledge discovery
Data mining and knowledge discovery
 
Directory based cache coherence
Directory based cache coherenceDirectory based cache coherence
Directory based cache coherence
 
Cache recap
Cache recapCache recap
Cache recap
 
Hardware managed cache
Hardware managed cacheHardware managed cache
Hardware managed cache
 
How analysis services caching works
How analysis services caching worksHow analysis services caching works
How analysis services caching works
 
Object model
Object modelObject model
Object model
 
Optimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessorsOptimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessors
 
Abstract data types
Abstract data typesAbstract data types
Abstract data types
 
Abstraction file
Abstraction fileAbstraction file
Abstraction file
 
Concurrency with java
Concurrency with javaConcurrency with java
Concurrency with java
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 
Abstract class
Abstract classAbstract class
Abstract class
 
Inheritance
InheritanceInheritance
Inheritance
 
Cobol, lisp, and python
Cobol, lisp, and pythonCobol, lisp, and python
Cobol, lisp, and python
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysis
 

Recently uploaded

Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Recently uploaded (20)

Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Behaviour drivendevelopment

  • 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/