SlideShare une entreprise Scribd logo
1  sur  40
Télécharger pour lire hors ligne
Behavior Driven
Development

B.D.D.
WHO AM I?
• Luis Majano - Computer Engineer	

• Hail from El Salvador ------------------>	

• Architecture + Software Design	

• CEO of Ortus Solutions	

• Adobe Community Professional	

• Creator of all things Box: 

ColdBox, ContentBox,
CommandBox,WireBox….
AGENDA
• Testing Landscape	

• WhyTest	

• TDD Intro	

• BDD Intro	

• TestBox BDD
Testing
Landscape
Why Where to start?	

What to test?	

What not to test?
Cost To Fix Time detected
Requirements Design Building Testing Post-Release
Time
Introduced
Requirements 1x 3x 5-10x 10x 10-100x
Design --- 1x 10x 15x 25-100x
Building -- -- 1x 10x 10-25x
^ Kaner, Cem; James Bach, Bret Pettichord (2001). Lessons Learned in Software Testing: A Context-Driven Approach. Wiley. p. 4. ISBN 0-471-08112-4.
BUGS COST MONEY
BIGGEST LIE IN SOFTWARE DEV
We don’t have time!
Don’t worry, we will
create the tests and
refactor it later!
What isT.D.D
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
T.D.D. Process
Write Test
Mock
Write CodeVerify
Refactor
T.D.D.
CFC
Validate()
Add()
List()
Save()
Test%
CFC%
testValidate()%
testAdd()%
testList()%
testSave()%
T.D.D.
• It is an approach to develop software by writing code that exercises your code	

• It does help you:	

• Verifies your source code compiles and executes 	

• Have immediate feedback	

• Create tests before rather than after (yea right!)	

• Express some behavior and ideas
T.D.D.
• Is NOT about verifying software requirements	

• Does not:	

• Verify user’s or stakeholder expectations	

• Express that requirements are satisfied	

• Very very developer oriented	

• Tedious	

• TDD can be a pain in the buttocks!	

• We start strong, but we finish weak, even if we
finish
Developer Test
Paralysis
What is B.D.D.?
In software engineering, behavior-driven development
(BDD) is a software development process based on
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"
B.D.D isT.D.D. Evolved
• 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
B.D.D. Process
Stories
Scenario
Specs
Implement
Behavior
Verify
Refactor
Make it work!
Then make it beautiful!
Questions Answered
Where%to%
start?%
Outside%/
>%In%
What%to%
test?%
User%
Stories%
What%Not%
to%test?%
Anything%
Else%
Story Framework
Story Scenario Spec
Stories to Scenarios
As an application user
I want to be welcomed with my name at login
in order to personalize my experience
Scenario: user login with valid credentials
Given a user “luis" with password "secret" exists
When I login as “luis" with "secret"
Then I should see the message "Welcome back luis!"
Stories to Scenarios
Story to Scenario to
TestBox
As an application user
I want to be welcomed with my name at login
in order to personalize my experience
Scenario: user login with valid credentials
Given a user “luis" with password "secret" exists
When I login as “luis" with "secret"
Then I should see the message "Welcome back luis!"
describe( “User login with valid credentials”, function(){
it( “should see a personalized message”, function(){
userService.login( “luis”, “secret” )
var event = execute(“user.home”)
expect( event.getValue( “welcome” ) ).toBe( “Welcome back luis!” )
})
})
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.
• BDD & xUnit style testing	

• Life-Cycle methods	

• MockBox Integration	

• AsynchronousTesting
• ANT/Jenkins Integration	

• Custom Reporters & Runners	

• Dynamic Labels & Skipping	

• Debug Output Streams
INSTALLATION + REQUIREMENTS
• ColdFusion 9.01+, Railo 3.1+	

• xUnit + MXUnit Compatibility	

• ColdFusion 10+, Railo 4+	

• xUnit, MXUnit, BDD	

• Place anywhere you like, create a “/testbox”
mapping





• Sublime Package, CPU IDE Support
MXUNIT COMPATIBLE
• Compatible with xUnit style by MXUnit	

• Migrate existing tests toTestBox	

• No BDD	

• How do you migrate?







• If something is not working, report it: bugs@coldbox.org
What you get! API Docs
Samples
Core
Test Browser
Test Harness
Test Runner
Test Harness
Automated test
results!
xUnit/BDDTest
Bundles
Harness bootstrap
HTML Runner
ANT Runner
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	

• TesBox will then execute all tests within 1 or more bundles
RUNNINGYOUR BUNDLES
• Execute bundle (if using inheritance) via the URL	

• http://mysite/test/bundle.cfc?method=runRemote
• Using theTestBox 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	

• Custom:Anything you like
TEST BUNDLE CFC
• run()
• Declare your scenario specs + suites	

• Life-cycle methods	

• Inherit some assertion, utility and
mocking methods	

• Expectations Library: expect()	

• Assertions Library: $assert
SUITES: DESCRIBE()YOURTESTS
• Suites begin with a describe() block	

• title	

• closure	

• A suite is composed of specs or more suites	

• Closures can contain	

• Life-cycle methods	

• More suites	

• Specs
DESCRIBE() ARGUMENTS
Annotation Description
Title The title of the suite to register
Body The closure that represents the test suite
Labels The list or array of labels this suite group belongs to
Skip A flag or a closure that tells TestBox to skip this suite group from testing
if true. If this is a closure it must return boolean.
AsyncAll If you want to parallelize the execution of the defined specs in this suite
group.
SPECS: IT()
• At least 2 args	

• Title
• Closure
• Labels	

• Skip	

• Closure is where you define	

• Scenarios	

• 1+ expectations, assertions	

• Specs tested in order declared
EXPECTATIONS + MATCHERS
• Self-concatenated method calls that evaluate your SUT	

• Start with a call to expect( actual )
• Concatenated with matcher methods	

• TestBox ships with a plethora of matchers!	

• Matchers also have negation (not) counterparts
NESTED SUITES
• Nest to your heart’s delight	

• Life-cycle methods bubble up	

• Great for grouping and recursive scenarios	

• Execute in descending order
EXPECTING EXCEPTIONS
• Verifies exceptions	

• Pass a closure to expect() and use toThrow( type, regex )	

• Match types and message+detail regex
LABELS + SKIPPING
• Apply labels to suites and specs	

• Skip suites and specs	

• Shortcut methods: xDescribe(), xIt()
ASYNCHRONICITY
• TestBox executes all specs in parallel	

• Decided on a per describe() block	

• Attention to var-scoping	

• Test shared access and contention	

• Much power comes much responsibility!
What the future holds!
• CommandBox Integration	

• Grunt JSTasks	

• NodeJS Runners and Watchers	

• More Sublime Integration	

• More focus on automation	

• Gherkins support
Thanks!
Q & A

Contenu connexe

Tendances

Craftsmanship Workshop: Coding Kata
Craftsmanship Workshop: Coding KataCraftsmanship Workshop: Coding Kata
Craftsmanship Workshop: Coding KataMichael Ibarra
 
Into The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applicationsInto The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applicationsOrtus Solutions, Corp
 
Behavior Driven Development with SpecFlow
Behavior Driven Development with SpecFlowBehavior Driven Development with SpecFlow
Behavior Driven Development with SpecFlowRachid Kherrazi
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Ganesh Kondal
 
Generalization in Auto-Testing. How we put what we had into new Technological...
Generalization in Auto-Testing. How we put what we had into new Technological...Generalization in Auto-Testing. How we put what we had into new Technological...
Generalization in Auto-Testing. How we put what we had into new Technological...SQALab
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing SoftwareSteven Smith
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Lars Thorup
 
Improving the Quality of Existing Software - DevIntersection April 2016
Improving the Quality of Existing Software - DevIntersection April 2016Improving the Quality of Existing Software - DevIntersection April 2016
Improving the Quality of Existing Software - DevIntersection April 2016Steven Smith
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing SoftwareSteven Smith
 
Behaviour Driven Development with SpecFlow
Behaviour Driven Development with SpecFlowBehaviour Driven Development with SpecFlow
Behaviour Driven Development with SpecFlowPascal Laurin
 
The Professional Programmer
The Professional ProgrammerThe Professional Programmer
The Professional ProgrammerDave Cross
 
TDD for APIs @ Europython 2015, Bilbao by Michael Kuehne
TDD for APIs @ Europython 2015, Bilbao by Michael KuehneTDD for APIs @ Europython 2015, Bilbao by Michael Kuehne
TDD for APIs @ Europython 2015, Bilbao by Michael KuehneMichael Kuehne-Schlinkert
 
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016Steven Smith
 
Approval Tests at Agile 2012
Approval Tests at Agile 2012Approval Tests at Agile 2012
Approval Tests at Agile 2012Lynn Langit
 
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 2019Jason Tice
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing SoftwareSteven Smith
 
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
 
Getting Started with Selenium
Getting Started with SeleniumGetting Started with Selenium
Getting Started with SeleniumDave Haeffner
 
Finally, easy integration testing with Testcontainers
Finally, easy integration testing with TestcontainersFinally, easy integration testing with Testcontainers
Finally, easy integration testing with TestcontainersRudy De Busscher
 
Intro to TDD and BDD
Intro to TDD and BDDIntro to TDD and BDD
Intro to TDD and BDDJason Noble
 

Tendances (20)

Craftsmanship Workshop: Coding Kata
Craftsmanship Workshop: Coding KataCraftsmanship Workshop: Coding Kata
Craftsmanship Workshop: Coding Kata
 
Into The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applicationsInto The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applications
 
Behavior Driven Development with SpecFlow
Behavior Driven Development with SpecFlowBehavior Driven Development with SpecFlow
Behavior Driven Development with SpecFlow
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5
 
Generalization in Auto-Testing. How we put what we had into new Technological...
Generalization in Auto-Testing. How we put what we had into new Technological...Generalization in Auto-Testing. How we put what we had into new Technological...
Generalization in Auto-Testing. How we put what we had into new Technological...
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing Software
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
 
Improving the Quality of Existing Software - DevIntersection April 2016
Improving the Quality of Existing Software - DevIntersection April 2016Improving the Quality of Existing Software - DevIntersection April 2016
Improving the Quality of Existing Software - DevIntersection April 2016
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing Software
 
Behaviour Driven Development with SpecFlow
Behaviour Driven Development with SpecFlowBehaviour Driven Development with SpecFlow
Behaviour Driven Development with SpecFlow
 
The Professional Programmer
The Professional ProgrammerThe Professional Programmer
The Professional Programmer
 
TDD for APIs @ Europython 2015, Bilbao by Michael Kuehne
TDD for APIs @ Europython 2015, Bilbao by Michael KuehneTDD for APIs @ Europython 2015, Bilbao by Michael Kuehne
TDD for APIs @ Europython 2015, Bilbao by Michael Kuehne
 
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
 
Approval Tests at Agile 2012
Approval Tests at Agile 2012Approval Tests at Agile 2012
Approval Tests at Agile 2012
 
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
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing Software
 
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
 
Getting Started with Selenium
Getting Started with SeleniumGetting Started with Selenium
Getting Started with Selenium
 
Finally, easy integration testing with Testcontainers
Finally, easy integration testing with TestcontainersFinally, easy integration testing with Testcontainers
Finally, easy integration testing with Testcontainers
 
Intro to TDD and BDD
Intro to TDD and BDDIntro to TDD and BDD
Intro to TDD and BDD
 

En vedette

