patrol_cli 0.6.5 patrol_cli: ^0.6.5 copied to clipboard
Command-line tool for Patrol, a powerful Flutter-native UI testing framework.
patrol_cli #
Command-line tool to make working with patrol easier.
Installation #
From pub.dev #
$ dart pub global activate patrol_cli
From git #
-
Make sure that you have Dart >= 2.17 installed.
$ dart --version
-
Clone the repo.
-
Go to
packages/patrol_cli
. -
Run
dart pub global activate --source path .
Troubleshooting #
If you can't run patrol
from the terminal and the error is something along the
lines of "command not found", make sure that you've added appropriate
directories to PATH:
- on Unix-like systems, add
$HOME/.pub-cache/bin
- on Windows, add
%USERPROFILE%\AppData\Local\Pub\Cache\bin
Usage #
First run #
On first run, patrol_cli
will download artifacts it needs to the artifact
path. By default it is $XDG_CACHE_HOME
(on Unix-like systems) or
$HOME/.patrol
(on Windows), but you can change it by setting PATROL_CACHE
environment variable.
To learn about commands, run:
$ patrol --help
Bootstrap #
To use Patrol in your Flutter project, you need to:
- add
patrol
as adev_dependency
inpubspec.yaml
- add
integration_test
as adev_dependency
inpubspec.yaml
- create
test_driver/integration_test.dart
- create
integration_test/app_test.dart
Run patrol bootstrap
to automatically perform these steps.
First drive #
Make sure that you have at least one device attached:
$ patrol devices
To run the simple integration test generated by patrol bootstrap
:
$ patrol drive