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

flutter drive should print a friendlier message when invoked with the wrong target file name #62626

Open
gaaclarke opened this issue Jul 30, 2020 · 4 comments
Labels
a: tests "flutter test", flutter_test, or one of our tests found in release: 3.0 Found to occur in 3.0 found in release: 3.1 Found to occur in 3.1 has reproducible steps The issue has been confirmed reproducible and is ready to work on P3 Issues that are less important to the Flutter project t: flutter driver "flutter driver", flutter_drive, or a driver test team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team

Comments

@gaaclarke
Copy link
Member

The following usage of flutter drive fails:

$ ls test_driver/keyboard_resize_test.dart 
test_driver/keyboard_resize_test.dart
$ flutter drive --target=test_driver/keyboard_resize_test.dart 
Using device iPhone (2).
Test file not found: /Users/myname/dev/flutter/dev/integration_tests/ui/test_driver/keyboard_resize_test_test.dart

Notice 'keyboard_resize_test_test.dart` in the message.

flutter doctor:

[✓] Flutter (Channel master, 1.21.0-6.0.pre.129, on Mac OS X 10.15.5 19F101, locale en-US)
    • Flutter version 1.21.0-6.0.pre.129 at /Users/aaclarke/dev/flutter
    • Framework revision 30aef0a3b9 (2 hours ago), 2020-07-30 14:20:21 -0700
    • Engine revision a9910e409c
    • Dart version 2.10.0 (build 2.10.0-1.0.dev 24c7666def)
@gaaclarke gaaclarke added the tool Affects the "flutter" command-line tool. See also t: labels. label Jul 30, 2020
@gaaclarke
Copy link
Member Author

The correct invocation is flutter drive -t lib/keyboard_resize.dart --driver test_driver/keyboard_resize_test.dart We should make the error message more apropos since what it prints out now looks erroneous.

@jmagman
Copy link
Member

jmagman commented Aug 4, 2020

The bug is just the doubled _test output, right? Or was it failing to find a keyboard_resize_test_test file?

@jmagman jmagman added the t: flutter driver "flutter driver", flutter_drive, or a driver test label Aug 4, 2020
@jmagman jmagman added this to Awaiting triage in Tools - driver review via automation Aug 4, 2020
@shinriyo
Copy link

@gaaclarke
you should prepare 2 files.

  1. The keyboard_resize file named without _test.
  2. The keyboard_resize_test file named with _test`.

but, it is troublesome for met too.

@pedromassangocode pedromassangocode added a: tests "flutter test", flutter_test, or one of our tests passed first triage labels Dec 29, 2020
@exaby73 exaby73 added has reproducible steps The issue has been confirmed reproducible and is ready to work on found in release: 3.0 Found to occur in 3.0 found in release: 3.1 Found to occur in 3.1 labels Aug 3, 2022
@exaby73
Copy link
Member

exaby73 commented Aug 3, 2022

I can reproduce the issue in latest stable and master.

$ flutter drive --target test/widget_test.dart
Test file not found: /Users/nabeelparkar/dev/nevercode/sample_project/test_driver/widget_test_test.dart
flutter doctor -v (Stable)
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.4 21F79 darwin-arm, locale en-US)
    • Flutter version 3.0.5 at /Users/nabeelparkar/fvm/versions/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (3 weeks ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/nabeelparkar/Library/Android/sdk/
    • Platform android-33, build-tools 33.0.0
    • ANDROID_SDK_ROOT = /Users/nabeelparkar/Library/Android/sdk/
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /Applications/Brave Browser.app/Contents/MacOS/Brave Browser

[✓] Android Studio (version 2021.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
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Ultimate Edition (version 2022.1.3)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 69.0.4
    • Dart plugin version 221.5921.27

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

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 12.4 21F79 darwin-arm
    • Chrome (web)    • chrome • web-javascript • Brave Browser 103.1.41.100

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

• No issues found!
flutter doctor -v (Master)
[✓] Flutter (Channel master, 3.1.0-0.0.pre.2055, on macOS 12.4 21F79 darwin-arm, locale en-US)
    • Flutter version 3.1.0-0.0.pre.2055 on channel master at /Users/nabeelparkar/fvm/versions/master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b4673a2c1f (2 hours ago), 2022-08-03 00:51:16 -0400
    • Engine revision 6cd744bb97
    • Dart version 2.19.0 (build 2.19.0-58.0.dev)
    • DevTools version 2.16.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/nabeelparkar/Library/Android/sdk/
    • Platform android-33, build-tools 33.0.0
    • ANDROID_SDK_ROOT = /Users/nabeelparkar/Library/Android/sdk/
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13F100
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /Applications/Brave Browser.app/Contents/MacOS/Brave Browser

[✓] Android Studio (version 2021.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
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Ultimate Edition (version 2022.1.3)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 69.0.4
    • Dart plugin version 221.5921.27

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

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 12.4 21F79 darwin-arm
    • Chrome (web)    • chrome • web-javascript • Brave Browser 103.1.41.100

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

• No issues found!

@christopherfujino christopherfujino changed the title flutter drive "Test file not found: foo_test_test.dart" flutter drive should print a friendlier message when invoked with the wrong target file name Aug 9, 2022
@christopherfujino christopherfujino added the P3 Issues that are less important to the Flutter project label Aug 9, 2022
@flutter-triage-bot flutter-triage-bot bot added team-tool Owned by Flutter Tool team triaged-tool Triaged by Flutter Tool team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: tests "flutter test", flutter_test, or one of our tests found in release: 3.0 Found to occur in 3.0 found in release: 3.1 Found to occur in 3.1 has reproducible steps The issue has been confirmed reproducible and is ready to work on P3 Issues that are less important to the Flutter project t: flutter driver "flutter driver", flutter_drive, or a driver test team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team
Projects
Tools - driver review
  
Awaiting triage
Development

No branches or pull requests

7 participants