SlideShare une entreprise Scribd logo
1  sur  53
Télécharger pour lire hors ligne
More than automation
                          How good acceptance tests
                          can make your team happier



                                  @mattwynne
                         Freelance Programmer & Coach


Wednesday, 18 April 12
Refuctoring your
                         Cucumber tests
                            Protecting your job with
                          Mortgage Driven Development



                                   @mattwynne
                          Freelance Programmer & Coach


Wednesday, 18 April 12
What is MDD?



Wednesday, 18 April 12
MDD Core Principles
                          Maintainable code offers no
                                job security


                           Programming should be a
                             solitary activity

Wednesday, 18 April 12
Wednesday, 18 April 12
MD D
                                                  F AI L

                          http://www.flickr.com/photos/downtree/1666035170/
Wednesday, 18 April 12
N ✔
                                               W I
                         D D
                    M
                          http://www.flickr.com/photos/chokingsun/3535556349/
Wednesday, 18 April 12
Maintainable code offers no
                               job security

                                  therefore


        As a mortgage-driven developer,
         I try to make my code seem as
       weird and mysterious as possible
Wednesday, 18 April 12
Programming should be a
                           solitary activity
                                   therefore

       As a mortgage-driven developer,
    I make the experience of collaborating
          with me as awkward and
            unpleasant as I can*
                           * without actually getting fired
Wednesday, 18 April 12
Cucumber
           is a
         threat
Wednesday, 18 April 12
Cucumber
       Could lead to
       YOUR house
          being
       repossessed
Wednesday, 18 April 12
Cucumber is a threat
                    • Promotes collaboration between
                         stakeholders and developers
                    • Transparency of how the system
                         actually behaves
                    • Aims to develop a shared
                         understanding or ubiquitous
                         language within the team


Wednesday, 18 April 12
MDD Core Practice


        uc to ri ng
    R ef

Wednesday, 18 April 12
What is Refuctoring?
                "Refuctoring is the process of taking a
                well-designed piece of code and, through
                a series of small, reversible changes,
                making it completely unmaintainable by
                anybody except yourself."
                              http://www.waterfall2006.com/gorman.html




Wednesday, 18 April 12
Feature: Sign Up

                 Sign up works in three stages:

                 1. Apply for an account via a form on the website. Applicant gets an email.
                 2. Follow the confirmation in the email to activate the account.
                 3. Fill out profile information. By this stage the user has an account but
                    we try to collect more information about them.

                 Scenario: Apply for an account
                   Given I do not have an account
                   When I follow the sign up link from the homepage
                   And I fill out the form with valid details and submit it
                   Then I should see a confirmation message telling me to check my email

                 Scenario: Confirm account
                   Given I have applied for an account
                   And I have confirmed my application
                   When I log in
                   Then I should not see a message telling me to confirm my account
                   But I should see a welcome message
                   And I should see a form asking me to fill out my account profile

                 Scenario: Fill out account profile
                   Given I have logged in to a brand new account
                   When I fill out my profile details
                   And I log out and log in again
                   Then I should not see the form asking me to fill out my account profile


Wednesday, 18 April 12
Step 1:
                         Remove Spurious
                          Documentation


Wednesday, 18 April 12
Feature: Sign Up

                 Sign up works in three stages:

                 1. Apply for an account via a form on the website. Applicant gets an email.
                 2. Follow the confirmation in the email to activate the account.
                 3. Fill out profile information. By this stage the user has an account but
                    we try to collect more information about them.

                 Scenario: Apply for an account
                   Given I do not have an account
                   When I follow the sign up link from the homepage
                   And I fill out the form with valid details and submit it
                   Then I should see a confirmation message telling me to check my email

                 Scenario: Confirm account
                   Given I have applied for an account
                   And I have confirmed my application
                   When I log in
                   Then I should not see a message telling me to confirm my account
                   But I should see a welcome message
                   And I should see a form asking me to fill out my account profile

                 Scenario: Fill out account profile
                   Given I have logged in to a brand new account
                   When I fill out my profile details
                   And I log out and log in again
                   Then I should not see the form asking me to fill out my account profile


Wednesday, 18 April 12
Feature: Sign Up

                 Scenario: Apply for an account
                   Given I do not have an account
                   When I follow the sign up link from the homepage
                   And I fill out the form with valid details and submit it
                   Then I should see a confirmation message telling me to check my email

                 Scenario: Confirm account
                   Given I have applied for an account
                   And I have confirmed my application
                   When I log in
                   Then I should not see a message telling me to confirm my account
                   But I should see a welcome message
                   And I should see a form asking me to fill out my account profile

                 Scenario: Fill out account profile
                   Given I have logged in to a brand new account
                   When I fill out my profile details
                   And I log out and log in again
                   Then I should not see the form asking me to fill out my account profile




Wednesday, 18 April 12
Step 2:
                         Conflate Scenarios


Wednesday, 18 April 12
Feature: Sign Up

                 Scenario: Apply for an account
                   Given I do not have an account
                   When I follow the sign up link from the homepage
                   And I fill out the form with valid details and submit it
                   Then I should see a confirmation message telling me to check my email

                 Scenario: Confirm account
                   Given I have applied for an account
                   And I have confirmed my application
                   When I log in
                   Then I should not see a message telling me to confirm my account
                   But I should see a welcome message
                   And I should see a form asking me to fill out my account profile

                 Scenario: Fill out account profile
                   Given I have logged in to a brand new account
                   When I fill out my profile details
                   And I log out and log in again
                   Then I should not see the form asking me to fill out my account profile




Wednesday, 18 April 12
Feature: Sign Up
               Scenario: Apply for an account
                 Given I do not have an account
                 When I follow the sign up link from the homepage
                 And I fill out the form with valid details and submit it
                 Then I should see a confirmation message telling me to check my email
                 When I have confirmed my application
                 And I log in
                 Then I should not see a message telling me to confirm my account
                 But I should see a welcome message
                 And I should see a form asking me to fill out my account profile
                 When I fill out my profile details
                 And I log out and log in again
                 Then I should not see the form asking me to fill out my account profile




