Top Flutter Testing packages There are many ways to test a Flutter app, but some common methods include: * **Unit testing**: Unit tests focus on small pieces of code, or units, to ensure that they are working as expected. * **Widget testing**: Widget tests (or component tests) focus on testing a single widget at a time. The goal of a widget testing is to verify that the widget's UI looks and interacts as expected. * **Integration testing**: Itegration tests check how well units work together in an app. * **User testing**: User tests simulate how real users would interact with the app given in form of a user interaction workflow. Testing can either be done manually or using automated tools. The complete list of Dart and Flutter packages given below provide tools/frameworks to perform Testing, Mock Testing, Widget Testing, UI Testing, etc. and also publish Coverage reports.
mockito
1258
A mock framework inspired by Mockito with APIs for Fakes, Mocks, behavior verification, and stubbing.
mocktail
981
A Dart mock library which simplifies mocking with null safety support and no manual mocks or code generation.
faker
758
A library for generating fake data. faker is heavily inspired by the Python package faker and, the Ruby package ffaker.
patrol
439
Powerful Flutter-native UI testing framework overcoming limitations of existing Flutter testing tools.
alchemist
139
A support package that aims to make golden testing in Flutter easier and more streamlined.
bdd_widget_test
133
A BDD-style widget testing library. Generates Flutter widget tests from *.feature files.
flutter_automation
130
A flutter package that provides various automation scripts to help you with your flutter project.
fake_cloud_firestore
116
Previously known as cloud_firestore_mocks. Fake implementation of Cloud Firestore. Use this package to unit test apps that use Cloud Firestore.
convenient_test
105
Write and debug tests easily, with full action history, time travel, screenshots, rapid re-execution, video records, interactivity, isolation and more
defer_pointer
102
An alternative to Overlay which allows you to easily render and hit test a widget outside its parent bounds.
firebase_auth_mocks
89
Fakes for Firebase Auth. Use this package with 'google_sign_in_mocks' to write unit tests involving Firebase Authentication.
faker_dart
83
generate massive amounts of fake data in Dart & Flutter! A dart port of the famous faker.js
webdriver
56
Provides WebDriver bindings for Dart. Supports WebDriver JSON interface and W3C spec. Requires the use of WebDriver remote server.
mocktail_image_network
50
A Dart package which allows you to mock Image.network in your widget tests with confidence using the mocktail package.
matcher
49
Support for specifying test expectations via an extensible Matcher class. Also includes a number of built-in Matcher implementations for common cases.
gherkin
40
A Gherkin parsers and runner for Dart which is very similar to Cucumber, it provides the base BDD functionality ready for use in platform specific implementations i.e. flutter/web
firebase_storage_mocks
35
Mocks for Firebase Storage. Use this package to write unit tests involving Firebase Storage.
google_sign_in_mocks
31
Mocks for Google Sign In. Use this package with `firebase_auth_mocks` to write unit tests involving Firebase Authentication.
junitreport
30
Generate JUnit XML reports from dart test runs. Transforms the output of dart or flutter tests to JUnit style XML
mock_data
28
Generate random data using Dart. Can be used to create random strings, integers, names, colors, IPs, UUIDs, URLs and dates.
flutter_auto_gui
27
A flutter plugin for desktop applications for controlling mouse and keyboard to automate interactions with other applications.
welltested
25
WelltestedAI is a Testing AI Pilot helping developers add and maintain tests as they code and deliver stable welltested apps to users.
elementary_test
24
A testing library which makes it easy to test elementary used apps. Built to be used with the elementary architecture package.
coverde
24
A CLI for basic coverage trace files manipulation. Validate minimum coverage, filter trace files data by tested file paths and generate HTML coverage reports.
ogurets
24
Gherkin/Cucumber implementation in dart, supporting classes and simple libraries, hooks, dependency injection, and all the things you would want in an easy to use format.
figma_frame_inspector
23
A Flutter plugin to verify how accurately the Figma frame was implemented in the app.
shouldly
23
A simple, extensible BDD assertion library which focuses on giving great error messages when the assertion fails.
espresso
22
Java classes for testing Flutter apps using Espresso. Allows driving Flutter widgets from a native Espresso test.
state_notifier_test
21
A testing library which makes it easy to test StateNotifier. Built to be used with the state_notifier, riverpod or flutter_riverpod packages.
rohd
15
The Rapid Open Hardware Development (ROHD) framework, a framework for describing and verifying hardware
acyclic_steps
13
An explicit acyclic step dependency framework with concurrent evaluation and dependency injection.
integration_test_preview
10
Integration Test Preview has pre-configured methods that allow for faster test deployment for end to end (e2e) test coverage (using Android and iOS platform UIs).
flutster
7
Record your Flutter UI tests using this Widget on Android. Save the UI tests to play them again automatically.
dart_test_adapter
7
Provides a Dart API for interacting with 'dart test'/'flutter test' programatically
ngtest
3
Testing runner and library for AngularDart. This package is necessary to write component tests for AngularDart components.