Skip to content

Neotest adapter for Java projects using Maven or Gradle.

License

Notifications You must be signed in to change notification settings

dmkenney/neotest-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Neotest adapter for Java projects using Maven or Gradle.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages