Open Klabauterman opened 1 year ago
I think it is because the tool overrides FLUTTER_TARGET which is used for the tests
Ok, the problem are the override of FLUTTER_TARGET in the xcconfig files. They break the integration_test as integration_test sets its own FLUTTER_TARGET which gets overridden.
I would suggest that it should be possible to generate flavors that don't override FLUTTER_TARGET. Using a dart define that can be added to the run or build command is much better: --dart-define=flavor=dev
. We would have one main file in which we can read the value of the dart define const flavor = String.fromEnvironment('flavor')
@Klabauterman did you used flavor?
flutter drive --flavor dev\
--driver=test_driver/integration_test.dart \
--target=integration_test/app_test.dart \
--web-port=5000 \
--browser-dimension=1280,1024 \
-d chrome
Hi, if we remove the FLUTTER_TARGET the tests work as expected. So I think we should do something like that https://github.com/AngeloAvv/flutter_flavorizr/issues/120 if we make it optional, we can run the tests without issues
When having an integration test with the integration_test framwork and starting it with a flavor created by this tool, the app gets started and the console says: "Xcode build done." But then nothing happens anymore. On Android it works fine and the test runs.
It looks like many people were running into this problem: https://github.com/flutter/flutter/issues/99246
But in the flutter repo there is a flavor example that works fine: https://github.com/flutter/flutter/tree/master/dev/integration_tests/flavors
So I am pretty sure there is something wrong with the config created by this tool.