A Sample app that shows different types of testing in Flutter.
This particular sample uses the Provider package but any other state management approach would do. It also uses flutter_gherkin package with integration_test support.
Show how to perform:
- Widget Testing
- Integration Testing
- Navigate to the project's root folder using command line and follow the instructions below.
The Flutter SDK can run unit tests and widget tests in a virtual machine, without the need of a physical device or emulator.
- To run all the test files in the
test/
directory in one go, runflutter test
. - To run a particular test file, run
flutter test test/<file_path>
- Widget Tests:
- Run
flutter run test/<file_path>
- Run
- Integration Tests:
- Run
flutter drive --driver=integration_test/integration_test.dart --target=integration_test/gherkin_suite_test.dart
- Run
- Flutter 2.5.0 (with respective Dart version). Instructions https://flutter.dev/docs/get-started/install
- Can also be used with FVM with
fvm install