Upgrade to Pro — share decks privately, control downloads, hide ads and more …

It's Not Just About Tests

It's Not Just About Tests

Talk about Test Driven Development (TDD). Addressing concepts that state that TDD is much more than write tests to the code.

Raphael Amorim

October 19, 2015
Tweet

More Decks by Raphael Amorim

Other Decks in Programming

Transcript

  1. IT'S NOT JUST ABOUT TESTS
    RAPHAEL AMORIM

    View full-size slide

  2. WHAT’S SOFTWARE
    TEST?
    FIRST THINGS FIRST

    View full-size slide

  3. 1. SOFTWARE TESTING IS A PROCESS OF
    EXECUTING A PROGRAM OR
    APPLICATION WITH THE INTENT OF FINDING
    THE SOFTWARE BUGS.

    View full-size slide

  4. 2. PROCESS OF VALIDATING AND VERIFYING
    THAT A SOFTWARE PROGRAM OR
    APPLICATION OR PRODUCT.

    View full-size slide

  5. 3. IN SHORT:
    THERE ARE SEVERAL TYPES/
    METHODOLOGIES OF SOFTWARE TESTING.

    View full-size slide

  6. 3. IN SHORT:
    THERE ARE SEVERAL TYPES/
    METHODOLOGIES OF SOFTWARE TESTING.
    E.G:
    UNIT TESTS,
    INTEGRATION TESTS,
    OPERATIONAL ACCEPTANCE TESTS…

    View full-size slide

  7. BUT WHY TEST MY SOFTWARE ?

    View full-size slide

  8. IT'S NOT JUST ABOUT TESTS
    WHY SOFTWARE TESTS?
    ▸ To ensure that what we create does what it’s supposed to do.

    View full-size slide

  9. IT'S NOT JUST ABOUT TESTS
    WHY SOFTWARE TESTS?
    ▸ To ensure that what we create does what it’s supposed to do.
    ▸ “Something that works when one person is using it may not work when
    hundreds of people are using it”.

    View full-size slide

  10. IT'S NOT JUST ABOUT TESTS
    WHY SOFTWARE TESTS?
    ▸ To ensure that what we create does what it’s supposed to do.
    ▸ “Something that works when one person is using it may not work when
    hundreds of people are using it”.
    ▸ We owe it to our users and ourselves to deliver the best application we can.

    View full-size slide

  11. IT'S NOT JUST ABOUT TESTS
    WHY SOFTWARE TESTS?
    ▸ To ensure that what we create does what it’s supposed to do.
    ▸ “Something that works when one person is using it may not work when
    hundreds of people are using it”.
    ▸ We owe it to our users and ourselves to deliver the best application we can.
    ▸ Tests means Quality.

    View full-size slide

  12. WE'LL NOT TALK ABOUT TESTS.
    WE'LL TALK ABOUT DEVELOPMENT PROCESS.

    View full-size slide

  13. TEST DRIVEN
    DEVELOPMENT
    SOFTWARE DEVELOPMENT
    PROCESS

    View full-size slide

  14. HOWEVER, TDD IS NOT THE "ONLY ONE"
    ( BDD, CDD, DDD, MDD, FDD, ATDD,
    AND THE OTHER DOUBLE D’S )

    View full-size slide

  15. IT’S NOT JUST ABOUT TESTS
    TDD CYCLE

    View full-size slide

  16. “ FOLK WISDOM IN SOFTWARE DEVELOPMENT TEACHES
    THAT INTERFACES SHOULDN'T BE UNDULY INFLUENCED BY
    IMPLEMENTATIONS. WRITING A TEST FIRST IS A CONCRETE
    WAY TO ACHIEVE THIS SEPARATION. ”
    Kent Beck,
    Extreme Programming Explained: Embrace Change
    IT'S NOT JUST ABOUT TESTS

    View full-size slide

  17. “ IF IT'S HARD TO BE TESTED,
    SORRY YOUR CODE DESIGN IS WRONG. ”
    Raphael Amorim,
    Random Tweet
    IT'S NOT JUST ABOUT TESTS

    View full-size slide

  18. TEST DRIVEN
    DEVELOPMENT
    “ The Bad Parts ”

    View full-size slide

  19. EXTRA DEVELOPMENT
    REQUIRED

    View full-size slide

  20. MISUSE OF MOCK
    OBJECTS

    View full-size slide

  21. MISUSE OF MOCK
    OBJECTS
    http://martinfowler.com/articles/mocksArentStubs.html
    Mocks Aren’t Stubs
    http://blog.testdouble.com/posts/2014-01-25-the-failures-of-intro-to-tdd.html
    The Failures of "Intro to TDD"

    View full-size slide

  22. TEST DRIVEN
    DEVELOPMENT
    “ The Good Parts ”

    View full-size slide

  23. NO MORE BUGS INTO
    PRODUCTION

    View full-size slide

  24. ALMOST NO BUGS INTO
    PRODUCTION
    Back to Reality:

    View full-size slide

  25. TEST DRIVEN
    DEVELOPMENT
    “ The AWESOME Parts ”

    View full-size slide

  26. GREAT API DESIGN

    View full-size slide

  27. ++DOCUMENTATION

    View full-size slide

  28. HIGH SPEED DEBUGGING

    View full-size slide

  29. ENCOURAGES SOLID DESIGN

    View full-size slide

  30. TDD IS NOT FOR EVERYONE

    View full-size slide

  31. TDD IS NOT FOR EVERYONE
    http://claysnow.co.uk/to-tdd-or-not-to-tdd/
    To TDD or not to TDD? That is not the question

    View full-size slide

  32. “ TDD IS NOT EASY, IT TAKES TIME TO LEARN AND GET
    RIGHT AND THERE IS A RISK THAT IT COULD BE A TIME SINK
    FOR A PROJECT IF THE ENTIRE DEVELOPMENT TEAM DOES
    NOT BUY INTO ITS USAGE. ”
    Bradley Braithwaite,
    TDD: It's not just about the Tests
    IT'S NOT JUST ABOUT TESTS

    View full-size slide

  33. WHERE TO START

    View full-size slide

  34. IT'S NOT JUST ABOUT TESTS
    ▸ The ThreeRules Of Tdd 

    ( http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd )
    ▸ Test Driven Development: By Example

    ( http://www.amazon.com/Test-Driven-Development-By-Example/dp/
    0321146530 )
    ▸ Growing Object-Oriented Software, Guided by Tests

    ( http://www.amazon.com/Growing-Object-Oriented-Software-Guided-Tests/dp/
    0321503627 )
    ▸ Test-Driven Development: A Practical Guide: A Practical Guide

    ( http://www.amazon.com/Test-Driven-Development-Practical-Guide/dp/
    0131016490 )

    View full-size slide

  35. IT'S NOT JUST ABOUT TESTS
    ▸ TDD no Mundo Real (PT-BR)

    ( http://tddnomundoreal.com.br/ )

    View full-size slide

  36. “ THANK YOU! ”
    - @RAPHAMUNDI

    View full-size slide

  37. IT'S NOT JUST ABOUT TESTS
    REFERENCES
    ▸ Extreme Programming Explained: Embrace Change, 2000 - Kent Beck.
    ▸ TDD: It's not just about the Tests, 2012 - Bradley Braithwaite
    ▸ 5 Reasons We Need Software Testing, 2014 - Cullyn Thomson

    View full-size slide