SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Rapid, Light-Weight Test-Driven Web
 UI with Rails, RSpec, and Selenium

              Scott Bellware
              Ampersand GT



                               @ampgt
      http://ampgt.com
Ruby: every now and then, more impressive
 testing tools than impressive testing ideas
The purpose of testing is to gain an understanding that
you don't already have, not to calcify the understanding
that you already do have
The language of tests
  should be at a higher
level than the language of
  the thing being tested

  When the language of
 the tests is at the same
 level as the thing being
  tested, the size of the
  audience that benefits
 from tests is drastically
         reduced
Given/When/Then is at a
 level of specificity that is
   too close to the thing
being specified to be useful
  in the general case
A Contrived Example

Given that I’m a User
When I’m on the Login page
And I enter ‘foo’ into the username textbox
And I enter ‘bar’ into the password textbox
And I click the login button
Then I should see the successful login message
The Problem

The english specification is at the same
level of specificity as the program code

While this is thorough and formal, it’s
excessive and ultimately counter-
productive
Have You Considered

If the goal is to communicate the line-by-
line specificity of test code, why not just
show the users clean Ruby code?

(and learn how to write Ruby test code
   that is clean enough that users can
  understand with your stewardship)
Mindless Orthodoxy

“Users are interested in the same level
of detail of specification that
programmers deal with when writing
test and program code”
Reality

Users want to know that you’ve
understood what they’ve asked for and
they need to trust you to turn that
understanding into capabilities that meet
their expectations
Minimal Specificity


A user, when logged in, can access
protected resources
Maximal Specificity

Given that I’m a User
When I’m on the Login page
And I enter ‘foo’ into the username textbox
And I enter ‘bar’ into the password textbox
And I click the login button
Then I should see the successful login message
If this Is the Right Level
      of Specificity...

  A user, when logged in, can access
  protected resources
Then this Is Waste

Given that I’m a User
When I’m on the Login page
And I enter ‘foo’ into the username textbox
And I enter ‘bar’ into the password textbox
And I click the login button
Then I should see the successful login message
Audience

The general audience for highly-detailed
specifications is programmers


  (if programmers need highly-detailed
      specifications, they can read the
            specification code)
The Punchline

Don’t translate program code into
English if the only people who care
about that level of detail can already
read program code
The right form of
                 specification in-practice is
                always more powerful than
BDD:
                       an orthodoxy
the exception
rather than
the rule
BDD


use it when no other form of
communication is sufficient

   (when as little detail as
 possible won’t do, use more
           detail)
Over-Specification
If your goal is to reduce productivity,
over-specification will provide you with
one of the quickest routes.


     (the other terminology for
        “over-specification” is
          “tight coupling”)
So... How Much Testing?
           The Agile Answer:
 As much as possible, as soon as possible
    (orthodoxy, methodology recipes)

             The Lean Answer:
  As little as possible, as late as possible
   (principles, momentary ingredients)
How Little is Little?

Often, a minimum amount of testing
in software is a lot of testing
How Late is Late?

Usually, testing should being when
requirements are being defined
This is Efficiency, Not
      Productivity
               holding pen:
Design   Dev    waiting for   Test (blocked)
                 testing
Productivity


One of the great benefits of testing is
the removal of typical obstructions to
productivity
Obstructions to
 Productivity

Relearning is the silent killer


(once you solve the problem
    of too many defects)
Principles
        Don’t over-test, don’t under test

    Don’t start too late, don’t start too early

Write tests to communicate as clearly as possible

  Don’t presume to automate until automation
              has sufficient payoff
When Does
Automation Payoff?
         It depends...

        ...on team size

       ...on project size

     ...on diversity of skill

  ...on speed of new learning

  ...on rate of knowledge loss
Testing is NOT
     Automation
Learn to differentiate between testing
and automated testing, and know when
either is the right choice
  (eliminating repetitive work only
  matters if the repetition is more
 costly than creating and maintaining
   automation, and trading off the
      rigidity of “test shackles”)
       (DRY is not its own justification)
When To Start Testing?

      The moment you have an
           assumption!!!



  (which is any time you have an idea
      that hasn’t been validated)
When To Start
    Automating?

        Before it’s too late!!!


(the definition of too late depends on
 a variety of factors that are usually
different between different teams and
           different projects)
Cost   Traditional          Agile




                     Time
Cost   Traditional          Agile




                     Time
Lean


       Testing
                               Automated Testing


           Problem                  Solution
Cost




         Development              Development




                       Time
Lean


       Testing
                           Automated Testing


           Problem                  Solution
Cost




         Development              Development



                                    a bit too late
                       Time
Context Specification
•Form of test-driven development
•Specification

•Documentation

•Making knowledge persistent and consistent

•Holistic optimization

•Principled, rather than orthodox
You have to mindfully practice something long enough and to understand its
             principles deeply enough to see the orthodoxy
                       (and not be misdirected by it)
Wax On. Wax Off.




Understand the difference between preparation and action
        (all concrete forms are the preparation,
                     not the action)
          (in real life, Daniel Larusso would have been creamed
        for failing to make this distinction at the critical moment)
