Open PunchedChimera opened 2 months ago
The exxtension uses the test flag in the classpath to determine where the test source root is.
If that flag is disabled. It could not detect the test location. May I ask why would you like to turn it off?
I have a project that contains test-jars that need to be used in compile scope. Without setting that flag, any classes in these test-jars are not on the classpath and result in multiple class not found/ un-resolved compilation errors when attempting to run tests via the test-runner. These issues are not present when compiling/ running the tests through command line (maven in my case). I have created a simple project that demonstrates this: https://github.com/PunchedChimera/demo-test-jar-deps
Thank you for the attached project.
So far, the extension only detect the test root by searching the test classpath flag of the project. I'm afraid that AFAIK, there is no workaround right now.
To resolve the issue, maybe we can remove this restriction and directly search the test cases by those annotations. But I'm not sure the impact on the perf for this approach.
related with #464
Hi, when setting the property
"java.import.maven.disableTestClasspathFlag": "true"
in.vscode/settings.xml
the test extension seems to break. No tests are discoverable in the Test Explorer and the run icons in the gutter disappear. Tested on multiple systems and on a fresh/clean install of VsCode. This is on Window, both natively and via WSL2."java.import.maven.disableTestClasspathFlag": "true" (Not working)
"java.import.maven.disableTestClasspathFlag": "false" (Works as expected)