AAD Testing, Debugging & Performance Optimization — Questions and Answers
Question 1: Which tool is primarily used for debugging Android applications?
- Android Emulator
- Logcat
- Android Debug Bridge (ADB) (Correct answer)
- Linter
Correct answer: Android Debug Bridge (ADB)
Android Debug Bridge (ADB) is a versatile tool that allows communication between a computer and an Android device for debugging purposes.
Question 2: Which tool is used to inspect and analyze memory usage in Android applications?
- Heap Dump
- StrictMode
- Android Profiler (Correct answer)
- TraceView
Correct answer: Android Profiler
Android Profiler in Android Studio helps developers inspect memory allocation, detect leaks, and optimize performance.
Question 3: Which type of test ensures that a specific unit of code, such as a function, works as expected?
- Integration Testing
- UI Testing
- Unit Testing (Correct answer)
- Performance Testing
Correct answer: Unit Testing
Unit testing verifies that individual functions or components of an application work as expected, often using frameworks like JUnit.
Question 4: Which Android tool helps detect and prevent memory leaks in an application?
- LeakCanary (Correct answer)
- Linter
- StrictMode
- TraceView
Correct answer: LeakCanary
LeakCanary is a popular library used to automatically detect and diagnose memory leaks in Android applications.
Question 5: Which framework is commonly used for writing UI tests in Android applications?
- JUnit
- Mockito
- Espresso (Correct answer)
- Robolectric
Correct answer: Espresso
Espresso is a widely used UI testing framework in Android that allows developers to write reliable UI tests.
Question 6: Which tool helps developers profile CPU performance in Android applications?
- StrictMode
- Android Studio Profiler (Correct answer)
- TraceView
- Linter
Correct answer: Android Studio Profiler
Android Studio Profiler includes a CPU profiler that helps developers analyze application performance and identify bottlenecks.
Which tool is primarily used for debugging Android applications?