Thanks!

  http://ampgt.com

Weitere ähnliche Inhalte

Kürzlich hochgeladen

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Kürzlich hochgeladen (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

Empfohlen

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 

Empfohlen (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

TDD for Web UI - Part 1

  • 1. Rapid, Light-Weight Test-Driven Web UI with Rails, RSpec, and Selenium Scott Bellware Ampersand GT @ampgt http://ampgt.com
  • 2. Ruby: every now and then, more impressive testing tools than impressive testing ideas
  • 3. The purpose of testing is to gain an understanding that you don't already have, not to calcify the understanding that you already do have
  • 4. The language of tests should be at a higher level than the language of the thing being tested When the language of the tests is at the same level as the thing being tested, the size of the audience that benefits from tests is drastically reduced
  • 5. Given/When/Then is at a level of specificity that is too close to the thing being specified to be useful in the general case
  • 6. A Contrived Example Given that I’m a User When I’m on the Login page And I enter ‘foo’ into the username textbox And I enter ‘bar’ into the password textbox And I click the login button Then I should see the successful login message
  • 7. The Problem The english specification is at the same level of specificity as the program code While this is thorough and formal, it’s excessive and ultimately counter- productive
  • 8. Have You Considered If the goal is to communicate the line-by- line specificity of test code, why not just show the users clean Ruby code? (and learn how to write Ruby test code that is clean enough that users can understand with your stewardship)
  • 9. Mindless Orthodoxy “Users are interested in the same level of detail of specification that programmers deal with when writing test and program code”
  • 10. Reality Users want to know that you’ve understood what they’ve asked for and they need to trust you to turn that understanding into capabilities that meet their expectations
  • 11. Minimal Specificity A user, when logged in, can access protected resources
  • 12. Maximal Specificity Given that I’m a User When I’m on the Login page And I enter ‘foo’ into the username textbox And I enter ‘bar’ into the password textbox And I click the login button Then I should see the successful login message
  • 13. If this Is the Right Level of Specificity... A user, when logged in, can access protected resources
  • 14. Then this Is Waste Given that I’m a User When I’m on the Login page And I enter ‘foo’ into the username textbox And I enter ‘bar’ into the password textbox And I click the login button Then I should see the successful login message
  • 15. Audience The general audience for highly-detailed specifications is programmers (if programmers need highly-detailed specifications, they can read the specification code)
  • 16. The Punchline Don’t translate program code into English if the only people who care about that level of detail can already read program code
  • 17. The right form of specification in-practice is always more powerful than BDD: an orthodoxy the exception rather than the rule
  • 18. BDD use it when no other form of communication is sufficient (when as little detail as possible won’t do, use more detail)
  • 19. Over-Specification If your goal is to reduce productivity, over-specification will provide you with one of the quickest routes. (the other terminology for “over-specification” is “tight coupling”)
  • 20. So... How Much Testing? The Agile Answer: As much as possible, as soon as possible (orthodoxy, methodology recipes) The Lean Answer: As little as possible, as late as possible (principles, momentary ingredients)
  • 21. How Little is Little? Often, a minimum amount of testing in software is a lot of testing
  • 22. How Late is Late? Usually, testing should being when requirements are being defined
  • 23. This is Efficiency, Not Productivity holding pen: Design Dev waiting for Test (blocked) testing
  • 24. Productivity One of the great benefits of testing is the removal of typical obstructions to productivity
  • 25. Obstructions to Productivity Relearning is the silent killer (once you solve the problem of too many defects)
  • 26. Principles Don’t over-test, don’t under test Don’t start too late, don’t start too early Write tests to communicate as clearly as possible Don’t presume to automate until automation has sufficient payoff
  • 27. When Does Automation Payoff? It depends... ...on team size ...on project size ...on diversity of skill ...on speed of new learning ...on rate of knowledge loss
  • 28. Testing is NOT Automation Learn to differentiate between testing and automated testing, and know when either is the right choice (eliminating repetitive work only matters if the repetition is more costly than creating and maintaining automation, and trading off the rigidity of “test shackles”) (DRY is not its own justification)
  • 29. When To Start Testing? The moment you have an assumption!!! (which is any time you have an idea that hasn’t been validated)
  • 30. When To Start Automating? Before it’s too late!!! (the definition of too late depends on a variety of factors that are usually different between different teams and different projects)
  • 31. Cost Traditional Agile Time
  • 32. Cost Traditional Agile Time
  • 33. Lean Testing Automated Testing Problem Solution Cost Development Development Time
  • 34. Lean Testing Automated Testing Problem Solution Cost Development Development a bit too late Time
  • 35. Context Specification •Form of test-driven development •Specification •Documentation •Making knowledge persistent and consistent •Holistic optimization •Principled, rather than orthodox
  • 36. You have to mindfully practice something long enough and to understand its principles deeply enough to see the orthodoxy (and not be misdirected by it)
  • 37. Wax On. Wax Off. Understand the difference between preparation and action (all concrete forms are the preparation, not the action) (in real life, Daniel Larusso would have been creamed for failing to make this distinction at the critical moment)

Hinweis der Redaktion