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

How we test Mobile Apps (QA in a nutshell)

How we test Mobile Apps (QA in a nutshell)

In this presentation from 2018, we present how test mobile apps at QuickBird Studios. The audience were app testers and QA experts (not programmers), so the presentation is not focused on code but more focused on overall strategies.

QuickBird

April 09, 2018
Tweet

More Decks by QuickBird

Other Decks in Programming

Transcript

  1. Agenda I. Why should you test apps? II. What stops

    you from testing apps? III. Testing strategies I. Manual GUI testing II. Automated GUI testing III. Automated integration testing IV. Automated unit testing IV. Our testing approach V. Continuous integration VI. Cloud-based testing Stefan Kofler & Malte Bucksch 3
  2. Stefan Kofler & Malte Bucksch 9 Storage Data usage Battery

    Users will uninstall your app quickly
  3. UI Testing with Espresso: Code Stefan Kofler & Malte Bucksch

    18 @Test public void greeterSaysHello() { }
  4. UI Testing with Espresso: Code Stefan Kofler & Malte Bucksch

    19 @Test public void greeterSaysHello() { onView(withId(R.id.addNote)) .perform(click()); }
  5. UI Testing with Espresso: Code Stefan Kofler & Malte Bucksch

    20 @Test public void greeterSaysHello() { onView(withId(R.id.addNote)) .perform(click()); onView(withId(R.id.noteContent)) .perform(typeText(“Espresso rules")); }
  6. UI Testing with Espresso: Code Stefan Kofler & Malte Bucksch

    21 @Test public void greeterSaysHello() { onView(withId(R.id.addNote)) .perform(click()); onView(withId(R.id.noteContent)) .perform(typeText(“Espresso rules")); onView(withId(R.id.ok)) .perform(click()); }
  7. UI Testing with Espresso: Code Stefan Kofler & Malte Bucksch

    22 @Test public void greeterSaysHello() { onView(withId(R.id.addNote)) .perform(click()); onView(withId(R.id.noteContent)) .perform(typeText(“Espresso rules")); onView(withId(R.id.ok)) .perform(click()); onView(withText("Espresso rules")) .check(matches(isDisplayed())); }
  8. Our approach with MVVM Stefan Kofler & Malte Bucksch 37

    View View Model Model Presentation User Input Business Logic Data User action Update Update Notify
  9. View Model Example: ContactsViewModel Stefan Kofler & Malte Bucksch 39

    Input: - List of all contacts - Search Text Output: - List of filtered contacts
  10. View Model Tests Stefan Kofler & Malte Bucksch 42 func

    testSearchFilter() { // Given // When // Then }
  11. View Model Tests Stefan Kofler & Malte Bucksch 43 func

    testSearchFilter() { // Given viewModel.inputs.allContacts = ["Stefan", "Malte", "Julian", "Sebastian"] // When // Then }
  12. View Model Tests Stefan Kofler & Malte Bucksch 44 func

    testSearchFilter() { // Given viewModel.inputs.allContacts = ["Stefan", "Malte", "Julian", "Sebastian"] // When viewModel.input.filterText = "Seba" // Then }
  13. View Model Tests Stefan Kofler & Malte Bucksch 45 func

    testSearchFilter() { // Given viewModel.inputs.allContacts = ["Stefan", "Malte", "Julian", "Sebastian"] // When viewModel.input.filterText = "Seba" // Then Assert(viewModel.output.filteredContacts == ["Sebastian"]) }
  14. Cloud based testing on real devices Stefan Kofler & Malte

    Bucksch 53 Automated UI Tests Remote Control