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

Beyond unit testing_Jorge D. Ortiz-Fuentes_Code...

Codemotion
November 13, 2019

Beyond unit testing_Jorge D. Ortiz-Fuentes_Codemotion Berlin 2019

That is great! You have learned about unit tests, and you even have some test coverage in your product. But now you have discovered that that's not enough. What then? Wouldn't it be great if we had some tests in place that will let us know if the app is broken in an obvious way, so we don't embarrass ourselves uploading it to the store? And, even better, could we have some tests that confirm that the app fulfills the acceptance criteria? Come to this session and learn about smoke and acceptance tests and how to implement them.This is going to be a live coding session for both Android and iOS

About: Jorge D. Ortiz-Fuentes, Founder - Canonical Examples

Jorge is a freelancer dedicated to mobile development, security, and systems architecture. As a developer, he started to work for the MIT in 1993 and since then he has collaborated in many software projects. Most of them were internally for HP where he worked for more than 15 years. Since 2008 he has been working in different aspects of mobile development. After playing with PalmOS, he learned Android programming for the first Android Developer Challenge and immediately started to play with the first iPhone SDK. He founded Canonical Examples where he consults and trains teams.

Codemotion

November 13, 2019
Tweet

More Decks by Codemotion

Other Decks in Technology

Transcript

  1. A

  2. @jdortiz What Can We Do? ★ Hire better developers ★

    Use a better architecture ★ Add automatic testing
  3. QA

  4. – Oxford Dictionary “The standard of something as measured against

    other things of a similar kind; the degree of excellence of something.”
  5. @jdortiz Where to Focus ★ First Impression ★ Old friends

    tend to forgive mistakes ★ But always try to behave
  6. @jdortiz Is That Enough? ★ Do pieces work well together?

    ★ Have we made a huge configuration mistake? ★ Does it do what is expected? Integration Smoke Acceptance
  7. @jdortiz Things that Have NEVER Happened to a RELEASE version

    ★ Points to development backend ★ Has wrong values of feature flags ★ Injects wrong dependencies ★ Allows insecure operations ★ Sign in or sign up don’t work
  8. @jdortiz Android Scenario app |-- src | |-- main |

    | |-- java | | |-- res | |-- test | |-- androidTest
  9. @jdortiz Android Scenario app |-- src | |-- main |

    | |-- java | | |-- res | |-- debug | |-- release | |-- test | |-- androidTest Different persistence
  10. @jdortiz Running Smoke Tests ★ Create simple tests using espresso

    ★ Run them against RELEASE build type • Add signature • Add artifact ★ Have a way to run only smoke tests
  11. @jdortiz The Goal ★ Test User Stories (at least the

    critical parts) ★ Similar to the sprint review (end of sprint demo)
  12. @jdortiz Acceptance Tests ★ Use UI automation ★ You can

    navigate ★ You can record/reproduce all(most) interactions ★ Accesibility is key ★ Reset status after each test (environment variable)
  13. @jdortiz Recap ★ Smoke test are not hard to set

    up and can save you from being in the hall of shame ★ Acceptance tests are more fragile and much slower than unit tests, but allow testing what you offer ★ Both can be implemented easily!