neotest
neotest copied to clipboard
JUnit/jdtls support
Hi,
I've started using nvim-jdtls instead of the built-in jdtls support from Neovim and went down the whole rabbit hole down to nvim-dap and nvim-dap-ui.
The debugging experience is great (many thanks to your dap-ui :smile:) and the last thing I'm missing is something like a test explorer/sumarry, which this plugin seems to offer.
I've went from the nvim-dap extensions wiki page to vim-ultest which seems to be deprecated now. From there I landed here :)
Is running the tests through nvim-dap
(which I think is the provider for running jdtls
tests) supported at the moment? I tried using neotest-vim-test
, but without success.
I've found some references to junit here and in nvim-dap
, but mostly in issues where I think it was all about having the results of other test runners provide the test results in junit format.
AFAIK there is no junit specific adapter and vim-test does not support debugging, so you'll need to wait for someone to implement or implement one yourself. Happy to help if you'd like to try :smile: The complexity of it really depends on the test runner but there are lots of examples in the other adapters.
Also I've updated the nvim-dap wiki thanks for pointing that out!
I have actually just written my own Java adapter. Very early stages but try it out and see what you think
https://github.com/andy-bell101/neotest-java
I have a use case for Java at some point in the near future so was going to start work on a JUnit adapter. I wrote the PHPUnitadapter which actually parses JUnit output. Might be useful @andy-bell101
Thanks! I think I've got it as far as I can without testing on a "real" project. It works with the Exercism exercises I've been doing to learn Java, but I don't think they're structured the way a real project is. I've done some reading and I think what I've implemented should work but need to confirm it