Compose: UI testing patterns Core principle Test the smallest UI contract that proves the behavior. Prefer plain state-driven UI tests with callbacks. Add integration only when lifecycle, navigation, DI, or platform behavior is the thing under test. Test target choice What you need to prove Test shape Text, button, loading/error branch, conditional content Plain UI Compose test Callback wiring from click/input Plain UI Compose test Focus navigation or keyboard behavior Compose test with key input Visual layout, clipping, elevation, typography, image composition Screenshot test State holder updates UI correctly State holder/unit test plus one wiring smoke test Hover, pressed, focused, dragged interaction state Plain UI test with MutableInteractionSource Navigation, lifecycle, DI integration Integration test Prefer plain UI tests Show more Installs 416 Repository chrisbanes/skills GitHub Stars 730 First Seen May 12, 2026 Security Audits Gen Agent Trust Hub Pass Socket Pass Snyk Pass
compose-ui-testing-patterns
安装
npx skills add https://github.com/chrisbanes/skills --skill compose-ui-testing-patterns