docs: document test execution order and $.tester access - #3192
Open
pdenert wants to merge 1 commit into
Open
Conversation
pdenert
requested review from
Kendru98,
PiotrRogulski,
jBorkowska,
piotruela and
zoskar
as code owners
July 23, 2026 16:46
Contributor
There was a problem hiding this comment.
Pull request overview
Documents Patrol test ordering and access to the underlying Flutter tester.
Changes:
- Adds test execution-order guidance.
- Documents
$.testeraccess. - Registers the new documentation page.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tips-and-tricks.mdx |
Adds $.tester guidance. |
test-execution-order.mdx |
Documents test ordering and selection. |
meta.json |
Registers the new page. |
Comments suppressed due to low confidence (1)
docs/documentation/other/test-execution-order.mdx:78
- This guarantee is false for web runs:
patrol test --web-workers Nexplicitly configures Playwright with multiple workers, and the CLI treats values greater than 1 as a sharded run (packages/patrol_cli/lib/src/web/web_test_backend.dart:463-469). In that mode tests execute concurrently and cannot rely on the file/declaration order described here. Please scope the sequential guarantee to native platforms (with Xcode parallel execution disabled as required by the setup docs) and call out the web-workers exception.
Patrol does not run tests in parallel or in a randomized order. The order
described above is deterministic, so tests that depend on running after one
another (though we recommend keeping tests independent) will behave
consistently across machines and CI.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+11
to
+12
| Patrol finds every file ending with `_test.dart` (or your custom | ||
| [`test_file_suffix`](/documentation/write-your-first-test)) under the test |
🚀 Preview Deployment Ready!Preview URL: https://pr-3192-patrol-docs.vercel.app Latest Deployment
This preview URL is stable and will be updated with each new commit to this PR. |
zoskar
approved these changes
Jul 23, 2026
Kendru98
requested changes
Jul 24, 2026
|
|
||
| ### Order within a single test file | ||
|
|
||
| Within a file, tests run **in the order they are declared** — top to bottom — |
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #2137 and #405.
TestFinder.findAllTests, which sorts witha.path.compareTo(b.path)), and tests within a file run in declaration order likepackage:flutter_test. Also covers selecting a single file and--exclude.tap()throwingWaitUntilVisibleTimeoutException#405): short tip in Tips and tricks showing thatPatrolIntegrationTesterwraps Flutter'sWidgetTesterand anyWidgetTesterAPI is reachable via$.tester.Verification
Docs-only change. Validated
meta.jsonand matched the MDX structure (frontmatter,<Info>callout) against existing pages in the same section. Registered the new page indocumentation/other/meta.json.🤖 Generated with Claude Code