Open Kendru98 opened 1 year ago
This is an interesting use case.
The problem with it is that currently, it's impossible. That's because Flutter tests run inside the app, so if the app dies, the tests also die.
It'd be very cool to accomplish this use case, though.
In Patrol 2.0, native tests are already run from the instrumentation process, which is separate from the app. But what these native tests then do is gRPC communication with the app process to execute Dart tests (which run in the app process). So again, if the app process dies, game over.
But what if we could move execution of Dart tests to the instrumentation process?
I'm just thinking out loud.
Of course, there are many problems with that, mainly that the whole flutter_test
API is built to work-in-process with the app under test. Essentially, this would probably result in flutter_driver
-like approach (and problems).
We would also want to do these types of tests to for example test whether one-time profiles are not present in the second app run, etc.
Description: Imagine that I want to test for example local storage of the app, and I want to be sure that my settings are remembered when I close and open app Example case: