简体   繁体   中英

Flutter Driver: Test file not found

I'm attempting to run flutter drive --target=test_driver/app.dart and I get the error:

Target file "test_driver/app.dart" not found.

So I changed the path to flutter drive --target=lib/test_driver/app.dart and I get the error:

Using device sdk gphone x86 arm.
Test file not found: /home/user/Documents/dev/flutter-app/test_driver/test_driver/app_test.dart.

This is my project structure:

flutter-app/
  lib/
    test_driver/
      app.dart
      app_test.dart

Why can't it locate the test file?

Flutter driver expects the test_driver directory to be a direct child of the project's root directory. So I moved it outside of lib/ and that fixed the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM