Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.66 KB

README.md

File metadata and controls

57 lines (39 loc) · 1.66 KB

Neotest Java

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.

Installation

Requires:

vim-plug:

Plug "dmkenney/neotest-java"

lazy.nvim:

return {
  { "dmkenney/neotest-java" },
}

Configuration

require("neotest").setup({
    adapters = {
        require("neotest-java"),
    },
})

Supported Features

  • Tests can be run in debug mode
  • Supports running different tasks based on the directory the test file resides in
  • Diagnostics for failed tests

TODOs

  • 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

Contributing

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.