Skip to content

[flutter_tools] Add integration coverage for test presets - #190858

Merged
auto-submit[bot] merged 1 commit into
flutter:masterfrom
Boulea7:fix/flutter-test-preset
Aug 18, 2026
Merged

auto-submit[bot] merged 1 commit into
flutter:masterfrom
Boulea7:fix/flutter-test-preset

Conversation

@Boulea7

@Boulea7 Boulea7 commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

#190878 added --preset / -P support to flutter test. This PR adds real-command integration coverage for that behavior in both the standard and experimental faster test runners.

The tests exercise the short and long flag forms, an undefined preset, composition with --plain-name, and a two-file --experimental-faster-testing invocation.

Related to #189191.

Tests

  • ../../bin/flutter test --no-pub test/commands.shard/hermetic/test_test.dart (56 tests)
  • ../../bin/flutter test --no-pub test/integration.shard/test_test.dart --concurrency=1 (39 tests)
  • ../../bin/flutter test --no-pub --experimental-faster-testing -P passing flutter_test/preset_test.dart flutter_test/trivial_test.dart
  • ./bin/dart analyze --fatal-infos packages/flutter_tools/lib/src/commands/test.dart packages/flutter_tools/lib/src/test/runner.dart packages/flutter_tools/test/commands.shard/hermetic/test_test.dart packages/flutter_tools/test/integration.shard/test_test.dart dev/automated_tests/flutter_test/preset_test.dart
  • ./bin/dart format --output=none --set-exit-if-changed packages/flutter_tools/lib/src/commands/test.dart packages/flutter_tools/lib/src/test/runner.dart packages/flutter_tools/test/commands.shard/hermetic/test_test.dart packages/flutter_tools/test/integration.shard/test_test.dart dev/automated_tests/flutter_test/preset_test.dart
  • ./bin/flutter analyze --flutter-repo
  • git diff --check

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the AI contribution guidelines and understand my responsibilities, or I am not using AI tools.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement. The change is limited to flutter_tools tests and does not add widgets.
  • I signed the CLA. This must be confirmed by the account holder.
  • I listed at least one issue that this PR relates to in the description above.
  • I updated/added relevant documentation (doc comments with ///). No public API is added by this test-only change.
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • I followed the breaking change policy and added Data Driven Fixes where supported. This is a test-only change and does not alter an API.
  • All existing and new tests are passing in the affected suites listed above.

@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Aug 10, 2026
@Boulea7

Boulea7 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Closing this draft until the account holder has personally reviewed and understood the AI-assisted changes, as required by Flutter’s AI contribution guidelines. The fork branch is retained for that review.

@Boulea7 Boulea7 closed this Aug 10, 2026
@Boulea7 Boulea7 reopened this Aug 11, 2026
@fluttergithubbot

Copy link
Copy Markdown
Contributor

An existing Git SHA, 447d8836b500d36a6378dae0445ca9e50ab5ca21, was detected, and no actions were taken.

To re-trigger presubmits after closing or re-opeing a PR, or pushing a HEAD commit (i.e. with --force) that already was pushed before, push a blank commit (git commit --allow-empty -m "Trigger Build") or rebase to continue.

@Boulea7
Boulea7 force-pushed the fix/flutter-test-preset branch from 447d883 to f3eabf0 Compare August 11, 2026 13:22
@Boulea7

Boulea7 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Maintainer label request: please add CICD so the full presubmit suite can run on the current draft head.

@Boulea7
Boulea7 force-pushed the fix/flutter-test-preset branch from f3eabf0 to 9fee492 Compare August 12, 2026 09:27
@Boulea7 Boulea7 changed the title Add preset support to flutter test [flutter_tools] Add integration coverage for test presets Aug 12, 2026
@Boulea7
Boulea7 marked this pull request as ready for review August 12, 2026 19:40

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support and integration tests for the test preset option in flutter test. It introduces a test configuration file (dart_test.yaml) defining presets, a test file (preset_test.dart) to verify preset application, and integration tests in test_test.dart to validate the short and long preset options, undefined preset handling, and combination of presets with other options. I have no feedback to provide.

@bkonyi bkonyi added the CICD Run CI/CD label Aug 18, 2026
@bkonyi
bkonyi requested review from bkonyi and chingjun August 18, 2026 15:28

@bkonyi bkonyi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! This just needs another review before it can land.

Exercise short and long preset flags through the real flutter test command, including undefined presets and combination with name filters. This extends the unit coverage added in flutter#190878.
@chingjun
chingjun force-pushed the fix/flutter-test-preset branch from 9fee492 to cee75ff Compare August 18, 2026 19:16
@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Aug 18, 2026
@chingjun chingjun added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App labels Aug 18, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Aug 18, 2026
Merged via the queue into flutter:master with commit f41f94b Aug 18, 2026
25 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants