flutter-add-integration-test

Configures Flutter Driver and converts MCP interactions into integration tests.

Updated Jan 8, 2026
One-click install
npx skills add https://github.com/arslan9024/White-Caves --skill flutter-add-integration-test-arslan9024
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: flutter-add-integration-test
Source: https://github.com/arslan9024/White-Caves/tree/main/.agents/skills/flutter-add-integration-test
Command: npx skills add https://github.com/arslan9024/White-Caves --skill flutter-add-integration-test-arslan9024

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires integration_test, flutter_test, flutter_driver.

What problem does it solve? Setting up Flutter integration testing requires coordinating pubspec dependencies, driver extensions, widget keys, and host driver scripts, and manually translating exploratory UI interactions into repeatable automated tests is error-prone. ## Core Features & Use Cases - Project Setup: Adds integration_test and flutter_test dependencies, enables the Flutter Driver extension, and guides adding ValueKeys to target widgets. - MCP-Based Exploration: Uses Dart/Flutter MCP tools (launch_app, get_widget_tree, tap, enter_text, scroll) to interactively discover and validate user flows before writing tests. - Test Authoring & Execution: Generates integration_test/ test files with WidgetTester APIs and test_driver/ host scripts, then runs them via flutter drive on Chrome, web-server, Android, or Firebase Test Lab. - Use Case: After building a login screen, launch the app via MCP, tap through the flow interactively, then convert those exact actions into a permanent app_test.dart that runs in CI. ## Quick Start Set up integration testing in my Flutter project and turn my login flow into an automated test.

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 script that calls integrationDriver().

How to find widgets in Flutter integration tests?▼

Assign ValueKey parameters to critical widgets, then locate them with find.byKey(ValueKey('your_key')) in tests. During exploration, use the MCP get_widget_tree tool to discover available Keys, Text nodes, and widget types.

What is the difference between flutter_driver and integration_test?▼

integration_test is the modern approach 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.

Can Flutter integration tests run 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 physical devices.

Why does my Flutter integration test fail to find a widget?▼

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