leancodepl / patrol

Flutter-first UI testing framework. Ready for action!
https://patrol.leancode.co
Apache License 2.0
869 stars 127 forks source link

Toggle isolation to prevent app restart between each test #2336

Open ziadsarour opened 2 weeks ago

ziadsarour commented 2 weeks ago

Use case

The app is restarting between each test which is time consuming. I have managed the app state reset by myself when I was using flutter test, I want to keep this behavior to speed up my tests.

Proposal

Add a new option --[no]-isolation to the test command.

--isolation : same behavior as now --no-isolation : all tests are run within the same instance (no app restart)

jBorkowska commented 1 week ago

Hi @ziadsarour , this is currently not possible without big architectural changes in patrol. We create platform-native tests that correspond with patrol ones, and as far as we know there is no possibility to change this behaviour to not restarting app after each test.

You can try to make one big test with all of them, but then most probably you'll have problems with gathering test results (if first test fails, others will not be executed).

ziadsarour commented 1 week ago

Thank you, I understand.

I think I will use Patrol only for native tests (less than 10% of my tests) and Flutter for the other ones !