Skip to content

Mention Patrol in the Integration Testing section #13128

@pdenert

Description

@pdenert

What information needs to be added?

Currently, the Flutter documentation for both app integration testing and plugin testing mentions the integration_test package and native tests like Espresso or XCUITest. The documentation also points out that:

Dart integration tests (...) These are often the most important tests for a plugin. However, Dart integration tests can't interact with native UI, such as native dialogs or the contents of platform views.

The Problem
The current documentation leaves a gap for developers who need to test:

  • Permission dialogs (e.g. Location/Camera).
  • Interacting with WebViews or PlatformViews.
  • System-level interactions (e.g., toggling Wi-Fi, opening the notification tray).

By only mentioning integration_test and native Espress/XCUITest, the docs suggest a high-friction "split" testing strategy. This might give the impression that there is no way to perform true end-to-end testing in Flutter that handles both Flutter code and native interactions. However, such a solution does exist, and it is Patrol.

I propose adding documentation for Patrol, an open-source testing framework that solves this specific problem by allowing Dart tests to interact with native OS features (permission dialogs, notifications, etc.).

Justification
Patrol has become a standard tool in the Flutter ecosystem for advanced E2E testing. Including it in the official docs would:

  • Provide developers with a clearer path for "real" E2E testing.
  • Clarify that the "native UI" limitation is solvable within the Dart ecosystem.
  • Align the docs with modern Flutter testing best practices.

Where should this new content appear?

  1. I would like to extend the "Integration testing concepts" page to describe both options: integration_test and Patrol.

  2. Add a new page: "Write and run a Patrol test", similar to the one that demonstrates how to use integration_test.

  3. Describe the option to use Patrol to test plugins on the https://docs.flutter.dev/testing/testing-plugins page.

I would like to fix this problem.

  • I will try and fix this problem on docs.flutter.dev.

Metadata

Metadata

Assignees

No one assigned

    Labels

    co.requestCommunity ask for documentationp2-mediumNecessary but not urgent concern. Resolve when possible.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions