Cracking android app. Мокиенко Сергей

Click here to load reader

  • date post

    12-Aug-2015
  • Category

    Software

  • view

    2.447
  • download

    0

Embed Size (px)

Transcript of Cracking android app. Мокиенко Сергей

  1. 1. CRACKING ANDROID APP Sergei Mokienko
  2. 2. ABOUT ME 3+ Android development 5+ IT Witness of 90% coverage Agile addict
  3. 3. AGENDA Do tests exist on mobile projects ? Can business write tests ? How to face release dates without red eyes ?
  4. 4. WHEN DO WE NEED TESTS ? When we are going to support codebase for a long time When the whole team agrees on writing tests When tests gives real value but not statistics When we are developing API for external services
  5. 5. Unit testing
  6. 6. + + Clean java way Works with clean java (less Android dependencies is best) Tests running on local JVM Android studio 1.0 + Gradle plugin 1.1.0+ supports running from IDE
  7. 7. Setting up Android Studio Create folder test/java under app/src Create test suit
  8. 8. Mocking Android + Helps with unit tests for logic that is tightly coupled wi Android SDK We can still run tests on local VM Nice assertions
  9. 9. Integration tests
  10. 10. Espresso No unnecessary waits for UI thread events Ofcially supported by Google Works with Android Instrumentation Harmcrest assertions JUnit 4
  11. 11. What Espresso can do ? Work with views Work with adapter views
  12. 12. Check intents
  13. 13. Spoon Running tests on several devices simultaneously Taking screen shots Great reports Run specic tests on multiple devices Choose device where you want tests to run
  14. 14. Add grade plugin for spoon Add plugin to your app module Run spoon task gradle spoon
  15. 15. BDD
  16. 16. What BDD is ? Behavior Driven Development Usage of DSL (Domain Specic Languages) Clear implementation understanding More tests approved by management High product owner involvement Lots of tests =)
  17. 17. Acceptance test Formula As a [role] I want [feature] so that [benet] Acceptance criteria Formula Given [initial context] when [event occurs] then [ensure some outcomes]
  18. 18. Calabash Android Cucumber wrapper Integrates with Xamarin cloud Cross-platform Flexible Large collection of predened steps Continuous Integration support
  19. 19. Cucumber Gherkin Scenarios Feature denitions Step denitions
  20. 20. Cucumber + Ruby + Robotium =
  21. 21. Calabash as is
  22. 22. Continuous Integration
  23. 23. Why ? Fast integration bug allocation No panic when release happens No merges with bug happens Every body knows where they can nd build Enforces discepline Automatic metrics generation
  24. 24. How ?
  25. 25. Questions ?