Incorrect test target selected when running or debugging tests with Bazel for IntelliJ plugin versions 2023.10.08.0.1 and newer #7017
Labels
awaiting-maintainer
Awaiting review from Bazel team on issues
product: IntelliJ
IntelliJ plugin
type: bug
Description of the bug:
When running or debugging tests in IntelliJ IDEA using newer versions of the Bazel for IntelliJ plugin (versions 2024.10.08.0.1-api-version-242 and later), the IDE often selects the incorrect Bazel target for test execution. I have noticed that this issue specifically occurs when a test class extends a base test class. While it may happen in other scenarios, this appears to be a common case.
Tests run and debug correctly, selecting the correct target.
Which category does this issue belong to?
Intellij
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Set up the environment:
Open a Bazel project in IntelliJ IDEA.
Find a test class that extends another base test class:
Attempt to run or debug the test:
Click the green run/debug icon (▶) next to the test class in the editor's left gutter.
Observe the behaviour:
Which Intellij IDE are you using? Please provide the specific version.
IntelliJ IDEA Ultimate Edition [2024.2] and [2024.3]
What programming languages and tools are you using? Please provide specific versions.
Programming Language: Java; Test Frameworks: JUnit; Bazel Version: 7.2.1
What Bazel plugin version are you using?
2024.10.08.0.1-api-version-242, 2024.11.07.0.1-api-version-243
Have you found anything relevant by searching the web?
GitHub Issues: Searched but did not find existing issues related to this problem.
Email Threads: Checked the intellij-bazel-plugin Google Group as well but found no relevant discussions.
Any other information, logs, or outputs that you want to share?
The text was updated successfully, but these errors were encountered: