SlideShare a Scribd company logo
1 of 54
Download to read offline
Behavior Driven Development
with Robots
Mark Shead
mark.shead@xeric.net
http://book.markshead.com
• Turn Up Brightness to 100%
• http://ozoblockly.com
• Test
Test Driven Development
TDD Process
What is the smallest piece of
functionality that would be closer to
a working system?
How could we test that this
functionality exists?
Write a 

simple test
Watch it fail
Write codeTest passes
Refactor
Behavior Driven Development
(Cucumber)
• Define desired behavior as an example
• Make example executable
• See that examples fail
• Use TDD to make those examples pass
Developer language
Business owner language
Developer language
Business owner language
Gerkin
Language
Given I am not an admin user

When I login to the system

Then I cannot see the admin menu
Given I am an admin user

When I login to the system

Then I can see the admin menu
Write 

Scenario
Watch it fail
Make It 

Executable
Scenario passes
Write the code
BDD with TDD
Write a 

simple test
Watch it fail
Write codeTest passes
Refactor
TDD
Write 

Scenario
Watch it fail
Make It 

Executable
Scenario passes
Write the code
BDD
Write 

Scenario
Watch it fail
Make It 

Executable
Scenario passes
Write a 

simple test
Watch it fail
Write 

code
Test passes
Refactor
Write 

Scenario
Watch it fail
Make It 

Executable
Scenario passes
Write a 

simple test
Watch it fail
Write 

code
Test passes
Refactor
TDD
BDD
Write 

Scenario
Watch it fail
Make It 

Executable
Scenario passes
Write a 

simple test
Watch it fail
Write 

code
Test passes
Refactor
Unit/IntegrationTests
Executable Specification
Pencil vs. Chisel
Sphex Wasp Behavior
Given the wasp is stocking it’s nest

When a cricket is located

Then the cricket is paralyzed

And the cricket is moved toward the nest
Given the wasp is headed toward the nest

And the wasp is carrying a cricket

When the wasp reaches the nest entrance

Then the wasp will drop the cricket

And the wasp will inspect the nest
Given the wasp has inspected the nest

When the wasp exits the nest

And finds it’s cricket at the entrance

Then the wasp will retrieve the cricket

And store the cricket for it’s larvae
Wasp Video

https://www.youtube.com/watch?v=YNvi_j2z96w
Retrospective
Problem: Someone keeps moving the cricket

Problem: Someone keeps moving the cricket

Solution: Sting the human
Given a family driving on a highway

And the car is approaching a rest area

When the car passes the rest area

Then the kids will need to use the restroom
Follow Me Robot
Follow Me Robot
aka: Baby Duck Mode
Follow Me Robot
aka: Baby Duck Mode
aka: Terrify Your Kids Robot
Given the legs of a human are identified

When the legs are to the right of center

Then rotate to the right
Given the legs of a human are identified

When the legs are to the right of center

Then rotate to the right
Given the legs of a human are identified

When the legs are to the right of center

Then rotate to the right
Given the legs of a human are identified

When the legs are to the left of center

Then rotate to the left
Given the legs of a human are identified

When the legs are to the left of center

Then rotate to the left
Given the legs of a human are identified

When the legs are to the left of center

Then rotate to the left
Given the legs of a human are identified

When the legs are more than 2 feet away

Then move 2 inches forward
Given the legs of a human are identified

When the legs are less than 2 feet away

Then move 2 inches backwards
Given the legs of a human are identified

When the legs are to the right of center

Then rotate to the right
Given the legs of a human are identified

When the legs are to the left of center

Then rotate to the left
Given the legs of a human are identified

When the legs are more than 2 feet away

Then move 2 inches forward
Given the legs of a human are identified

When the legs are less than 2 feet away

Then move 2 inches backwards
Given the legs of a human are identified

When follow me is activated

Then follow the human
Given the legs of a human are identified

When search and destroy mode is activate

Then follow the human
Your Brain
Given it is near lunch time

When the speaker keeps talking

Then discard 85% of what he says
AgileMidwest2018-Shead-BddWithRobots

More Related Content

Similar to AgileMidwest2018-Shead-BddWithRobots (6)

The great monarch butterfly mystery
The great monarch butterfly mysteryThe great monarch butterfly mystery
The great monarch butterfly mystery
 
Open Access Week 2014 Webcast
Open Access Week 2014 WebcastOpen Access Week 2014 Webcast
Open Access Week 2014 Webcast
 
27 Ways To Be A Better Developer
27 Ways To Be A Better Developer27 Ways To Be A Better Developer
27 Ways To Be A Better Developer
 
27 Ways To Be A Better Developer (PHPBenelux 2011)
27 Ways To Be A Better Developer (PHPBenelux 2011)27 Ways To Be A Better Developer (PHPBenelux 2011)
27 Ways To Be A Better Developer (PHPBenelux 2011)
 
Code is so much more...
Code is so much more...Code is so much more...
Code is so much more...
 
Teacher slides_3.pptx
Teacher slides_3.pptxTeacher slides_3.pptx
Teacher slides_3.pptx
 