Wednesday, 18 April 12
Step 3:
                   Insert Incidental Detail


Wednesday, 18 April 12
Feature: Sign Up
               Scenario: Apply for an account
                 Given I do not have an account
                 When I follow the sign up link from the homepage
                 And I fill out the form with valid details and submit it
                 Then I should see a confirmation message telling me to check my email
                 And I have confirmed my application
                 When I log in
                 Then I should not see a message telling me to confirm my account
                 But I should see a welcome message
                 And I should see a form asking me to fill out my account profile
                 When I fill out my profile details
                 And I log out and log in again
                 Then I should not see the form asking me to fill out my account profile




Wednesday, 18 April 12
Feature: Sign Up
               Scenario: Apply for an account
                 Given I do not have an account
                 And I am on the home page
                 And I follow "Join"
                 Then I should see "we need some information from you."
                 And I should see "Home / Join"
                 And I fill out the form with valid details and submit it
                 Then I should see a confirmation message telling me to check my email
                 And I have confirmed my application
                 When I log in
                 Then I should not see a message telling me to confirm my account
                 But I should see a welcome message
                 And I should see a form asking me to fill out my account profile
                 When I fill out my profile details
                 And I log out and log in again
                 Then I should not see the form asking me to fill out my account profile




Wednesday, 18 April 12
Feature: Sign Up
               Scenario: Apply for an account
                 Given I do not have an account
                 And I am on the home page
                 And I follow "Join"
                 Then I should see "we need some information from you."
                 And I should see "Home / Join"
                 When I fill in "user_email" with "dave123@hotmail.com"
                 And I fill in "user_password" with "passw0rd"
                 And I fill in "user_password_confirmation" with "passw0rd"
                 And I fill in "user_title" with "Mr"
                 And I fill in "user_firstname" with "Dave"
                 And I fill in "user_surname" with "Smith"
                 And I fill in "user_display_name" with "Dave Smith"
                 And I fill in "user_organisation_name" with "Big Corp"
                 And I fill in "user_city" with "London"
                 And I select "United Kingdom" from "user_country_id"
                 And I fill in "user_phone_number" with "1234 5678"
                 And I press "Sign up"
                 Then I should see a confirmation message telling me to check my email
                 And I have confirmed my application
                 When I log in
                 Then I should not see a message telling me to confirm my account
                 But I should see a welcome message
                 And I should see a form asking me to fill out my account profile
                 When I fill out my profile details
                 And I log out and log in again
                 Then I should not see the form asking me to fill out my account profile




Wednesday, 18 April 12
Feature: Sign Up
               Scenario: Apply for an account
                 Given I do not have an account
                 And I am on the home page
                 And I follow "Join"
                 Then I should see "we need some information from you."
                 And I should see "Home / Join"
                 When I fill in "user_email" with "dave123@hotmail.com"
                 And I fill in "user_password" with "passw0rd"
                 And I fill in "user_password_confirmation" with "passw0rd"
                 And I fill in "user_title" with "Mr"
                 And I fill in "user_firstname" with "Dave"
                 And I fill in "user_surname" with "Smith"
                 And I fill in "user_display_name" with "Dave Smith"
                 And I fill in "user_organisation_name" with "Big Corp"
                 And I fill in "user_city" with "London"
                 And I select "United Kingdom" from "user_country_id"
                 And I fill in "user_phone_number" with "1234 5678"
                 And I press "Sign up"
                 Then I should see "You have signed up successfully"
                 Given I have confirmed my signup for "dave123@hotmail.com"
                 And I login as "dave123@hotmail.com"
                 Then I should not see a message telling me to confirm my account
                 But I should see a welcome message
                 And I should see a form asking me to fill out my account profile
                 When I fill out my profile details
                 And I log out and log in again
                 Then I should not see the form asking me to fill out my account profile




Wednesday, 18 April 12
Feature: Sign Up
               Scenario: Apply for an account
                 Given I do not have an account
                 And I am on the home page
                 And I follow "Join"
                 Then I should see "we need some information from you."
                 And I should see "Home / Join"
                 When I fill in "user_email" with "dave123@hotmail.com"
                 And I fill in "user_password" with "passw0rd"
                 And I fill in "user_password_confirmation" with "passw0rd"
                 And I fill in "user_title" with "Mr"
                 And I fill in "user_firstname" with "Dave"
                 And I fill in "user_surname" with "Smith"
                 And I fill in "user_display_name" with "Dave Smith"
                 And I fill in "user_organisation_name" with "Big Corp"
                 And I fill in "user_city" with "London"
                 And I select "United Kingdom" from "user_country_id"
                 And I fill in "user_phone_number" with "1234 5678"
                 And I press "Sign up"
                 Then I should see "You have signed up successfully"
                 Given I have confirmed my signup for "dave123@hotmail.com"
                 And I login as "dave123@hotmail.com"
                 And I should not see "You have to confirm your account before continuing"
                 And I should see "Thank you for signing up for the portal"
                 And I should see "Home / New Demographic"
                 And I should see a form asking me to fill out my account profile
                 When I fill out my profile details
                 And I log out and log in again
                 Then I should not see the form asking me to fill out my account profile




Wednesday, 18 April 12
Feature: Sign Up
               Scenario: Apply for an account
                 Given I do not have an account
                 And I am on the home page
                 And I follow "Join"
                 Then I should see "we need some information from you."
                 And I should see "Home / Join"
                 When I fill in "user_email" with "dave123@hotmail.com"
                 And I fill in "user_password" with "passw0rd"
                 And I fill in "user_password_confirmation" with "passw0rd"
                 And I fill in "user_title" with "Mr"
                 And I fill in "user_firstname" with "Dave"
                 And I fill in "user_surname" with "Smith"
                 And I fill in "user_display_name" with "Dave Smith"
                 And I fill in "user_organisation_name" with "Big Corp"
                 And I fill in "user_city" with "London"
                 And I select "United Kingdom" from "user_country_id"
                 And I fill in "user_phone_number" with "1234 5678"
                 And I press "Sign up"
                 Then I should see "You have signed up successfully"
                 Given I have confirmed my signup for "dave123@hotmail.com"
                 And I login as "dave123@hotmail.com"
                 And I should not see "You have to confirm your account before continuing"
                 And I should see "Thank you for signing up for the portal"
                 And I should see "Home / New Demographic"
                 And I should see "I am a:"
                 And I should see "My Main Work Area is:"
                 And I should see "I work with:"
                 And I should see "About your organisation"
                 And I should see "The primary area is:"
                 And I should see "The secondary area is:"
                 And I should see "Your Reasons for joining this community"
                 When I fill out my profile details
                 And I log out and log in again
                 Then I should not see the form asking me to fill out my account profile



