Use Java reflection on the classes to find out.
For version 3 the class must extend TestCase.
For version 4 you can scan for annotations, see this: How to get annotations of a member variable?
Basically you have to do as if you were JUnit, maybe you can even reuse some of the existing JUnit code.