SlideShare una empresa de Scribd logo
1 de 39
Overcoming the Obstacles,
Pitfalls, and Dangers of
Automated Testing

      Stephen D. Ritchie
      6-Sept-2012
Purpose




               Useful

          Automated Testing

   Make Software Better
                Excella Consulting
Agenda
  1   Motivation

  2   Principles

  3   Obstacles
         Excella Consulting   -3-
Chrysler New Yorker




                      Excella Consulting
First Topic: Motivation




                    Why Write
                    Unit Tests?
             Why Automate
               Testing?
                          Excella Consulting
Agenda
  1   Motivation

  2   Principles

  3   Obstacles
         Excella Consulting   -6-
Visibility & Insight

Problem Detection

Advance Warning
Microscope: Visibility and Insight




                               Excella Consulting
Smoke Detector: Problem Detection




                           Excella Consulting
Weather Satellite: Advance Warning




                            Excella Consulting
Example




           Perhaps
          An Example
           Would Be
            Helpful

             Excella Consulting
Automated Tests
  Make Sure
Software Works
  As Intended
Agenda
  1   Motivation

  2   Principles

  3   Obstacles
         Excella Consulting   - 13 -
Principles




        Zero Configuration
                  Fast
               Clear Result
             Easy To Maintain
                   Excella Consulting
Automated Testing: Vocabulary




• Test-Driven Development (TDD)
    – Write a Test, Watch the Test Fail
    – Write Code, Make the Test Pass
    – Write the Next Test


• Behavior-Driven Development (BDD)
    – Given a Desired Behavior


• Intention Checking
    – The Software Works, As Intended




                                 Excella Consulting
Principles




        Zero Configuration

 I can run your tests,
 You can run mine.

              Excella Consulting
Principles




             Fast

    All the tests run in
    just a few minutes

             Excella Consulting
Principles




             Clear Results

              Pass/Fail
             Focused Test

                 Excella Consulting
Principles




             Easy to Maintain

             Conventional
                  Brief

                  Excella Consulting
The Long-Term Goals




• Automated Testing
    – Vigilantly Monitoring the Code
• Readability
    – Have Mercy on Future Developers
        • Conventional
        • Short, Clear
• Maintainability
    – Both a Sword and a Shield
        • Code Works as Intended
        • Protects Against Regression
    – Reliable
    – N+1 is Easy




                                 Excella Consulting
Agenda
  1   Motivation

  2   Principles

  3   Obstacles
         Excella Consulting   - 21 -
One Primary Assert To Rule Them All




                   Obstacle 1
        Over-Specifying



                            Excella Consulting
One Primary Assert To Rule Them All




• Is your effort to refactor and improve code overwhelmed by the
  time it takes to maintain/update/rewrite all those failing unit tests?
    – Your test-code could be over specifying things.


• Perhaps an example would be helpful …




                               Excella Consulting
One Primary Assert To Rule Them All




• Debate: Only one assertion per test?

• Test Method Tests One and Only One Scenario
    – 1 Primary Assert Verifies and Validates the Scenario


• Secondary Asserts
    – Support Arrangement and Preconditions
    – Support Post-Conditions


• Avoid Asserts that Over Specify
    – Too Literal => Inhibited Refactoring
    – Imagined Benefit => Rigidity



                               Excella Consulting
Four Ways to Fake Time




                  Obstacle 2
             Time Crunch



                         Excella Consulting
Four Ways to Fake Time




• Are your test methods starting to fail because the code-under-test is
  coupled to the system clock?
    – Your code is too dependent on   System.DateTime.Now

• Perhaps an example would be helpful …




                              Excella Consulting
Four Ways to Fake Time




• Things to Watch For
    – Thread Safety
       • public static class SystemDateTime

   – Making Your Privates Public
   // Inject the class dependency on DateTime.Now
   private DateTime? _now;
   public DateTime Now
   {
       get { return _now ?? DateTime.Now; }
       set { _now = value; }
   }



                          Excella Consulting
Database Killed The Integration Test




                   Obstacle 3
                   Database



                             Excella Consulting
Database Killed The Integration Test




• Are your automated integration tests failing because of the data in
  the testing database; the data keeps changing?

• Perhaps an example would be helpful …




                             Excella Consulting
Database Killed The Integration Test




• Automated Testing Persistence
    – NDbUnit
    – SQL Server Express
    – NHibernate


• Surface Testing
    – Data Access Layer: API Surface
    – Liberates Refactoring




                              Excella Consulting
In Test Code, Do Repeat Yourself ... Do Repeat Yourself




         Obstacle 4
     Unhelpful …
        Reuse
        Repetition
        Coupling
                             Excella Consulting
In Test Code, Do Repeat Yourself ... Do Repeat Yourself




