You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The use case for me is that essentially I run my testcases in maven
with surefire plugin.
Only if something goes wrong I switch to the test runner to analyze the details.
Then I switch back.
Currently, I have to configure both, the test runner in settings, and maven in the pom.
It would be some help if I could use the variables available in maven pom.
At least the ones available for maven projects,
better in addition those defined in the properties section in the pom.
Even better if I just can use the config of the surefire plugin.
Even helpful it would be if the settings in both worlds are comparable.
So I miss a way to include and exclude tests in test runner as provided by the surefire plugin.
Concrete suggestion: setting to syncronize with surefire
"java.test.conig": {
"syncSurefire": "true" % with default false
}
Hi Ernst Reissner (@Reissner), 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.
Current Status
There is no built-in way to automatically read Maven Surefire settings (properties or include/exclude patterns) from your pom into VS Code’s Java Test Runner. You must manually mirror any configurations in your settings.json.
Workarounds
Use the java.test.config settings to specify include/exclude patterns. For example:
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!
Activity
jdneo commentedon Aug 16, 2022
Thank you for your feedback.
So for now, what kind of configurations you are using in
java.test.conigsetting?github-actions commentedon Nov 12, 2025
Hi Ernst Reissner (@Reissner), 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.
Current Status
There is no built-in way to automatically read Maven Surefire settings (properties or include/exclude patterns) from your pom into VS Code’s Java Test Runner. You must manually mirror any configurations in your
settings.json.Workarounds
java.test.configsettings to specify include/exclude patterns. For example:defaultproperty of a test configuration to avoid repeatedly selecting the same config when you hit Run/Debug (see below).References
Always use test configuration or make it configurable
defaultfield in your test config so VS Code picks it automatically even when using the Run/Debug shortcuts.Run a test with a particular maven profile
Other references with low confidence
Expose “New Maven Module” command to Java Projects view
Support publishing pre-release versions
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!
covenant-17 commentedon Aug 21, 2026
Hello! I ran into a similar problem and ended up making a small extension for it.
It watches Maven Surefire/Failsafe reports and shows the results in VS Code, so Maven stays the actual test runner.
GitHub: https://github.com/covenant-17/maven-test-explorer-bridge
VS Code Marketplace: https://marketplace.visualstudio.com/items?itemName=covenant-17.maven-test-explorer-bridge
It's a slightly different approach from syncing Java Test Runner with Surefire, but maybe it could be useful for your case too.