← ClaudeAtlas

flutter-testing-appslisted

Implements unit, widget, and integration tests for a Flutter app. Use when ensuring code quality and preventing regressions through automated testing.
openplaybooks-dev/converge · ★ 3 · Testing & QA · score 74
Install: claude install-skill openplaybooks-dev/converge
# Testing Flutter Applications ## Contents - [Core Testing Strategies](#core-testing-strategies) - [Architectural Testing Guidelines](#architectural-testing-guidelines) - [Workflows](#workflows) - [Examples](#examples) ## Core Testing Strategies Balance your testing suite across three categories to optimize for confidence, maintenance cost, and execution speed. ### Unit Tests Verify the correctness of a single function, method, or class. - Mock all external dependencies. - Do not involve disk I/O, screen rendering, or user actions. - Execute using the `test` or `flutter_test` package. ### Widget Tests Ensure a single widget's UI looks and interacts as expected. - Provide widget lifecycle context using `WidgetTester`. - Use `Finder` classes to locate widgets and `Matcher` constants to verify state. - Test views and UI interactions without the full application. ### Integration Tests Validate how individual pieces work together and capture performance metrics on real devices. - Add the `integration_test` package as a dependency. - Run on physical devices, OS emulators, or Firebase Test Lab. - Prioritize for routing, dependency injection, and critical user flows. ## Architectural Testing Guidelines Design for observability and testability: - **ViewModels/Providers**: Unit test every provider. Test UI logic without Flutter framework dependency. - **Repositories & Services**: Unit test with mocked data sources (HTTP clients, databases). - **Views**: Widget test all views. P