Wednesday, 18 April 12
Feature: Sign Up
               Scenario: Apply for an account
                 Given I do not have an account
                 And I am on the home page
                 And I follow "Join"
                 Then I should see "we need some information from you."
                 And I should see "Home / Join"
                 When I fill in "user_email" with "dave123@hotmail.com"
                 And I fill in "user_password" with "passw0rd"
                 And I fill in "user_password_confirmation" with "passw0rd"
                 And I fill in "user_title" with "Mr"
                 And I fill in "user_firstname" with "Dave"
                 And I fill in "user_surname" with "Smith"
                 And I fill in "user_display_name" with "Dave Smith"
                 And I fill in "user_organisation_name" with "Big Corp"
                 And I fill in "user_city" with "London"
                 And I select "United Kingdom" from "user_country_id"
                 And I fill in "user_phone_number" with "1234 5678"
                 And I press "Sign up"
                 Then I should see "You have signed up successfully"
                 Given I have confirmed my signup for "dave123@hotmail.com"
                 And I login as "dave123@hotmail.com"
                 And I should not see "You have to confirm your account before continuing"
                 And I should see "Thank you for signing up for the portal"
                 And I should see "Home / New Demographic"
                 And I should see "I am a:"
                 And I should see "My Main Work Area is:"
                 And I should see "I work with:"
                 And I should see "About your organisation"
                 And I should see "The primary area is:"
                 And I should see "The secondary area is:"
                 And I should see "Your Reasons for joining this community"
                 And I should see "Demographic was successfully created"
                 And I should see "I am a: Researcher"
                 And I should see "My Main Work Area is: Heart Disease"
                 And I should see "My Organisations primary area is: Equipment Manufacturer"
                 And I log out and log in again
                 Then I should not see the form asking me to fill out my account profile

Wednesday, 18 April 12
Feature: Sign up
                  Scenario: Apply for an Account
                    Given I have setup the base data
                    And I am on the home page
                    And I follow "Join"
                    Then I should see "we need some information from you."
                    And I should see "Home / Join"
                    When I fill in "user_email" with "dave123@hotmail.com"
                    And I fill in "user_password" with "passw0rd"




                                                                                  d
                    And I fill in "user_password_confirmation" with "passw0rd"




                                                                                e
                    And I fill in "user_title" with "Mr"
                    And I fill in "user_firstname" with "Dave"




                                                                               r
                    And I fill in "user_surname" with "Smith"




                                                                             o
                    And I fill in "user_display_name" with "Dave Smith"




                 t
                    And I fill in "user_organisation_name" with "Big Corp"




               c
                    And I fill in "user_city" with "London"




             u
                    And I select "United Kingdom" from "user_country_id"




           f
                    And I fill in "user_phone_number" with "1234 5678"




         e
                    And I press "Sign up"




       R
                    Then I should see "You have signed up successfully"
                    Given I have confirmed my signup for "dave123@hotmail.com"
                    And I login as "dave123@hotmail.com"
                    And I should not see "You have to confirm your account before continuing"




                 !
                    And I should see "Thank you for signing up for the portal"
                    And I should see "Home / New Demographic"
                    And I should see "I am a:"
                    And I should see "My Main Work Area is:"
                    And I should see "I work with:"
                    And I should see "About your organisation"
                    And I should see "The primary area is:"
                    And I should see "The secondary area is:"
                    And I should see "Your Reasons for joining this community"
                    Then I select "Researcher" from "I am a:"
                    Then I select "Heart Disease" from "My Main Work Area is:"
                    Then I select "Equipment Manufacturer" from "The primary area is:"
                    Then I press "Save Demographic Information"
                    And I should see "Demographic was successfully created"
                    And I should see "I am a: Researcher"
                    And I should see "My Main Work Area is: Heart Disease"
                    And I should see "My Organisations primary area is: Equipment Manufacturer"
                    Then I am signed out
                    And I login as "dave123@hotmail.com"
                    And I should not see "Home / New Demographic"

Wednesday, 18 April 12
Incidental         Conflated
                                 Detail           Scenarios




                         Brittle       Reader            Reader
                         Tests        Confusion         Boredom



                                        Job
                                     Security
Wednesday, 18 April 12
MDD Best Practices
                    • Include as much irrelevant detail in your
                         features as possible
                         • keeps them hard / boring to read
                         • and nice and brittle
                    • Try to sprinkle technical details like CSS or
                         HTML in there too


Wednesday, 18 April 12
Now that I have your
                              attention


Wednesday, 18 April 12
Wednesday, 18 April 12
Think about it


                    • Why are you writing these features?



Wednesday, 18 April 12
What you
                         think you
                           need




                          All you
                          actually
                           need
Wednesday, 18 April 12
What you
                                           think you
                                             need




                                            All you
                                            actually
                         What would give     need
                         you some value,
                            right now

Wednesday, 18 April 12
Think about it


                    • Who are you writing these features for?



Wednesday, 18 April 12
Ideas


                         Features




                          Code


Wednesday, 18 April 12
Are you writing tests
                          or documentation?


Wednesday, 18 April 12
Mea culpa



Wednesday, 18 April 12
IMPORTANT: This file is
generated by cucumber-rails -
edit at your own peril. It is
recommended to regenerate
this file in the future when you
upgrade to a newer version of
cucumber-rails. Consider
adding your own code to a new
file instead of editing this one.
Wednesday, 18 April 12
Wednesday, 18 April 12
Levels of Abstraction



Wednesday, 18 April 12
When I
                                       fill o
                                              ut the
                         Declarative                 form w
                                                            ith va
                                                                   lid de
                                                                          tails




                                  When I
                                          fill in
                                  And I f           "user_e
                                          ill in            mail" w
                                 And I f          "user_p           ith "da
                                         ill in            assword          ve123@h
                                                  "user_p          " with            otmail.
                                 And I f                  assword          "passw0
                                         ill in                   _confir          rd"
                                And I f          "user_t                  mation"
                                        ill in            itle" w                   with "p
                                And I f          "user_f          ith "Mr                   a
                                        ill in           irstnam          "
                                                "user_s          e" with
                                                         urname"           "Dave"
                         Imperative                               with "S
                                                                          mith"



Wednesday, 18 April 12
Feature: The System

                         Scenario: Everything Works
                           Given the system exists
                           When I use it
                           Then it should work, perfectly




Wednesday, 18 April 12
Whose domain is it
                             anyway?


Wednesday, 18 April 12
Solutions

                    • Feedback
                    • Feedback
                    • Feedback


Wednesday, 18 April 12
Wednesday, 18 April 12
Relish Features
                    • Private projects, organisations
                    • Full text search
                    • Editorial
                     • Markdown pages
                     • Navigation / ToC ordering
                    • Push from a gem
Wednesday, 18 April 12
Other Tips

                    • Strive for documentation, not tests
                    • Write scenarios with domain experts
                    • Pair up with programmers to write step
                         definitions
                    • Banish incidental details!

Wednesday, 18 April 12
Thanks



Wednesday, 18 April 12
Further Reading
      •      http://dhemery.com/pdf/writing_maintainable_automated_acceptance_tests.pdf

      •      http://benmabey.com/2008/05/19/imperative-vs-declarative-scenarios-in-user-stories.html

      •      http://dannorth.net/2011/01/31/whose-domain-is-it-anyway

      •      http://elabs.se/blog/15-you-re-cuking-it-wrong

      •      http://github.com/mattwynne/cucumber-usual_suspects

      •      http://github.com/riverGlide/CukeSalad/

      •      http://relishapp.com

      •      http://blog.mattwynne.net




Wednesday, 18 April 12

Contenu connexe

Similaire à More Than Automation - How Good Acceptance Tests Can Make Your Team Happier

Odesk Tutorial
Odesk Tutorial Odesk Tutorial
Odesk Tutorial Lancemode
 
How to open an account in oDesk
How to open an account in oDeskHow to open an account in oDesk
How to open an account in oDeskMillicent Reyes
 
Taskr seller guide
Taskr seller guideTaskr seller guide
Taskr seller guideSaahil Goel
 
Website Users Guide
Website Users GuideWebsite Users Guide
Website Users GuideCIREIA
 
How to Go Web Site Live in China?
How to Go Web Site Live in China?How to Go Web Site Live in China?
How to Go Web Site Live in China?Jordan Chung
 
How to register your online business in india
How to register your online business in indiaHow to register your online business in india
How to register your online business in indiaMrityunjay Aryan
 
Linked In Secret Twin
Linked In Secret TwinLinked In Secret Twin
Linked In Secret TwinStaci Daley
 
How to buy digital signature
How to buy digital signatureHow to buy digital signature
How to buy digital signatureTaxfreemart
 
How to buy digital signature
How to buy digital signatureHow to buy digital signature
How to buy digital signatureTaxfreemart
 
My info biz user journey sample (assisted director)
My info biz user journey sample (assisted director)My info biz user journey sample (assisted director)
My info biz user journey sample (assisted director)Huang Junqi
 
How to Avoid Online Marketing Scams and Ripoffs
How to Avoid Online Marketing Scams and RipoffsHow to Avoid Online Marketing Scams and Ripoffs
How to Avoid Online Marketing Scams and RipoffsDavid Christensen
 
How To Apply for Pick.Click.Give. in 2016 - Powerpoint
How To Apply for Pick.Click.Give. in 2016 - PowerpointHow To Apply for Pick.Click.Give. in 2016 - Powerpoint
How To Apply for Pick.Click.Give. in 2016 - Powerpointpcgak
 
Accounting Project (bank dealing)
Accounting Project (bank dealing) Accounting Project (bank dealing)
Accounting Project (bank dealing) fizaamir0007
 
Goals and workflows of HelpDeskGoal 1 Assist Government Retiree.pdf
Goals and workflows of HelpDeskGoal 1 Assist Government Retiree.pdfGoals and workflows of HelpDeskGoal 1 Assist Government Retiree.pdf
Goals and workflows of HelpDeskGoal 1 Assist Government Retiree.pdfaucmistry
 
Taskr Selling Guide
Taskr Selling GuideTaskr Selling Guide
Taskr Selling GuideTaskr
 
How to build a profitable business with less than $17
How to build a profitable business with less than $17   How to build a profitable business with less than $17
How to build a profitable business with less than $17 Tiffany Maya
 
SingleDisciplinary_GrantApp_Manual.pdf
SingleDisciplinary_GrantApp_Manual.pdfSingleDisciplinary_GrantApp_Manual.pdf
SingleDisciplinary_GrantApp_Manual.pdfInthumathiGovindasam
 
Flipkart Marketplace – Onboarding
Flipkart Marketplace – OnboardingFlipkart Marketplace – Onboarding
Flipkart Marketplace – OnboardingSellOnFlipkart
 
att09072023mysss-registration-proceduresfinal (1).pdf
att09072023mysss-registration-proceduresfinal (1).pdfatt09072023mysss-registration-proceduresfinal (1).pdf
att09072023mysss-registration-proceduresfinal (1).pdfCharlenePBalderama
 

Similaire à More Than Automation - How Good Acceptance Tests Can Make Your Team Happier (20)

Paypal.com ppt
Paypal.com pptPaypal.com ppt
Paypal.com ppt
 
