SlideShare a Scribd company logo
Intro	
  to	
  TDD	
  &	
  BDD

Test Driven Development 

& Behaviour Driven Development
Kev McCabe
In to The Box 2015
Sunday, 19 April 15
Who am I?
• Kev McCabe AKA @bigmadkev
• Freelance Code Smith 

& Agile Coach
• Developer for over 18 years
• Worked in TV Broadcast,
Healthcare, Travel & Finance
• Adobe Community Professional
Agenda
• Types of testing
• Why Test
• TDD Intro
• BDD Intro
• TestBox BDD
Types of Testing
GUI
Integration
Unit Tests
Exploratory
testing
Real World Testing Pyramid
GUI
Integration
Exploratory testing
Unit TestsManual Testing
Bugs cost money
^ Kaner,Cem; JamesBach, Bret Pettichord (2001). Lessons Learned inSoftwareTesting: A Context-Driven Approach.Wiley. p. 4. ISBN 0-471-08112-4.
One Big Lie!
What is TDD
Test-driven development (TDD) is a software
development process that relies on the
repetition of a very short development cycle:
first the developer writes an (initially failing)
automated test case that defines a desired
improvement or new function, then
produces the minimum amount of code to
pass that test, and finally refactors the new code
to acceptable standards
What is TDD
What it is
• A tool to drive design
• Developer focused
• Works with BDD
• Non-intuitive but powerful
tool
What it is not
• About testing
• For the faint hearted
• A silver bullet
• Easy
TDD Process
From	
  Growing	
  Object-­‐Oriented	
  Software	
  by	
  Nat	
  Pryce	
  and	
  Steve	
  Freeman
What is BDD
In software engineering, behavior-driven development
(BDD) is a software development process that
emerged from test-driven development (TDD).Behavior-
driven development combines the general techniques and
principles of TDD with ideas from domain-driven
design and object-oriented analysis and design to
provide software developers and business analysts
with shared tools and a shared process to
collaborate on software development, with the aim of
delivering “software that matters”
What is BDD
• Dan North - http://dannorth.net/introducing-bdd
• Ubiquitous language
– existing or being everywhere at the same time : constantly
• Promotes communication & collaboration between
– Developers + business analysts + stakeholders
• Focuses on stories or requirements rather than on functions
• Focuses on what a system should do and not on how it should be
implemented
– Better readability and visibility
– Verify that software works but also that it meets customer
expectations
BDD Process
Story
Generate Scenarios
Pass Scenarios
Generating Scenarios
As an Insurance Company,
I want to generate life insurance risk
so that we don’t lose money
Example 3 Amigos Session
In order to not lose money
as an insurance company,
I want to generate life insurance risk
Example 3 Amigos Session
Scenario One
Given a customer
When they request a quote
Then we return an insurance risk
BDD
User stories &
acceptance
criteria
Domain
Learning
Examples
Examples
Examples
Examples
Examples
Open
Questions
New Stories
Scenario One
Given a customer under 30 years
When they request a life insurance quote
Then we return an insurance risk of low
Given a customer under 55 years
When they request a life insurance quote
Then we return an insurance risk of med
Scenario Two
Given a customer over 55 years
When they request a life insurance quote
Then we return an insurance risk of high
Scenario Three
Given a customer between 

<lowerLimit> & <upperLimit>
When they request a life insurance quote
Then we return an insurance risk of <riskResult>
|lowerLimit|upperLimit|riskResult|
|18 | 29 | low |
|30 | 54 | med |
|55 | 65 | high |
Scenario Outline
What if they smoke?
What if they drink alcohol?
What if they have known health issues?
What about people under 18 and over 70?
Questions Raised
In order not to insurance under & over aged
customers
as an insurance company,
I want to raise an exception
Additional Stories
We have learnt about our domain
The customer worries about age limits more
than anything else
We also know that other items are upcoming
but …… we don’t need to develop them until
we have that story!
What we have learnt
Having conversations
Is more important than

