Repository navigation
Description
See linked issue for more context: #100447
[Web][Integration Test] Two Chrome instances launched, and the unnecessary Chrome instance breaks the foundation of the integration test [Edited]
Page URL
Page source
Describe the problem
After executing the command:
flutter drive \
--driver=test_driver/integration_test.dart \
--target=integration_test/app_test.dart \
-d chrome
One Chrome is opened. Notice that it is not labeled with "chrome is controlled by automated test software".
Then try to execute the command plus arg --no-headless:
flutter drive \
--driver=test_driver/integration_test.dart \
--target=integration_test/app_test.dart \
-d chrome \
--no-headless
Two Chrome instances are launched:
- One [backend one] is launched as a device [this is NOT intended for test cases execution]
- The other [frontend one] is launched via webdriver (chromedriver this case) [this is intended for test cases execution, labeled with 'chrome is controlled by automated test software']
[Note: Mostly, the two Chromes are overlaid, please try to drag it away (up or down), then back one would be visible.]
Expected fix
Issue code raised: #100447
[Web][Integration Test] Two Chrome instances launched, and the unnecessary Chrome instance breaks the foundation of the integration test [Edited]
Before issue 100447 is fixed. Please kindly add the above info to this page to clear the context to avoid misleading users.
Additional context
No response


Activity
[-][PAGE ISSUE]: 'An introduction to integration testing'[/-][+][PAGE ISSUE]: 'An introduction to integration testing', the content in this page is misleading[/+]danagbemava-nc commentedon Mar 22, 2022
Hi @zpsean, I'm not sure I fully understand what your request is.
Are you saying the page should recommend using
--no-headless?zpsean commentedon Mar 22, 2022
@danagbemava-nc in summary, as stated in: #100447
the function of flutter drive for integration_test has issues. that is, if use command below, the expected results need to be addressed as no Chrome is launched. However, currently, it has one Chrome launched wrongly, which will mislead the user. I suggest here need comments to clarify this in the page.
danagbemava-nc commentedon Mar 23, 2022
The command on this page does not state to use chrome as the device but rather web-server and it suggests to launch chromedriver separately. Are you proposing to add a cautionary statement for when the user uses chrome as the device?
zpsean commentedon Mar 23, 2022
Yes, maybe most of the users would try to use real browser (like Chrome) but not
-d web-server, as the command itself also gives such suggestion.The web-server device requires the Dart Debug Chrome extension for debugging. Consider using the Chrome or Edge devices for an improved development workflow.
danagbemava-nc commentedon Mar 24, 2022
Thanks for feedback
[-][PAGE ISSUE]: 'An introduction to integration testing', the content in this page is misleading[/-][+]Duplicate browsers start for test given on 'An introduction to integration testing' page[/+]atsansone commentedon May 23, 2023
@yjbanov , I know that the original issue(s) were closed in flutter/flutter (#100447, #67090), but I would like to provide better guidance in the docs. Do you have a recommendation I can include to avoid the double browser effect? I understand why it would happen, but I agree that this could make the tests wonky.
flutter-triage-bot commentedon May 24, 2024
This issue is assigned to @yjbanov but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
flutter-triage-bot commentedon May 24, 2024
This issue was assigned to @yjbanov but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.
huycozy commentedon May 27, 2024
Reproduced this issue on the latest Flutter stable & master channels.
flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.22.1, on macOS 14.1 23B74 darwin-x64, locale en-VN) • Flutter version 3.22.1 on channel stable at /Users/huynq/Documents/GitHub/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision a14f74ff3a (11 hours ago), 2024-05-22 11:08:21 -0500 • Engine revision 55eae6864b • Dart version 3.4.1 • DevTools version 2.34.3 [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/huynq/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • ANDROID_HOME = /Users/huynq/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.3) • Xcode at /Applications/Xcode15.3.app/Contents/Developer • Build 15E204a • CocoaPods version 1.15.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2023.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • android-studio-dir = /Applications/Android Studio.app/ • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) [✓] VS Code (version 1.89.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.88.0 [✓] Connected device (2 available) • macOS (desktop) • macos • darwin-x64 • macOS 14.1 23B74 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 125.0.6422.76 [✓] Network resources • All expected network resources are available. • No issues found!