Run integration tests.
To see all available options and flags, run
patrol test --help.
This command is the one use you'll be using most often.
patrol test does the following things:
- Builds the app under test (AUT) and the instrumentation app
- Installs the AUT and the instrumentation on the selected device
- Runs the tests natively, and reports results back in native format.
Under the hood, it calls Gradle (when testing on Android) and
testing on iOS).
patrol test runs all integration tests (files ending with
_test.dart located in the
To run a single test, use
patrol test --target integration_test/login_test.dart
You can use
--target more than once to run multiple tests:
patrol test \ --target integration_test/login_test.dart \ --target integration_test/app_test.dart
patrol test --targets integration_test/login_test.dart,integration_test/app_test.dart
Test files must end with
_test.dart. Otherwise the file is not considered a
test and is not run.
To delay app uninstallation for 5 seconds after the test finishes:
patrol test --target integration_test/app_test.dart --wait 5