capturing conversations
Is more important than

automating conversations
www.slideshare.net/lunivore/behavior-­‐driven-­‐development-­‐11754474	
  
Liz	
  Keogh	
  @lunivore
describe(“Customer is between 18 & 29”, function() {	
  
it( “will return an insurance risk of low”, function() {	
  
var customer = new customerBuilder().withAge(24).build(); 	
  
expect(riskService.generateRiskRating(customer))

.toBe(“low”);	
  
}) 	
  
})	
  
describe(“Customer is between 30 & 54”, function() {	
  
it( “will return an insurance risk of med”, function() {	
  
var customer = new customerBuilder().withAge(37).build();
expect(riskService.generateRiskRating(customer))

.toBe(“med”);	
  
}) 	
  
})
Scenario to TestBox
BDD & TDD
From	
  Growing	
  Object-­‐Oriented	
  Software	
  by	
  Nat	
  Pryce	
  and	
  Steve	
  Freeman
TestBox is a next generation testing framework for ColdFusion that is based
on BDD (Behavior Driven Development) for providing a clean obvious
syntax for writing tests. It contains not only a testing framework, runner,
assertions and expectations library but also integrates with MockBox for
mocking and stubbing. It also supports xUnit style of testing and MXUnit
compatibilities.
What you get!
Test Harness
Test Bundle CFC
• No matter what style, you start with a test
bundle CFC
• Inherits from testbox.system.BaseSpec or not!

• URL runner caveat
• Get’s lots of methods and properties for testing
• TestBox will then execute all tests within 1 or
more bundles
Running your bundles
• Execute bundle (if using inheritance) via the URL
– http://mysite/test/bundle.cfc?method=runRemote
• Using the TestBox Class: testbox.system.TestBox
– Bundle(s) Runner
– Directory Runner
– SOAP Runner
– HTTP/REST Runner
– ANT Runner
– Custom Runners
• What’s the output? We call this reporters
Reporters
• ANTJunit : A specific variant of JUnit XML that works with the ANT junitreport task
• Codexwiki : Produces MediaWiki syntax for usage in Codex Wiki
• Console : Sends report to console
• Doc : Builds semantic HTML to produce nice documentation
• Dot : Builds an awesome dot report
• JSON : Builds a report into JSON
• JUnit : Builds a JUnit compliant report
• Raw : Returns the raw structure representation of the testing results
• Simple : A basic HTML reporter
• Text : Back to the 80's with an awesome text report
• XML : Builds yet another XML testing report
• Tap : A test anything protocol reporter
• Min : A minimalistic view of your test reports
Let’s walk through an example
• The life insurance example
• We’ll use a BDD Spec to tell us when we’re done
• We’ll use TDD to drive the design of our code
What the future holds!
• Grunt JS Tasks
• NodeJS Runners and Watchers
• Sublime Runner
• More Reporters
• More focus on automation
• Gherkins support

More Related Content

Viewers also liked

ORM Pink Unicorns
ORM Pink UnicornsORM Pink Unicorns
ORM Pink Unicorns
Ortus Solutions, Corp
 
ITB2015 - Crash Course in Ionic + AngularJS
ITB2015 - Crash Course in Ionic + AngularJSITB2015 - Crash Course in Ionic + AngularJS
ITB2015 - Crash Course in Ionic + AngularJS
Ortus Solutions, Corp
 
ITB2015 - Real Life ContentBox Modular CMS
ITB2015 - Real Life ContentBox Modular CMSITB2015 - Real Life ContentBox Modular CMS
ITB2015 - Real Life ContentBox Modular CMS
Ortus Solutions, Corp
 
Story Book
Story BookStory Book
Story Book
Duncan Warren-Rix
 
話題呼
話題呼話題呼
話題呼
eppii
 
