Skip to content

Don't run flutter test tests both by line + by name if they are not affected by location/invocation mode - #6171

Merged
DanTup merged 1 commit into
merge-debug-tests-3from
reduce-dupe-flutter-test-debug-tests
Sep 5, 2026
Merged

DanTup merged 1 commit into
merge-debug-tests-3from
reduce-dupe-flutter-test-debug-tests

Conversation

@DanTup

@DanTup DanTup commented Sep 5, 2026

Copy link
Copy Markdown
Member

Many of these tests run the whole suite and therefore are not affected by the testInvocationMode setting. This moves them outside the loop so they run only once instead of twice.

See #6165

@DanTup DanTup added this to the v3.144.0 milestone Sep 5, 2026
@DanTup DanTup added the is testing Relates to the testing (either manual or automated) of Dart Code label Sep 5, 2026
@codecov

codecov Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.80%. Comparing base (648dce1) to head (795a9ee).

Additional details and impacted files
@@                   Coverage Diff                   @@
##           merge-debug-tests-3    #6171      +/-   ##
=======================================================
- Coverage                70.82%   70.80%   -0.03%     
=======================================================
  Files                      170      170              
  Lines                    13158    13158              
  Branches                  2649     2649              
=======================================================
- Hits                      9319     9316       -3     
- Misses                    3319     3321       +2     
- Partials                   520      521       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

… affected by location/invocation mode

Many of these tests run the whole suite and therefore are not affected by the `testInvocationMode` setting. This moves them outside the loop so they run only once instead of twice.

See #6165
@DanTup
DanTup force-pushed the reduce-dupe-flutter-test-debug-tests branch from ba7b57a to 795a9ee Compare September 5, 2026 14:55
@DanTup
DanTup requested a lite review from Copilot September 5, 2026 15:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

One moved test’s waitFor predicate is effectively always true for startedSessions, which can allow a false-positive pass and should be corrected before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR speeds up the flutter_test_debug test suite by avoiding running tests twice (by name + by line) when the behavior under test isn’t affected by dart.testInvocationMode, while keeping the invocation-mode-sensitive tests inside the loop.

Changes:

  • Moved “whole-suite” Flutter test debugger tests outside the testInvocationMode loop so they run only once.
  • Converted some slow integration-style tests into faster configuration-resolution assertions using getLaunchConfiguration(...).
  • Added use of flutterTestDeviceId for device-aware launch config assertions.
File summaries
File Description
src/test/flutter_test_debug/debug/flutter_test.test.ts Refactors the test structure to reduce duplicate runs across invocation modes and replaces some slow runs with launch-config assertions.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/test/flutter_test_debug/debug/flutter_test.test.ts
Comment thread src/test/flutter_test_debug/debug/flutter_test.test.ts
DanTup added a commit that referenced this pull request Sep 5, 2026
@DanTup
DanTup merged commit 1fb5381 into master Sep 5, 2026
24 of 25 checks passed
DanTup added a commit that referenced this pull request Sep 5, 2026
@DanTup
DanTup deleted the reduce-dupe-flutter-test-debug-tests branch September 7, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

is testing Relates to the testing (either manual or automated) of Dart Code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants