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

Karumi Dojo: Kata Super Heroes for Android & iOS

Karumi
January 29, 2016

Karumi Dojo: Kata Super Heroes for Android & iOS

Karumi

January 29, 2016
Tweet

More Decks by Karumi

Other Decks in Technology

Transcript

  1. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Karumi Dojo: Kata Super Heroes Pedro Vicente Gómez Sánchez Senior Android Developer at Karumi [email protected] @pedro_g_s github.com/pedrovgs
  2. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Sergio Gutierrez Senior Android Developer Alberto Gragera Technical Director Jorge Barroso Senior Android Developer Davide Mendolia Senior Full Stack Engineer
  3. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Karumi Dojo • We are here to practice and learn. • This exercise meant to be collaborative, not competitive. • Try to open your mind to new concepts.
  4. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Karumi Dojo • We are here to practice UI Testing. • Espresso, Dagger, KIF and Nimble are our main tools. • Keep always in mind the Dependency Inversion Principle. • We are going to practice pair programming.
  5. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Rules: • Do not start coding without read the repository README. md • Do not start coding without test the application manually and review the application code. • Do not write another test without keep the previous one passing. • Think carefully where you are going to use test doubles.
  6. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Dagger 2: Test Double you can configure easily. Initialize your Test Doubles. Initializes your Activity under test.
  7. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Dagger 2: Use mockito to mock answer or return values.
  8. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Dagger 2: Configure your mocks before to start the activity.
  9. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Espresso Cheat Sheet https://google.github.io/android-testing-support- library/docs/espresso/cheatsheet/
  10. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    KIF Documentation https://github.com/kif-framework/KIF
  11. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Tips • Baby steps. • Review the application before to start. • Review the testing framework API before to start. • Don’t lose the green. • Fork this project and use Travis CI configuration.
  12. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Ressources Github • KataSuperHeroesAndroid • KataSuperHeroesIOS
  13. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Ressources • Clone • Activate Travis • git pull • git checkout kata-super-heroes
  14. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Tasks • Setup MainActivityTest with a list of Super Heroes. • Test listing the correct number of elements. • Test that each of this elements contains the correct Super Hero name.