From: SourceForge.net <no...@so...> - 2009-12-01 02:20:29
|
Feature Requests item #1625786, was opened at 2007-01-01 19:08 Message generated for change (Comment added) made by sf-robot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=365278&aid=1625786&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: None Priority: 5 Private: No Submitted By: Russ Jackson (arjackson) Assigned to: Nobody/Anonymous (nobody) Summary: Please add @Testable annotation Initial Comment: It would be great if you could add a @Testable annotation to the JUnit 4 framework so that users could annotate their source methods that require unit testing and tools could use this to generate assocated JUnit tests. Here is the requested annotation: import java.lang.annotation.*; @Retention(value = RetentionPolicy.SOURCE) @Target( { ElementType.CONSTRUCTOR, ElementType.METHOD } ) public @interface Testable { String value() default ""; } // Testable annotation type I recently added a plugin to IntelliJ IDEA that generates JUnit 4 tests. As part of that the plugin creates this annotation in the users source, the users annotate their testable methods and then the plugin generates the test classes/methods for these annotated methods. It would be nice if this annotation was available in the JUnit 4 framework. Thanks. Russ ---------------------------------------------------------------------- >Comment By: SourceForge Robot (sf-robot) Date: 2009-12-01 02:20 Message: This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). ---------------------------------------------------------------------- Comment By: David Saff (dsaff) Date: 2009-11-16 17:52 Message: This tracker is being shut down. Please move this item to http://github.com/KentBeck/junit/issues ---------------------------------------------------------------------- Comment By: Russ Jackson (arjackson) Date: 2007-01-01 19:27 Message: Logged In: YES user_id=1680949 Originator: YES Forgot to mention - the value() annotation method, in the case of the IDEA plugin, is used to name the test method. For example, the user can annotate their method with: @Testable("testLongAddition") and the plugin with generate a @Test annotated method with that name (otherwise, the annotated method name is simply prefixed with 'test'). The value() method depends on that being the only annotation method. Perhaps a more extensible solution would be to name the annotation method something like 'testName()'. The usage in this case would be: @Testable(testName="testLongAddition") You may also want to consider adding other annotation methods to testable to specify things like test paramters or anything else you think a tool developer would find helpful when generating JUnit tests from annotated source code. Thanks again. Russ ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=365278&aid=1625786&group_id=15278 |