Reputation: 451
I want to find out which tests are not executed (disabled or excluded from test suite...) when running my build. How do I do that?
Upvotes: 0
Views: 37
Reputation: 5740
Easy for disabled tests: just use an IAnnotationTransformer
and check with annotation.getEnabled() == false
.
For excluded tests, you'll have to do it by yourself because TestNG doesn't provide hooks on test selection. You can start from the ISuiteListener
because it provides you parsed suite file.
But with this solution, you won't detect classes which are not included in the suite file.
To find not included classes, you can scan the classpath.
Upvotes: 1