drift/extras/integration_tests
Simon Binder bc5295492d
Add `drift_sqflite` to replace `moor_flutter`
2022-03-14 20:27:19 +01:00
..
ffi_on_flutter Remove redundant imports 2021-12-09 14:10:51 +01:00
postgres PostgreSQL support (#1507) 2021-11-11 14:40:41 +01:00
sqflite Add `drift_sqflite` to replace `moor_flutter` 2022-03-14 20:27:19 +01:00
tests Replace old website and repository links 2022-03-13 15:52:15 +01:00
vm Replace moor impl with exports 2021-10-07 22:16:05 +02:00
web Replace old website and repository links 2022-03-13 15:52:15 +01:00
README.md Resolve aliased columns 2019-07-25 17:33:01 +02:00

README.md

Integration tests

These directories contain integration tests for the various moor backends by running the same set of actions on multiple databases.

Tests

All test cases live in tests/lib. We have a runAllTests method that basically takes a QueryExecutor (the database backend in moor) and then runs all tests on that executor. Everything the other packages are doing is calling the runAllTests method with the database they're supposed to test.


Flutter is a bit annoying here because AFAIK there is no easy way to run tests that run on a real device? With flutter drive, the tests are still run on a local machine which communicates with an app to verify behavior of widgets. As we want to run the whole test bundle on a device, we instead put the test files into flutter_db/lib and run them with flutter run. That works, but we don't get an output format that is machine readable. Please create an issue if you know a better way, thanks! TODO: https://github.com/tomaszpolanski/flutter-presentations/blob/master/lib/test_driver/test_runner.dart looks promising

That is also why these tests are not running automatically.