rcasia / neotest-java

Neotest adapter for Java.
MIT License
44 stars 24 forks source link

@TestConfiguration is treated as a test and the test tree shows that a class contains failed tests #161

Closed qverkk closed 3 weeks ago

qverkk commented 1 month ago

So in general sometimes you might want to setup some test beans and stuff in a class annotated with @TestConfiguration (spring). Right now neotest-java treats those classes as classes containing tests and is trying to run those classes. In general there might be a scenario where:

  1. A file contains only the @TestConfiguration annotation - is_test_file should return false
  2. A file contains @TestConfiguration and a @Test annotation - is is_test_file should return true
  3. A file contains @Test annotation and doesn't contain @TestConfiguration - this should return true
  4. No @Test annotation found - return false

Hope this helps :D awesome work dude btw!