• Do you have an explosion of test methods, with the ratio of test
  code to code-under-test that’s way too high?
    – Your test-code is too DRY in some places and …
    – Not DRY enough in all the right places


• Perhaps an example would be helpful …




                              Excella Consulting
In Test Code, Do Repeat Yourself ... Do Repeat Yourself




• Data-Drive Test Cases
    – One Test Method
    – Many Test Scenarios
• Repeat Code in a “TestsContext” Class
    – Sidecar Approach
• Use Helper Classes
    – Extension methods
    – Composition
• Keep Inheritance in Reserve
    – Overall Testing Framework




                             Excella Consulting
Agenda
  1   Motivation

  2   Principles

  3   Obstacles
         Excella Consulting   - 34 -
Of Course It’s Safe … After You




                             Excella Consulting
Further Discussion




            Any questions?

           Any comments?


                     Excella Consulting
Shameless Self Promotion Time!




                            40% off eBook at
                            apress.com

                            Use promo code:
                            LIN340

                            Offer ends 6-Oct-2012




                            Excella Consulting
Contact Me




• Twitter:    @ruthlesshelp

• Email:      stephen.ritchie@excella.com

• Blog:       http://ruthlesslyhelpful.net

• LinkedIn:   http://www.linkedin.com/in/sritchie




                           Excella Consulting
Slides and Examples




• Slideshare: http://www.slideshare.net/ruthlesshelp

• Github:      http://github.com/ruthlesshelp




                           Excella Consulting

Más contenido relacionado

La actualidad más candente

La actualidad más candente (10)

How to Use Innoslate for Beginners
How to Use Innoslate for BeginnersHow to Use Innoslate for Beginners
How to Use Innoslate for Beginners
 
Part of the DLM story: Get your Database under Source Control - SQL In The City
Part of the DLM story: Get your Database under Source Control - SQL In The City Part of the DLM story: Get your Database under Source Control - SQL In The City
Part of the DLM story: Get your Database under Source Control - SQL In The City
 
Sql server infernals
Sql server infernalsSql server infernals
Sql server infernals
 
Eurosport's Kodakademi #2
Eurosport's Kodakademi #2Eurosport's Kodakademi #2
Eurosport's Kodakademi #2
 
Clean tests
Clean testsClean tests
Clean tests
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy Code
 
Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014
 
Single Responsibility Principle @ Clean Code Alliance Meetup
Single Responsibility Principle @ Clean Code Alliance MeetupSingle Responsibility Principle @ Clean Code Alliance Meetup
Single Responsibility Principle @ Clean Code Alliance Meetup
 
LF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
LF_APIStrat17_Don't Repeat Yourself - Your API is Your DocumentationLF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
LF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
 
[DevDay 2016] Design Pattern at a glance - Speaker: Tuan Do – Scrum Master a...
 [DevDay 2016] Design Pattern at a glance - Speaker: Tuan Do – Scrum Master a... [DevDay 2016] Design Pattern at a glance - Speaker: Tuan Do – Scrum Master a...
[DevDay 2016] Design Pattern at a glance - Speaker: Tuan Do – Scrum Master a...
 

Similar a Automated Testing: Obstacles, Pitfalls, and Dangers

DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangersDCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
Stephen Ritchie
 
Unit Testing Best Practices
Unit Testing Best PracticesUnit Testing Best Practices
Unit Testing Best Practices
Tomaš Maconko
 
Arch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesArch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best Practices
Igor Moochnick
 
Code review
Code reviewCode review
Code review
Aleksey Solntsev
 
ACC presentation for QA Club Kiev
ACC presentation for QA Club KievACC presentation for QA Club Kiev
ACC presentation for QA Club Kiev
Nikita Knysh
 

Similar a Automated Testing: Obstacles, Pitfalls, and Dangers (20)

DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangersDCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
 
Overcoming the Obstacles, Pitfalls, and Dangers of Unit Testing
Overcoming the Obstacles, Pitfalls, and Dangers of Unit TestingOvercoming the Obstacles, Pitfalls, and Dangers of Unit Testing
Overcoming the Obstacles, Pitfalls, and Dangers of Unit Testing
 
Agile Testing Best Practices
Agile Testing Best PracticesAgile Testing Best Practices
Agile Testing Best Practices
 
An Overview of .NET Best Practices
An Overview of .NET Best PracticesAn Overview of .NET Best Practices
An Overview of .NET Best Practices
 
An Overview of .NET Best Practices
An Overview of .NET Best PracticesAn Overview of .NET Best Practices
An Overview of .NET Best Practices
 
Advancing Testing Using Axioms
Advancing Testing Using AxiomsAdvancing Testing Using Axioms
Advancing Testing Using Axioms
 
Dare to Explore: Discover ET!
Dare to Explore: Discover ET!Dare to Explore: Discover ET!
Dare to Explore: Discover ET!
 
