-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
JUnit should have a listener model that provides all the events from test execution (run starting, suite starting, test case starting, test starting, failed, error, success, timeout, theories data, assumption failed etc etc), including a reference to the test/suite class and a Method object for the method at hand.
It should also allow for hooking in the listeners in a single place for an entire set of tests in an unobtrusive way, like a properties file (or possibly as an annotation on a suite, or a specific class in the execution tree).
Rules are sort of listeners, but they require more detailed manipulations of tests. RunListener provides only a fragment of the available information. If the listener framework can also change the test execution (AOP-style), the Rule implementation, as well as the RunListener, could be build on top of this framework.