vscode-java-test icon indicating copy to clipboard operation
vscode-java-test copied to clipboard

Link Test explorer UI to actively viewed file

Open valentijnscholten opened this issue 1 year ago • 1 comments

With the normal (File) explorer in VSCode, the file that the user currently working on or reading gets focused in the explorer. This allows the user to easily find it in the explorer.

My suggestion is to do the same for Test cases / files / classes in the Test Runner.

valentijnscholten avatar Jan 26 '25 19:01 valentijnscholten

Hi @valentijnscholten, I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.

Suggested Approaches

  • There isn’t currently a built-in “auto reveal” feature in the Java Test Runner’s Test Explorer akin to VS Code’s File Explorer (explorer.autoReveal).

  • You can upvote or comment on the Java Test Runner repo to request this feature:

    • https://github.com/microsoft/vscode-java-test/issues (search for or create a feature request “auto-reveal active test in Test Explorer”)
  • As a temporary workaround, use the editor’s context menu:

    1. Open the test file in the editor.
    2. Right-click → Reveal in Explorer to locate it in the File Explorer.
    3. From there you can run/debug the test via the Test Explorer or gutter icons.

Other References with Low Confidence

Test Explorer UI extension docs
  • Title: Test Explorer UI
    Description: Documentation for the generic Test Explorer UI extension; shows how adapters integrate and display tests.
    URL: https://github.com/hbenl/vscode-test-explorer#readme

  • Title: VS Code explorer.autoReveal
    Description: VS Code setting that auto-reveals the active file in the File Explorer—this behavior is not presently exposed in Test Explorer.
    URL: https://code.visualstudio.com/docs/getstarted/settings#_explorer

The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!

github-actions[bot] avatar Nov 12 '25 23:11 github-actions[bot]