bazelbuild / bazelbuild/bazel

Show deselected tests in output

Open
#26,601 0 comments 0 reactions 0 assignees View on GitHub
team-Core type: feature request untriaged
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the feature request:

If a test is flaky, we disable it by adding a tag that gets auto-filtered out with `--test_tag_filters` in our bazelrc. There are two problems with this:
1. When running `bazel test //...`, it's not obvious that some tests did not run
2. When running `bazel test //:specific_disabled_test`, it says "No test targets were found", which can be a confusing experience

At least for the "No test targets were found" scenario, it would be nice if the output included something like "The following targets were excluded due to configuration settings / excluded tags:". It would also be nice to show it when some tests were run (maybe with a limit like showing max 10 targets)

### Which category does this issue belong to?

Core

### What underlying problem are you trying to solve with this feature?

Confusing user experience when tests are not running as expected

### Which operating system are you running Bazel on?

_No response_

### What is the output of `bazel info release`?

_No response_

### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.

_No response_

### What's the output of `git remote get-url origin; git rev-parse HEAD` ?

```text

```

### Have you found anything relevant by searching the web?

_No response_

### Any other information, logs, or outputs that you want to share?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by tracing how `--test_tag_filters` excludes targets during `bazel test //...` and `bazel test //:specific_disabled_test`, focusing on the code that emits the "No test targets were found" message. Done means excluded targets are reported clearly in the no-target case and, where applicable, in test runs with a bounded list.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.