flutter-add-integration-test

Configures Flutter Driver and converts MCP interactions into integration tests.

1|Updated Aug 31, 2026
One-click install
npx skills add https://github.com/nguyenhungtran18/skill-and-tool-tracker --skill flutter-add-integration-test-nguyenhungtran18
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: flutter-add-integration-test
Source: https://github.com/nguyenhungtran18/skill-and-tool-tracker/tree/main/skills/flutter-add-integration-test
Command: npx skills add https://github.com/nguyenhungtran18/skill-and-tool-tracker --skill flutter-add-integration-test-nguyenhungtran18

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding end-to-end integration testing to a Flutter project requires coordinating pubspec dependencies, driver extensions, widget keys, and platform-specific execution commands, which is error-prone when done manually. ## Core Features & Use Cases - Project Setup: Adds integration_test and flutter_test dependencies, enables the Flutter Driver extension, and assigns ValueKeys to target widgets. - Interactive MCP Exploration: Uses Dart/Flutter MCP tools like launch_app, get_widget_tree, tap, and enter_text to explore the widget tree before writing tests. - Test Authoring & Execution: Generates integration_test/ test files with WidgetTester APIs and runs them via flutter drive on Chrome, web-server, Android, or Firebase Test Lab. - Use Case: You want to automate a login flow test. Explore the UI via MCP to find widget keys, then generate a permanent integration test that taps the login button and asserts the result. ## Quick Start Add integration tests to my Flutter app that verify the counter increments when the floating action button is tapped.

Frequently Asked Questions about flutter-add-integration-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add integration tests to a Flutter project?▼

Add integration_test and flutter_test as dev dependencies in pubspec.yaml, call enableFlutterDriverExtension() before runApp(), and create test files in an integration_test/ directory. Run tests with flutter drive using a host driver script that calls integrationDriver().

How to write Flutter integration tests with WidgetTester?▼

Initialize IntegrationTestWidgetsFlutterBinding.ensureInitialized() in main(), load the UI with tester.pumpWidget(), interact via tester.tap(), and wait with tester.pumpAndSettle(). Assert visibility using expect(find.byKey(ValueKey('foo')), findsOneWidget).

What is the difference between flutter_driver and integration_test?▼

integration_test is the modern package using WidgetTester APIs like pumpWidget and pumpAndSettle within the app process. Legacy flutter_driver tests use driver.waitFor(), driver.tap(), and driver.scroll() from a separate process and are mainly relevant for migration scenarios.

Can I run Flutter integration tests on Chrome or web?▼

Yes. Launch chromedriver on port 4444, then run flutter drive with -d chrome, or use -d web-server for headless web testing. Both require the standard driver script and target test file arguments.

Why is my widget not found during a Flutter integration test?▼

The widget may be lazily loaded inside a SliverList or ListView and not yet mounted. Use tester.scrollUntilVisible() or MCP scroll/scrollIntoView commands to force it into view before interacting or asserting.

How do I run Flutter integration tests on Firebase Test Lab?▼

Build a debug APK with flutter build apk --debug, build the test APK with ./gradlew app:assembleAndroidTest, then upload both APKs to the Firebase Test Lab console to execute the tests on managed devices.