More from Jason Tice

More from Jason Tice (20)

Lean Kanban STL – March 2020 – Reference Canvas
Lean Kanban STL – March 2020 – Reference CanvasLean Kanban STL – March 2020 – Reference Canvas
Lean Kanban STL – March 2020 – Reference Canvas
 
John Yorke - Can being remote to enable you to be more agile - Agile Midwest ...
John Yorke - Can being remote to enable you to be more agile - Agile Midwest ...John Yorke - Can being remote to enable you to be more agile - Agile Midwest ...
John Yorke - Can being remote to enable you to be more agile - Agile Midwest ...
 
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
 
Danny Presten The Rise of Business Agility - Agile Midwest 2019
Danny Presten The Rise of Business Agility - Agile Midwest 2019Danny Presten The Rise of Business Agility - Agile Midwest 2019
Danny Presten The Rise of Business Agility - Agile Midwest 2019
 
AgileMidwest2018-Goulet-KeynoteCommunicationCodeStrategistsTechnicians
AgileMidwest2018-Goulet-KeynoteCommunicationCodeStrategistsTechniciansAgileMidwest2018-Goulet-KeynoteCommunicationCodeStrategistsTechnicians
AgileMidwest2018-Goulet-KeynoteCommunicationCodeStrategistsTechnicians
 
AgileMidwest2018-Kryvko-JumpStartRelationshipsWithBusinessAgility
AgileMidwest2018-Kryvko-JumpStartRelationshipsWithBusinessAgilityAgileMidwest2018-Kryvko-JumpStartRelationshipsWithBusinessAgility
AgileMidwest2018-Kryvko-JumpStartRelationshipsWithBusinessAgility
 
AgileMidwest2018-Cruth-PowerOfStorytelling
AgileMidwest2018-Cruth-PowerOfStorytellingAgileMidwest2018-Cruth-PowerOfStorytelling
AgileMidwest2018-Cruth-PowerOfStorytelling
 
AgileMidwest2018-Pollard-TalkingAndNotTalking
AgileMidwest2018-Pollard-TalkingAndNotTalkingAgileMidwest2018-Pollard-TalkingAndNotTalking
AgileMidwest2018-Pollard-TalkingAndNotTalking
 
AgileMidwest2018-Selvin-DramaTriangle
AgileMidwest2018-Selvin-DramaTriangleAgileMidwest2018-Selvin-DramaTriangle
AgileMidwest2018-Selvin-DramaTriangle
 
AgileMidwest2018-Becker-DatabasesAndCattle
AgileMidwest2018-Becker-DatabasesAndCattleAgileMidwest2018-Becker-DatabasesAndCattle
AgileMidwest2018-Becker-DatabasesAndCattle
 
AgileMidwest2018-Grosman-LongDistranceRelationship
AgileMidwest2018-Grosman-LongDistranceRelationshipAgileMidwest2018-Grosman-LongDistranceRelationship
AgileMidwest2018-Grosman-LongDistranceRelationship
 
AgileMidwest2018-Heffield-AgileLeadershipOutofBounds
AgileMidwest2018-Heffield-AgileLeadershipOutofBoundsAgileMidwest2018-Heffield-AgileLeadershipOutofBounds
AgileMidwest2018-Heffield-AgileLeadershipOutofBounds
 
AgileMidwest2018-Watson-WhyPayTwoDevelopers
AgileMidwest2018-Watson-WhyPayTwoDevelopersAgileMidwest2018-Watson-WhyPayTwoDevelopers
AgileMidwest2018-Watson-WhyPayTwoDevelopers
 
AgileMidwest2018-Silas-PowerfulCoaching
AgileMidwest2018-Silas-PowerfulCoachingAgileMidwest2018-Silas-PowerfulCoaching
AgileMidwest2018-Silas-PowerfulCoaching
 
AgileMidwest2018-Bruce-AgilitySpeedDeveloper
AgileMidwest2018-Bruce-AgilitySpeedDeveloperAgileMidwest2018-Bruce-AgilitySpeedDeveloper
AgileMidwest2018-Bruce-AgilitySpeedDeveloper
 
AgileMidwest2018-Morton-ValueEatingZombiesKilledMyAgileTranformation
AgileMidwest2018-Morton-ValueEatingZombiesKilledMyAgileTranformationAgileMidwest2018-Morton-ValueEatingZombiesKilledMyAgileTranformation
AgileMidwest2018-Morton-ValueEatingZombiesKilledMyAgileTranformation
 
AgileMidwest2018-Harper-BlackholesAndRevelations
AgileMidwest2018-Harper-BlackholesAndRevelationsAgileMidwest2018-Harper-BlackholesAndRevelations
AgileMidwest2018-Harper-BlackholesAndRevelations
 
AgileMidwest2018-Haarmann-AcceleratingAgilityWithTech
AgileMidwest2018-Haarmann-AcceleratingAgilityWithTechAgileMidwest2018-Haarmann-AcceleratingAgilityWithTech
AgileMidwest2018-Haarmann-AcceleratingAgilityWithTech
 
