The property file in src/test/resources is not recognized and the test fails.
Environment:
- OS: Windows10
- VS Code: v1.60.2
- JDK: v11
- Java Test Runner Extension: v0.32.0
Repro steps:
- git clone : https://github.com/tsukasa89/test-runner-example
- Open test-runner-example with VSCode
VSCode Test run:
Click "Run All Tests"
Result:
The test "test resource properties value" failed.
Gradle Test run:
.\gradlew clean test
Result:
All tests succeed.
Took a quick look and found that in the resolved classpath, main folder comes previous of the test folder.
Needs to take a deep look to see what's happening.
Root cause is that the upstream does not specially put the test output location before the main output location.
Same bug can be seen in Eclipse as well.
I know about the eclipse issue. However, in eclipse, JUnit succeeds by prioritizing src/test in the Java Build Path. Is it possible to prioritize src/test when running the Java Test Runner in VS Code?

Currently the order of the build path is not configurable in VS Code. But that's a good point how we can solve such kind of issues.
Thank you. I hope this problem will be solved.
Root cause is that the upstream does not specially put the test output location before the main output location.
Same bug can be seen in Eclipse as well.
@jdneo May I ask who the upstream is in this case? Is there already a ticket addressing this issue?
@FieteO Since this is a Gradle project, so Buildship is used to resolve the classpaths