Flutter Driver: Test file not found

1,264

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.

Share:
1,264
chrallard
Author by

chrallard

Updated on December 24, 2022

Comments

  • chrallard
    chrallard over 1 year

    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?