Emberjs building-ambitious-web-applications
Emberjs building-ambitious-web-applicationsEmberjs building-ambitious-web-applications
Emberjs building-ambitious-web-applicationsColdFusionConference
 
Load Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusionLoad Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusionColdFusionConference
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeColdFusionConference
 
Get Gulping with Javascript Task Runners
Get Gulping with Javascript Task RunnersGet Gulping with Javascript Task Runners
Get Gulping with Javascript Task RunnersColdFusionConference
 
The Future of CSS with Web Components
The Future of CSS with Web ComponentsThe Future of CSS with Web Components
The Future of CSS with Web ComponentsColdFusionConference
 
Solving Frequent ColdFusion Server Problems in New and Better Ways
Solving Frequent ColdFusion Server Problems in New and Better WaysSolving Frequent ColdFusion Server Problems in New and Better Ways
Solving Frequent ColdFusion Server Problems in New and Better WaysColdFusionConference
 
Powering GIS Operations with ColdFusion
Powering GIS Operations with ColdFusionPowering GIS Operations with ColdFusion
Powering GIS Operations with ColdFusionColdFusionConference
 
Monetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APISMonetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APISColdFusionConference
 
ColdFusion builder 3 making the awesome
ColdFusion builder 3  making the awesomeColdFusion builder 3  making the awesome
ColdFusion builder 3 making the awesomeColdFusionConference
 

En vedette (20)

Emberjs building-ambitious-web-applications
Emberjs building-ambitious-web-applicationsEmberjs building-ambitious-web-applications
Emberjs building-ambitious-web-applications
 
Load Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusionLoad Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusion
 
Who Owns Software Security?
Who Owns Software Security?Who Owns Software Security?
Who Owns Software Security?
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio Code
 
This is how we REST
This is how we RESTThis is how we REST
This is how we REST
 
Hidden gems in cf2016
Hidden gems in cf2016Hidden gems in cf2016
Hidden gems in cf2016
 
Get Gulping with Javascript Task Runners
Get Gulping with Javascript Task RunnersGet Gulping with Javascript Task Runners
Get Gulping with Javascript Task Runners
 
Marketing for developers
Marketing for developersMarketing for developers
Marketing for developers
 
Building Multi-Tenant Saas Apps
Building  Multi-Tenant Saas AppsBuilding  Multi-Tenant Saas Apps
Building Multi-Tenant Saas Apps
 
The Future of CSS with Web Components
The Future of CSS with Web ComponentsThe Future of CSS with Web Components
The Future of CSS with Web Components
 
I am-designer
I am-designerI am-designer
I am-designer
 
API Management from the Trenches
API Management from the TrenchesAPI Management from the Trenches
API Management from the Trenches
 
Solving Frequent ColdFusion Server Problems in New and Better Ways
Solving Frequent ColdFusion Server Problems in New and Better WaysSolving Frequent ColdFusion Server Problems in New and Better Ways
Solving Frequent ColdFusion Server Problems in New and Better Ways
 
Powering GIS Operations with ColdFusion
Powering GIS Operations with ColdFusionPowering GIS Operations with ColdFusion
Powering GIS Operations with ColdFusion
 
2014 cf summit_clustering
2014 cf summit_clustering2014 cf summit_clustering
2014 cf summit_clustering
 
Monetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APISMonetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APIS
 
Dont throwthatout
Dont throwthatoutDont throwthatout
Dont throwthatout
 
ColdFusion builder 3 making the awesome
ColdFusion builder 3  making the awesomeColdFusion builder 3  making the awesome
ColdFusion builder 3 making the awesome
 
Java scriptconfusingbits
Java scriptconfusingbitsJava scriptconfusingbits
Java scriptconfusingbits
 

Similaire à Test box bdd

Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...Ortus Solutions, Corp
 
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Adob...
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Adob...Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Adob...
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Adob...Uma Ghotikar
 
Bringing DevOps to the Database
Bringing DevOps to the DatabaseBringing DevOps to the Database
Bringing DevOps to the DatabaseMichaela Murray
 
Continuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CIContinuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CIwajrcs
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersSPC Adriatics
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven DevelopmentSarah Dutkiewicz
 
Just Do It! ColdBox Integration Testing
Just Do It! ColdBox Integration TestingJust Do It! ColdBox Integration Testing
Just Do It! ColdBox Integration TestingOrtus Solutions, Corp
 
DSpace 7 - Creating High-Quality Software: Update to Development Practices
DSpace 7 - Creating High-Quality Software: Update to Development PracticesDSpace 7 - Creating High-Quality Software: Update to Development Practices
DSpace 7 - Creating High-Quality Software: Update to Development Practices4Science
 
Test driven development v1.0
Test driven development v1.0Test driven development v1.0
Test driven development v1.0Ganesh Kondal
 
VT.NET 20160411: An Intro to Test Driven Development (TDD)
VT.NET 20160411: An Intro to Test Driven Development (TDD)VT.NET 20160411: An Intro to Test Driven Development (TDD)
VT.NET 20160411: An Intro to Test Driven Development (TDD)Rob Hale
 
Unit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUGUnit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUGegoodwintx
 
Enter the mind of an Agile Developer
Enter the mind of an Agile DeveloperEnter the mind of an Agile Developer
Enter the mind of an Agile DeveloperBSGAfrica
 
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?Vincent Biret
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven DevelopmentMeilan Ou
 
Introduction to Testing and TDD
Introduction to Testing and TDDIntroduction to Testing and TDD
Introduction to Testing and TDDSarah Dutkiewicz
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScriptRob Scaduto
 
The Power of Azure DevOps
The Power of Azure DevOpsThe Power of Azure DevOps
The Power of Azure DevOpsJeff Bramwell
 
Unit Testing and Tools
Unit Testing and ToolsUnit Testing and Tools
Unit Testing and ToolsWilliam Simms
 

Similaire à Test box bdd (20)

Evolve your coding with some BDD
Evolve your coding with some BDDEvolve your coding with some BDD
Evolve your coding with some BDD
 
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...
 
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Adob...
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Adob...Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Adob...
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Adob...
 
Bdd with m spec
Bdd with m specBdd with m spec
Bdd with m spec
 
Bringing DevOps to the Database
Bringing DevOps to the DatabaseBringing DevOps to the Database
Bringing DevOps to the Database
 
Continuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CIContinuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CI
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill Ayers
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
 
Just Do It! ColdBox Integration Testing
Just Do It! ColdBox Integration TestingJust Do It! ColdBox Integration Testing
Just Do It! ColdBox Integration Testing
 
DSpace 7 - Creating High-Quality Software: Update to Development Practices
DSpace 7 - Creating High-Quality Software: Update to Development PracticesDSpace 7 - Creating High-Quality Software: Update to Development Practices
DSpace 7 - Creating High-Quality Software: Update to Development Practices
 
Test driven development v1.0
Test driven development v1.0Test driven development v1.0
Test driven development v1.0
 
VT.NET 20160411: An Intro to Test Driven Development (TDD)
VT.NET 20160411: An Intro to Test Driven Development (TDD)VT.NET 20160411: An Intro to Test Driven Development (TDD)
VT.NET 20160411: An Intro to Test Driven Development (TDD)
 
Unit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUGUnit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUG
 
Enter the mind of an Agile Developer
Enter the mind of an Agile DeveloperEnter the mind of an Agile Developer
Enter the mind of an Agile Developer
 
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
Introduction to Testing and TDD
Introduction to Testing and TDDIntroduction to Testing and TDD
Introduction to Testing and TDD
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScript
 
The Power of Azure DevOps
The Power of Azure DevOpsThe Power of Azure DevOps
The Power of Azure DevOps
 
Unit Testing and Tools
Unit Testing and ToolsUnit Testing and Tools
Unit Testing and Tools
 

Plus de ColdFusionConference

Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server DatabasesColdFusionConference
 
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsColdFusionConference
 
Crafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectCrafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectColdFusionConference
 
Security And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API ManagerSecurity And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API ManagerColdFusionConference
 
Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016ColdFusionConference
 
Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016ColdFusionConference
 
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995ColdFusionConference
 
Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMSColdFusionConference
 
Build your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webBuild your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webColdFusionConference
 

Plus de ColdFusionConference (20)

Api manager preconference
Api manager preconferenceApi manager preconference
Api manager preconference
 
Cf ppt vsr
Cf ppt vsrCf ppt vsr
Cf ppt vsr
 
Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server Databases
 
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIs
 
Don't just pdf, Smart PDF
Don't just pdf, Smart PDFDon't just pdf, Smart PDF
Don't just pdf, Smart PDF
 
Crafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectCrafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an Architect
 
Security And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API ManagerSecurity And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API Manager
 
Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016
 
ColdFusion in Transit action
ColdFusion in Transit actionColdFusion in Transit action
ColdFusion in Transit action
 
Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016
 
Where is cold fusion headed
Where is cold fusion headedWhere is cold fusion headed
Where is cold fusion headed
 
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
 
Restful services with ColdFusion
Restful services with ColdFusionRestful services with ColdFusion
Restful services with ColdFusion
 
Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMS
 
Build your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webBuild your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and web
 
Why Everyone else writes bad code
Why Everyone else writes bad codeWhy Everyone else writes bad code
Why Everyone else writes bad code
 
Securing applications
Securing applicationsSecuring applications
Securing applications
 
Testing automaton
Testing automatonTesting automaton
Testing automaton
 
Rest ful tools for lazy experts
Rest ful tools for lazy expertsRest ful tools for lazy experts
Rest ful tools for lazy experts
 

Dernier

Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 

Dernier (20)

Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 

