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

Android testing in production

Android testing in production

See how PSPDFKit tests it's SDK.

Jernej Virag

October 29, 2015
Tweet

More Decks by Jernej Virag

Other Decks in Technology

Transcript

  1. Jernej Virag / @jernejv PSPDFKit Core / C++ PSPDFKit Android

    / Java PSPDFKit iOS / Obj-C OS X Linux NDK / Clang XCode / Clang CMake / Clang
  2. Jernej Virag / @jernejv Android Android Instrumentation Tests JUnit 4

    Gradle Espresso Mockito Spoon facebook / screenshot-tests
  3. Jernej Virag / @jernejv Android notes • Espresso is awesome

    - but you MUST access UI only through it! • Use IdleResources to tell Espresso when the UI is in a stable state. • Disable animations via ADB before running tests to avoid flakiness. • Write your own ViewMatchers when required, DO NOT attempt to access UI elements from testing thread!
  4. Jernej Virag / @jernejv Continious Integration git push GitHub Pull

    Request Jenkins CI git merge master Run tests ✓ / ❌ Developer creates Review and verify Coverage Android Lint FindBugs + PMD
  5. Jernej Virag / @jernejv Notes on Android / Jenkins •

    Emulator startup is painful - with both emulators • You need to clean up code! • You MUST disable animations or things WILL fail. • You’ll need a running UI session for Genymotion.
  6. Jernej Virag / @jernejv It’s all about the humans! •

    Features and changes are reviewed by another person. • No merging before “8 green ticks” or confirmed flakey test. • Master isn’t touched directly. • Bugs get their own tests together with fixes. • Master branch is available to customers as a nightly.
  7. Jernej Virag / @jernejv • Jenkins requires a lot of

    maintenance. • Jenkins nodes require even more maintenance. • Both iOS and Android UI frameworks are flaky. • Whole team must invest in testing… • … and accept that you’ll lose time kicking your CI into obedience.