Technical & DevelopmentAdvanced
flutter-testing-apps
Implement unit, widget, and integration tests
Developer Setup
Setup & Installation
bash
npx skills add https://github.com/flutter/skills --skill flutter-testing-appsnpx skills add https://github.com/flutter/skills --skill flutter-testing-appsOr paste this URL into your assistant to install:
Overview
What This Skill Does
Implement unit, widget, and integration tests
Application
When to use this Skill
- Integrating flutter testing apps into your development workflow.
- Following best practices for implement unit, widget, and integration tests.
- Automating repetitive tasks with AI-assisted tooling.
- Building production-grade applications with proper standards.
- Debugging and troubleshooting common implementation issues.
Documentation
Show Skills.md file
Testing Flutter Applications
Contents
- Core Testing Strategies
- Architectural Testing Guidelines
- Plugin Testing Guidelines
- Workflows
- Examples
Core Testing Strategies
Balance your testing suite across three main categories to optimize for confidence, maintenance cost, dependencies, and execution speed.
Unit Tests
Use unit tests to verify the correctness of a single function, method, or class under various conditions.
- Mock all external dependencies.
- Do not involve disk I/O, screen rendering, or user actions from outside the test process.
- Execute using the
testorflutter_testpackage.
Widget Tests
Use widget tests (component tests) to ensure a single widget's UI looks and interacts as expected.
- Provide the appropriate widget lifecycle context using
WidgetTester. - Use
Finderclasses to locate widgets andMatcherconstants to verify their existence and state. - Test views and UI interactions without spinning up the full application.
Lines 1 - 25 of 174
Recommendations