microsoft / microsoft/vscode-java-test

[BUG] Test is marked as successful even though it was not executed

Open
#1,499 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ai-triaged bug junit maven test-execution ux
Dominant language
TypeScript
Stars
340
Forks
173
Avg merge
1d 19h
Merged PRs (30d)
18

Description

I have a JUnit test for which the Maven goal testCompile (belonging to the maven-compiler-plugin) fails. Nevertheless, when the test is executed using the green play button in the gutter, the green triangle becomes a green tick. Even though the Debugging Console shows that the class was not found.

In addition to marking the test as failed it would be very useful to provide the output of the failed Maven execution in the Debugging Console. That the class was not found is a consequence of the compilation failure, and this stacktrace does not help to fix the problem. The output of Maven does.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with a JUnit test whose Maven testCompile goal fails, then trace how the green gutter action reports the result and writes to the Debugging Console. Done means the test is marked failed when compilation prevents execution, and the failed Maven output is shown instead of only the class-not-found stacktrace.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript, vscode
Domain
testing, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.