Cannot execute nested test class
When tying to execute the test below it fails stating thatapp.SomeTest.app.SomeNestedTest.* doesn't exist. That's because it should try and run app.SomeTest$SomeNestedTest.* instead.
package app;
public class SomeTest {
public static class SomeNestedTest {
@Test
public void someTest() {
assertEquals(1 + 1, 2);
}
}
}
I am already checking this out. Thank you for the report!
Awesome! Let me know if you need help, I'm willing to contribute
Having classes as namespaces should bring the posibility to construct the right command. I'll assing you this issue. If you need any guidance, don't hesitate to ask.
I'm having trouble running my tests locally and it's making it difficult to see how my changes affect the project. How do you run them?
I've tried with neotest-plenary and with the barebons nvim --headless -c "PlenaryBustedDirectory ." but 2 test while loading neotest-java and the others hang.
I've also inspected your CI and found that while it succeeds there are a couple hidden failures in there: https://github.com/rcasia/neotest-java/actions/runs/6805839060/job/18506092499#step:5:42
Oh forget about the CI thing, I went back and noticed that those were java tests and not lua's :sweat_smile: , but I still have trouble executing the other. I do wonder if it has something to do with the way I have configured Lazy.nvim.
I needed to set the absolute path to minimal_init.vim for the neotest-plenary config. Something like this:
{
'nvim-neotest/neotest-plenary',
min_init = ".../neotest-java/tests/minimal_init.vim"
}
Also I just created CONTRIBUTING, might be useful.
I've just pushed a bugfix related to the newly introduced namespaces. This fix could be a starting point for addressing the issue with nested classes.
Close this issue is currently fixed.