Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.4
-
None
Description
Often, there is one test method per test case. JUnit allows a test class to be more flexible: It may generate a test suite at test run time, which may contain any number of tests.
JUnit has traditionally required
- a public static suite() method
- returning junit.framework.Test (or some type, such as TestSuite, that can be cast to Test ).
In addition to these JUnit requirements, Surefire imposes one more requirement:
- the class that contains the suite() method needs to itself implement junit.framework.Test .
If that additional requirement is not met, the suite() method is not called, but silently ignored.
Surefire should not impose this additional requirement, but call any suite() method that returns something that can be cast to junit.framework.Test , in any test class.