How Much Should We Test?

How Much Should We Test?

Presented at SP Tech Talk

Cad06c496d78923202f2c30444fab2ea?s=128

Michael Cheng

March 09, 2017
Tweet

Transcript

  1. 2.

    GOALS OF TEST SUITE • Tests should be thorough •

    Tests should be stable • Tests should be fast • Tests should be few (minimal)
  2. 3.

    TEST DRIVEN DEVELOPMENT • We use test cases to guide

    the design of our code • 2 approaches to testing - Inside Out and Outside In • Outside In - Use integration tests to guide you • Inside Out - Build & test individual components, integrate later
  3. 4.
  4. 5.
  5. 14.

    MESSAGE TYPES • Query: Returns something / changes nothing •

    Command: Returns nothing / changes something Object under test Incoming Messages Outgoing Messages Send to self Command Query
  6. 15.
  7. 16.
  8. 17.
  9. 18.
  10. 19.
  11. 20.
  12. 21.

    RESOURCES • “The Magic Tricks of Testing” - Sandi Metz


    http://confreaks.tv/videos/railsconf2013- the-magic-tricks-of-testing • “Working Effectively with Unit Tests” - Jay Fields
 https://leanpub.com/wewut