SlideShare a Scribd company logo
1 of 28
Download to read offline
BDD for
Web Applications
  Thomas Lundström, Softhouse
      @thomaslundstrom

 TelecomCity DevCon, Karlskrona
       September 23, 2010
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/
User stories - example
                                      BDD builds upon the
                                      conversation taking place
                                      in user stories and
                                      acceptance criteria.


                                      Context: comments for e.g.
                                      articles on a news site




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

                                           One story - Many
                                           acceptance criteria

                                           This is only 2 of the
Given that there are 3 messages in the comment page
                                           possible acceptance
                                           criteria for the story
When I view the comment page
Then I should see 3 messages

Given that the comment page is empty
When I view the comment page
Then I should see 0 messages
(If we work with iterations - the same
                    thing applies if we work pull-based)



   BDD              Before we do something, we need to agree
                    upon what we should deliver = before
                    stories are accepted 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?
* 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/
This is a tool in your toolbox. Use as
                                                  needed.



              BDD




            No silver bullet

http://www.flickr.com/photos/williamhook/1506578592/
As said previously: The Holy Grail :)




   Why BDD?
                                                 This is what I find the most interesting
                                                 with the whole discussion about BDD.


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




http://www.flickr.com/photos/22280677@N07/3342653727/
Tools                            Ruby: Cucumber, RSpec

                                     Java: JBehave,
                                     cuke4duke

                                     .NET: NBehave,
                                     cuke4nuke




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




              Tools


                 Process




http://www.flickr.com/photos/nostri-imago/3137422976/
Tool architecture
                  Yellow = the part of the
                  BDD stack that you write



      Language

      Runner

     Glue layer

        SUT
BDD + Web apps                                         Perfect marriage!

                                                       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/
cuke4duke + selenium
                           WebDriver = one of e.g.
                           HtmlUnit, Firefox,
                           Chrome, IE etc.
          Gherkin          Hooks = cuke4duke
                           methods + the page
                           object pattern



         cuke4duke

           Hooks

    Selenium + WebDriver

         HTML + js
Demo

• Domain: Comment functionality
 • 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
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                 Shift in viewpoint:
                                      previously, we

                                      We use testers to transform
                                      high-level stories to “do this,
                                      do that” specs, which
                                      preferably are automated.
                                      It’s their speciality to find
                                      these thngs!




• “You can not inspect quality into the
  product; it’s already there”
  - W. Edwards Deming
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

More Related Content

Similar to Bdd for Web Applications at TelecomCity DevCon 2010

Behavior Driven Development - WPC 2011
Behavior Driven Development - WPC 2011Behavior Driven Development - WPC 2011
Behavior Driven Development - WPC 2011Fabio Armani
 
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
 
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
 
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
 
BDD presentation
BDD presentationBDD presentation
BDD presentationtemebele
 
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
 
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
 
A study of the characteristics of Behaviour Driven Development
A study of the characteristics of Behaviour Driven DevelopmentA study of the characteristics of Behaviour Driven Development
A study of the characteristics of Behaviour Driven DevelopmentCarlos Solís
 
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
 
Topic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionTopic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionHoa Le
 
Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++Sumant Tambe
 
Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven DevelopmentBen Goldin
 
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
 
Deploy, move and manage Postgres across cloud platforms
Deploy, move and manage Postgres across cloud platformsDeploy, move and manage Postgres across cloud platforms
Deploy, move and manage Postgres across cloud platformsAshnikbiz
 
Securing Your MongoDB Implementation
Securing Your MongoDB ImplementationSecuring Your MongoDB Implementation
Securing Your MongoDB ImplementationMongoDB
 
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 DevelopmentQASymphony
 

Similar to Bdd for Web Applications at TelecomCity DevCon 2010 (20)

Behavior Driven Development - WPC 2011
Behavior Driven Development - WPC 2011Behavior Driven Development - WPC 2011
Behavior Driven Development - WPC 2011
 
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
 
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
 
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
 
BDD presentation
BDD presentationBDD presentation
BDD presentation
 
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)
 
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
 
A study of the characteristics of Behaviour Driven Development
A study of the characteristics of Behaviour Driven DevelopmentA study of the characteristics of Behaviour Driven Development
A study of the characteristics of Behaviour Driven Development
 
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
 
Topic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolutionTopic tdd-and-bdd b4usolution
Topic tdd-and-bdd b4usolution
 
Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++
 
Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven Development
 
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)
 
Deploy, move and manage Postgres across cloud platforms
Deploy, move and manage Postgres across cloud platformsDeploy, move and manage Postgres across cloud platforms
Deploy, move and manage Postgres across cloud platforms
 