CBDW2014 - Railo 5.0 and Beyond
CBDW2014 - Railo 5.0 and BeyondCBDW2014 - Railo 5.0 and Beyond
CBDW2014 - Railo 5.0 and Beyond
Ortus Solutions, Corp
 
Mood boards
Mood boards Mood boards
Mood boards
caitlinkirby42
 
Where to find $59 Trillion: A Map for Nonprofits
Where to find $59 Trillion: A Map for NonprofitsWhere to find $59 Trillion: A Map for Nonprofits
Where to find $59 Trillion: A Map for Nonprofits
Kristen Massey Lawrence
 
Проблеми комп’ютероманії
Проблеми комп’ютероманіїПроблеми комп’ютероманії
Проблеми комп’ютероманії
Наталія Дорощук
 
CBDW2014 - ColdBox 4 Modules
CBDW2014 - ColdBox 4 ModulesCBDW2014 - ColdBox 4 Modules
CBDW2014 - ColdBox 4 Modules
Ortus Solutions, Corp
 
0 6 método de los desplazamientos
0 6 método de los desplazamientos0 6 método de los desplazamientos
0 6 método de los desplazamientos
Bryan Aucca
 
ARS MARKETING _ PROFILE
ARS MARKETING _ PROFILEARS MARKETING _ PROFILE
ARS MARKETING _ PROFILE
Raj Singh
 
Costumes
CostumesCostumes
Costumes
LucyAnne97
 
과제
과제과제
과제
Hye Jin Lee
 
Storyboard final
Storyboard finalStoryboard final
Storyboard final
LucyAnne97
 

Viewers also liked (15)

ORM Pink Unicorns
ORM Pink UnicornsORM Pink Unicorns
ORM Pink Unicorns
 
ITB2015 - Crash Course in Ionic + AngularJS
ITB2015 - Crash Course in Ionic + AngularJSITB2015 - Crash Course in Ionic + AngularJS
ITB2015 - Crash Course in Ionic + AngularJS
 
ITB2015 - Real Life ContentBox Modular CMS
ITB2015 - Real Life ContentBox Modular CMSITB2015 - Real Life ContentBox Modular CMS
ITB2015 - Real Life ContentBox Modular CMS
 
Story Book
Story BookStory Book
Story Book
 
話題呼
話題呼話題呼
話題呼
 
CBDW2014 - Railo 5.0 and Beyond
CBDW2014 - Railo 5.0 and BeyondCBDW2014 - Railo 5.0 and Beyond
CBDW2014 - Railo 5.0 and Beyond
 
Mood boards
Mood boards Mood boards
Mood boards
 
Where to find $59 Trillion: A Map for Nonprofits
Where to find $59 Trillion: A Map for NonprofitsWhere to find $59 Trillion: A Map for Nonprofits
Where to find $59 Trillion: A Map for Nonprofits
 
Проблеми комп’ютероманії
Проблеми комп’ютероманіїПроблеми комп’ютероманії
Проблеми комп’ютероманії
 
CBDW2014 - ColdBox 4 Modules
CBDW2014 - ColdBox 4 ModulesCBDW2014 - ColdBox 4 Modules
CBDW2014 - ColdBox 4 Modules
 
0 6 método de los desplazamientos
0 6 método de los desplazamientos0 6 método de los desplazamientos
0 6 método de los desplazamientos
 
ARS MARKETING _ PROFILE
ARS MARKETING _ PROFILEARS MARKETING _ PROFILE
ARS MARKETING _ PROFILE
 
Costumes
CostumesCostumes
Costumes
 
과제
과제과제
과제
 
Storyboard final
Storyboard finalStoryboard final
Storyboard final
 

Similar to ITB2015 - Behavior Driven Development, Automation and Continuous Integration

Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Synerzip
 
Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD
Gervais Johnson, Advisor
 
Behaviour Driven Development: Oltre i limiti del possibile
Behaviour Driven Development: Oltre i limiti del possibileBehaviour Driven Development: Oltre i limiti del possibile
Behaviour Driven Development: Oltre i limiti del possibile
Iosif Itkin
 
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo RiolWebinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
atSistemas
 
Expo qa from user stories to automated acceptance tests with bdd
Expo qa   from user stories to automated acceptance tests with bddExpo qa   from user stories to automated acceptance tests with bdd
Expo qa from user stories to automated acceptance tests with bdd
Eduardo Riol
 
Quality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQuality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the Enterprise
QASymphony
 
Making the Move to Behavior Driven Development
Making the Move to Behavior Driven DevelopmentMaking the Move to Behavior Driven Development
Making the Move to Behavior Driven Development
QASymphony
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia event
Xebia India
 
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
Amazon Web Services
 
Software quality - no more bugs!
Software quality - no more bugs!Software quality - no more bugs!
Software quality - no more bugs!
Arnon Axelrod
 
A Stratagem on Strategy: Rolling Security Testing into Product Testing
A Stratagem on Strategy: Rolling Security Testing into Product TestingA Stratagem on Strategy: Rolling Security Testing into Product Testing
A Stratagem on Strategy: Rolling Security Testing into Product Testing
Kevin Fealey
 
Failure is an Option: Scaling Resilient Feature Delivery
Failure is an Option: Scaling Resilient Feature DeliveryFailure is an Option: Scaling Resilient Feature Delivery
Failure is an Option: Scaling Resilient Feature Delivery
Optimizely
 
Specification-by-Example: A Cucumber Implementation
Specification-by-Example: A Cucumber ImplementationSpecification-by-Example: A Cucumber Implementation
Specification-by-Example: A Cucumber Implementation
TechWell
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
QA or the Highway
 
IBM Blockchain Labs Explained v1.0
IBM Blockchain Labs Explained v1.0IBM Blockchain Labs Explained v1.0
IBM Blockchain Labs Explained v1.0
Matt Lucas
 
The Need for Speed
The Need for SpeedThe Need for Speed
The Need for Speed
Capgemini
 
Scrum + bdd + ddd
Scrum + bdd + dddScrum + bdd + ddd
Scrum + bdd + ddd
Helder De Oliveira
 
IT due diligence and software quality for fintech startups
IT due diligence and software quality for fintech startupsIT due diligence and software quality for fintech startups
IT due diligence and software quality for fintech startups
Sieuwert van Otterloo
 
OpenID Foundation Workshop at EIC 2018 - OpenID Certification Update
OpenID Foundation Workshop at EIC 2018 - OpenID Certification UpdateOpenID Foundation Workshop at EIC 2018 - OpenID Certification Update
OpenID Foundation Workshop at EIC 2018 - OpenID Certification Update
MikeLeszcz
 
Technical debt management strategies
Technical debt management strategiesTechnical debt management strategies
Technical debt management strategies
Raquel Pau
 

Similar to ITB2015 - Behavior Driven Development, Automation and Continuous Integration (20)

Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
 
Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD
 
Behaviour Driven Development: Oltre i limiti del possibile
Behaviour Driven Development: Oltre i limiti del possibileBehaviour Driven Development: Oltre i limiti del possibile
Behaviour Driven Development: Oltre i limiti del possibile
 
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo RiolWebinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
 
Expo qa from user stories to automated acceptance tests with bdd
Expo qa   from user stories to automated acceptance tests with bddExpo qa   from user stories to automated acceptance tests with bdd
Expo qa from user stories to automated acceptance tests with bdd
 
Quality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQuality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the Enterprise
 
Making the Move to Behavior Driven Development
Making the Move to Behavior Driven DevelopmentMaking the Move to Behavior Driven Development
Making the Move to Behavior Driven Development
 
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
 
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
 
Software quality - no more bugs!
Software quality - no more bugs!Software quality - no more bugs!
Software quality - no more bugs!
 