AgileMidwest2018-Vance-AgileDevopsWhyShouldICare
AgileMidwest2018-Vance-AgileDevopsWhyShouldICareAgileMidwest2018-Vance-AgileDevopsWhyShouldICare
AgileMidwest2018-Vance-AgileDevopsWhyShouldICare
 
AgileMidwest2018-Carter-Retrospectives
AgileMidwest2018-Carter-RetrospectivesAgileMidwest2018-Carter-Retrospectives
AgileMidwest2018-Carter-Retrospectives
 

Recently uploaded

Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
Kayode Fayemi
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
Kayode Fayemi
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
amilabibi1
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
raffaeleoman
 
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
David Celestin
 

Recently uploaded (15)

Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Bailey
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
 
Digital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of DrupalDigital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of Drupal
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio III
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
ICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdfICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdf
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
 
Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatment
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdfSOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
 

AgileMidwest2018-Shead-BddWithRobots

  • 1. Behavior Driven Development with Robots Mark Shead mark.shead@xeric.net http://book.markshead.com
  • 2. • Turn Up Brightness to 100% • http://ozoblockly.com • Test
  • 5. What is the smallest piece of functionality that would be closer to a working system?
  • 6. How could we test that this functionality exists?
  • 7. Write a 
 simple test Watch it fail Write codeTest passes Refactor
  • 8.
  • 9.
  • 11. • Define desired behavior as an example • Make example executable • See that examples fail • Use TDD to make those examples pass
  • 13. Developer language Business owner language Gerkin Language
  • 14. Given I am not an admin user
 When I login to the system
 Then I cannot see the admin menu
  • 15. Given I am an admin user
 When I login to the system
 Then I can see the admin menu
  • 16. Write 
 Scenario Watch it fail Make It 
 Executable Scenario passes Write the code
  • 18. Write a 
 simple test Watch it fail Write codeTest passes Refactor TDD
  • 19. Write 
 Scenario Watch it fail Make It 
 Executable Scenario passes Write the code BDD
  • 20. Write 
 Scenario Watch it fail Make It 
 Executable Scenario passes Write a 
 simple test Watch it fail Write 
 code Test passes Refactor
  • 21. Write 
 Scenario Watch it fail Make It 
 Executable Scenario passes Write a 
 simple test Watch it fail Write 
 code Test passes Refactor TDD BDD
  • 22. Write 
 Scenario Watch it fail Make It 
 Executable Scenario passes Write a 
 simple test Watch it fail Write 
 code Test passes Refactor Unit/IntegrationTests Executable Specification
  • 23.
  • 26.
  • 27. Given the wasp is stocking it’s nest
 When a cricket is located
 Then the cricket is paralyzed
 And the cricket is moved toward the nest
  • 28. Given the wasp is headed toward the nest
 And the wasp is carrying a cricket
 When the wasp reaches the nest entrance
 Then the wasp will drop the cricket
 And the wasp will inspect the nest
  • 29. Given the wasp has inspected the nest
 When the wasp exits the nest
 And finds it’s cricket at the entrance
 Then the wasp will retrieve the cricket
 And store the cricket for it’s larvae
  • 30.
  • 33. Problem: Someone keeps moving the cricket

  • 34. Problem: Someone keeps moving the cricket
 Solution: Sting the human
  • 35. Given a family driving on a highway
 And the car is approaching a rest area
 When the car passes the rest area
 Then the kids will need to use the restroom
  • 37. Follow Me Robot aka: Baby Duck Mode
  • 38. Follow Me Robot aka: Baby Duck Mode aka: Terrify Your Kids Robot
  • 39. Given the legs of a human are identified
 When the legs are to the right of center
 Then rotate to the right
  • 40. Given the legs of a human are identified
 When the legs are to the right of center
 Then rotate to the right
  • 41. Given the legs of a human are identified
 When the legs are to the right of center
 Then rotate to the right
  • 42. Given the legs of a human are identified
 When the legs are to the left of center
 Then rotate to the left
  • 43. Given the legs of a human are identified
 When the legs are to the left of center
 Then rotate to the left
  • 44. Given the legs of a human are identified
 When the legs are to the left of center
 Then rotate to the left
  • 45. Given the legs of a human are identified
 When the legs are more than 2 feet away
 Then move 2 inches forward
  • 46. Given the legs of a human are identified
 When the legs are less than 2 feet away
 Then move 2 inches backwards
  • 47.
  • 48. Given the legs of a human are identified
 When the legs are to the right of center
 Then rotate to the right Given the legs of a human are identified
 When the legs are to the left of center
 Then rotate to the left Given the legs of a human are identified
 When the legs are more than 2 feet away
 Then move 2 inches forward Given the legs of a human are identified
 When the legs are less than 2 feet away
 Then move 2 inches backwards
  • 49.
  • 50. Given the legs of a human are identified
 When follow me is activated
 Then follow the human
  • 51. Given the legs of a human are identified
 When search and destroy mode is activate
 Then follow the human
  • 53. Given it is near lunch time
 When the speaker keeps talking
 Then discard 85% of what he says