O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Android Test Pyramid - Ágiles 2013

698 visualizações

Publicada em

How to balance your android test suite to have a good feedback, from units to functionals.

Publicada em: Tecnologia, Educação
  • Seja o primeiro a comentar

Android Test Pyramid - Ágiles 2013

  1. 1. Test Pyramid in an Android Agile Project Lima, 2013 PORTELA PAMELA How to balance your android test suite to have a good feedback, from units to functionals.
  2. 2. [ Tests, seriously? It’s a mobile app.. ]
  3. 3. 15+ Shared codebases
  4. 4. 40+ Devs, QAs and Ops
  5. 5. http://martinfowler.com/bliki/TestPyramid.html
  6. 6. Unit Test Verify small pieces individually Run fast Run a lot of times during development Feedback instantly 6
  7. 7. Feedback
  8. 8. Android? It’s Java, let’s TDD.
  9. 9. Android TDD Android SDK classes are not trivial huge API eyes on docs java.lang.RuntimeException: Stub! 9
  10. 10. test object result() assert(expected, obj.result()) Humm, I’ve seen that.. The ‘2 + 2 = 4’ example!
  11. 11. the object u’re looking at dependencies
  12. 12. when(stub.getData()).thenReturn(data) getData() saveSomething() verify(mock).saveSomething()
  13. 13. mock stub double http://martinfowler.com/articles/mocksArentStubs.html
  14. 14. Unit Tests with Dependency injection Roboguice DI Mocks Robolectric Android Shadows jUnit @Test
  15. 15. Functional Test UI testing [with full stack] Tests user flow sounds perfect BDD, ATDD business likes that ;) Feedback after a coffee *not a strict definition
  16. 16. Cucumber + Honeydew step definitions in Ruby wraps UIAutomator = ] github.com/amplify-education/honeydew 
  17. 17. Cucumber feature file
  18. 18. Honeydew steps
  19. 19. [ Cool.. write as much user-like tests as you can.. PERFECT!! ]
  20. 20. Slow Flaky Costy
  21. 21. Feedback
  22. 22. some UI tests
  23. 23. Where are you?
  24. 24. http://fabiopereira.me/blog/2012/03/18/introducing-depth-of-test-dot/
  25. 25. backend external services libs
  26. 26. API contracts validation PACTO https://github.com/thoughtworks/pacto
  27. 27. [ Annnnd.. the manual tests? ]
  28. 28. Thank you! ;) Questions? Feedback? A beer? PORTELA @rafaelportela rportela@thoughtworks.com PAMELA @pamcdm pmori@thoughtworks.com

×