Securing Your MongoDB Implementation
Securing Your MongoDB ImplementationSecuring Your MongoDB Implementation
Securing Your MongoDB Implementation
 
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
 
BDD along with Continuous Integration
BDD along with Continuous IntegrationBDD along with Continuous Integration
BDD along with Continuous Integration
 

Recently uploaded

Culture Clash_Bioethical Concerns_Slideshare Version.pptx
Culture Clash_Bioethical Concerns_Slideshare Version.pptxCulture Clash_Bioethical Concerns_Slideshare Version.pptx
Culture Clash_Bioethical Concerns_Slideshare Version.pptxStephen Palm
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiAmil Baba Mangal Maseeh
 
Amil baba kala jadu expert asli ilm ka malik
Amil baba kala jadu expert asli ilm ka malikAmil baba kala jadu expert asli ilm ka malik
Amil baba kala jadu expert asli ilm ka malikamil baba kala jadu
 
Monthly Khazina-e-Ruhaniyaat April’2024 (Vol.14, Issue 12)
Monthly Khazina-e-Ruhaniyaat April’2024 (Vol.14, Issue 12)Monthly Khazina-e-Ruhaniyaat April’2024 (Vol.14, Issue 12)
Monthly Khazina-e-Ruhaniyaat April’2024 (Vol.14, Issue 12)Darul Amal Chishtia
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiAmil Baba Mangal Maseeh
 
Unity is Strength 2024 Peace Haggadah + Song List.pdf
Unity is Strength 2024 Peace Haggadah + Song List.pdfUnity is Strength 2024 Peace Haggadah + Song List.pdf
Unity is Strength 2024 Peace Haggadah + Song List.pdfRebeccaSealfon
 
Topmost Black magic specialist in Saudi Arabia Or Bangali Amil baba in UK Or...
Topmost Black magic specialist in Saudi Arabia  Or Bangali Amil baba in UK Or...Topmost Black magic specialist in Saudi Arabia  Or Bangali Amil baba in UK Or...
Topmost Black magic specialist in Saudi Arabia Or Bangali Amil baba in UK Or...baharayali
 
原版1:1复刻莫纳什大学毕业证Monash毕业证留信学历认证
原版1:1复刻莫纳什大学毕业证Monash毕业证留信学历认证原版1:1复刻莫纳什大学毕业证Monash毕业证留信学历认证
原版1:1复刻莫纳什大学毕业证Monash毕业证留信学历认证jdkhjh
 
A Costly Interruption: The Sermon On the Mount, pt. 2 - Blessed
A Costly Interruption: The Sermon On the Mount, pt. 2 - BlessedA Costly Interruption: The Sermon On the Mount, pt. 2 - Blessed
A Costly Interruption: The Sermon On the Mount, pt. 2 - BlessedVintage Church
 
Sawwaf Calendar, 2024
Sawwaf Calendar, 2024Sawwaf Calendar, 2024
Sawwaf Calendar, 2024Bassem Matta
 
Dubai Call Girls Skinny Mandy O525547819 Call Girls Dubai
Dubai Call Girls Skinny Mandy O525547819 Call Girls DubaiDubai Call Girls Skinny Mandy O525547819 Call Girls Dubai
Dubai Call Girls Skinny Mandy O525547819 Call Girls Dubaikojalkojal131
 
No 1 astrologer amil baba in Canada Usa astrologer in Canada
No 1 astrologer amil baba in Canada Usa astrologer in CanadaNo 1 astrologer amil baba in Canada Usa astrologer in Canada
No 1 astrologer amil baba in Canada Usa astrologer in CanadaAmil Baba Mangal Maseeh
 
Seerah un nabi Muhammad Quiz Part-1.pdf
Seerah un nabi  Muhammad Quiz Part-1.pdfSeerah un nabi  Muhammad Quiz Part-1.pdf
Seerah un nabi Muhammad Quiz Part-1.pdfAnsariB1
 
Asli amil baba in Karachi Pakistan and best astrologer Black magic specialist
Asli amil baba in Karachi Pakistan and best astrologer Black magic specialistAsli amil baba in Karachi Pakistan and best astrologer Black magic specialist
Asli amil baba in Karachi Pakistan and best astrologer Black magic specialistAmil Baba Mangal Maseeh
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiAmil Baba Naveed Bangali
 
Asli amil baba in Karachi asli amil baba in Lahore
Asli amil baba in Karachi asli amil baba in LahoreAsli amil baba in Karachi asli amil baba in Lahore
Asli amil baba in Karachi asli amil baba in Lahoreamil baba kala jadu
 
The Chronological Life of Christ part 097 (Reality Check Luke 13 1-9).pptx
The Chronological Life of Christ part 097 (Reality Check Luke 13 1-9).pptxThe Chronological Life of Christ part 097 (Reality Check Luke 13 1-9).pptx
The Chronological Life of Christ part 097 (Reality Check Luke 13 1-9).pptxNetwork Bible Fellowship
 

Recently uploaded (20)

Culture Clash_Bioethical Concerns_Slideshare Version.pptx
Culture Clash_Bioethical Concerns_Slideshare Version.pptxCulture Clash_Bioethical Concerns_Slideshare Version.pptx
Culture Clash_Bioethical Concerns_Slideshare Version.pptx
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
 
Amil baba kala jadu expert asli ilm ka malik
Amil baba kala jadu expert asli ilm ka malikAmil baba kala jadu expert asli ilm ka malik
Amil baba kala jadu expert asli ilm ka malik
 
Monthly Khazina-e-Ruhaniyaat April’2024 (Vol.14, Issue 12)
Monthly Khazina-e-Ruhaniyaat April’2024 (Vol.14, Issue 12)Monthly Khazina-e-Ruhaniyaat April’2024 (Vol.14, Issue 12)
Monthly Khazina-e-Ruhaniyaat April’2024 (Vol.14, Issue 12)
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
 
Unity is Strength 2024 Peace Haggadah + Song List.pdf
Unity is Strength 2024 Peace Haggadah + Song List.pdfUnity is Strength 2024 Peace Haggadah + Song List.pdf
Unity is Strength 2024 Peace Haggadah + Song List.pdf
 
Topmost Black magic specialist in Saudi Arabia Or Bangali Amil baba in UK Or...
Topmost Black magic specialist in Saudi Arabia  Or Bangali Amil baba in UK Or...Topmost Black magic specialist in Saudi Arabia  Or Bangali Amil baba in UK Or...
Topmost Black magic specialist in Saudi Arabia Or Bangali Amil baba in UK Or...
 
原版1:1复刻莫纳什大学毕业证Monash毕业证留信学历认证
原版1:1复刻莫纳什大学毕业证Monash毕业证留信学历认证原版1:1复刻莫纳什大学毕业证Monash毕业证留信学历认证
原版1:1复刻莫纳什大学毕业证Monash毕业证留信学历认证
 
A Costly Interruption: The Sermon On the Mount, pt. 2 - Blessed
A Costly Interruption: The Sermon On the Mount, pt. 2 - BlessedA Costly Interruption: The Sermon On the Mount, pt. 2 - Blessed
A Costly Interruption: The Sermon On the Mount, pt. 2 - Blessed
 
🔝9953056974 🔝young Delhi Escort service Vinay Nagar
🔝9953056974 🔝young Delhi Escort service Vinay Nagar🔝9953056974 🔝young Delhi Escort service Vinay Nagar
🔝9953056974 🔝young Delhi Escort service Vinay Nagar
 
Sawwaf Calendar, 2024
Sawwaf Calendar, 2024Sawwaf Calendar, 2024
Sawwaf Calendar, 2024
 
Dubai Call Girls Skinny Mandy O525547819 Call Girls Dubai
Dubai Call Girls Skinny Mandy O525547819 Call Girls DubaiDubai Call Girls Skinny Mandy O525547819 Call Girls Dubai
Dubai Call Girls Skinny Mandy O525547819 Call Girls Dubai
 
young Whatsapp Call Girls in Adarsh Nagar🔝 9953056974 🔝 escort service
young Whatsapp Call Girls in Adarsh Nagar🔝 9953056974 🔝 escort serviceyoung Whatsapp Call Girls in Adarsh Nagar🔝 9953056974 🔝 escort service
young Whatsapp Call Girls in Adarsh Nagar🔝 9953056974 🔝 escort service
 
No 1 astrologer amil baba in Canada Usa astrologer in Canada
No 1 astrologer amil baba in Canada Usa astrologer in CanadaNo 1 astrologer amil baba in Canada Usa astrologer in Canada
No 1 astrologer amil baba in Canada Usa astrologer in Canada
 
Top 8 Krishna Bhajan Lyrics in English.pdf
Top 8 Krishna Bhajan Lyrics in English.pdfTop 8 Krishna Bhajan Lyrics in English.pdf
Top 8 Krishna Bhajan Lyrics in English.pdf
 
