Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 201
chrallard Avatar asked Aug 15 '26 09:08

chrallard


1 Answers

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.

like image 83
chrallard Avatar answered Aug 17 '26 00:08

chrallard



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!