SlideShare uma empresa Scribd logo
1 de 32
BDD approaches for
 web development
   Thomas Lundström, Softhouse

        Agile testing days
         Oct 13, 2009
Agenda

• What is BDD?
• BDD for web
  applications
• BDD + Traditional
  QA?

                      http://www.flickr.com/photos/puntodevista/84796578/
BDD


• What is BDD?
* BDD aims to bridge the gap bet ween
                                                 the differing views of computer



            BDD
                                                 systems held by Business users and
                                                 Technologists. It is deeply rooted in the
                                                 success of TDD and is influenced by
                                                 ideas like Domain Driven Design. Its
                                                 focus is on minimizing the hurdles
                                                 bet ween specification, design,
                                                 implementation and confirmation of
                                                 the behaviour of a system.




            Stakeholders




http://www.flickr.com/photos/zunami/3709268689/
* Golden triangle bet ween analyst’s
                                                         requirements, acceptance tests from



                 BDD
                                                         the test department and the “Done”
                                                         criteria for a feature used by the
                                                         developers

                                                         * Team effort
                                                          - Analyst
                                                          - Tester

                       Reqs
                                                         - Developer/Architect




Test                                           Done
  http://www.flickr.com/photos/qthomasbower/3426242870/
* Focus on vocabulary
                                                   - user stories



            BDD
                                                   - acceptance criteria

                                                  Ubiquitous language!




           Vocabulary

http://www.flickr.com/photos/altemark/337248947/
BDD
                                                       * Outside-in
                                                        - onion
                                                        - use the words of the user, not the
                                                       programmer

                                                       * Connection DDD - BDD: use ubiquitous
                                                       language when specifying the user
                                                       words

                                                       * Unit-level tests are still needed




             Outside-in

http://www.flickr.com/photos/redcherryhill/389325062/
Why?




              BDD
                                                  * Programmer-driven
                                                  * Non-user jargon




            No silver bullet

http://www.flickr.com/photos/williamhook/1506578592/
This is what I find the most interesting
                                                 with the whole discussion about BDD.



   Why BDD?                                     - executable specifications
                                                - focus on requirements
                                                 - everything builds upon user stories/
                                                acceptance criteria




http://www.flickr.com/photos/22280677@N07/3342653727/
User stories


As a <role>
I want to <perform something>
So that <benefit>
User stories - example
                                      Context: A guestbook




As a public user
I want to be able to view messages
So that I can see what my friends think
Acceptance criteria          Acceptance criteria
                              defines if the soft ware
                              is done

                              One story - Many
                              acceptance criteria




Given <pre-requisite state>
When <action>
Then <outcome>
Acc. criteria - example                     This is only 2 of the
                                            possible acceptance
                                            criteria for the story




Given that there are 3 messages in the guestbook
When I view the home page
Then I should see 3 messages

Given that there are 3 messages in the guestbook
When I view the home page
Then I should see 3 messages
(If we work with iterations)




   BDD
                    Before we do something, we need to agree
                    upon what we should deliver = before
                    stories are pulled into the iteration, we
                    define the acceptance criteria for the
                    story

                    Based on the acceptance criteria and our
                    estimations, we include X number of
                    stories to deliver in the iteration

                    Important: we can’t commit to deliver
                    something unless we know what to deliver
                    = be thorough in splitting a story in
                    acceptance criteria




How to use BDD in
an iteration?
Tools                            Ruby: Cucumber, RSpec

                                     Java: JBehave

                                     .NET: NBehave




@deurell, http://twitpic.com/iqp9c
Focus on process - not tech!




              Tools


                 Process




http://www.flickr.com/photos/nostri-imago/3137422976/
Tool architecture

      Language

      Runner

     Glue layer

        SUT
Tool architecture

      Language

       Runner

     Web-runner

       HTML
BDD + Web apps                                         All web apps use the same
                                                       tech to communicate

                                                       HTML (+ javascript) is the
                                                       lingua franca for web
                                                       development




  http://www.flickr.com/photos/rubyran2626/296913361/
Cucumber + webrat

        Gherkin

       Cucumber

    Cucumber+Webrat


         HTML
Demo
• Domain: Comment functionality (guest
  book)
 • Adding
 • Viewing
 • (In the future, it’s possible to add
    moderation, tagging etc)
Current functionality
                     Demo: current
                     functionality




• Viewing comments
New iteration             Demo: add comments

                                 * new feature
                                 * new steps
                                 * implement steps
                                 * implement web app




• New feature: adding comments
New iteration


• New feature: paging
New iteration


• New feature: deleting comments
How to include this into



      CI environment
                                         the regular CI env?

                                         Depends on what you
                                         run

                                         Here: easy with maven2

                                         In .NET land, e.g. msbuild
                                         or Ant/Java, let the
                                         build script launching
                                         the acceptance criteria
                                         run

                                         Results from the acc
                                         criteria run should be
                                         output to html so that
                                         we know how far we’ve
                                         gotten




• Run acceptance criteria in the build
Test automation
                             Is there a difference bet ween BDD and the test
                             automation we’ve previously used?

                             - It depends on how the test automation was done
                             - with BDD, we’ve got test automation aligned with
                             (that are) the requirements!

                             Earlier: test automation prone to breakage.
                             Why?
                             - dev changes stuff (button names etc) that test
                             automation uses (fixed by running everything in
                             the build; everyone is in charge of the build, instead
                             of only the test dept)


• BDD vs. Test automation?   - Requirements churn (we can’t guard from that)
                             - Unstable tools (no guard here either)
Test automation -
imperative/declarative




 http://www.benmabey.com/2008/05/19/imperative-vs-declarative-scenarios-in-user-stories/
Test automation -
imperative/declarative


BREAK

 http://www.benmabey.com/2008/05/19/imperative-vs-declarative-scenarios-in-user-stories/
Test in a BDD process
                                     We use testers to
                                     transform high-level
                                     stories to “do this, do
                                     that” specs. It’s their
                                     speciality to find these
                                     thngs!




• “Quality is not enforced by checking
  afterwards, but designed into the
  product” (my interpretation)
  - James Bach, at a discussion during Øredev
  2008
Test in a BDD process

                                                                      Testers can go from performing
                                                                      manual script labour to do more
                                                                      useful stuff

                                                                      - exploratory testing
                                                                      - helping devs & analysts analyse the
                                                                      problem
                                                                      - Performance testing

                                                                      The competence of the testers i.e.
                                                                      translation of abstract Reqs ->
                                                                      hands-on runnables is used when
                                                                      defining acceptance criteria




   http://en.wikipedia.org/wiki/File:Systems_Engineering_Process_II.gif
Thanks!

• Thomas Lundström, Softhouse
• thomas.lundstrom@softhouse.se
• Twitter: @thomaslundstrom
• http://blog.thomaslundstrom.com

Mais conteúdo relacionado

Destaque

The Hitchhiker’s Guide To Dsl
The Hitchhiker’s Guide To DslThe Hitchhiker’s Guide To Dsl
The Hitchhiker’s Guide To DslKoji SHIMADA
 
Approaches to Kanban using Team Foundation Server - Dec 20
Approaches to Kanban using Team Foundation Server - Dec 20Approaches to Kanban using Team Foundation Server - Dec 20
Approaches to Kanban using Team Foundation Server - Dec 20Imaginet
 
Using Lean and Kanban to Revolutionize Your Organization
Using Lean and Kanban to Revolutionize Your OrganizationUsing Lean and Kanban to Revolutionize Your Organization
Using Lean and Kanban to Revolutionize Your OrganizationImaginet
 
Lean, Kanban, and TFS
Lean, Kanban, and TFSLean, Kanban, and TFS
Lean, Kanban, and TFSImaginet
 
Taller capacitación en tic 1era parte
Taller capacitación en tic  1era parteTaller capacitación en tic  1era parte
Taller capacitación en tic 1era parteEkaterina Cordero
 
отчёт о предметной неделе по истории и обществознанию
отчёт о предметной неделе по истории и обществознаниюотчёт о предметной неделе по истории и обществознанию
отчёт о предметной неделе по истории и обществознаниюyulyanym
 
Continuous Delivery with VS2015 and TFS2015
Continuous Delivery with VS2015 and TFS2015Continuous Delivery with VS2015 and TFS2015
Continuous Delivery with VS2015 and TFS2015Tung Nguyen Thanh
 
Getting Started With the TFS Object Model
Getting Started With the TFS Object ModelGetting Started With the TFS Object Model
Getting Started With the TFS Object ModelJeff Bramwell
 

Destaque (9)

Dsl
DslDsl
Dsl
 
The Hitchhiker’s Guide To Dsl
The Hitchhiker’s Guide To DslThe Hitchhiker’s Guide To Dsl
The Hitchhiker’s Guide To Dsl
 
Approaches to Kanban using Team Foundation Server - Dec 20
Approaches to Kanban using Team Foundation Server - Dec 20Approaches to Kanban using Team Foundation Server - Dec 20
Approaches to Kanban using Team Foundation Server - Dec 20
 
Using Lean and Kanban to Revolutionize Your Organization
Using Lean and Kanban to Revolutionize Your OrganizationUsing Lean and Kanban to Revolutionize Your Organization
Using Lean and Kanban to Revolutionize Your Organization
 
Lean, Kanban, and TFS
Lean, Kanban, and TFSLean, Kanban, and TFS
Lean, Kanban, and TFS
 
Taller capacitación en tic 1era parte
Taller capacitación en tic  1era parteTaller capacitación en tic  1era parte
Taller capacitación en tic 1era parte
 
отчёт о предметной неделе по истории и обществознанию
отчёт о предметной неделе по истории и обществознаниюотчёт о предметной неделе по истории и обществознанию
отчёт о предметной неделе по истории и обществознанию
 
Continuous Delivery with VS2015 and TFS2015
Continuous Delivery with VS2015 and TFS2015Continuous Delivery with VS2015 and TFS2015
Continuous Delivery with VS2015 and TFS2015
 
Getting Started With the TFS Object Model
Getting Started With the TFS Object ModelGetting Started With the TFS Object Model
Getting Started With the TFS Object Model
 

Semelhante a BDD Approaches for Web Development

Bdd For Web Applications from Scandinavian Developer Conference 2010
Bdd For Web Applications from Scandinavian Developer Conference 2010Bdd For Web Applications from Scandinavian Developer Conference 2010
Bdd For Web Applications from Scandinavian Developer Conference 2010Thomas Lundström
 
German Testing Day 2015 - How behavior-driven development fuses developers an...
German Testing Day 2015 - How behavior-driven development fuses developers an...German Testing Day 2015 - How behavior-driven development fuses developers an...
German Testing Day 2015 - How behavior-driven development fuses developers an...Bastian Seehaus
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven DevelopmentAdam Englander
 
Behavior Driven Development - WPC 2011
Behavior Driven Development - WPC 2011Behavior Driven Development - WPC 2011
Behavior Driven Development - WPC 2011Fabio Armani
 
Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Mindfire Solutions
 
BDD presentation
BDD presentationBDD presentation
BDD presentationtemebele
 
Myths and Challenges of Behaviour Driven Development
Myths and Challenges of Behaviour Driven DevelopmentMyths and Challenges of Behaviour Driven Development
Myths and Challenges of Behaviour Driven DevelopmentPankaj Nakhat
 
Morden F2E Education - Think of Progressive Web Apps
Morden F2E Education - Think of Progressive Web AppsMorden F2E Education - Think of Progressive Web Apps
Morden F2E Education - Think of Progressive Web AppsCaesar Chi
 
TorontoRb Intro to BDD
TorontoRb   Intro to BDDTorontoRb   Intro to BDD
TorontoRb Intro to BDDnunick
 
Approaching ATDD/BDD
Approaching ATDD/BDDApproaching ATDD/BDD
Approaching ATDD/BDDDhaval Dalal
 
Acceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkAcceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkSteve Zhang
 
Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd Sakares Saengkaew
 
Lessons learned in rolling out BDDs in a large project
Lessons learned in rolling out BDDs in a large projectLessons learned in rolling out BDDs in a large project
Lessons learned in rolling out BDDs in a large projectCampus Interaction
 
Digdag Updates 2020 July
Digdag Updates 2020 JulyDigdag Updates 2020 July
Digdag Updates 2020 JulyYou Yamagata
 
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...BA and Beyond
 
Topic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionTopic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionHoa Le
 
Domain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioDomain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioSrini Penchikala
 
Securing Your MongoDB Implementation
Securing Your MongoDB ImplementationSecuring Your MongoDB Implementation
Securing Your MongoDB ImplementationMongoDB
 

Semelhante a BDD Approaches for Web Development (20)

Bdd For Web Applications from Scandinavian Developer Conference 2010
Bdd For Web Applications from Scandinavian Developer Conference 2010Bdd For Web Applications from Scandinavian Developer Conference 2010
Bdd For Web Applications from Scandinavian Developer Conference 2010
 
German Testing Day 2015 - How behavior-driven development fuses developers an...
German Testing Day 2015 - How behavior-driven development fuses developers an...German Testing Day 2015 - How behavior-driven development fuses developers an...
German Testing Day 2015 - How behavior-driven development fuses developers an...
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
Behavior Driven Development - WPC 2011
Behavior Driven Development - WPC 2011Behavior Driven Development - WPC 2011
Behavior Driven Development - WPC 2011
 
Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)
 
Bdd
BddBdd
Bdd
 
BDD presentation
BDD presentationBDD presentation
BDD presentation
 
Myths and Challenges of Behaviour Driven Development
Myths and Challenges of Behaviour Driven DevelopmentMyths and Challenges of Behaviour Driven Development
Myths and Challenges of Behaviour Driven Development
 
Morden F2E Education - Think of Progressive Web Apps
Morden F2E Education - Think of Progressive Web AppsMorden F2E Education - Think of Progressive Web Apps
Morden F2E Education - Think of Progressive Web Apps
 
Phpers day 2019
Phpers day 2019Phpers day 2019
Phpers day 2019
 
TorontoRb Intro to BDD
TorontoRb   Intro to BDDTorontoRb   Intro to BDD
TorontoRb Intro to BDD
 
Approaching ATDD/BDD
Approaching ATDD/BDDApproaching ATDD/BDD
Approaching ATDD/BDD
 
Acceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkAcceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot Framework
 
Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd Practiced agile developer with tdd & bdd
Practiced agile developer with tdd & bdd
 
Lessons learned in rolling out BDDs in a large project
Lessons learned in rolling out BDDs in a large projectLessons learned in rolling out BDDs in a large project
Lessons learned in rolling out BDDs in a large project
 
Digdag Updates 2020 July
Digdag Updates 2020 JulyDigdag Updates 2020 July
Digdag Updates 2020 July
 
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...
 
Topic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionTopic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolution
 
Domain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioDomain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring Portfolio
 
Securing Your MongoDB Implementation
Securing Your MongoDB ImplementationSecuring Your MongoDB Implementation
Securing Your MongoDB Implementation
 

