โ† All Android Development Flashcard Decks

Android Testing Flashcards

6 cards from real Android Development practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 6 Android Testing flashcards as text
  1. Which testing framework is used for writing unit tests in Android projects?

    Answer: JUnit

    JUnit is the standard testing framework for writing and running unit tests in Android and Java/Kotlin projects.

  2. What is the purpose of Espresso in Android testing?

    Answer: To write UI instrumentation tests that interact with the app UI

    Espresso is Google's UI testing framework that allows you to write automated UI tests that interact with and assert the state of your app's UI.

  3. What is a unit test in Android development?

    Answer: A test that validates a single function or class in isolation without Android framework dependencies

    Unit tests validate individual units of code like functions or classes in isolation, typically running on the JVM without Android dependencies.

  4. What is the difference between unit tests and instrumentation tests in Android?

    Answer: Unit tests run on JVM; instrumentation tests run on an Android device or emulator

    Unit tests run locally on the JVM and are fast, while instrumentation tests run on an Android device/emulator and can access the Android framework.

  5. Which library is used for mocking dependencies in Android unit tests?

    Answer: Mockito

    Mockito is a popular mocking framework that creates fake implementations of dependencies, allowing you to isolate the code under test.

  6. Where are Android unit tests located in a project structure?

    Answer: src/test/java

    Unit tests are placed in the src/test/java directory and run locally on the JVM without Android framework dependencies.