flutter_autopilot 0.0.2 copy "flutter_autopilot: ^0.0.2" to clipboard
flutter_autopilot: ^0.0.2 copied to clipboard

An intelligent companion for automated end-to-end testing in Flutter, featuring a DevTools extension with a simple scripting syntax.

🤖 Flutter Autopilot #

Pub Package License: MIT

Flutter Autopilot is your intelligent companion for automated end-to-end testing in Flutter. It seamlessly integrates a powerful Dart core package with a sleek DevTools extension, allowing you to run, manage, and write automated test scripts using a simple, intuitive scripting syntax.


🎥 Demo #

Flutter Autopilot Demo


✨ Features #

  • Simple Scripting Syntax: Write your UI interactions and assertions in a concise, easy-to-learn format.
  • DevTools Integration: A built-in DevTools extension to record, execute, and monitor tests right from your browser.
  • Zero Boilerplate: Injects directly into your Flutter application with a single line of code.
  • Robust Finders: Locate elements by text, widget type, or keys.
  • Real User Interactions: Simulates genuine pointer events for tapping, scrolling, and typing.

🚀 Getting Started #

1. Add Dependency #

Add flutter_autopilot to your pubspec.yaml:

dependencies:
  flutter_autopilot: ^0.0.1

2. Initialize Autopilot #

Initialize the Autopilot binding before running your app. This will register the necessary VM Service extensions.

import 'package:flutter/material.dart';
import 'package:flutter_autopilot/flutter_autopilot.dart';

void main() {
  Autopilot.initialize();
  runApp(const MyApp());
}

Note: Autopilot automatically disables its extensions in Release mode to ensure there is no performance or security impact in production.


🛠️ Supported Commands & Test Cases #

Autopilot processes script commands from the DevTools extension and translates them into precise UI interactions.

Current Capabilities: #

Command Action DevTools Script Syntax
Tap / Click tap text "Login"
tap key "back_btn"
Long Press longTap text "Menu Item"
longTap key "submit_btn"
Enter Text type key "email_field" "user@example.com"
type type "TextField" "password123"
Scroll scroll 200 (down)
scroll -100 (up)
Verify Assertions verify text "Welcome Address" exists
verify text "Error" absent
Wait / Delay wait 2000 (wait 2 seconds)
wait 500 (wait 500ms)

🔮 Upcoming Commands (Roadmap) #

We are constantly working to expand Autopilot's capabilities. Look out for these features in upcoming releases:

  • Import / Export Test Cases: Easily save test suites, share them across your team, and run them automatically in CI/CD.
  • Swipe & Drag: Swipe left on the carousel, Drag the slider to 50%
  • Advanced Assertions: Verify that the button is disabled, Verify text color is red
  • Screenshot Capture: Take a screenshot and name it "login_success"
  • Network Stubbing / Mocking: Easily mock backend API responses.
  • Conditional Logic: If "Popup" exists, tap "Close"

🤝 Contributing #

We welcome contributions! Please check out the Issues page to discover what's being worked on, report bugs, or request new features.

0
likes
155
points
0
downloads

Documentation

API reference

Publisher

verified publisherfullstackrohit.com

Weekly Downloads

An intelligent companion for automated end-to-end testing in Flutter, featuring a DevTools extension with a simple scripting syntax.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_autopilot