Odesk Tutorial
Odesk Tutorial Odesk Tutorial
Odesk Tutorial
 
How to open an account in oDesk
How to open an account in oDeskHow to open an account in oDesk
How to open an account in oDesk
 
Taskr seller guide
Taskr seller guideTaskr seller guide
Taskr seller guide
 
Website Users Guide
Website Users GuideWebsite Users Guide
Website Users Guide
 
How to Go Web Site Live in China?
How to Go Web Site Live in China?How to Go Web Site Live in China?
How to Go Web Site Live in China?
 
How to register your online business in india
How to register your online business in indiaHow to register your online business in india
How to register your online business in india
 
Linked In Secret Twin
Linked In Secret TwinLinked In Secret Twin
Linked In Secret Twin
 
How to buy digital signature
How to buy digital signatureHow to buy digital signature
How to buy digital signature
 
How to buy digital signature
How to buy digital signatureHow to buy digital signature
How to buy digital signature
 
My info biz user journey sample (assisted director)
My info biz user journey sample (assisted director)My info biz user journey sample (assisted director)
My info biz user journey sample (assisted director)
 
How to Avoid Online Marketing Scams and Ripoffs
How to Avoid Online Marketing Scams and RipoffsHow to Avoid Online Marketing Scams and Ripoffs
How to Avoid Online Marketing Scams and Ripoffs
 
How To Apply for Pick.Click.Give. in 2016 - Powerpoint
How To Apply for Pick.Click.Give. in 2016 - PowerpointHow To Apply for Pick.Click.Give. in 2016 - Powerpoint
How To Apply for Pick.Click.Give. in 2016 - Powerpoint
 
Accounting Project (bank dealing)
Accounting Project (bank dealing) Accounting Project (bank dealing)
Accounting Project (bank dealing)
 
Goals and workflows of HelpDeskGoal 1 Assist Government Retiree.pdf
Goals and workflows of HelpDeskGoal 1 Assist Government Retiree.pdfGoals and workflows of HelpDeskGoal 1 Assist Government Retiree.pdf
Goals and workflows of HelpDeskGoal 1 Assist Government Retiree.pdf
 
Taskr Selling Guide
Taskr Selling GuideTaskr Selling Guide
Taskr Selling Guide
 
How to build a profitable business with less than $17
How to build a profitable business with less than $17   How to build a profitable business with less than $17
How to build a profitable business with less than $17
 
SingleDisciplinary_GrantApp_Manual.pdf
SingleDisciplinary_GrantApp_Manual.pdfSingleDisciplinary_GrantApp_Manual.pdf
SingleDisciplinary_GrantApp_Manual.pdf
 
Flipkart Marketplace – Onboarding
Flipkart Marketplace – OnboardingFlipkart Marketplace – Onboarding
Flipkart Marketplace – Onboarding
 
att09072023mysss-registration-proceduresfinal (1).pdf
att09072023mysss-registration-proceduresfinal (1).pdfatt09072023mysss-registration-proceduresfinal (1).pdf
att09072023mysss-registration-proceduresfinal (1).pdf
 

Plus de seleniumconf

Using Selenium to Improve a Teams Development Cycle
Using Selenium to Improve a Teams Development CycleUsing Selenium to Improve a Teams Development Cycle
Using Selenium to Improve a Teams Development Cycleseleniumconf
 
Building Quality with Foundations of Mud
Building Quality with Foundations of MudBuilding Quality with Foundations of Mud
Building Quality with Foundations of Mudseleniumconf
 
Building a Selenium Community One Meetup at a Time
Building a Selenium Community One Meetup at a TimeBuilding a Selenium Community One Meetup at a Time
Building a Selenium Community One Meetup at a Timeseleniumconf
 
Introduction to selenium_grid_workshop
Introduction to selenium_grid_workshopIntroduction to selenium_grid_workshop
Introduction to selenium_grid_workshopseleniumconf
 
Automated Security Testing
Automated Security TestingAutomated Security Testing
Automated Security Testingseleniumconf
 
Selenium: State of the Union
Selenium: State of the UnionSelenium: State of the Union
Selenium: State of the Unionseleniumconf
 
Introducing Selenium Builder – the Future of Test Development
Introducing Selenium Builder – the Future of Test DevelopmentIntroducing Selenium Builder – the Future of Test Development
Introducing Selenium Builder – the Future of Test Developmentseleniumconf
 
Automated Web App Performance Testing Using WebDriver
Automated Web App Performance Testing Using WebDriverAutomated Web App Performance Testing Using WebDriver
Automated Web App Performance Testing Using WebDriverseleniumconf
 
Building a Driver: Lessons Learned From Developing the Internet Explorer Driver
Building a Driver: Lessons Learned From Developing the Internet Explorer DriverBuilding a Driver: Lessons Learned From Developing the Internet Explorer Driver
Building a Driver: Lessons Learned From Developing the Internet Explorer Driverseleniumconf
 
Massively Continuous Integration: From 3 days to 30 minutes
Massively Continuous Integration: From 3 days to 30 minutesMassively Continuous Integration: From 3 days to 30 minutes
Massively Continuous Integration: From 3 days to 30 minutesseleniumconf
 

Plus de seleniumconf (10)

Using Selenium to Improve a Teams Development Cycle
Using Selenium to Improve a Teams Development CycleUsing Selenium to Improve a Teams Development Cycle
Using Selenium to Improve a Teams Development Cycle
 
Building Quality with Foundations of Mud
Building Quality with Foundations of MudBuilding Quality with Foundations of Mud
Building Quality with Foundations of Mud
 
Building a Selenium Community One Meetup at a Time
Building a Selenium Community One Meetup at a TimeBuilding a Selenium Community One Meetup at a Time
Building a Selenium Community One Meetup at a Time
 
Introduction to selenium_grid_workshop
Introduction to selenium_grid_workshopIntroduction to selenium_grid_workshop
Introduction to selenium_grid_workshop
 
Automated Security Testing
Automated Security TestingAutomated Security Testing
Automated Security Testing
 
Selenium: State of the Union
Selenium: State of the UnionSelenium: State of the Union
Selenium: State of the Union
 
Introducing Selenium Builder – the Future of Test Development
Introducing Selenium Builder – the Future of Test DevelopmentIntroducing Selenium Builder – the Future of Test Development
Introducing Selenium Builder – the Future of Test Development
 
Automated Web App Performance Testing Using WebDriver
Automated Web App Performance Testing Using WebDriverAutomated Web App Performance Testing Using WebDriver
Automated Web App Performance Testing Using WebDriver
 
Building a Driver: Lessons Learned From Developing the Internet Explorer Driver
Building a Driver: Lessons Learned From Developing the Internet Explorer DriverBuilding a Driver: Lessons Learned From Developing the Internet Explorer Driver
Building a Driver: Lessons Learned From Developing the Internet Explorer Driver
 
Massively Continuous Integration: From 3 days to 30 minutes
Massively Continuous Integration: From 3 days to 30 minutesMassively Continuous Integration: From 3 days to 30 minutes
Massively Continuous Integration: From 3 days to 30 minutes
 

Dernier

Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...itnewsafrica
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessWSO2
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 

Dernier (20)

Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 

More Than Automation - How Good Acceptance Tests Can Make Your Team Happier

  • 1. More than automation How good acceptance tests can make your team happier @mattwynne Freelance Programmer & Coach Wednesday, 18 April 12
  • 2. Refuctoring your Cucumber tests Protecting your job with Mortgage Driven Development @mattwynne Freelance Programmer & Coach Wednesday, 18 April 12
  • 4. MDD Core Principles Maintainable code offers no job security Programming should be a solitary activity Wednesday, 18 April 12
  • 6. MD D F AI L http://www.flickr.com/photos/downtree/1666035170/ Wednesday, 18 April 12
  • 7. N ✔ W I D D M http://www.flickr.com/photos/chokingsun/3535556349/ Wednesday, 18 April 12
  • 8. Maintainable code offers no job security therefore As a mortgage-driven developer, I try to make my code seem as weird and mysterious as possible Wednesday, 18 April 12
  • 9. Programming should be a solitary activity therefore As a mortgage-driven developer, I make the experience of collaborating with me as awkward and unpleasant as I can* * without actually getting fired Wednesday, 18 April 12
  • 10. Cucumber is a threat Wednesday, 18 April 12
  • 11. Cucumber Could lead to YOUR house being repossessed Wednesday, 18 April 12
  • 12. Cucumber is a threat • Promotes collaboration between stakeholders and developers • Transparency of how the system actually behaves • Aims to develop a shared understanding or ubiquitous language within the team Wednesday, 18 April 12
  • 13. MDD Core Practice uc to ri ng R ef Wednesday, 18 April 12
  • 14. What is Refuctoring? "Refuctoring is the process of taking a well-designed piece of code and, through a series of small, reversible changes, making it completely unmaintainable by anybody except yourself." http://www.waterfall2006.com/gorman.html Wednesday, 18 April 12
  • 15. Feature: Sign Up Sign up works in three stages: 1. Apply for an account via a form on the website. Applicant gets an email. 2. Follow the confirmation in the email to activate the account. 3. Fill out profile information. By this stage the user has an account but we try to collect more information about them. Scenario: Apply for an account Given I do not have an account When I follow the sign up link from the homepage And I fill out the form with valid details and submit it Then I should see a confirmation message telling me to check my email Scenario: Confirm account Given I have applied for an account And I have confirmed my application When I log in Then I should not see a message telling me to confirm my account But I should see a welcome message And I should see a form asking me to fill out my account profile Scenario: Fill out account profile Given I have logged in to a brand new account When I fill out my profile details And I log out and log in again Then I should not see the form asking me to fill out my account profile Wednesday, 18 April 12
  • 16. Step 1: Remove Spurious Documentation Wednesday, 18 April 12
  • 17. Feature: Sign Up Sign up works in three stages: 1. Apply for an account via a form on the website. Applicant gets an email. 2. Follow the confirmation in the email to activate the account. 3. Fill out profile information. By this stage the user has an account but we try to collect more information about them. Scenario: Apply for an account Given I do not have an account When I follow the sign up link from the homepage And I fill out the form with valid details and submit it Then I should see a confirmation message telling me to check my email Scenario: Confirm account Given I have applied for an account And I have confirmed my application When I log in Then I should not see a message telling me to confirm my account But I should see a welcome message And I should see a form asking me to fill out my account profile Scenario: Fill out account profile Given I have logged in to a brand new account When I fill out my profile details And I log out and log in again Then I should not see the form asking me to fill out my account profile Wednesday, 18 April 12
  • 18. Feature: Sign Up Scenario: Apply for an account Given I do not have an account When I follow the sign up link from the homepage And I fill out the form with valid details and submit it Then I should see a confirmation message telling me to check my email Scenario: Confirm account Given I have applied for an account And I have confirmed my application When I log in Then I should not see a message telling me to confirm my account But I should see a welcome message And I should see a form asking me to fill out my account profile Scenario: Fill out account profile Given I have logged in to a brand new account When I fill out my profile details And I log out and log in again Then I should not see the form asking me to fill out my account profile Wednesday, 18 April 12
  • 19. Step 2: Conflate Scenarios Wednesday, 18 April 12
  • 20. Feature: Sign Up Scenario: Apply for an account Given I do not have an account When I follow the sign up link from the homepage And I fill out the form with valid details and submit it Then I should see a confirmation message telling me to check my email Scenario: Confirm account Given I have applied for an account And I have confirmed my application When I log in Then I should not see a message telling me to confirm my account But I should see a welcome message And I should see a form asking me to fill out my account profile Scenario: Fill out account profile Given I have logged in to a brand new account When I fill out my profile details And I log out and log in again Then I should not see the form asking me to fill out my account profile Wednesday, 18 April 12
  • 21. Feature: Sign Up Scenario: Apply for an account Given I do not have an account When I follow the sign up link from the homepage And I fill out the form with valid details and submit it Then I should see a confirmation message telling me to check my email When I have confirmed my application And I log in Then I should not see a message telling me to confirm my account But I should see a welcome message And I should see a form asking me to fill out my account profile When I fill out my profile details And I log out and log in again Then I should not see the form asking me to fill out my account profile Wednesday, 18 April 12
  • 22. Step 3: Insert Incidental Detail Wednesday, 18 April 12
  • 23. Feature: Sign Up Scenario: Apply for an account Given I do not have an account When I follow the sign up link from the homepage And I fill out the form with valid details and submit it Then I should see a confirmation message telling me to check my email And I have confirmed my application When I log in Then I should not see a message telling me to confirm my account But I should see a welcome message And I should see a form asking me to fill out my account profile When I fill out my profile details And I log out and log in again Then I should not see the form asking me to fill out my account profile Wednesday, 18 April 12
  • 24. Feature: Sign Up Scenario: Apply for an account Given I do not have an account And I am on the home page And I follow "Join" Then I should see "we need some information from you." And I should see "Home / Join" And I fill out the form with valid details and submit it Then I should see a confirmation message telling me to check my email And I have confirmed my application When I log in Then I should not see a message telling me to confirm my account But I should see a welcome message And I should see a form asking me to fill out my account profile When I fill out my profile details And I log out and log in again Then I should not see the form asking me to fill out my account profile Wednesday, 18 April 12
  • 25. Feature: Sign Up Scenario: Apply for an account Given I do not have an account And I am on the home page And I follow "Join" Then I should see "we need some information from you." And I should see "Home / Join" When I fill in "user_email" with "dave123@hotmail.com" And I fill in "user_password" with "passw0rd" And I fill in "user_password_confirmation" with "passw0rd" And I fill in "user_title" with "Mr" And I fill in "user_firstname" with "Dave" And I fill in "user_surname" with "Smith" And I fill in "user_display_name" with "Dave Smith" And I fill in "user_organisation_name" with "Big Corp" And I fill in "user_city" with "London" And I select "United Kingdom" from "user_country_id" And I fill in "user_phone_number" with "1234 5678" And I press "Sign up" Then I should see a confirmation message telling me to check my email And I have confirmed my application When I log in Then I should not see a message telling me to confirm my account But I should see a welcome message And I should see a form asking me to fill out my account profile When I fill out my profile details And I log out and log in again Then I should not see the form asking me to fill out my account profile Wednesday, 18 April 12
  • 26. Feature: Sign Up Scenario: Apply for an account Given I do not have an account And I am on the home page And I follow "Join" Then I should see "we need some information from you." And I should see "Home / Join" When I fill in "user_email" with "dave123@hotmail.com" And I fill in "user_password" with "passw0rd" And I fill in "user_password_confirmation" with "passw0rd" And I fill in "user_title" with "Mr" And I fill in "user_firstname" with "Dave" And I fill in "user_surname" with "Smith" And I fill in "user_display_name" with "Dave Smith" And I fill in "user_organisation_name" with "Big Corp" And I fill in "user_city" with "London" And I select "United Kingdom" from "user_country_id" And I fill in "user_phone_number" with "1234 5678" And I press "Sign up" Then I should see "You have signed up successfully" Given I have confirmed my signup for "dave123@hotmail.com" And I login as "dave123@hotmail.com" Then I should not see a message telling me to confirm my account But I should see a welcome message And I should see a form asking me to fill out my account profile When I fill out my profile details And I log out and log in again Then I should not see the form asking me to fill out my account profile Wednesday, 18 April 12
  • 27. Feature: Sign Up Scenario: Apply for an account Given I do not have an account And I am on the home page And I follow "Join" Then I should see "we need some information from you." And I should see "Home / Join" When I fill in "user_email" with "dave123@hotmail.com" And I fill in "user_password" with "passw0rd" And I fill in "user_password_confirmation" with "passw0rd" And I fill in "user_title" with "Mr" And I fill in "user_firstname" with "Dave" And I fill in "user_surname" with "Smith" And I fill in "user_display_name" with "Dave Smith" And I fill in "user_organisation_name" with "Big Corp" And I fill in "user_city" with "London" And I select "United Kingdom" from "user_country_id" And I fill in "user_phone_number" with "1234 5678" And I press "Sign up" Then I should see "You have signed up successfully" Given I have confirmed my signup for "dave123@hotmail.com" And I login as "dave123@hotmail.com" And I should not see "You have to confirm your account before continuing" And I should see "Thank you for signing up for the portal" And I should see "Home / New Demographic" And I should see a form asking me to fill out my account profile When I fill out my profile details And I log out and log in again Then I should not see the form asking me to fill out my account profile Wednesday, 18 April 12
  • 28. Feature: Sign Up Scenario: Apply for an account Given I do not have an account And I am on the home page And I follow "Join" Then I should see "we need some information from you." And I should see "Home / Join" When I fill in "user_email" with "dave123@hotmail.com" And I fill in "user_password" with "passw0rd" And I fill in "user_password_confirmation" with "passw0rd" And I fill in "user_title" with "Mr" And I fill in "user_firstname" with "Dave" And I fill in "user_surname" with "Smith" And I fill in "user_display_name" with "Dave Smith" And I fill in "user_organisation_name" with "Big Corp" And I fill in "user_city" with "London" And I select "United Kingdom" from "user_country_id" And I fill in "user_phone_number" with "1234 5678" And I press "Sign up" Then I should see "You have signed up successfully" Given I have confirmed my signup for "dave123@hotmail.com" And I login as "dave123@hotmail.com" And I should not see "You have to confirm your account before continuing" And I should see "Thank you for signing up for the portal" And I should see "Home / New Demographic" And I should see "I am a:" And I should see "My Main Work Area is:" And I should see "I work with:" And I should see "About your organisation" And I should see "The primary area is:" And I should see "The secondary area is:" And I should see "Your Reasons for joining this community" When I fill out my profile details And I log out and log in again Then I should not see the form asking me to fill out my account profile Wednesday, 18 April 12
  • 29. Feature: Sign Up Scenario: Apply for an account Given I do not have an account And I am on the home page And I follow "Join" Then I should see "we need some information from you." And I should see "Home / Join" When I fill in "user_email" with "dave123@hotmail.com" And I fill in "user_password" with "passw0rd" And I fill in "user_password_confirmation" with "passw0rd" And I fill in "user_title" with "Mr" And I fill in "user_firstname" with "Dave" And I fill in "user_surname" with "Smith" And I fill in "user_display_name" with "Dave Smith" And I fill in "user_organisation_name" with "Big Corp" And I fill in "user_city" with "London" And I select "United Kingdom" from "user_country_id" And I fill in "user_phone_number" with "1234 5678" And I press "Sign up" Then I should see "You have signed up successfully" Given I have confirmed my signup for "dave123@hotmail.com" And I login as "dave123@hotmail.com" And I should not see "You have to confirm your account before continuing" And I should see "Thank you for signing up for the portal" And I should see "Home / New Demographic" And I should see "I am a:" And I should see "My Main Work Area is:" And I should see "I work with:" And I should see "About your organisation" And I should see "The primary area is:" And I should see "The secondary area is:" And I should see "Your Reasons for joining this community" And I should see "Demographic was successfully created" And I should see "I am a: Researcher" And I should see "My Main Work Area is: Heart Disease" And I should see "My Organisations primary area is: Equipment Manufacturer" And I log out and log in again Then I should not see the form asking me to fill out my account profile Wednesday, 18 April 12
  • 30. Feature: Sign up Scenario: Apply for an Account Given I have setup the base data And I am on the home page And I follow "Join" Then I should see "we need some information from you." And I should see "Home / Join" When I fill in "user_email" with "dave123@hotmail.com" And I fill in "user_password" with "passw0rd" d And I fill in "user_password_confirmation" with "passw0rd" e And I fill in "user_title" with "Mr" And I fill in "user_firstname" with "Dave" r And I fill in "user_surname" with "Smith" o And I fill in "user_display_name" with "Dave Smith" t And I fill in "user_organisation_name" with "Big Corp" c And I fill in "user_city" with "London" u And I select "United Kingdom" from "user_country_id" f And I fill in "user_phone_number" with "1234 5678" e And I press "Sign up" R Then I should see "You have signed up successfully" Given I have confirmed my signup for "dave123@hotmail.com" And I login as "dave123@hotmail.com" And I should not see "You have to confirm your account before continuing" ! And I should see "Thank you for signing up for the portal" And I should see "Home / New Demographic" And I should see "I am a:" And I should see "My Main Work Area is:" And I should see "I work with:" And I should see "About your organisation" And I should see "The primary area is:" And I should see "The secondary area is:" And I should see "Your Reasons for joining this community" Then I select "Researcher" from "I am a:" Then I select "Heart Disease" from "My Main Work Area is:" Then I select "Equipment Manufacturer" from "The primary area is:" Then I press "Save Demographic Information" And I should see "Demographic was successfully created" And I should see "I am a: Researcher" And I should see "My Main Work Area is: Heart Disease" And I should see "My Organisations primary area is: Equipment Manufacturer" Then I am signed out And I login as "dave123@hotmail.com" And I should not see "Home / New Demographic" Wednesday, 18 April 12
  • 31. Incidental Conflated Detail Scenarios Brittle Reader Reader Tests Confusion Boredom Job Security Wednesday, 18 April 12
  • 32. MDD Best Practices • Include as much irrelevant detail in your features as possible • keeps them hard / boring to read • and nice and brittle • Try to sprinkle technical details like CSS or HTML in there too Wednesday, 18 April 12
  • 33. Now that I have your attention Wednesday, 18 April 12
  • 35. Think about it • Why are you writing these features? Wednesday, 18 April 12
  • 36. What you think you need All you actually need Wednesday, 18 April 12
  • 37. What you think you need All you actually What would give need you some value, right now Wednesday, 18 April 12
  • 38. Think about it • Who are you writing these features for? Wednesday, 18 April 12
  • 39. Ideas Features Code Wednesday, 18 April 12
  • 40. Are you writing tests or documentation? Wednesday, 18 April 12
  • 42. IMPORTANT: This file is generated by cucumber-rails - edit at your own peril. It is recommended to regenerate this file in the future when you upgrade to a newer version of cucumber-rails. Consider adding your own code to a new file instead of editing this one. Wednesday, 18 April 12
  • 45. When I fill o ut the Declarative form w ith va lid de tails When I fill in And I f "user_e ill in mail" w And I f "user_p ith "da ill in assword ve123@h "user_p " with otmail. And I f assword "passw0 ill in _confir rd" And I f "user_t mation" ill in itle" w with "p And I f "user_f ith "Mr a ill in irstnam " "user_s e" with urname" "Dave" Imperative with "S mith" Wednesday, 18 April 12
  • 46. Feature: The System Scenario: Everything Works Given the system exists When I use it Then it should work, perfectly Wednesday, 18 April 12
  • 47. Whose domain is it anyway? Wednesday, 18 April 12
  • 48. Solutions • Feedback • Feedback • Feedback Wednesday, 18 April 12
  • 50. Relish Features • Private projects, organisations • Full text search • Editorial • Markdown pages • Navigation / ToC ordering • Push from a gem Wednesday, 18 April 12
  • 51. Other Tips • Strive for documentation, not tests • Write scenarios with domain experts • Pair up with programmers to write step definitions • Banish incidental details! Wednesday, 18 April 12
  • 53. Further Reading • http://dhemery.com/pdf/writing_maintainable_automated_acceptance_tests.pdf • http://benmabey.com/2008/05/19/imperative-vs-declarative-scenarios-in-user-stories.html • http://dannorth.net/2011/01/31/whose-domain-is-it-anyway • http://elabs.se/blog/15-you-re-cuking-it-wrong • http://github.com/mattwynne/cucumber-usual_suspects • http://github.com/riverGlide/CukeSalad/ • http://relishapp.com • http://blog.mattwynne.net Wednesday, 18 April 12