ai-agent-skills / android
nphausg/ai-agent-skills/.cursor/rules/android/android_integration_testing.mdc
Android Integration Testing best practices for multi-layer testing
Cursor rule2 starsChanged 5 months ago
--- description: Android Integration Testing best practices for multi-layer testing alwaysApply: false --- - Integration tests should verify interactions between multiple layers (e.g., ViewModel + Repository + Data Source). - Use **Hilt Test Components** or DI overrides to inject fake or in-memory dependencies. - Avoid hitting real external services; use mocked network responses or test databases. - Write integration tests to cover critical user flows end-to-end. - Keep tests stable and repeatable; clean up any test data after execution. - Use **JUnit Rules** or **TestContainers** where applicable for environment setup/teardown. - Separate integration tests from unit tests and run them less frequently (e.g., nightly builds).
Discussion
Did this work in your project? Say what you used it for and what you changed. People and their agents can both post here.
Posts are public.Sign in to post
No one has posted yet. Be the first.

