Reputation: 6852
Can someone let me know is there a way I can identify all JUnit tests which are ignored i.e either @Ignore
being added to the method or @Test
is missing on the method in IntelliJ IDEA?
Upvotes: 2
Views: 621
Reputation: 47865
Finding test classes which contain the @Ignore
annotation can be done with Edit > Find > Find in Path
...
Finding test classes where "@Test is missing on the method" is trickier because any class can be a test class. Or to put it another way; a class is deemed a "test class" if (a) it is located in the test source tree and (b) it has at least one public method annotated with @Test
. So, the absence of @Test
would preclude a class from your search. So, perhaps you are looking for classes which meet these criteria:
@Test
@Test
This would require a Structural Search, accessed from Edit > Find > Search Structurally
. There are numerous canned templates available:
Upvotes: 1