microsoft / microsoft/vscode-java-test

Cannot run tests when the path has space

Open
#1,197 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

環境

  • Windows 10 Pro
  • Visual Studio Code 1.56
  • Java Extension Pack 0.14.0
  • Java Test Runner 0.29.0

問題

JPMSの(module-info.javaを含む)テストを実行しようとすると、
TestEngineを探しに行くときにネットワークパスを探しに行ってエラーとなります。

java.util.ServiceConfigurationError: org.junit.platform.engine.TestEngine: Error locating configuration files

module-info.javaを削除してRun Testを実行すると正常にテストが実施されます。

gradleからは正常にテストが実施されます。

参考

以下に、サンプルのプロジェクトを作成しました。
https://github.com/Empressia/VSCodeJavaTest02

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 failure with the linked sample project on Windows, using a workspace path that contains spaces and a module-info.java file. Compare the VS Code Run Test path with the working Gradle run, and trace the TestEngine discovery that produces the ServiceConfigurationError. Done means JPMS tests run successfully from VS Code without the network-path error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.