Agung
Agung

Reputation: 13843

how to run flutter test on specific directory only?

let say inside a test folder, I have structure like this

test
 unit_test
    firebase_services
       firestore_user_services_test.dart
    http_services
       http_services_test.dart
    

 widget_test
     login_page_test.dart 
     home_page_test.dart

I have two folders called unit_test and widget_test inside the test folder. I need to run all the tests inside the unit_test only. how to do that ?

because if I run flutter test it will run all the tests inside the test folder. if I run flutter test unit_test, it doesn't run

Upvotes: 11

Views: 5499

Answers (1)

Agung
Agung

Reputation: 13843

I should run

flutter test test/unit_test

thanks to pskink to point out this documentation

Upvotes: 16

Related Questions