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.
faker
912
A library for generating fake data. faker is heavily inspired by the Python package faker and, the Ruby package ffaker.
patrol
627
Powerful Flutter-native UI testing framework overcoming limitations of existing Flutter testing tools.
alchemist
191
A support package that aims to make golden testing in Flutter easier and more streamlined.
bdd_widget_test
172
A BDD-style widget testing library. Generates Flutter widget tests from *.feature files.
defer_pointer
151
An alternative to Overlay which allows you to easily render and hit test a widget outside its parent bounds.
convenient_test
147
Write and debug tests easily, with full action history, time travel, screenshots, rapid re-execution, video records, interactivity, isolation and more
flutter_automation
141
A flutter package that provides various automation scripts to help you with your flutter project.
fake_cloud_firestore
135
Previously known as cloud_firestore_mocks. Fake implementation of Cloud Firestore. Use this package to unit test apps that use Cloud Firestore.
firebase_auth_mocks
104
Fakes for Firebase Auth. Use this package with 'google_sign_in_mocks' to write unit tests involving Firebase Authentication.
faker_dart
94
generate massive amounts of fake data in Dart & Flutter! A dart port of the famous faker.js
webdriver
63
Provides WebDriver bindings for Dart. Supports WebDriver JSON interface and W3C spec. Requires the use of WebDriver remote server.
mocktail_image_network
62
A Dart package which allows you to mock Image.network in your widget tests with confidence using the mocktail package.
matcher
62
Support for specifying test expectations via an extensible Matcher class. Also includes a number of built-in Matcher implementations for common cases.
firebase_storage_mocks
40
Mocks for Firebase Storage. Use this package to write unit tests involving Firebase Storage.
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
junitreport
35
Generate JUnit XML reports from dart test runs. Transforms the output of dart or flutter tests to JUnit style XML
flutter_auto_gui
34
A flutter plugin for desktop applications for controlling mouse and keyboard to automate interactions with other applications.
google_sign_in_mocks
34
Mocks for Google Sign In. Use this package with `firebase_auth_mocks` to write unit tests involving Firebase Authentication.
mock_data
29
Generate random data using Dart. Can be used to create random strings, integers, names, colors, IPs, UUIDs, URLs and dates.
welltested
29
WelltestedAI is a Testing AI Pilot helping developers add and maintain tests as they code and deliver stable welltested apps to users.
elementary_test
27
A testing library which makes it easy to test elementary used apps. Built to be used with the elementary architecture package.
espresso
25
Java classes for testing Flutter apps using Espresso. Allows driving Flutter widgets from a native Espresso test.
figma_frame_inspector
25
A Flutter plugin to verify how accurately the Figma frame was implemented in the app.
riverpod_test
25
A testing library which makes it easy to test providers. Built to be used with the riverpod package.
bdd_framework
25
BDD framework for Dart/Flutter. Lets you create BDD tests in code, and gives you easy to read error messages when assertions fail. Exports to Gherkin/Cucumber feature files.
coverde
25
A CLI for basic coverage trace files manipulation. Validate minimum coverage, filter trace files data by tested file paths and generate HTML coverage reports.
shouldly
24
A simple, extensible BDD assertion library which focuses on giving great error messages when the assertion fails.
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.
state_notifier_test
22
A testing library which makes it easy to test StateNotifier. Built to be used with the state_notifier, riverpod or flutter_riverpod packages.
acyclic_steps
20
An explicit acyclic step dependency framework with concurrent evaluation and dependency injection.
rohd
18
The Rapid Open Hardware Development (ROHD) framework, a framework for describing and verifying hardware
source_gen_test
13
Test support for the source_gen package. Includes helpers to make it easy to validate both success and failure cases.
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).
global_assert
7
A micro-library that makes it easy to do build-time assertions about constants so that misconfigured apps fail at build-time instead of failing at runtime.
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
better_test_reporter
6
A CLI for generating a junit xml report from dart test json output and libraries for parsing test json into dev-friendly models
mock_exceptions
5
Provides a mechanism to throw exceptions on certain calls. This is useful when working with a Fake and we still want to occasionally make it throw exceptions.
cel
5
This project parses and evaluates Common Expression Language (CEL) programs against some inputs.
react_testing_library
4
A Dart unit testing library for OverReact components that mimics the API of the JS react-testing-library
testreport
3
This library can be used to process the results of dart tests. It processes data from the `json` output emitted by the dart test runner and provide an API to the test results.
ngtest
3
Testing runner and library for AngularDart. This package is necessary to write component tests for AngularDart components.
lcov_dart
1
Parse and format to LCOV your code coverage reports. The best way to share your code coverage stats.
mocktail
0
A Dart mock library which simplifies mocking with null safety support and no manual mocks or code generation.
stash_test
0
Provides the testing support needed in order to implement extensions to the base stash package