From: SourceForge.net <no...@so...> - 2008-07-22 17:02:43
|
Feature Requests item #2019122, was opened at 2008-07-15 19:28 Message generated for change (Comment added) made by kbeck You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=365278&aid=2019122&group_id=15278 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Let RunListeners reflect on the test method being run Initial Comment: When a RunListener is alerted that a test has failed, or has finished, etc., a Failure or Description object is passed to the listener. These Failure and Description objects contain Strings that have some information about the test; for instance, a test method named "testAdd" in a class named "AdderTest" would have a Description with its getDisplayName() method returning the String "testAdd(AdderTest)". The Description class should include more information about the test, stored in strongly typed data structures instead of Strings. At a minimum, this means adding a method to the Description class that returns the java.lang.reflect.Method object associated with the test method that was run. In this way information such as extra runtime Annotations (besides org.junit.Test) on the test method could be queried (in a clean and strongly-typed way) from the test that failed and processed. The current workaround is to parse the String returned by getDisplayName() and then use reflection to build a Method object from the substrings of getDisplayName() containing the names of the method and the test class. ---------------------------------------------------------------------- >Comment By: Kent Beck (kbeck) Date: 2008-07-22 10:02 Message: Logged In: YES user_id=117320 Originator: NO Description now supports getAnnotations() as of 4.4 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=365278&aid=2019122&group_id=15278 |