Neotest adapter for Java projects using Maven or Gradle.
This uses the same technique as IntelliJ for running tests. It runs the Maven/Gradle test
command if the test class/method is within the test directory, and runs the integrationTest
command if the test class/method is within the integrationTest directory.
Test reports must be output in XML.
Requires:
Plug "dmkenney/neotest-java"
return {
{ "dmkenney/neotest-java" },
}
require("neotest").setup({
adapters = {
require("neotest-java"),
},
})
- Tests can be run in debug mode
- Supports running different tasks based on the directory the test file resides in
- Diagnostics for failed tests
- Stream results back to Neotest - show test results as they occur, not wait until all are complete before showing
- Support Maven
- Don't run tests marked with @Disabled
- Add configuration options - specifically for setting which Maven/Gradle tasks should run for which directories.
- Add logging
Please raise a PR if you are interested in adding new functionality or fixing any bugs. If you are unsure of how this plugin works please read the Writing adapters section of the Neotest README.