A Stratagem on Strategy: Rolling Security Testing into Product Testing
A Stratagem on Strategy: Rolling Security Testing into Product TestingA Stratagem on Strategy: Rolling Security Testing into Product Testing
A Stratagem on Strategy: Rolling Security Testing into Product Testing
 
Failure is an Option: Scaling Resilient Feature Delivery
Failure is an Option: Scaling Resilient Feature DeliveryFailure is an Option: Scaling Resilient Feature Delivery
Failure is an Option: Scaling Resilient Feature Delivery
 
Specification-by-Example: A Cucumber Implementation
Specification-by-Example: A Cucumber ImplementationSpecification-by-Example: A Cucumber Implementation
Specification-by-Example: A Cucumber Implementation
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
 
IBM Blockchain Labs Explained v1.0
IBM Blockchain Labs Explained v1.0IBM Blockchain Labs Explained v1.0
IBM Blockchain Labs Explained v1.0
 
The Need for Speed
The Need for SpeedThe Need for Speed
The Need for Speed
 
Scrum + bdd + ddd
Scrum + bdd + dddScrum + bdd + ddd
Scrum + bdd + ddd
 
IT due diligence and software quality for fintech startups
IT due diligence and software quality for fintech startupsIT due diligence and software quality for fintech startups
IT due diligence and software quality for fintech startups
 
OpenID Foundation Workshop at EIC 2018 - OpenID Certification Update
OpenID Foundation Workshop at EIC 2018 - OpenID Certification UpdateOpenID Foundation Workshop at EIC 2018 - OpenID Certification Update
OpenID Foundation Workshop at EIC 2018 - OpenID Certification Update
 
Technical debt management strategies
Technical debt management strategiesTechnical debt management strategies
Technical debt management strategies
 

More from Ortus Solutions, Corp

Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
Ortus Solutions, Corp
 
Revolutionizing Task Scheduling in CFML!
Revolutionizing Task Scheduling in CFML!Revolutionizing Task Scheduling in CFML!
Revolutionizing Task Scheduling in CFML!
Ortus Solutions, Corp
 
CBDebugger : Debug your Box apps with ease!
CBDebugger : Debug your Box apps with ease!CBDebugger : Debug your Box apps with ease!
CBDebugger : Debug your Box apps with ease!
Ortus Solutions, Corp
 
TheFutureIsDynamic-BoxLang-CFCamp2024.pdf
TheFutureIsDynamic-BoxLang-CFCamp2024.pdfTheFutureIsDynamic-BoxLang-CFCamp2024.pdf
TheFutureIsDynamic-BoxLang-CFCamp2024.pdf
Ortus Solutions, Corp
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
ITB2024 - Keynote Day 1 - Ortus Solutions.pdf
ITB2024 - Keynote Day 1 - Ortus Solutions.pdfITB2024 - Keynote Day 1 - Ortus Solutions.pdf
ITB2024 - Keynote Day 1 - Ortus Solutions.pdf
Ortus Solutions, Corp
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
Ortus Solutions, Corp
 
Ortus Government.pdf
Ortus Government.pdfOrtus Government.pdf
Ortus Government.pdf
Ortus Solutions, Corp
 
Luis Majano The Battlefield ORM
Luis Majano The Battlefield ORMLuis Majano The Battlefield ORM
Luis Majano The Battlefield ORM
Ortus Solutions, Corp
 
Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI
Ortus Solutions, Corp
 
Secure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusion
Ortus Solutions, Corp
 
Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023
Ortus Solutions, Corp
 
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
Ortus Solutions, Corp
 
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
Ortus Solutions, Corp
 
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
Ortus Solutions, Corp
 
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
Ortus Solutions, Corp
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
Ortus Solutions, Corp
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
Ortus Solutions, Corp
 
ITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdfITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdf
Ortus Solutions, Corp
 

More from Ortus Solutions, Corp (20)

Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
 
