Search code examples
flutterflutter-integration-testflutter-patrol

(Flutter-Patrol) How can I run few patrol's tests in the directory to execute one file/test only once?


The following hierarchy of the integration_test directory:

integration_test
├── patrol
   ├── 1_test.dart
   ├── 2_test.dart
   ├── 3_test.dart
   ├── 4_test.dart
   ├── 5_test.dart
   └── 6_test.dart

Command to run tests (windows):

patrol test -t integration_test\patrol\

Execution of test on the device:

--------In the loop:

first test run 1_test.dart

second test run 1_test.dart+ 2_test.dart

third test run 1_test.dart+ 2_test.dart+ 3_test.dart

fourth test run 1_test.dart+ 2_test.dart+ 3_test.dart+ 4_test.dart

... etc... last test run 1_test.dart+ 2_test.dart+ 3_test.dart+ 4_test.dart+ 5_test.dart+ 6_test.dart

-------end of test- test results are displayed correctly

Is it possible, to make the execution simple, single- non-incremental calls, so that calls to a single test are not repeated on the device?

-In the loop:

first test run 1_test.dart

second test run 2_test.dart

third test run 3_test.dart

...

last one 6_test.dart

-------end of test


Solution

  • You're probably missing the nativeAutomation: true argument when calling patrolTest().

    The author of this issue had the same problem. I recommend reading that thread.