Intro to TDD
Intro to TDDIntro to TDD
Intro to TDD
 
Delhi it professionals
Delhi it professionalsDelhi it professionals
Delhi it professionals
 
A Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentA Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven Development
 
Unit Testing Best Practices
Unit Testing Best PracticesUnit Testing Best Practices
Unit Testing Best Practices
 
A New Model for Testing
A New Model for TestingA New Model for Testing
A New Model for Testing
 
Search Solutions 2015: Towards a new model of search relevance testing
Search Solutions 2015:  Towards a new model of search relevance testingSearch Solutions 2015:  Towards a new model of search relevance testing
Search Solutions 2015: Towards a new model of search relevance testing
 
Arch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesArch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best Practices
 
Code review
Code reviewCode review
Code review
 
ACC presentation for QA Club Kiev
ACC presentation for QA Club KievACC presentation for QA Club Kiev
ACC presentation for QA Club Kiev
 
STOP! You're Testing Too Much - Shawn Wallace
STOP!  You're Testing Too Much - Shawn WallaceSTOP!  You're Testing Too Much - Shawn Wallace
STOP! You're Testing Too Much - Shawn Wallace
 
Stop! you're testing too much
Stop!  you're testing too muchStop!  you're testing too much
Stop! you're testing too much
 
Ml2 production
Ml2 productionMl2 production
Ml2 production
 
Code Review
Code ReviewCode Review
Code Review
 

Más de Stephen Ritchie

Continuous Integration - NoVA CodeCamp 2014-10-11
Continuous Integration - NoVA CodeCamp 2014-10-11Continuous Integration - NoVA CodeCamp 2014-10-11
Continuous Integration - NoVA CodeCamp 2014-10-11
Stephen Ritchie
 

Más de Stephen Ritchie (13)

Overview of .NET Best Practices
Overview of .NET Best PracticesOverview of .NET Best Practices
Overview of .NET Best Practices
 
Lightweight Documentation
Lightweight DocumentationLightweight Documentation
Lightweight Documentation
 
Agile Engineering Sparker GLASScon 2015
Agile Engineering Sparker GLASScon 2015Agile Engineering Sparker GLASScon 2015
Agile Engineering Sparker GLASScon 2015
 
DevOps Requires Agility
DevOps Requires AgilityDevOps Requires Agility
DevOps Requires Agility
 
Continuous Integration - NoVA CodeCamp 2014-10-11
Continuous Integration - NoVA CodeCamp 2014-10-11Continuous Integration - NoVA CodeCamp 2014-10-11
Continuous Integration - NoVA CodeCamp 2014-10-11
 
Lightweight Documentation: An Agile Approach
Lightweight Documentation: An Agile ApproachLightweight Documentation: An Agile Approach
Lightweight Documentation: An Agile Approach
 
Continuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master CraftContinuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master Craft
 
Dc scrum agile_eng_20130923
Dc scrum agile_eng_20130923Dc scrum agile_eng_20130923
Dc scrum agile_eng_20130923
 
Test Driven Development: Blueprint, Toolbox, and Master Craft
Test Driven Development: Blueprint, Toolbox, and Master CraftTest Driven Development: Blueprint, Toolbox, and Master Craft
Test Driven Development: Blueprint, Toolbox, and Master Craft
 
Continuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master CraftContinuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master Craft
 
Continuous Integration DCAEC12
Continuous Integration DCAEC12Continuous Integration DCAEC12
Continuous Integration DCAEC12
 
Advanced Code Analysis with .NET
Advanced Code Analysis with .NETAdvanced Code Analysis with .NET
Advanced Code Analysis with .NET
 
Advanced Code Analysis In .NET
Advanced Code Analysis In .NETAdvanced Code Analysis In .NET
Advanced Code Analysis In .NET
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Automated Testing: Obstacles, Pitfalls, and Dangers

  • 1. Overcoming the Obstacles, Pitfalls, and Dangers of Automated Testing Stephen D. Ritchie 6-Sept-2012
  • 2. Purpose Useful Automated Testing Make Software Better Excella Consulting
  • 3. Agenda 1 Motivation 2 Principles 3 Obstacles Excella Consulting -3-
  • 4. Chrysler New Yorker Excella Consulting
  • 5. First Topic: Motivation Why Write Unit Tests? Why Automate Testing? Excella Consulting
  • 6. Agenda 1 Motivation 2 Principles 3 Obstacles Excella Consulting -6-
  • 7. Visibility & Insight Problem Detection Advance Warning
  • 8. Microscope: Visibility and Insight Excella Consulting
  • 9. Smoke Detector: Problem Detection Excella Consulting
  • 10. Weather Satellite: Advance Warning Excella Consulting
  • 11. Example Perhaps An Example Would Be Helpful Excella Consulting
  • 12. Automated Tests Make Sure Software Works As Intended
  • 13. Agenda 1 Motivation 2 Principles 3 Obstacles Excella Consulting - 13 -
  • 14. Principles Zero Configuration Fast Clear Result Easy To Maintain Excella Consulting
  • 15. Automated Testing: Vocabulary • Test-Driven Development (TDD) – Write a Test, Watch the Test Fail – Write Code, Make the Test Pass – Write the Next Test • Behavior-Driven Development (BDD) – Given a Desired Behavior • Intention Checking – The Software Works, As Intended Excella Consulting
  • 16. Principles Zero Configuration I can run your tests, You can run mine. Excella Consulting
  • 17. Principles Fast All the tests run in just a few minutes Excella Consulting
  • 18. Principles Clear Results Pass/Fail Focused Test Excella Consulting
  • 19. Principles Easy to Maintain Conventional Brief Excella Consulting
  • 20. The Long-Term Goals • Automated Testing – Vigilantly Monitoring the Code • Readability – Have Mercy on Future Developers • Conventional • Short, Clear • Maintainability – Both a Sword and a Shield • Code Works as Intended • Protects Against Regression – Reliable – N+1 is Easy Excella Consulting
  • 21. Agenda 1 Motivation 2 Principles 3 Obstacles Excella Consulting - 21 -
  • 22. One Primary Assert To Rule Them All Obstacle 1 Over-Specifying Excella Consulting
  • 23. One Primary Assert To Rule Them All • Is your effort to refactor and improve code overwhelmed by the time it takes to maintain/update/rewrite all those failing unit tests? – Your test-code could be over specifying things. • Perhaps an example would be helpful … Excella Consulting
  • 24. One Primary Assert To Rule Them All • Debate: Only one assertion per test? • Test Method Tests One and Only One Scenario – 1 Primary Assert Verifies and Validates the Scenario • Secondary Asserts – Support Arrangement and Preconditions – Support Post-Conditions • Avoid Asserts that Over Specify – Too Literal => Inhibited Refactoring – Imagined Benefit => Rigidity Excella Consulting
  • 25. Four Ways to Fake Time Obstacle 2 Time Crunch Excella Consulting
  • 26. Four Ways to Fake Time • Are your test methods starting to fail because the code-under-test is coupled to the system clock? – Your code is too dependent on System.DateTime.Now • Perhaps an example would be helpful … Excella Consulting
  • 27. Four Ways to Fake Time • Things to Watch For – Thread Safety • public static class SystemDateTime – Making Your Privates Public // Inject the class dependency on DateTime.Now private DateTime? _now; public DateTime Now { get { return _now ?? DateTime.Now; } set { _now = value; } } Excella Consulting
  • 28. Database Killed The Integration Test Obstacle 3 Database Excella Consulting
  • 29. Database Killed The Integration Test • Are your automated integration tests failing because of the data in the testing database; the data keeps changing? • Perhaps an example would be helpful … Excella Consulting
  • 30. Database Killed The Integration Test • Automated Testing Persistence – NDbUnit – SQL Server Express – NHibernate • Surface Testing – Data Access Layer: API Surface – Liberates Refactoring Excella Consulting
  • 31. In Test Code, Do Repeat Yourself ... Do Repeat Yourself Obstacle 4 Unhelpful … Reuse Repetition Coupling Excella Consulting
  • 32. In Test Code, Do Repeat Yourself ... Do Repeat Yourself • Do you have an explosion of test methods, with the ratio of test code to code-under-test that’s way too high? – Your test-code is too DRY in some places and … – Not DRY enough in all the right places • Perhaps an example would be helpful … Excella Consulting
  • 33. In Test Code, Do Repeat Yourself ... Do Repeat Yourself • Data-Drive Test Cases – One Test Method – Many Test Scenarios • Repeat Code in a “TestsContext” Class – Sidecar Approach • Use Helper Classes – Extension methods – Composition • Keep Inheritance in Reserve – Overall Testing Framework Excella Consulting
  • 34. Agenda 1 Motivation 2 Principles 3 Obstacles Excella Consulting - 34 -
  • 35. Of Course It’s Safe … After You Excella Consulting
  • 36. Further Discussion Any questions? Any comments? Excella Consulting
  • 37. Shameless Self Promotion Time! 40% off eBook at apress.com Use promo code: LIN340 Offer ends 6-Oct-2012 Excella Consulting
  • 38. Contact Me • Twitter: @ruthlesshelp • Email: stephen.ritchie@excella.com • Blog: http://ruthlesslyhelpful.net • LinkedIn: http://www.linkedin.com/in/sritchie Excella Consulting
  • 39. Slides and Examples • Slideshare: http://www.slideshare.net/ruthlesshelp • Github: http://github.com/ruthlesshelp Excella Consulting