chrallard
chrallard

Reputation: 147

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?

Upvotes: 3

Views: 3664

Answers (1)

chrallard
chrallard

Reputation: 147

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.

Upvotes: 2

Related Questions