Revolutionizing Task Scheduling in CFML!
Revolutionizing Task Scheduling in CFML!Revolutionizing Task Scheduling in CFML!
Revolutionizing Task Scheduling in CFML!
 
CBDebugger : Debug your Box apps with ease!
CBDebugger : Debug your Box apps with ease!CBDebugger : Debug your Box apps with ease!
CBDebugger : Debug your Box apps with ease!
 
TheFutureIsDynamic-BoxLang-CFCamp2024.pdf
TheFutureIsDynamic-BoxLang-CFCamp2024.pdfTheFutureIsDynamic-BoxLang-CFCamp2024.pdf
TheFutureIsDynamic-BoxLang-CFCamp2024.pdf
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
ITB2024 - Keynote Day 1 - Ortus Solutions.pdf
ITB2024 - Keynote Day 1 - Ortus Solutions.pdfITB2024 - Keynote Day 1 - Ortus Solutions.pdf
ITB2024 - Keynote Day 1 - Ortus Solutions.pdf
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Ortus Government.pdf
Ortus Government.pdfOrtus Government.pdf
Ortus Government.pdf
 
Luis Majano The Battlefield ORM
Luis Majano The Battlefield ORMLuis Majano The Battlefield ORM
Luis Majano The Battlefield ORM
 
Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI
 
Secure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusion
 
Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023
 
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
 
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
 
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
 
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
 
ITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdfITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdf
 

Recently uploaded

5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
BibashShahi
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 

Recently uploaded (20)

5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Artificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic WarfareArtificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic Warfare
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 

