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

Karumi Dojo - Kata TODO API Client for Android ...

Karumi
June 12, 2016
180

Karumi Dojo - Kata TODO API Client for Android & iOS

Slides used during the Karumi coding dojo to explain how to resolve the TODO API Client Kata for Android & iOS.

Karumi

June 12, 2016
Tweet

Transcript

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

    Karumi Dojo: Kata TODO Api Client Pedro Vicente Gómez Sánchez Senior Mobile 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 Mobile Developer Alberto Gragera Technical Director Jorge Barroso Google Developer Expert 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 is 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 integration testing. • MockWebServer, Nocilla, JUnit 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 reading the repository README.md • Do not start coding without testing the project playground manually and reviewing the repository code. • Do not write another test without keeping 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

    MockWebServer: Mocked response you can configure easily. Mocked server instance Class to extend by your test cases.
  7. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    MockWebServer: Assert a request was sent to a path and the method used was GET Assert a request was sent to a path Configure a body and HTTP status
  8. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Nocilla: Mocked server instance Class to extend by your test cases.
  9. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Nocilla: Stub a request and return an error. Stub a request and return a body with 200 as HTTP status code
  10. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Nimble: Assert the data is properly parsed Wait for the request to finish
  11. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Tips • Baby steps. • Review the playground 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 • KataTodoApiClientIOS • KataTodoApiClientJava
  13. Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

    Ressources • Clone • Activate Travis • git pull • git checkout kata-todo-api-client