Quality Assurance & Compliance Flashcards
7 cards from real AAD practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Quality Assurance & Compliance flashcards as text
Which Espresso method is used to check that a View is displayed on screen?
Answer: matches(isDisplayed())
Espresso uses `onView(matcher).check(matches(isDisplayed()))` to assert a View is visible.
What does the `@SmallTest` annotation signal about an Android unit test?
Answer: The test runs quickly and has no external dependencies
`@SmallTest` indicates the test is fast and does not rely on the file system, network, or database.
Which tool in Android Studio helps detect memory leaks by tracking object allocations over time?
Answer: Memory Profiler
The Memory Profiler records heap snapshots and allocation traces to identify leaked objects.
When running instrumented tests on an emulator with `testInstrumentationRunner`, which class is the standard runner for AndroidX Test?
Answer: androidx.test.runner.AndroidJUnitRunner
`androidx.test.runner.AndroidJUnitRunner` is declared in `build.gradle` as the instrumentation runner for AndroidX tests.
What is the primary purpose of the `IdlingResource` API in Espresso?
Answer: Synchronize test execution with asynchronous app operations
`IdlingResource` tells Espresso when the app is idle so the framework waits before proceeding with assertions.
Which Gradle command runs only unit tests (not instrumented tests) for the debug build variant?
Answer: ./gradlew testDebugUnitTest
`testDebugUnitTest` executes local JVM unit tests for the debug variant without requiring a device.
In Android's StrictMode, which policy detects disk reads on the main thread?
Answer: ThreadPolicy
`StrictMode.ThreadPolicy` monitors main-thread violations including disk reads and writes.