@@ -16,7 +16,38 @@ To perform these tasks, use *integration tests*.
1616Integration tests verify the behavior of the complete app.
1717This test can also be called end-to-end testing or GUI testing.
1818
19- The Flutter SDK includes the [ integration_test] [ ] package.
19+ ## Testing frameworks
20+
21+ Flutter supports two main approaches for integration testing:
22+
23+ ### ` integration_test ` package
24+
25+ The Flutter SDK includes the [ ` integration_test ` ] [ integration_test ] package.
26+ Tests written with ` integration_test ` can perform the following tasks:
27+
28+ * Run on the target device.
29+ To test multiple Android or iOS devices, use Firebase Test Lab.
30+ * Run from the host machine with ` flutter test integration_test ` .
31+ * Use ` flutter_test ` APIs. This makes integration tests
32+ similar to writing [ widget tests] [ ] .
33+
34+ However, ` integration_test ` can't interact with native platform UI,
35+ such as permission dialogs, notifications, or the contents of
36+ platform views.
37+
38+ ### ` patrol ` package
39+
40+ [ Patrol] [ ] is an open-source testing framework that builds on top
41+ of Flutter's testing capabilities. It extends ` integration_test `
42+ with native interaction support. Patrol lets you:
43+
44+ * Interact with native platform UI, such as permission dialogs,
45+ notifications, and WebViews.
46+ * Access device-level features like toggling Wi-Fi
47+ or adjusting system settings.
48+ * Write more concise tests using [ patrol finders] [ ] .
49+
50+ To learn more, visit the [ Patrol documentation] [ ] .
2051
2152## Terminology
2253
@@ -30,30 +61,27 @@ The Flutter SDK includes the [integration_test][] package.
3061 If you run your app in a web browser or as a desktop application,
3162 the host machine and the target device are the same.
3263
33- ## Dependent package
64+ ## Getting started
3465
35- To run integration tests , add the ` integration_test ` package
36- as a dependency for your Flutter app test file.
66+ To use ` integration_test ` , add it as a dependency for your
67+ Flutter app test file.
3768
3869To migrate existing projects that use ` flutter_driver ` ,
3970consult the [ Migrating from flutter_driver] [ ] guide.
4071
41- Tests written with the ` integration_test ` package
42- can perform the following tasks.
43-
44- * Run on the target device.
45- To test multiple Android or iOS devices, use Firebase Test Lab.
46- * Run from the host machine with ` flutter test integration_test ` .
47- * Use ` flutter_test ` APIs. This makes integration tests
48- similar to writing [ widget tests] [ ] .
72+ To use Patrol, follow the [ Patrol setup guide] [ ] .
4973
5074## Use cases for integration testing
5175
5276The other guides in this section explain how to use integration tests to validate
5377[ functionality] [ ] and [ performance] [ ] .
5478
79+ [ patrol finders ] : {{site.pub-pkg}}/patrol_finders
5580[ functionality ] : /testing/integration-tests/
56- [ performance ] : /cookbook/testing/integration/profiling/
5781[ integration_test ] : {{site.repo.flutter}}/tree/main/packages/integration_test
5882[ Migrating from flutter_driver ] : /release/breaking-changes/flutter-driver-migration
83+ [ Patrol ] : {{site.pub-pkg}}/patrol
84+ [ Patrol documentation ] : https://patrol.leancode.co/
85+ [ Patrol setup guide ] : https://patrol.leancode.co/getting-started
86+ [ performance ] : /cookbook/testing/integration/profiling/
5987[ widget tests ] : /testing/overview#widget-tests
0 commit comments