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

Keeping Your Users Happy With Testable Apps

Keeping Your Users Happy With Testable Apps

Given at Xamarin Evolve on April 16, 2013

Greg Shackles

April 20, 2013
Tweet

More Decks by Greg Shackles

Other Decks in Technology

Transcript

  1. TDD

  2. Stability • Obvious, but important • Refactor and iterate with

    a safety net • Compilation is only the first unit test
  3. Stability • Obvious, but important • Refactor and iterate with

    a safety net • Compilation is only the first unit test • Verify cross-platform compatibility
  4. Once It’s Out, It’s Out • This isn’t the web

    • Difficult and expensive to fix
  5. Once It’s Out, It’s Out • This isn’t the web

    • Difficult and expensive to fix • Quality bar has been raised
  6. Once It’s Out, It’s Out • This isn’t the web

    • Difficult and expensive to fix • Quality bar has been raised • Bad reviews stick with you
  7. • Improves design • More shared code (not just mobile

    apps) • Optimize independently of a platform The Happy Path
  8. • Improves design • More shared code (not just mobile

    apps) • Optimize independently of a platform • IterationSpeed++ The Happy Path
  9. • Improves design • More shared code (not just mobile

    apps) • Optimize independently of a platform • IterationSpeed++ • FACT: Green tests are good for the soul The Happy Path
  10. What to Test? • 100% code coverage != the goal

    • Test parts that provide value
  11. What to Test? • 100% code coverage != the goal

    • Test parts that provide value • Testing platform code can be difficult
  12. What to Test? • 100% code coverage != the goal

    • Test parts that provide value • Testing platform code can be difficult • Start small
  13. ! ! ! ! ! ! Unit  Tests Integra-on  Tests

    UI  /  UX  Tests Mixed Automated
  14. Unit / Integration Tests • Automated • Low friction •

    Leverage tooling • NUnit (Lite) • Run on all platforms
  15. Unit / Integration Tests • Automated • Low friction •

    Leverage tooling • NUnit (Lite) • Run on all platforms • Simulator vs Device
  16. 01 02 03 04 05 06 07 08 09 10

    11 12 13 14 Mocking interface IService { ! string Foo(string bar); } ! class MockService : IService { ! public Func<string> FooBody { get; set; } ! ! ! public Foo(string bar) ! { ! ! return FooBody(); ! } }
  17. Manual Testing • User feedback is critical • UX testing

    • Exploratory testing • TestFlight testflightapp.com
  18. MVVM • MvvmCross • Shared, testable view models • Improved

    IoC support • Databinding keeps views thin
  19. Q&A