Java Test Runner 0.7.1
For out tests we need to provide env and vmargs, but they don't work with code lens (which actually took quite some time to realize). We use Code lens a lot since we practice TDD.
Ideally, once we define test run/debug configuration - it should be automatically picked up everywhere: in Test Explorer, Code Lens, Maven test, etc.
It would help to have the following configuration options for this extension:
@lashchev unfortunately we removed Run/Debug with Config from the code lens as it would make the code lens rather long and not every one needs this feature. Adding an option to show/hide is a good way. However, we also provide a default property for people who use this feature often, you can edit your test config and specify the default field with the name of a config item, and then this config item would be picked even you choose Run/Debug. Does this make sense to you? Looking forward to your feedback.
@ansyral Actually, my point is quite the opposite from what you did: if there is a config to run test - then there is no use for running tests without the config.
If project has config - it means that it is needed. I cannot find any use case why would I create a config and later want to run without it. This is a primary use case.
If project has 2+ configs (which is most likely only a very tiny % of all the projects) - then you need a way to pick a config on start or configure default one. So, support for those rare projects should not complicate config usage for simple projects.
In all our current projects in 99% cases we run/debug tests from Code Lens and in 100% of our test runs we need a configuration. We ended up creating our own runtime configuration loading since current VSCode config approach doesn't work for us.
@lashchev I think your requirement should be achieved if we resolve #524.
Please feel free to let us know your thoughts about it.
Closing this issue since the experience of running/debugging with configuration has been changed.
More details can be found here: https://aka.ms/java-test-config
Works great for me. Thank you.
Most helpful comment
@ansyral Actually, my point is quite the opposite from what you did: if there is a config to run test - then there is no use for running tests without the config.
If project has config - it means that it is needed. I cannot find any use case why would I create a config and later want to run without it. This is a primary use case.
If project has 2+ configs (which is most likely only a very tiny % of all the projects) - then you need a way to pick a config on start or configure default one. So, support for those rare projects should not complicate config usage for simple projects.
In all our current projects in 99% cases we run/debug tests from Code Lens and in 100% of our test runs we need a configuration. We ended up creating our own runtime configuration loading since current VSCode config approach doesn't work for us.