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

How ANDROID TESTING changed how we think about ...

How ANDROID TESTING changed how we think about Death - Second Edition

"Irreproducible bugs become highly reproducible right after delivery to the customer". This is something that happens "almost" everyday.
It is well known that testing offers significant advantages as a development practice and helps ensure higher quality code with fewer defects.
Unfortunately, testing Android apps can be challenging, so in this session we are gonna talk about available tools and practices that could help us accomplish our goals.

Fernando Cejas

May 08, 2014
Tweet

More Decks by Fernando Cejas

Other Decks in Programming

Transcript

  1. How ANDROID TESTING changed how we think about death… @fernando_cejas

    Code samples: https://github.com/android10/Inside_Android_Testing https://github.com/android10/AndroidApplicationTestingSample Second Edition android10.org
  2. Who am I… •  Software Engineer •  GDG Barcelona Organizer

    android10.org •  Android lover •  Geek •  Gintonic fan…
  3. Why testing..WTF? •  Testing increases the level of confidence in

    your code. •  Testing makes it possible to write new code, and refactor existing code, without worrying that you’ve broken existing functionality.
  4. •  Unit testing •  Integration Testing •  Functional and System

    Testing 1.  Stress Testing 2.  Performance Testing 3.  Usability Testing •  Acceptance Testing •  Regression Testing 1.  Smoke Testing Types of tests…
  5. Mockito is a mocking framework that tastes really good. Mockito

    doesn't give you hangover because the tests are very readable and they produce clean verification errors. GIVE A WARM WELCOME TO… mockito
  6. Allows you to run your android code on JVM. Allows

    loading of Android Classes in pure Java Projects. TO THE RESCUE…
  7. •  Uses real Android SDK code •  Styles and themes

    supported •  System resources are available •  Performance improved •  Bugs fixed Robolectric 2.0+
  8. •  A library by square (FTW!) •  It gives a

    chainable (or “fluent”) syntax for checking assertions. •  Makes tests easier to write (and read!). FEST Android
  9. Dependency injection is a software design pattern that allows the

    removal of hard-coded dependencies and makes it possible to change them, whether at run-time or compile-time Dependency what?
  10. Spoon •  Acceptance tests (black box) •  Automation of test

    execution across multiple devices •  Aggregation of the results
  11. •  Robojuice •  Robotium •  Android Testing Framework •  UI

    Automator •  Monkey Runner •  Espresso •  Calabash More tools…
  12. WRITE TESTS!!! •  Simplify your architecture •  Have a robust

    testing strategy •  Use continuous integration tools •  Mock/stub functionality •  Create your own test runner Best practices and some advice…
  13. DO NOT LET YOUR CODE TO BE BROKEN… DO NOT

    BREAK EXISTING FUNCTIONLITY…