ITB2015 - Behavior Driven Development, Automation and Continuous Integration

  • 1. Intro  to  TDD  &  BDD
 Test Driven Development 
 & Behaviour Driven Development Kev McCabe In to The Box 2015 Sunday, 19 April 15
  • 2. Who am I? • Kev McCabe AKA @bigmadkev • Freelance Code Smith 
 & Agile Coach • Developer for over 18 years • Worked in TV Broadcast, Healthcare, Travel & Finance • Adobe Community Professional
  • 3. Agenda • Types of testing • Why Test • TDD Intro • BDD Intro • TestBox BDD
  • 4. Types of Testing GUI Integration Unit Tests Exploratory testing
  • 5. Real World Testing Pyramid GUI Integration Exploratory testing Unit TestsManual Testing
  • 6. Bugs cost money ^ Kaner,Cem; JamesBach, Bret Pettichord (2001). Lessons Learned inSoftwareTesting: A Context-Driven Approach.Wiley. p. 4. ISBN 0-471-08112-4.
  • 8. What is TDD Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: first the developer writes an (initially failing) automated test case that defines a desired improvement or new function, then produces the minimum amount of code to pass that test, and finally refactors the new code to acceptable standards
  • 9. What is TDD What it is • A tool to drive design • Developer focused • Works with BDD • Non-intuitive but powerful tool What it is not • About testing • For the faint hearted • A silver bullet • Easy
  • 10. TDD Process From  Growing  Object-­‐Oriented  Software  by  Nat  Pryce  and  Steve  Freeman
  • 11. What is BDD In software engineering, behavior-driven development (BDD) is a software development process that emerged from test-driven development (TDD).Behavior- driven development combines the general techniques and principles of TDD with ideas from domain-driven design and object-oriented analysis and design to provide software developers and business analysts with shared tools and a shared process to collaborate on software development, with the aim of delivering “software that matters”
  • 12. What is BDD • Dan North - http://dannorth.net/introducing-bdd • Ubiquitous language – existing or being everywhere at the same time : constantly • Promotes communication & collaboration between – Developers + business analysts + stakeholders • Focuses on stories or requirements rather than on functions • Focuses on what a system should do and not on how it should be implemented – Better readability and visibility – Verify that software works but also that it meets customer expectations
  • 15. As an Insurance Company, I want to generate life insurance risk so that we don’t lose money Example 3 Amigos Session
  • 16. In order to not lose money as an insurance company, I want to generate life insurance risk Example 3 Amigos Session
  • 17. Scenario One Given a customer When they request a quote Then we return an insurance risk
  • 19. Scenario One Given a customer under 30 years When they request a life insurance quote Then we return an insurance risk of low
  • 20. Given a customer under 55 years When they request a life insurance quote Then we return an insurance risk of med Scenario Two
  • 21. Given a customer over 55 years When they request a life insurance quote Then we return an insurance risk of high Scenario Three
  • 22. Given a customer between 
 <lowerLimit> & <upperLimit> When they request a life insurance quote Then we return an insurance risk of <riskResult> |lowerLimit|upperLimit|riskResult| |18 | 29 | low | |30 | 54 | med | |55 | 65 | high | Scenario Outline
  • 23. What if they smoke? What if they drink alcohol? What if they have known health issues? What about people under 18 and over 70? Questions Raised
  • 24. In order not to insurance under & over aged customers as an insurance company, I want to raise an exception Additional Stories
  • 25. We have learnt about our domain The customer worries about age limits more than anything else We also know that other items are upcoming but …… we don’t need to develop them until we have that story! What we have learnt
  • 26. Having conversations Is more important than
 capturing conversations Is more important than
 automating conversations www.slideshare.net/lunivore/behavior-­‐driven-­‐development-­‐11754474   Liz  Keogh  @lunivore
  • 27. describe(“Customer is between 18 & 29”, function() {   it( “will return an insurance risk of low”, function() {   var customer = new customerBuilder().withAge(24).build();   expect(riskService.generateRiskRating(customer))
 .toBe(“low”);   })   })   describe(“Customer is between 30 & 54”, function() {   it( “will return an insurance risk of med”, function() {   var customer = new customerBuilder().withAge(37).build(); expect(riskService.generateRiskRating(customer))
 .toBe(“med”);   })   }) Scenario to TestBox
  • 28. BDD & TDD From  Growing  Object-­‐Oriented  Software  by  Nat  Pryce  and  Steve  Freeman
  • 29. TestBox is a next generation testing framework for ColdFusion that is based on BDD (Behavior Driven Development) for providing a clean obvious syntax for writing tests. It contains not only a testing framework, runner, assertions and expectations library but also integrates with MockBox for mocking and stubbing. It also supports xUnit style of testing and MXUnit compatibilities.
  • 32. Test Bundle CFC • No matter what style, you start with a test bundle CFC • Inherits from testbox.system.BaseSpec or not!
 • URL runner caveat • Get’s lots of methods and properties for testing • TestBox will then execute all tests within 1 or more bundles
  • 33. Running your bundles • Execute bundle (if using inheritance) via the URL – http://mysite/test/bundle.cfc?method=runRemote • Using the TestBox Class: testbox.system.TestBox – Bundle(s) Runner – Directory Runner – SOAP Runner – HTTP/REST Runner – ANT Runner – Custom Runners • What’s the output? We call this reporters
  • 34. Reporters • ANTJunit : A specific variant of JUnit XML that works with the ANT junitreport task • Codexwiki : Produces MediaWiki syntax for usage in Codex Wiki • Console : Sends report to console • Doc : Builds semantic HTML to produce nice documentation • Dot : Builds an awesome dot report • JSON : Builds a report into JSON • JUnit : Builds a JUnit compliant report • Raw : Returns the raw structure representation of the testing results • Simple : A basic HTML reporter • Text : Back to the 80's with an awesome text report • XML : Builds yet another XML testing report • Tap : A test anything protocol reporter • Min : A minimalistic view of your test reports
  • 35.
  • 36. Let’s walk through an example • The life insurance example • We’ll use a BDD Spec to tell us when we’re done • We’ll use TDD to drive the design of our code
  • 37. What the future holds! • Grunt JS Tasks • NodeJS Runners and Watchers • Sublime Runner • More Reporters • More focus on automation • Gherkins support