Suche senden
Hochladen
Pragmatic notdogmatictdd
•
1 gefällt mir
•
1,035 views
Joseph Yoder
Folgen
Agile 2012
Weniger lesen
Mehr lesen
Technologie
Business
Melden
Teilen
Melden
Teilen
1 von 33
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
Lean agile pt
Lean agile pt
Joseph Yoder
Refactoring AOMs For AgilePT2010
Refactoring AOMs For AgilePT2010
Joseph Yoder
Pragmatic Not Dogmatic TDD Agile2012 by Joseph Yoder and Rebecca Wirfs-Brock
Pragmatic Not Dogmatic TDD Agile2012 by Joseph Yoder and Rebecca Wirfs-Brock
Joseph Yoder
Lean in Software Development
Lean in Software Development
Aslam Khan
Software testing agile_environment_wp
Software testing agile_environment_wp
Cristiano Caetano
The Design Process - FRC
The Design Process - FRC
Christopher Bearden
Bdd Introduction
Bdd Introduction
Skills Matter
Using tests and mocks to drive the design of software
Using tests and mocks to drive the design of software
Attila Magyar
Empfohlen
Lean agile pt
Lean agile pt
Joseph Yoder
Refactoring AOMs For AgilePT2010
Refactoring AOMs For AgilePT2010
Joseph Yoder
Pragmatic Not Dogmatic TDD Agile2012 by Joseph Yoder and Rebecca Wirfs-Brock
Pragmatic Not Dogmatic TDD Agile2012 by Joseph Yoder and Rebecca Wirfs-Brock
Joseph Yoder
Lean in Software Development
Lean in Software Development
Aslam Khan
Software testing agile_environment_wp
Software testing agile_environment_wp
Cristiano Caetano
The Design Process - FRC
The Design Process - FRC
Christopher Bearden
Bdd Introduction
Bdd Introduction
Skills Matter
Using tests and mocks to drive the design of software
Using tests and mocks to drive the design of software
Attila Magyar
Postdoc Symposium - Abram Hindle
Postdoc Symposium - Abram Hindle
ICSM 2011
Building Mobile (app) Masterpiece with Distributed Agile
Building Mobile (app) Masterpiece with Distributed Agile
Wee Witthawaskul
Oxente BDD
Oxente BDD
Milfont Consulting
Chapter 1 ASE Slides ppt
Chapter 1 ASE Slides ppt
Mr SMAK
Expert Recommendation with Usage Expertise
Expert Recommendation with Usage Expertise
davema
Michael Bolton - Two futures of software testing - Sept 2010
Michael Bolton - Two futures of software testing - Sept 2010
David O'Dowd
Acceptance testfurureinmind
Acceptance testfurureinmind
LeanDog
Getting started with Agile
Getting started with Agile
kutuma
A tale of bad requirements
A tale of bad requirements
Fran McKain
Effective Strategies for Distributed Testing
Effective Strategies for Distributed Testing
Anand Bagmar
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
Tieturi Oy
Real developers-dont-need-unit-tests
Real developers-dont-need-unit-tests
Skills Matter
Shirly Ronen - User story testing activities
Shirly Ronen - User story testing activities
AgileSparks
Webapp acceptance testing a case study
Webapp acceptance testing a case study
ekantola
Practical Guide to Unit Testing
Practical Guide to Unit Testing
Krzysztof Szafranek
Pair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical things
Marcello Duarte
JDD2014: QA to AQ: shifting from quality assurance to agile quality - Joseph ...
JDD2014: QA to AQ: shifting from quality assurance to agile quality - Joseph ...
PROIDEA
IPSJ/SIGSE201506 パターンWG・AsianPLoP2015報告-公開用
IPSJ/SIGSE201506 パターンWG・AsianPLoP2015報告-公開用
Hironori Washizaki
Evolution of Pattern Languages: Designing Human Actions, Dialogue, & Films (P...
Evolution of Pattern Languages: Designing Human Actions, Dialogue, & Films (P...
Takashi Iba
大きな泥のカタマリを相手にするためのアジャイルと努力と苦労 by Joe Yoder (XP祭り2014)
大きな泥のカタマリを相手にするためのアジャイルと努力と苦労 by Joe Yoder (XP祭り2014)
Yasui Tsutomu
Testing System Qualities Agile2012 by Rebecca Wirfs-Brock and Joseph Yoder
Testing System Qualities Agile2012 by Rebecca Wirfs-Brock and Joseph Yoder
Joseph Yoder
AWS Summit Tokyo 2015 megane LT JAWS-UG TRAIN TRAIN 栄光に向かって走って行け
AWS Summit Tokyo 2015 megane LT JAWS-UG TRAIN TRAIN 栄光に向かって走って行け
Hajime Ogushi
Weitere ähnliche Inhalte
Was ist angesagt?
Postdoc Symposium - Abram Hindle
Postdoc Symposium - Abram Hindle
ICSM 2011
Building Mobile (app) Masterpiece with Distributed Agile
Building Mobile (app) Masterpiece with Distributed Agile
Wee Witthawaskul
Oxente BDD
Oxente BDD
Milfont Consulting
Chapter 1 ASE Slides ppt
Chapter 1 ASE Slides ppt
Mr SMAK
Expert Recommendation with Usage Expertise
Expert Recommendation with Usage Expertise
davema
Michael Bolton - Two futures of software testing - Sept 2010
Michael Bolton - Two futures of software testing - Sept 2010
David O'Dowd
Acceptance testfurureinmind
Acceptance testfurureinmind
LeanDog
Getting started with Agile
Getting started with Agile
kutuma
A tale of bad requirements
A tale of bad requirements
Fran McKain
Effective Strategies for Distributed Testing
Effective Strategies for Distributed Testing
Anand Bagmar
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
Tieturi Oy
Real developers-dont-need-unit-tests
Real developers-dont-need-unit-tests
Skills Matter
Shirly Ronen - User story testing activities
Shirly Ronen - User story testing activities
AgileSparks
Webapp acceptance testing a case study
Webapp acceptance testing a case study
ekantola
Practical Guide to Unit Testing
Practical Guide to Unit Testing
Krzysztof Szafranek
Pair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical things
Marcello Duarte
Was ist angesagt?
(16)
Postdoc Symposium - Abram Hindle
Postdoc Symposium - Abram Hindle
Building Mobile (app) Masterpiece with Distributed Agile
Building Mobile (app) Masterpiece with Distributed Agile
Oxente BDD
Oxente BDD
Chapter 1 ASE Slides ppt
Chapter 1 ASE Slides ppt
Expert Recommendation with Usage Expertise
Expert Recommendation with Usage Expertise
Michael Bolton - Two futures of software testing - Sept 2010
Michael Bolton - Two futures of software testing - Sept 2010
Acceptance testfurureinmind
Acceptance testfurureinmind
Getting started with Agile
Getting started with Agile
A tale of bad requirements
A tale of bad requirements
Effective Strategies for Distributed Testing
Effective Strategies for Distributed Testing
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
Real developers-dont-need-unit-tests
Real developers-dont-need-unit-tests
Shirly Ronen - User story testing activities
Shirly Ronen - User story testing activities
Webapp acceptance testing a case study
Webapp acceptance testing a case study
Practical Guide to Unit Testing
Practical Guide to Unit Testing
Pair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical things
Andere mochten auch
JDD2014: QA to AQ: shifting from quality assurance to agile quality - Joseph ...
JDD2014: QA to AQ: shifting from quality assurance to agile quality - Joseph ...
PROIDEA
IPSJ/SIGSE201506 パターンWG・AsianPLoP2015報告-公開用
IPSJ/SIGSE201506 パターンWG・AsianPLoP2015報告-公開用
Hironori Washizaki
Evolution of Pattern Languages: Designing Human Actions, Dialogue, & Films (P...
Evolution of Pattern Languages: Designing Human Actions, Dialogue, & Films (P...
Takashi Iba
大きな泥のカタマリを相手にするためのアジャイルと努力と苦労 by Joe Yoder (XP祭り2014)
大きな泥のカタマリを相手にするためのアジャイルと努力と苦労 by Joe Yoder (XP祭り2014)
Yasui Tsutomu
Testing System Qualities Agile2012 by Rebecca Wirfs-Brock and Joseph Yoder
Testing System Qualities Agile2012 by Rebecca Wirfs-Brock and Joseph Yoder
Joseph Yoder
AWS Summit Tokyo 2015 megane LT JAWS-UG TRAIN TRAIN 栄光に向かって走って行け
AWS Summit Tokyo 2015 megane LT JAWS-UG TRAIN TRAIN 栄光に向かって走って行け
Hajime Ogushi
JDD 2016 - Marcin Stozek - Docker. Przewodnik dla poczatkujacych
JDD 2016 - Marcin Stozek - Docker. Przewodnik dla poczatkujacych
PROIDEA
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Joseph Yoder
AWSでアプリ開発するなら 知っておくべこと
AWSでアプリ開発するなら 知っておくべこと
Keisuke Nishitani
DevOpsとか言う前にAWSエンジニアに知ってほしいアプリケーションのこと
DevOpsとか言う前にAWSエンジニアに知ってほしいアプリケーションのこと
Terui Masashi
Andere mochten auch
(10)
JDD2014: QA to AQ: shifting from quality assurance to agile quality - Joseph ...
JDD2014: QA to AQ: shifting from quality assurance to agile quality - Joseph ...
IPSJ/SIGSE201506 パターンWG・AsianPLoP2015報告-公開用
IPSJ/SIGSE201506 パターンWG・AsianPLoP2015報告-公開用
Evolution of Pattern Languages: Designing Human Actions, Dialogue, & Films (P...
Evolution of Pattern Languages: Designing Human Actions, Dialogue, & Films (P...
大きな泥のカタマリを相手にするためのアジャイルと努力と苦労 by Joe Yoder (XP祭り2014)
大きな泥のカタマリを相手にするためのアジャイルと努力と苦労 by Joe Yoder (XP祭り2014)
Testing System Qualities Agile2012 by Rebecca Wirfs-Brock and Joseph Yoder
Testing System Qualities Agile2012 by Rebecca Wirfs-Brock and Joseph Yoder
AWS Summit Tokyo 2015 megane LT JAWS-UG TRAIN TRAIN 栄光に向かって走って行け
AWS Summit Tokyo 2015 megane LT JAWS-UG TRAIN TRAIN 栄光に向かって走って行け
JDD 2016 - Marcin Stozek - Docker. Przewodnik dla poczatkujacych
JDD 2016 - Marcin Stozek - Docker. Przewodnik dla poczatkujacych
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
AWSでアプリ開発するなら 知っておくべこと
AWSでアプリ開発するなら 知っておくべこと
DevOpsとか言う前にAWSエンジニアに知ってほしいアプリケーションのこと
DevOpsとか言う前にAWSエンジニアに知ってほしいアプリケーションのこと
Ähnlich wie Pragmatic notdogmatictdd
Pragmatic notdogmatictdd agile2012
Pragmatic notdogmatictdd agile2012
drewz lin
Distributed agile testing_for_enterprises
Distributed agile testing_for_enterprises
ThoughtWorks Studios
Test Driven Development by Denis Lutz
Test Driven Development by Denis Lutz
jazzman1980
Agile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer Perspective
Wee Witthawaskul
xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012
Justin Gordon
TDD refresher
TDD refresher
Kerry Buckley
Software Testing with Agile Requirements Practices
Software Testing with Agile Requirements Practices
A B M Moniruzzaman
Agile Software Development Process Practice in Thai Culture
Agile Software Development Process Practice in Thai Culture
Wee Witthawaskul
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...
Steve Lange
Why Test Driven Development?
Why Test Driven Development?
Naresh Jain
Testing
Testing
Jan Voracek
Javascript Tests with Jasmine for Front-end Devs
Javascript Tests with Jasmine for Front-end Devs
Chris Powers
Software Testing Life Cycle
Software Testing Life Cycle
gueste730d5
Waterfallacies V1 1
Waterfallacies V1 1
Jorge Boria
Continuous Integration, Continuous Quality, Continuous Delivery
Continuous Integration, Continuous Quality, Continuous Delivery
John Ferguson Smart Limited
Approval Tests at Agile 2012
Approval Tests at Agile 2012
Lynn Langit
Test-Driven Development Reference Card
Test-Driven Development Reference Card
Seapine Software
test
test
gikrauss
test
test
gikrauss
Release Management for Large Enterprises
Release Management for Large Enterprises
Salesforce Developers
Ähnlich wie Pragmatic notdogmatictdd
(20)
Pragmatic notdogmatictdd agile2012
Pragmatic notdogmatictdd agile2012
Distributed agile testing_for_enterprises
Distributed agile testing_for_enterprises
Test Driven Development by Denis Lutz
Test Driven Development by Denis Lutz
Agile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer Perspective
xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012
TDD refresher
TDD refresher
Software Testing with Agile Requirements Practices
Software Testing with Agile Requirements Practices
Agile Software Development Process Practice in Thai Culture
Agile Software Development Process Practice in Thai Culture
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...
Why Test Driven Development?
Why Test Driven Development?
Testing
Testing
Javascript Tests with Jasmine for Front-end Devs
Javascript Tests with Jasmine for Front-end Devs
Software Testing Life Cycle
Software Testing Life Cycle
Waterfallacies V1 1
Waterfallacies V1 1
Continuous Integration, Continuous Quality, Continuous Delivery
Continuous Integration, Continuous Quality, Continuous Delivery
Approval Tests at Agile 2012
Approval Tests at Agile 2012
Test-Driven Development Reference Card
Test-Driven Development Reference Card
test
test
test
test
Release Management for Large Enterprises
Release Management for Large Enterprises
Kürzlich hochgeladen
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
Paola De la Torre
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Katpro Technologies
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Enterprise Knowledge
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Results
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
The Digital Insurer
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Drew Madelung
Kürzlich hochgeladen
(20)
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Pragmatic notdogmatictdd
1.
Joseph W. Yoder
Pragmatic, Not Dogmatic TDD: Rethinking How We Test Joseph W. Yoder The Refactory, Inc. joe@refactory.com http://www.refactory.com Bio Joseph Yoder (Founder and Architect, The Refactory; Hillside Board President; Long Term ACM Member) pattern enthusiast, author of Big Ball of Mud; programs adaptive software, runs a development company, consults top companies on software needs, agile enthusiast, amateur photographer, motorcycle enthusiast, enjoys dancing samba!!! Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 2 TDD & Testing Best Practices Page - 1
2.
Joseph W. Yoder
Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 3 Test-Driven Development Cycle Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 4 TDD & Testing Best Practices Page - 2
3.
Joseph W. Yoder
Add a Test design class interface + define expected behavior Make Test Pass create actual behavior + most simple solution Refactor clean implemented code + adjust class design Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 5 First Classic Test-Driven Development Start test fails Write Re(Write) Check if production a test test fails code 1 or more tests fail test succeeds all tests Clean up code succeed Check all tests (Refactor) succeed Ship Ready to it!!! Release? Short Sprints Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 6 TDD & Testing Best Practices Page - 3
4.
Joseph W. Yoder
TDD Promises 1 Tests help you build the right thing 2 Tests guide development 3 Tests keep you focused 4 Tests allow you to change code safely and quickly 5 Tests ensure what you build works 6 You will end up with quality code 7 You will end up with a good design Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 7 Question: Do tests help you build the right things? Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 8 TDD & Testing Best Practices Page - 4
5.
Joseph W. Yoder
Common Misperceptions Tests verify program correctness 3.1415926535… Tests enable and encourage well-designed code Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 9 Understanding Tests Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 10 TDD & Testing Best Practices Page - 5
6.
Joseph W. Yoder
Test Target → the thing T we are trying to test. Action → changes environment or the Test Target. Assertion → comparison of expected vs observable outcome of the action on the Test Target. Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 11 Test → a sequence of at least one action and one assertion T T’ Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 12 TDD & Testing Best Practices Page - 6
7.
Joseph W. Yoder
Good Test Outline 1. Set up 2. Declare the expected results 3. Exercise the test 4. Get the actual results 5. Assert that the actual results match the expected results Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 13 Testing Questions What is a good size for a test? a class? a set of classes? a set of interacting functions/methods? What is important to test? Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 14 TDD & Testing Best Practices Page - 7
8.
Joseph W. Yoder
What to Test Significant scenarios of use, not isolated methods. The difficult parts: Complex interactions, intricate algorithms, tricky business logic Required system qualities Performance, scalability, throughput, security... How services respond to normal and exceptional invocations. Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 15 What Not to Test Tests should add value, not just be an exercise. Do not test: setters and getters (unless they have side effects or are very complex) every boundary condition; only test those with significant business value every exception; only those likely to occur or that will cause catastrophic problems. Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 16 TDD & Testing Best Practices Page - 8
9.
Joseph W. Yoder
Question: Do tests help you build the right things? Answer: Yes. But only if you have the right tests, not superficial tests. Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 17 Ten Commandments of Testing 1. Test single complete scenarios 2. Do not create dependencies between tests 3. Only verify a single thing in each assertion 4. Respect class encapsulation 5. Test limit values and boundaries 6. Test expected exceptional scenarios 7. Test interactions with other objects 8. When you find a bug, write a test to show it 9. Do not duplicate application logic in tests 10. Keep your test code clean Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 18 TDD & Testing Best Practices Page - 9
10.
Joseph W. Yoder
Question: Do tests guide development and keep you focused? Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 19 Two Faces of Testing Defining tests But you may helps limit be missing scope and the bigger increases focus picture… Tests force you Might need to to implement consider how functionality current instead of functionality jumping around affects the and tweaking rest of the stuff system Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 20 TDD & Testing Best Practices Page - 10
11.
Joseph W. Yoder
Thinking Fast vs. Slow Fast thinking: decisions based on intuition, biases, ingrained patterns, and emotions Slow thinking: Reasoning, logical thinking Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 21 Take Time For Both Slow thinking Pairing and discussion options are why you want to implement something a certain way Sketching, noodling, design spikes Fast thinking Fast turns of coding, testing and quick fixes… (Red/Green) Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 22 TDD & Testing Best Practices Page - 11
12.
Joseph W. Yoder
You are not doing TDD! Common Belief You must create You are not your tests first! practicing TDD correctly unless you write tests first, before writing any code that is tested. Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 23 Dogmatic Synonyms: assertive, bullheaded, categorical, definite, despotic, determined, dictative, doctrinaire, domineering, downright, fanatical, intolerant, narrow-minded, one-sided, overbearing, peremptory, stubborn, tyrannical, unequivocal Antonyms: amenable, flexible, manageable Blindly following the TDD doctrine says you … “Must” write your test first!!! Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 24 TDD & Testing Best Practices Page - 12
13.
Joseph W. Yoder
Is it OK to write tests after you write production code? Is this cheating? Does this result in bad code? Does it result in a bad design? Does it reinforce “slacker” tendencies to not write tests? Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 25 Pragmatic Synonyms: businesslike, common, commonsense, down-to-earth, easy, efficient, hard, hardboiled, hardheaded, logical, matter-of-fact, mundane, no- nonsense, practical , rational, realistic, sane, sensible, sober, unfantastic, unidealistic, unsentimental Antonyms: idealistic, unrealistic Sometimes it is more practical and logical to write your tests after you write the code!!! Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 26 TDD & Testing Best Practices Page - 13
14.
Joseph W. Yoder
Common Practice Tests don’t always get written first. Start test fails Write Re(Write) Check if production a test test fails code 1 or more tests fail test succeeds all tests Clean up code succeed Check all tests (Refactor) succeed Ship Ready to it!!! Release? Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 27 A Pragmatic Testing Cycle Tests verify that code works as expected. Tests don’t always guide what code you write. Write some Check if Re(write) production test fails a test code Clean up code (Refactor) 1 or more tests fail Check all tests succeed all tests succeed Ship Ready to it!!! Release? Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 28 TDD & Testing Best Practices Page - 14
15.
Joseph W. Yoder
Pragmatic Testing Cycle Alternate between writing test code and production in small steps. Use feedback from tests to verify code (integrate often). Don’t worry whether the chicken or the egg comes first. Sometimes development guides testing. Do what yields the most value! Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 29 Question: Do tests guide development and keep you focused? Answer: Yes if you have the right tests. But tests do not tell you if you built it right. Sometimes you need to take a broader look. Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 30 TDD & Testing Best Practices Page - 15
16.
Joseph W. Yoder
Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 31 Question: Do tests allow you to change code safely and quickly? Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 32 TDD & Testing Best Practices Page - 16
17.
Joseph W. Yoder
Test-Driven Refactoring Development Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 33 Common Wisdom Work refactoring into your daily routine. “In almost all cases, I’m opposed to setting aside time for refactoring. In my view refactoring is not an activity you set aside time to do. Refactoring is something you do all the time in little bursts.”—Martin Fowler Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 34 TDD & Testing Best Practices Page - 17
18.
Joseph W. Yoder
Testing is Key!!! Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 35 Two Refactoring Types* Floss Refactorings—frequent, small changes, intermingled with other programming (daily health) Root canal refactorings— infrequent, protracted refactoring, during which programmers do nothing else (major repair) * Emerson Murphy-Hill and Andrew Black in “Refactoring Tools: Fitness for Purpose” http://web.cecs.pdx.edu/~black/publications/IEEESoftwareRefact.pdf Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 36 TDD & Testing Best Practices Page - 18
19.
Joseph W. Yoder
Sometimes it is easier to throw away tests, change the design of your production code, and then write new tests. Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 37 The design of test code needs to evolve, just like production code! Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 38 TDD & Testing Best Practices Page - 19
20.
Joseph W. Yoder
….if your tests slow down your ability to make the changes you want to make in production code, rethink whether you want to keep all your tests. Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 39 Refactoring Test bar should Production Code continue green But tests can also have smells! Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 40 TDD & Testing Best Practices Page - 20
21.
Joseph W. Yoder
Possible Duplicate Code Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 41 So, Refactor the Tests! Create Test Hierarchy Pull Up Common Parts Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 42 TDD & Testing Best Practices Page - 21
22.
Joseph W. Yoder
Additional Test Refactorings Tests have Refactorings that are specific to test code … Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 43 Test Method Refactorings Replace actions & assertions with simpler equivalent ones: Add Assertion Explanation Introduce Assertion Method Simplify Test Scenario Separate Action from Assertion Decompose Assertion Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 44 TDD & Testing Best Practices Page - 22
23.
Joseph W. Yoder
Test Class Refactorings Reorganize actions and assertions to reduce duplication: Add Fixture Introduce Initialization Method Inline Initialization Method Join Incremental Tests Split Test Join Similar Tests with Distinct Data Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 45 Question: Do tests allow you to change code safely and quickly? Answer: Yes and no. It takes courage to throw away and rewrite your tests. Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 46 TDD & Testing Best Practices Page - 23
24.
Joseph W. Yoder
Classic Test-Driven Development Rhythm User story-by-story: Write the simplest test Run the test and fail Write the simplest code that will pass the test Run the test and pass Repeat until a “story” is tested and implemented “Design happens between the keystrokes” Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 47 Question: Do tests help with quality code and good design? Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 48 TDD & Testing Best Practices Page - 24
25.
Joseph W. Yoder
Another View of Test-Driven Development Requirements Architecture Envisioning Envisioning Conceptual Modeling (days/weeks/...) (days/weeks/…) Iteration 0: Envisioning Iteration Modeling (hours) a little bit of modeling Model Storming then a lot of coding (minutes) Fast TDD(hours) Iteration n: Development Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 49 Spike Solutions If some technical difficulty threatens to hold up the system's development, Or you are not sure how to solve a particular problem… “Put a pair of developers on the problem for a week or two to reduce the potential risk” Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 50 TDD & Testing Best Practices Page - 25
26.
Joseph W. Yoder
Pragmatic Testing Questions What are the most important kinds of testing you should focus on? Who should write them? Who run them? When are they run? How are they run? Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 51 Different Kinds of Tests Unit Tests – Tests classes and components Integration Tests – Tests code integration Smoke Tests – Quick tests of core functionality Performance Tests – Test system under load Regression Tests – Tests it is still working Acceptance Tests – Requirements testing System Tests – Test all parts together Common to only focus on Unit Tests in TDD!!! Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 52 TDD & Testing Best Practices Page - 26
27.
Joseph W. Yoder
Tests Can Overlap… Smoke Tests Quality Scenario Integration Tests Acceptance Tests (Functional and qualities) Unit Tests Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 53 TDD should be more than… Developing unit tests along with code Only checking in tested code with unit tests + defining some customer acceptance Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 54 TDD & Testing Best Practices Page - 27
28.
Joseph W. Yoder
Other Techniques for Improving Quality Steve McConnell http://kev.inburke.com/kevin/the-best-ways-to-find-bugs-in-your-code/ Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 55 Combine and Conquer The average is 40% for any one technique… No one approach is adequate Combining techniques gives you much higher quality Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 56 TDD & Testing Best Practices Page - 28
29.
Joseph W. Yoder
Question: Do tests help with quality code and good design? Answer: They can but … you need more than tests. Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 57 The Agile Dream … Identify some Create some Construct based requirements acceptance criteria on the tests Deliver some working Test to verify the software requirements Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 58 TDD & Testing Best Practices Page - 29
30.
Joseph W. Yoder
Agile Design Values Core values: Design Simplicity Communication Teamwork Trust Satisfying stakeholder needs Keep learning Lots of Testing!!! Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 59 Pragmatic Test-Driven Development (core process) Tests written & must pass before checking in production code Write some Check if Re(write) production test fails a test code Clean up code (Refactor) 1 or more tests fail Check all tests succeed all tests succeed Ship Ready to it!!! Release? Short Sprints Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 60 TDD & Testing Best Practices Page - 30
31.
Joseph W. Yoder
TDD Challenges 1. Lot’s of Unit Tests with classic TDD is not enough to guarantee good design… Dogmatic TDD can focus on functionality and features rather than design 2. Deception that incremental test mode will give you an inductive way to prove it works…probably more deductive and example driven… All squirrels I see in Illinois are brown, therefore all squirrels are brown…. 3. TDD or unit tests can hurt the evolution/refactoring phase….“Oh no! Changes might break the tests” 4. Not enough Quality Tests are written. Focus often is on function and missing quality. 5. Testing Patterns of Collaboration are important, Unit tests on class might not be good enough. Setting up Mocks doesn’t really test collaborations. Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 61 Pragmatic Test Driven Development Is… Practical… Focus on how testing best fits into and enhances your current software development practices. Thinking carefully about how best to validate that your software meets its requirements. Developing the optimum set of tests to feel confident your system keeps working, not just Unit Testing! Including both slow and fast thinking with your tests. Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 62 TDD & Testing Best Practices Page - 31
32.
Joseph W. Yoder
Keep It Focused Keep It Fresh Expand your Horizons …Be Practical Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 63 Where Did All The Time Go? Muito Obrigado!!! rebecca@wirfs-brock.com joe@refactory.com Twitter: @rebeccawb Twitter: @metayoda http://refactory.com/training/test-driven-development http://adaptiveobjectmodel.com/2012/01/what-is-pragmatic-tdd/ Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 64 TDD & Testing Best Practices Page - 32
33.
Joseph W. Yoder
Minimum Bar for Pragmatic TDD All production code must have tests validating it. Think about tests early in each iteration and how to validate the next release. Core tests include important aspect of your software, what you really care about. Include both slow and fast thinking with your tests. Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 65 Ten Tenets of Testing 1. Test single complete scenarios 2. Do not create dependencies between tests 3. Only verify a single thing in each assertion 4. Respect class encapsulation 5. Test limit values and boundaries 6. Test expected exceptional scenarios 7. Test interactions with other objects 8. When you find a bug, write a test to show it 9. Do not duplicate application logic in tests 10. Keep your test code clean Pragmatic Test Driven Development – Copyright © 2012 Joseph W. Yoder The Refactory, Inc. Slide - 66 TDD & Testing Best Practices Page - 33
Jetzt herunterladen