microsoft / microsoft/vscode-java-test

Can run test from a .class file

Open
#1,196 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ai-triaged enhancement maven question test-discovery
Dominant language
TypeScript
Stars
340
Forks
173
Avg merge
1d 19h
Merged PRs (30d)
18

Description

Hi,

I have a tests.jar package that has the tests included, I did not write the tests, instead the've been downloaded by maven, the pom.xml has them as dependency. I've downloaded the sources as well, however Code Lens does not provide the Run Test| Debug Test above each test case, or the test class.

Here's the video, I have a TestSuite.java that is in the tests folder and it shows the Run Test | Debug Test, but when I navigate to the Broker.class test that is part of the tests.jar, the Code Lens does not show the individual Run Test | Debug Test above each test, like shown here.
https://code.visualstudio.com/docs/java/java-testing#_rundebug-test-cases

video if it in action:

https://user-images.githubusercontent.com/60336163/117559253-8f135c80-b038-11eb-8a51-e1720ba4b9c1.mov

Running vsCode 1.56 w/ all extensions latest version.

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

Start with the pom.xml dependency that provides tests.jar, then reproduce the missing Code Lens behavior while navigating to Broker.class and compare it with TestSuite.java in the tests folder. Done means the individual test cases and test class from the downloaded dependency expose Run Test and Debug Test actions as described in the Java testing documentation.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.