Test box bdd

  • 2. WHO AM I? • Luis Majano - Computer Engineer • Hail from El Salvador ------------------> • Architecture + Software Design • CEO of Ortus Solutions • Adobe Community Professional • Creator of all things Box: 
 ColdBox, ContentBox, CommandBox,WireBox….
  • 3. AGENDA • Testing Landscape • WhyTest • TDD Intro • BDD Intro • TestBox BDD
  • 4. Testing Landscape Why Where to start? What to test? What not to test?
  • 5. Cost To Fix Time detected Requirements Design Building Testing Post-Release Time Introduced Requirements 1x 3x 5-10x 10x 10-100x Design --- 1x 10x 15x 25-100x Building -- -- 1x 10x 10-25x ^ Kaner, Cem; James Bach, Bret Pettichord (2001). Lessons Learned in Software Testing: A Context-Driven Approach. Wiley. p. 4. ISBN 0-471-08112-4. BUGS COST MONEY
  • 6. BIGGEST LIE IN SOFTWARE DEV We don’t have time! Don’t worry, we will create the tests and refactor it later!
  • 7. What isT.D.D 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
  • 10. T.D.D. • It is an approach to develop software by writing code that exercises your code • It does help you: • Verifies your source code compiles and executes • Have immediate feedback • Create tests before rather than after (yea right!) • Express some behavior and ideas
  • 11. T.D.D. • Is NOT about verifying software requirements • Does not: • Verify user’s or stakeholder expectations • Express that requirements are satisfied • Very very developer oriented • Tedious • TDD can be a pain in the buttocks! • We start strong, but we finish weak, even if we finish Developer Test Paralysis
  • 12. What is B.D.D.? In software engineering, behavior-driven development (BDD) is a software development process based on 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"
  • 13. B.D.D isT.D.D. Evolved • 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. Make it work! Then make it beautiful!
  • 18. Stories to Scenarios As an application user I want to be welcomed with my name at login in order to personalize my experience Scenario: user login with valid credentials Given a user “luis" with password "secret" exists When I login as “luis" with "secret" Then I should see the message "Welcome back luis!"
  • 20. Story to Scenario to TestBox As an application user I want to be welcomed with my name at login in order to personalize my experience Scenario: user login with valid credentials Given a user “luis" with password "secret" exists When I login as “luis" with "secret" Then I should see the message "Welcome back luis!" describe( “User login with valid credentials”, function(){ it( “should see a personalized message”, function(){ userService.login( “luis”, “secret” ) var event = execute(“user.home”) expect( event.getValue( “welcome” ) ).toBe( “Welcome back luis!” ) }) })
  • 21. 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.
  • 22. • BDD & xUnit style testing • Life-Cycle methods • MockBox Integration • AsynchronousTesting • ANT/Jenkins Integration • Custom Reporters & Runners • Dynamic Labels & Skipping • Debug Output Streams
  • 23. INSTALLATION + REQUIREMENTS • ColdFusion 9.01+, Railo 3.1+ • xUnit + MXUnit Compatibility • ColdFusion 10+, Railo 4+ • xUnit, MXUnit, BDD • Place anywhere you like, create a “/testbox” mapping
 
 
 • Sublime Package, CPU IDE Support
  • 24. MXUNIT COMPATIBLE • Compatible with xUnit style by MXUnit • Migrate existing tests toTestBox • No BDD • How do you migrate?
 
 
 
 • If something is not working, report it: bugs@coldbox.org
  • 25. What you get! API Docs Samples Core Test Browser Test Harness Test Runner
  • 27. 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 • TesBox will then execute all tests within 1 or more bundles
  • 28. RUNNINGYOUR BUNDLES • Execute bundle (if using inheritance) via the URL • http://mysite/test/bundle.cfc?method=runRemote • Using theTestBox 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
  • 29. 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 • Custom:Anything you like
  • 30. TEST BUNDLE CFC • run() • Declare your scenario specs + suites • Life-cycle methods • Inherit some assertion, utility and mocking methods • Expectations Library: expect() • Assertions Library: $assert
  • 31. SUITES: DESCRIBE()YOURTESTS • Suites begin with a describe() block • title • closure • A suite is composed of specs or more suites • Closures can contain • Life-cycle methods • More suites • Specs
  • 32. DESCRIBE() ARGUMENTS Annotation Description Title The title of the suite to register Body The closure that represents the test suite Labels The list or array of labels this suite group belongs to Skip A flag or a closure that tells TestBox to skip this suite group from testing if true. If this is a closure it must return boolean. AsyncAll If you want to parallelize the execution of the defined specs in this suite group.
  • 33. SPECS: IT() • At least 2 args • Title • Closure • Labels • Skip • Closure is where you define • Scenarios • 1+ expectations, assertions • Specs tested in order declared
  • 34. EXPECTATIONS + MATCHERS • Self-concatenated method calls that evaluate your SUT • Start with a call to expect( actual ) • Concatenated with matcher methods • TestBox ships with a plethora of matchers! • Matchers also have negation (not) counterparts
  • 35. NESTED SUITES • Nest to your heart’s delight • Life-cycle methods bubble up • Great for grouping and recursive scenarios • Execute in descending order
  • 36. EXPECTING EXCEPTIONS • Verifies exceptions • Pass a closure to expect() and use toThrow( type, regex ) • Match types and message+detail regex
  • 37. LABELS + SKIPPING • Apply labels to suites and specs • Skip suites and specs • Shortcut methods: xDescribe(), xIt()
  • 38. ASYNCHRONICITY • TestBox executes all specs in parallel • Decided on a per describe() block • Attention to var-scoping • Test shared access and contention • Much power comes much responsibility!
  • 39. What the future holds! • CommandBox Integration • Grunt JSTasks • NodeJS Runners and Watchers • More Sublime Integration • More focus on automation • Gherkins support