flutter-add-integration-test

Configures Flutter Driver and converts MCP interactions into integration tests.

1|Updated Aug 14, 2026
One-click install
npx skills add https://github.com/sohampawar1866/zeromile-go --skill flutter-add-integration-test-sohampawar1866
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-add-integration-test
Source: https://github.com/sohampawar1866/zeromile-go/tree/main/.agents/skills/flutter-add-integration-test
Command: npx skills add https://github.com/sohampawar1866/zeromile-go --skill flutter-add-integration-test-sohampawar1866

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up Flutter integration testing requires coordinating 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 guides adding ValueKeys to widgets. - Interactive Exploration: Uses Dart/Flutter MCP tools like launch_app, get_widget_tree, tap, and scroll to explore the UI before writing tests. - Test Authoring & Execution: Generates integration_test/ test files with WidgetTester APIs and runs them via flutter drive on Chrome, Android, or Firebase Test Lab. - Use Case: A developer wants to automate a login flow test. The Skill explores the widget tree via MCP, writes a test that taps the login button and verifies navigation, then executes it with flutter drive. ## Quick Start Add integration tests to my Flutter app that tap the increment button and verify the counter updates.

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 app?

Add integration_test and flutter_test as dev dependencies in pubspec.yaml, create an integration_test/ directory with files named <name>_test.dart, and call IntegrationTestWidgetsFlutterBinding.ensureInitialized() in main(). Run tests with flutter drive using a host script in test_driver/.

How to run Flutter integration tests on Chrome?

Launch chromedriver with --port=4444 in a separate terminal, then run flutter drive with --driver=test_driver/integration_test.dart, your target test file, and -d chrome. For headless web testing, use -d web-server instead.

What is the difference between flutter_driver and integration_test?

integration_test is the modern package using WidgetTester APIs like tester.tap() and pumpAndSettle() within the app process. Legacy flutter_driver uses driver.tap() and driver.waitFor() from a separate process; the Skill supports migrating between both.

Why does my Flutter test fail with widget not found?

The widget may be lazily loaded inside a SliverList or ListView and not yet mounted. Use tester.scrollUntilVisible() or the MCP scroll tool to force it into view before interacting, and verify keys with get_widget_tree.

Can I run Flutter integration tests on Firebase Test Lab?

Yes, 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 for execution on remote devices.