Seerah un nabi Muhammad Quiz Part-1.pdf
Seerah un nabi  Muhammad Quiz Part-1.pdfSeerah un nabi  Muhammad Quiz Part-1.pdf
Seerah un nabi Muhammad Quiz Part-1.pdf
 
Asli amil baba in Karachi Pakistan and best astrologer Black magic specialist
Asli amil baba in Karachi Pakistan and best astrologer Black magic specialistAsli amil baba in Karachi Pakistan and best astrologer Black magic specialist
Asli amil baba in Karachi Pakistan and best astrologer Black magic specialist
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
 
Asli amil baba in Karachi asli amil baba in Lahore
Asli amil baba in Karachi asli amil baba in LahoreAsli amil baba in Karachi asli amil baba in Lahore
Asli amil baba in Karachi asli amil baba in Lahore
 
The Chronological Life of Christ part 097 (Reality Check Luke 13 1-9).pptx
The Chronological Life of Christ part 097 (Reality Check Luke 13 1-9).pptxThe Chronological Life of Christ part 097 (Reality Check Luke 13 1-9).pptx
The Chronological Life of Christ part 097 (Reality Check Luke 13 1-9).pptx
 

Bdd for Web Applications at TelecomCity DevCon 2010

  • 1. BDD for Web Applications Thomas Lundström, Softhouse @thomaslundstrom TelecomCity DevCon, Karlskrona September 23, 2010
  • 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. User stories - example BDD builds upon the conversation taking place in user stories and acceptance criteria. Context: comments for e.g. articles on a news site As a public user I want to be able to view messages So that I can see what my friends think
  • 7. Acc. criteria - example Acceptance criteria defines if the soft ware is done One story - Many acceptance criteria This is only 2 of the Given that there are 3 messages in the comment page possible acceptance criteria for the story When I view the comment page Then I should see 3 messages Given that the comment page is empty When I view the comment page Then I should see 0 messages
  • 8. (If we work with iterations - the same thing applies if we work pull-based) BDD Before we do something, we need to agree upon what we should deliver = before stories are accepted 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?
  • 9. * Focus on vocabulary - user stories BDD - acceptance criteria Ubiquitous language! Vocabulary http://www.flickr.com/photos/altemark/337248947/
  • 10. 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/
  • 11. This is a tool in your toolbox. Use as needed. BDD No silver bullet http://www.flickr.com/photos/williamhook/1506578592/
  • 12. As said previously: The Holy Grail :) Why BDD? This is what I find the most interesting with the whole discussion about BDD. - executable specifications - focus on requirements - everything builds upon user stories/ acceptance criteria http://www.flickr.com/photos/22280677@N07/3342653727/
  • 13. Tools Ruby: Cucumber, RSpec Java: JBehave, cuke4duke .NET: NBehave, cuke4nuke @deurell, http://twitpic.com/iqp9c
  • 14. Focus on process - not tech! Tools Process http://www.flickr.com/photos/nostri-imago/3137422976/
  • 15. Tool architecture Yellow = the part of the BDD stack that you write Language Runner Glue layer SUT
  • 16. BDD + Web apps Perfect marriage! 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/
  • 17. cuke4duke + selenium WebDriver = one of e.g. HtmlUnit, Firefox, Chrome, IE etc. Gherkin Hooks = cuke4duke methods + the page object pattern cuke4duke Hooks Selenium + WebDriver HTML + js
  • 18. Demo • Domain: Comment functionality • Adding • Viewing • (In the future, it’s possible to add moderation, tagging etc)
  • 19. Current functionality Demo: current functionality • Viewing comments
  • 20. New iteration Demo: add comments * new feature * new steps * implement steps * implement web app • New feature: adding comments
  • 21. New iteration • New feature: paging
  • 22. 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
  • 23. 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)
  • 24. Test automation - imperative/declarative http://www.benmabey.com/2008/05/19/imperative-vs-declarative-scenarios-in-user-stories/
  • 25. Test automation - imperative/declarative BREAK http://www.benmabey.com/2008/05/19/imperative-vs-declarative-scenarios-in-user-stories/
  • 26. Test in a BDD process Shift in viewpoint: previously, we We use testers to transform high-level stories to “do this, do that” specs, which preferably are automated. It’s their speciality to find these thngs! • “You can not inspect quality into the product; it’s already there” - W. Edwards Deming
  • 27. 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
  • 28. Thanks! • Thomas Lundström, Softhouse • thomas.lundstrom@softhouse.se • Twitter: @thomaslundstrom • http://blog.thomaslundstrom.com