Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patrol Next #661

Closed
4 tasks done
bartekpacia opened this issue Dec 2, 2022 · 5 comments
Closed
4 tasks done

Patrol Next #661

bartekpacia opened this issue Dec 2, 2022 · 5 comments
Labels
epic Idea for a big new feature

Comments

@bartekpacia
Copy link
Contributor

bartekpacia commented Dec 2, 2022

TL;DR

This issue tracks the architectural redesign of Patrol. The redesign is required to be able to circumvent longstanding issues with Flutter described here.

All your tests written using Patrol will continue to work.

The redesign will be almost completely seamless from the developer/tester perspective – it'll take place only under the hood. Some minor configuration changes might be required, like changing a line in pubspec.yaml or in app's native files, but that's it. So don't worry! :)

Patrol Next

Synopsis

Patrol Next is the codename for Patrol's architecture redesign, which aims to enable features which are impossible to implement with the current architecture.

Requirements

  1. Works on {virtual, physical} {android, ios} devices
  2. Tests are reported natively
  3. Debuggability of integration tests in VS Code (attaching to running app)
  4. Being able to build all tests into a single app binary (see here)

Roadmap

  • initial basic Proof of Concept of the new architectural approach (see POC: Patrol Next #646)

  • replicate integration_test functionality 1:1, but include Patrol-only goodies (native UI automation)

    • Decide what to do with native automation code being duplicated twice
    • Update CI workflows

    We will convert the patrol package to patrol plugin. It'll look similar to the integration_test plugin. Setup instructions will be roughly similar.

    Once this step is done, users will be able to import it and use it.

In the future/TBD:

  • an extensible Patrol Test Runner, written in Dart, which can be embedded in the integration test and in the CLI

See also:

Workshop notes

Implementation idea

There is a single app, which bundles Flutter AUT (app under test) and native integration test together. Communication between AUT and native integration is accomplished using method channels*.

*After research conducted in #646 we've learned that method channels can only be directly used on Android, because on Android AUT test and integration test run in the same process. This is not the case on iOS, where AUT and instrumentation run in separate processes, so some form of RPC is needed. In #646 eDistantObject library was used for it, but it could be anything. We should find a solution that doesn't differ too much between Android and iOS, to avoid unnecessary work.

IMG_9865

Legend:

  • PTR = Patrol Test Runner
@neiljaywarner
Copy link

sounds fantastic! :)

@neiljaywarner
Copy link

@bartekpacia how difficult would it be to use the poc in a hackathon on january 6th, and/or how close will it be to be usable by january 6th? :)

@bartekpacia
Copy link
Contributor Author

@neiljaywarner No guarantees, but it should be ready by then (ready as in: done 1. and 2. from the "roadmap") :)

@bartekpacia
Copy link
Contributor Author

This phase is completed.

Migration progress of features from patrol drive to patrol test is tracked in #788.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
epic Idea for a big new feature
Projects
None yet
Development

No branches or pull requests

2 participants