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

Ensuring The Happy Path - Mobile Dev + Test

Ensuring The Happy Path - Mobile Dev + Test

Is there anything worse than trying to fix that one small bug, declaring it fixed, and then realizing “the fix” caused another bug somewhere else in your app? And there it is, one more bug and you are at it again. The small voice in your head says if only you had automated tests. We know we should invest more in testing because it can save us headaches down the road. Josiah Mory says that although getting started can be an uphill climb, automated testing does not have to be all or nothing. Josiah introduces approaches for automating developer tests along with test-driven development and behavior-driven development methodologies. Even though Josiah shows real examples using Swift and iOS code implementations, the concepts he discusses apply to any software. Leave this session with an understanding of the benefits we get from testing, conversation points to advocate testing to co-workers and management, and practical ways of implementing automation and unit tests.

kickinbahk

June 20, 2017
Tweet

More Decks by kickinbahk

Other Decks in Technology

Transcript

  1. Ensuring the Happy Path
    @kickinbahk
    Josiah Mory

    View Slide

  2. This
    is
    Me

    View Slide

  3. New Feature

    View Slide

  4. Wait…but it
    worked before!?!

    View Slide

  5. Just need to fix
    this one last bug…

    View Slide

  6. View Slide

  7. View Slide

  8. View Slide

  9. View Slide

  10. Why Test?

    View Slide

  11. Rephrased: What are
    the benefits of testing?

    View Slide

  12. Check for Behavior

    View Slide

  13. Refactoring
    Assurance

    View Slide

  14. Doesn’t the Compiler
    Test Enough for us?

    View Slide

  15. The Compiler Checks
    for….

    View Slide

  16. Compile-Time
    Bugs

    View Slide

  17. Types
    (type of objects we place into functions)

    View Slide

  18. An object’s adherence to
    protocols

    View Slide

  19. Nil

    View Slide

  20. The compiler does not
    check for….

    View Slide

  21. Runtime errors

    View Slide

  22. Behavior

    View Slide

  23. Testing Takes Too
    Much Time

    View Slide

  24. TDD is SUPER Intense!

    View Slide

  25. View Slide

  26. TDD Not Required

    View Slide

  27. 100% Coverage
    Not Required

    View Slide

  28. Testing doesn’t need
    to be all or nothing

    View Slide

  29. Start off just Testing
    Main Functionality

    View Slide

  30. Many 3rd Party Test
    Frameworks
    • Quick/Nimble
    • Kiwi
    • Specta
    • XCFit

    View Slide

  31. View Slide

  32. View Slide

  33. “But we don’t want to
    include (more) third
    party libraries”

    View Slide

  34. Enter XCTest
    Apple’s test framework built into Xcode

    View Slide

  35. View Slide

  36. View Slide

  37. TDD Doesn’t Fit our
    Business Model

    View Slide

  38. Time = Money

    View Slide

  39. Testing requires
    more modular code

    View Slide

  40. Less time spent in
    manual QA

    View Slide

  41. Less time Debugging and
    Fixing Programmer Errors

    View Slide

  42. Our users shouldn’t
    be our QA team

    View Slide

  43. Loss of confidence
    due to reoccurring
    bugs

    View Slide

  44. View Slide

  45. Testing…

    View Slide

  46. covers a multitude
    of mistakes

    View Slide

  47. and provides
    refactoring reassurance

    View Slide

  48. Testing doesn’t need
    to be all or nothing

    View Slide

  49. Start off just Testing
    Main Functionality

    View Slide

  50. and continue adding
    tests as needed

    View Slide

  51. Thank you!
    @kickinbahk
    Josiah Mory

    View Slide