Último

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Último (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

BDD Approaches for Web Development

  • 1. BDD approaches for web development Thomas Lundström, Softhouse Agile testing days Oct 13, 2009
  • 2. Agenda • What is BDD? • BDD for web applications • BDD + Traditional QA? http://www.flickr.com/photos/puntodevista/84796578/
  • 4. * BDD aims to bridge the gap bet ween the differing views of computer BDD systems held by Business users and Technologists. It is deeply rooted in the success of TDD and is influenced by ideas like Domain Driven Design. Its focus is on minimizing the hurdles bet ween specification, design, implementation and confirmation of the behaviour of a system. Stakeholders http://www.flickr.com/photos/zunami/3709268689/
  • 5. * Golden triangle bet ween analyst’s requirements, acceptance tests from BDD the test department and the “Done” criteria for a feature used by the developers * Team effort - Analyst - Tester Reqs - Developer/Architect Test Done http://www.flickr.com/photos/qthomasbower/3426242870/
  • 6. * Focus on vocabulary - user stories BDD - acceptance criteria Ubiquitous language! Vocabulary http://www.flickr.com/photos/altemark/337248947/
  • 7. BDD * Outside-in - onion - use the words of the user, not the programmer * Connection DDD - BDD: use ubiquitous language when specifying the user words * Unit-level tests are still needed Outside-in http://www.flickr.com/photos/redcherryhill/389325062/
  • 8. Why? BDD * Programmer-driven * Non-user jargon No silver bullet http://www.flickr.com/photos/williamhook/1506578592/
  • 9. This is what I find the most interesting with the whole discussion about BDD. Why BDD? - executable specifications - focus on requirements - everything builds upon user stories/ acceptance criteria http://www.flickr.com/photos/22280677@N07/3342653727/
  • 10. User stories As a <role> I want to <perform something> So that <benefit>
  • 11. User stories - example Context: A guestbook As a public user I want to be able to view messages So that I can see what my friends think
  • 12. Acceptance criteria Acceptance criteria defines if the soft ware is done One story - Many acceptance criteria Given <pre-requisite state> When <action> Then <outcome>
  • 13. Acc. criteria - example This is only 2 of the possible acceptance criteria for the story Given that there are 3 messages in the guestbook When I view the home page Then I should see 3 messages Given that there are 3 messages in the guestbook When I view the home page Then I should see 3 messages
  • 14. (If we work with iterations) BDD Before we do something, we need to agree upon what we should deliver = before stories are pulled into the iteration, we define the acceptance criteria for the story Based on the acceptance criteria and our estimations, we include X number of stories to deliver in the iteration Important: we can’t commit to deliver something unless we know what to deliver = be thorough in splitting a story in acceptance criteria How to use BDD in an iteration?
  • 15. Tools Ruby: Cucumber, RSpec Java: JBehave .NET: NBehave @deurell, http://twitpic.com/iqp9c
  • 16. Focus on process - not tech! Tools Process http://www.flickr.com/photos/nostri-imago/3137422976/
  • 17. Tool architecture Language Runner Glue layer SUT
  • 18. Tool architecture Language Runner Web-runner HTML
  • 19. BDD + Web apps All web apps use the same tech to communicate HTML (+ javascript) is the lingua franca for web development http://www.flickr.com/photos/rubyran2626/296913361/
  • 20. Cucumber + webrat Gherkin Cucumber Cucumber+Webrat HTML
  • 21. Demo • Domain: Comment functionality (guest book) • Adding • Viewing • (In the future, it’s possible to add moderation, tagging etc)
  • 22. Current functionality Demo: current functionality • Viewing comments
  • 23. New iteration Demo: add comments * new feature * new steps * implement steps * implement web app • New feature: adding comments
  • 24. New iteration • New feature: paging
  • 25. New iteration • New feature: deleting comments
  • 26. How to include this into CI environment the regular CI env? Depends on what you run Here: easy with maven2 In .NET land, e.g. msbuild or Ant/Java, let the build script launching the acceptance criteria run Results from the acc criteria run should be output to html so that we know how far we’ve gotten • Run acceptance criteria in the build
  • 27. Test automation Is there a difference bet ween BDD and the test automation we’ve previously used? - It depends on how the test automation was done - with BDD, we’ve got test automation aligned with (that are) the requirements! Earlier: test automation prone to breakage. Why? - dev changes stuff (button names etc) that test automation uses (fixed by running everything in the build; everyone is in charge of the build, instead of only the test dept) • BDD vs. Test automation? - Requirements churn (we can’t guard from that) - Unstable tools (no guard here either)
  • 28. Test automation - imperative/declarative http://www.benmabey.com/2008/05/19/imperative-vs-declarative-scenarios-in-user-stories/
  • 29. Test automation - imperative/declarative BREAK http://www.benmabey.com/2008/05/19/imperative-vs-declarative-scenarios-in-user-stories/
  • 30. Test in a BDD process We use testers to transform high-level stories to “do this, do that” specs. It’s their speciality to find these thngs! • “Quality is not enforced by checking afterwards, but designed into the product” (my interpretation) - James Bach, at a discussion during Øredev 2008
  • 31. Test in a BDD process Testers can go from performing manual script labour to do more useful stuff - exploratory testing - helping devs & analysts analyse the problem - Performance testing The competence of the testers i.e. translation of abstract Reqs -> hands-on runnables is used when defining acceptance criteria http://en.wikipedia.org/wiki/File:Systems_Engineering_Process_II.gif
  • 32. Thanks! • Thomas Lundström, Softhouse • thomas.lundstrom@softhouse.se • Twitter: @thomaslundstrom • http://blog.thomaslundstrom.com