Aus öffentlichen Paketdaten erstellte Orientierung.
Ein Toolkit, das entwickelt wurde, um Flutter Driver-Tests auf Desktop-Plattformen zu beschleunigen und eine schnellere Testausführung auf Android, iOS, macOS, Windows und Linux zu ermöglichen. Es vereinfacht die Einrichtung und Ausführung von Integrationsprüfungen durch Optimierung der Testumgebung und Reduzierung des Overheads. Ideal für Entwickler, die während der Entwicklung oder in CI/CD-Pipelines effiziente, wiederholbare Testworkflows suchen. Das Werkzeug steigert die Produktivität, indem es Verzögerungen verringert, die typischerweise mit dem Starten und Verwalten von Testumgebungen verbunden sind.
Anwendungsfälle
Integrationstests lokal ausführen
Beschleunigung von CI/CD-Testzyklen
Tests über mehrere Desktop-Plattformen hinweg
UI-Interaktionen schnell debuggen
Automatisierung von End-to-End-Test-Suiten
Hauptmerkmale
Optimierte Testausführungs-Geschwindigkeit
Unterstützung für mehrere Desktop-Plattformen
Minimale Setup-Aufwand
Nahtlose Integration mit Flutter Driver
Plattformübergreifende Testkonsistenz
Geeignet für
Entwickler, die schnelle Feedbackschleifen priorisieren
Teams, die Flutter Driver in CI/CD verwenden
Test-Automatisierungsingenieure
Desktop-fokussierte Flutter-Anwendungen
Hinweise
Flutter Driver-Einrichtung erforderlich
Beschränkt auf Desktop-Plattformen
Für komplexe Test-Szenarien kann eine zusätzliche Konfiguration erforderlich sein
Nicht für Testläufe ausschließlich auf Mobilgeräten vorgesehen
Original-README
Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.
Flutter Driver tests are being deprecated in favor of new Integration Tests.
I will continue to support this package as long it's feasible but it is recommended to start using Integration Tests.
Toolkit for running rapidly flutter driver tests on desktop/mobile.
This package simplifies the creation of Flutter Driver tests that can be run in bulk without restarting or rebuilding the application.
An example of how the toolkit works can be found in this article.
The reasoning for Desktop tests
The desktop builds are almost identical to Android/iOS builds in regard to the UI.
Running tests on a simulator/emulator are painful. This can be even worse on your CI.
Your CI is usually a dockerized Linux machine - running Linux flutter driver tests against Linux Flutter application is both fast and reliable.
This tool allows you to run your flutter driver tests much faster and more reliably than a build for a simulator/emulator.
The application flows that require Android/iOS plugins should still be run on a Simulator/Emulator or a real device.
Running also on Android/iOS
While running tests against Desktop will find the majority of bugs, it is recommended to run sometimes against actual devices. There are bugs in Dart (like implementing your generics in an invalid way) that can cause a native crash on a mobile device and work properly on the desktop.It's prudent to run fastdriver tests before every release on a mobile device.
Example
You can build and execute the example that works on any desktop system and Docker as well.
Usage
Add dev_dependency to your pubspec.yaml
dev_dependencies:fast_flutter_driver:^2.0.0
Create configuration class test_driver/generic/test_configuration.dart
This was the simplest setup of tests, next you would like to pass different application configuration so every time you run tests, they could be run with a different configuration (eg different page). To do that you need to add more properties to TestConfiguration.
A full example of how to do that can be found in the example folder.
Null Safety
The package supports building project that are migrated to null safety but until flutter driver is migrated to null safety, we need to pass the above flags to the command line tool.