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

Update driver.close() in tearDownAll on 'An introduction to integration testing' page #8444

Closed
apaatsio opened this issue Mar 3, 2019 · 4 comments
Labels
a.cookbook Relates to a cookbook recipe or guide cl.wont-fix Issue closed as it either can't be or won't be fixed d.repro-steps Issue includes steps that someone can repeat e2-days Effort: < 5 days fix.quality Needs improvement in copy quality p2-medium Necessary but not urgent concern. Resolve when possible. st.triage.ltw Indicates Lead Tech Writer has triaged t.framework Relates to Flutter framework test.general Relates to unit, integration, perf testing test.integration Relates to integration testing

Comments

@apaatsio
Copy link

apaatsio commented Mar 3, 2019

In the integration testing docs the tearDownAll() is defined as

tearDownAll(() async {
  if (driver != null) {
    driver.close();
  }
});

In examples and tests, there are at least three other variants to this same code. For example,

https://github.com/flutter/flutter/blob/938dd5a4aa9cdeff973f238dce2ed0a77e3730d5/dev/integration_tests/ui/test_driver/keyboard_textfield_test.dart#L20-L22

https://github.com/flutter/flutter/blob/938dd5a4aa9cdeff973f238dce2ed0a77e3730d5/dev/integration_tests/ui/test_driver/driver_test.dart#L20-L22

https://github.com/flutter/flutter/blob/0fb84e96c79df2fe7efeaeb06fbd1c2b53f4a84b/examples/catalog/bin/screenshot_test.dart.template#L18-L20

I think these should be unified. To me, the last version (await driver?.close();) makes the most sense.

@a-deeb
Copy link

a-deeb commented Mar 3, 2019

Hi, @apaatsio, can I help to update the tearDownAll() function ?

@Piinks Piinks added the t.dev-tools Relates to DevTools and CLI label Mar 26, 2019
@jonahwilliams jonahwilliams removed the t.dev-tools Relates to DevTools and CLI label Apr 22, 2019
@jmagman jmagman added the t.dev-tools Relates to DevTools and CLI label Dec 3, 2019
@jonahwilliams jonahwilliams removed the t.dev-tools Relates to DevTools and CLI label May 23, 2020
@iapicca iapicca added the t.framework Relates to Flutter framework label Jul 1, 2020
@markusaksli-nc
Copy link
Member

flutter/flutter#28808 only partially fixed this, there are still many places where this is inconsistent, including the integration testing cookbook.

@markusaksli-nc markusaksli-nc added fix.quality Needs improvement in copy quality d: cookbook d.repro-steps Issue includes steps that someone can repeat labels Jul 29, 2020
@huycozy
Copy link
Member

huycozy commented Oct 27, 2022

This issue is reproducible with unfinished fixes, can be found some from filter

flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.3.6, on macOS 12.6 21G115 darwin-x64, locale en-VN)
    • Flutter version 3.3.6 on channel stable at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6928314d50 (30 hours ago), 2022-10-25 16:34:41 -0400
    • Engine revision 3ad69d7be3
    • Dart version 2.18.2
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode14.0.1.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • 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
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] IntelliJ IDEA Community Edition (version 2022.2.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 70.0.5
    • Dart plugin version 222.4167.21

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
    • 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

[✓] VS Code (version 1.72.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.50.0

[✓] Connected device (3 available)
    • SM T225 (mobile) • R9JT3004VRJ • android-arm64  • Android 12 (API 31)
    • macOS (desktop)  • macos       • darwin-x64     • macOS 12.6 21G115 darwin-x64
    • Chrome (web)     • chrome      • web-javascript • Google Chrome 107.0.5304.62

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
[!] Flutter (Channel master, 3.5.0-10.0.pre.123, on macOS 12.6 21G115 darwin-x64, locale en-VN)
    • Flutter version 3.5.0-10.0.pre.123 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision eaecf4687d (19 minutes ago), 2022-10-26 22:40:17 -0400
    • Engine revision 871de2f904
    • Dart version 2.19.0 (build 2.19.0-342.0.dev)
    • DevTools version 2.18.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode14.0.1.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • 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
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] IntelliJ IDEA Community Edition (version 2022.2.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 70.0.5
    • Dart plugin version 222.4167.21

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
    • 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

[✓] VS Code (version 1.72.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.50.0

[✓] Connected device (3 available)
    • SM T225 (mobile) • R9JT3004VRJ • android-arm64  • Android 12 (API 31)
    • macOS (desktop)  • macos       • darwin-x64     • macOS 12.6 21G115 darwin-x64
    • Chrome (web)     • chrome      • web-javascript • Google Chrome 107.0.5304.62

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

@goderbauer goderbauer added the P4 label Feb 7, 2023
@Hixie Hixie transferred this issue from flutter/flutter Mar 24, 2023
@atsansone atsansone added test.general Relates to unit, integration, perf testing a.cookbook Relates to a cookbook recipe or guide and removed d: cookbook labels May 30, 2023
@atsansone atsansone changed the title Inconsistent driver.close() in tearDownAll across tests, examples, and docs Update driver.close() in tearDownAll on 'An introduction to integration testing' page Jun 1, 2023
@atsansone atsansone added p2-medium Necessary but not urgent concern. Resolve when possible. e2-days Effort: < 5 days st.triage.ltw Indicates Lead Tech Writer has triaged test.integration Relates to integration testing cl.wont-fix Issue closed as it either can't be or won't be fixed and removed P4 labels Jun 1, 2023
@atsansone
Copy link
Contributor

Flutter Driver has been deprecated. See the migration guide. Closing this issue.

@atsansone atsansone closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a.cookbook Relates to a cookbook recipe or guide cl.wont-fix Issue closed as it either can't be or won't be fixed d.repro-steps Issue includes steps that someone can repeat e2-days Effort: < 5 days fix.quality Needs improvement in copy quality p2-medium Necessary but not urgent concern. Resolve when possible. st.triage.ltw Indicates Lead Tech Writer has triaged t.framework Relates to Flutter framework test.general Relates to unit, integration, perf testing test.integration Relates to integration testing
Projects
None yet
Development

No branches or pull requests

10 participants