Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integration_test on iOS getting stuck on start #161

Open
Klabauterman opened this issue Feb 28, 2023 · 4 comments
Open

integration_test on iOS getting stuck on start #161

Klabauterman opened this issue Feb 28, 2023 · 4 comments

Comments

@Klabauterman
Copy link

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: flutter/flutter#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.

@Klabauterman
Copy link
Author

I think it is because the tool overrides FLUTTER_TARGET which is used for the tests

@Klabauterman
Copy link
Author

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')

@amrgetment
Copy link

@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

@mirland
Copy link
Contributor

mirland commented Mar 18, 2024

Hi, if we remove the FLUTTER_TARGET the tests work as expected.
So I think we should do something like that #120
if we make it optional, we can run the tests without issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants