# Android Testing Advanced (Android) > Testing avanzado en Android: TDD, mocking, Coroutines, Flow, Compose UI y cobertura de tests - 18 preguntas de entrevista - Senior - [Preguntas de entrevista: Android](https://sharpskill.dev/es/technologies/android/preguntas-entrevista.md) ## 1. ¿Qué diferencia hay entre un Mock, un Stub y un Fake en testing? **Respuesta** Un Mock verifica las interacciones (quién llama a qué, cuántas veces, con qué argumentos). Un Stub devuelve respuestas predefinidas sin verificación. Un Fake es una implementación funcional simplificada (por ejemplo, un repositorio en memoria). Los Mocks priorizan la behavior verification, los Stubs la state verification y los Fakes ofrecen alternativas ligeras y realistas. ## 2. ¿Cómo usar MockK para hacer mocking en Kotlin? **Respuesta** MockK está centrado en Kotlin: mockk() crea un doble, every { ... } returns ... define respuestas, verify { ... } valida las interacciones. Soporta coroutines (coEvery/coVerify), relaxed mocks y captura de argumentos mediante slot. ## 3. ¿Qué es TDD (Test-Driven Development)? **Respuesta** TDD significa escribir un test antes del código e iterar Red‑Green‑Refactor: test que falla, código mínimo para pasar, luego refactor sin cambiar el comportamiento. Beneficios: mejor cobertura, diseño más testeable, documentación viva. ## 15 preguntas más disponibles - ¿Cómo testear Coroutines con runTest? - ¿Cómo testear los Flow? Regístrate gratis: https://sharpskill.dev/es/login ## Otros temas de entrevista Android - [Fundamentos de Android](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-fundamentals.md): 24 preguntas, Junior - [UI y Recursos Android](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-ui-and-resources.md): 30 preguntas, Junior - [Ciclo de Vida de Android](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-lifecycle.md): 30 preguntas, Junior - [Navegación Android](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-navigation.md): 26 preguntas, Junior - [Gestión de Datos Android](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-data-management.md): 29 preguntas, Junior - [Redes Android](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-networking.md): 29 preguntas, Junior - [Testing en Android](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-testing.md): 28 preguntas, Junior - [Android Gradle](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-gradle.md): 26 preguntas, Junior - [Fundamentos del lenguaje Kotlin para Android](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-kotlin-language-essentials.md): 24 preguntas, Junior - [Room Database](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-room-database.md): 25 preguntas, Mid-Level - [Trabajo en segundo plano](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-background-work.md): 18 preguntas, Mid-Level - [Jetpack Compose](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-compose.md): 28 preguntas, Mid-Level - [Permisos y Funciones del Dispositivo](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-permissions-and-device.md): 21 preguntas, Mid-Level - [Firebase para Android](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-firebase.md): 23 preguntas, Mid-Level - [Android MVVM Architecture](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-mvvm-architecture.md): 18 preguntas, Mid-Level - [Redes Android Avanzadas](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-networking-advanced.md): 13 preguntas, Mid-Level - [Colecciones y Operadores de Kotlin](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-kotlin-collections-operators.md): 20 preguntas, Mid-Level - [Kotlin Coroutines y Flow](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-kotlin-coroutines-flow.md): 20 preguntas, Mid-Level - [Inyección de Dependencias en Android](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-dependency-injection.md): 15 preguntas, Mid-Level - [Android MVI Architecture](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-mvi-architecture.md): 17 preguntas, Mid-Level - [Android Clean Architecture](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-clean-architecture.md): 21 preguntas, Senior - [Android Compose Avanzado](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-compose-advanced.md): 17 preguntas, Senior - [Android Performance and Monitoring](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-performance-monitoring.md): 13 preguntas, Senior - [Android Security and Privacy](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-security-privacy.md): 18 preguntas, Senior - [Android CI/CD and Release](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-cicd-release.md): 15 preguntas, Senior - [Android UX and Form Factors](https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-ux-form-factors.md): 18 preguntas, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/es/technologies/android/preguntas-entrevista/android-testing-advanced