Skip to content

Group tests under Workspace Folder and Project nodes#5871

Merged
DanTup merged 10 commits intomasterfrom
group-test-suites-under-wf-and-project
Jan 12, 2026
Merged

Group tests under Workspace Folder and Project nodes#5871
DanTup merged 10 commits intomasterfrom
group-test-suites-under-wf-and-project

Conversation

@DanTup
Copy link
Member

@DanTup DanTup commented Jan 8, 2026

Previously we put all suites in one huge flat list.

Fixes #5858

@DanTup DanTup added this to the v3.128.0 milestone Jan 8, 2026
@DanTup DanTup added is enhancement An enhancement or improvement that should be listed in release notes but is not a bug fix. in testing Relates to test execution of Dart/Flutter tests for end users labels Jan 8, 2026
@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

❌ Patch coverage is 75.55556% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.30%. Comparing base (b2b0db1) to head (3629592).
⚠️ Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
src/shared/test/test_model.ts 76.19% 17 Missing and 3 partials ⚠️
src/extension/test/vs_test_controller.ts 76.74% 7 Missing and 3 partials ⚠️
src/extension/extension.ts 50.00% 0 Missing and 2 partials ⚠️
src/extension/commands/test.ts 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5871      +/-   ##
==========================================
- Coverage   67.31%   67.30%   -0.02%     
==========================================
  Files         168      168              
  Lines       12822    12891      +69     
  Branches     2538     2553      +15     
==========================================
+ Hits         8631     8676      +45     
- Misses       3743     3762      +19     
- Partials      448      453       +5     

☔ View full report in Codecov by Sentry.
📢 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.

@DanTup DanTup requested a review from Copilot January 10, 2026 10:10
@DanTup
Copy link
Member Author

DanTup commented Jan 10, 2026

@codex review

/gemini review

Copy link

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

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 is a great improvement, refactoring the test view from a flat list to a hierarchy based on workspace folders and projects. The implementation looks solid, with a well-designed model introducing WorkspaceFolderNode, ProjectNode, and RunnableTreeNode. The test controller and extension activation logic have been updated accordingly, and the tests themselves have been modified to reflect the new structure. I've found a couple of minor areas for improvement in a test helper function to make it more robust and readable. Overall, excellent work!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request reorganizes the test tree structure by introducing workspace folder and project nodes as parents of test suites, replacing the previous flat list. This makes it easier to navigate tests in multi-project and multi-workspace scenarios.

Changes:

  • Added WorkspaceFolderNode and ProjectNode classes to create a hierarchical test tree structure
  • Updated test helpers to locate suite nodes through the new hierarchy
  • Modified all test files' expected results to include the new project/workspace folder parent nodes

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/shared/test/test_model.ts Added WorkspaceFolderNode, ProjectNode, and RunnableTreeNode classes; implemented hierarchy creation logic
src/extension/test/vs_test_controller.ts Updated node creation/removal to support the new hierarchy; added extractRunnableNodes helper
src/extension/extension.ts Updated TestModel initialization with workspace folder accessor functions
src/extension/commands/test.ts Updated type signatures to use RunnableTreeNode
src/test/helpers.ts Added findSuiteNode helper to navigate the new hierarchy; updated makeTestTextTree to filter workspace/project nodes
src/test/test_projects/**/test/*.dart Updated expected test results to include project names as parent nodes
src/test/dart_debug/dart_test.test.ts Updated test code to use findSuiteNode helper; fixed commented code syntax
src/test/flutter_test_debug/debug/flutter_test.test.ts Updated test code to use findSuiteNode helper
src/test/dart/test/test_discovery.test.ts Updated test expectations to include project node in tree
.vscode/launch.json Renamed launch configuration for clarity

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0686f09104

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Tests pass locally, can't see a reason why we didn't do this.
@DanTup DanTup merged commit 734b443 into master Jan 12, 2026
20 checks passed
@DanTup DanTup deleted the group-test-suites-under-wf-and-project branch January 12, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in testing Relates to test execution of Dart/Flutter tests for end users is enhancement An enhancement or improvement that should be listed in release notes but is not a bug fix.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Group tests by workspace folder + package

2 participants