Test Explorer: show test counts on tree nodes (project / namespace / class)
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Currently the Test Explorer tree gives no indication of how many tests a node (project / namespace / class / folder) contains. Visual Studio's Test Explorer and ReSharper/Rider's Unit Test Explorer show an aggregate count on every node, e.g. `MyProject (109 tests)` > `Directory (10 tests)` > `SearchUsersByObjectIdsTests (5 tests)`.
**Use cases**
- Sanity-check test discovery: a drop from 109 to 87 tests after a refactor or config change is visible at a glance, without expanding and counting.
- Gauge suite size per area/class quickly.
- Parity for users moving between VS Code and Visual Studio / Rider.
**What exists today doesn't cover this**
- `testing.countBadge` is a single global number on the Activity Bar icon, and only counts tests that have results.
- The run summary (e.g. `2/2`) is per-run, not per-node.
- Test extensions can't reasonably work around it by baking counts into `TestItem` labels (breaks filtering/sorting, and every provider would have to reimplement it).
**Proposal**
An opt-in setting (e.g. `testing.showCounts`) that renders the descendant test-case count after each expandable node in the Test Explorer tree, similar to how the Search view shows match counts per file.
Related but different: #181094 (Activity Bar badge, shipped as `testing.countBadge`), #117890 (totals in run progress).
Contributor guide
Assessment
This issue has not been assessed yet.