From: SourceForge.net <no...@so...> - 2009-11-16 17:52:55
|
Feature Requests item #1581916, was opened at 2006-10-21 14:30 Message generated for change (Comment added) made by dsaff You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=365278&aid=1581916&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: Pending Resolution: None Priority: 5 Private: No Submitted By: TOF (dash-13) Assigned to: Nobody/Anonymous (nobody) Summary: Using APT to find JUnit API usage errors at build time Initial Comment: The following patch intoduces an APT processor into junit.jar, that is able to uncover a number of commonly made mistakes when writing 4.1 test cases. Among the things tested: - that methods / classes are public / static / parameterless / void etc as required. - that the proper constructors exist. - that the value of RunWith matches the other annotations present. and more. Usage is simple, e.g.: - you might use the apt commandline (plain or within ant) - you migth use ant 1.7-alpha (which supports apt) - in any ant java task you might specify executable="$(JDK_HOME}/bin/apt.exe" - or you might use eclipse 3.2. In any case, you just need to place the junit.jar into the factory path (look up suns documentation apt) The patch is complete with testcases, but also uncovers some things, that I like to discuss separately, time permitting. I'm also providing a readily built junit.jar for those not having the time or means to apply the patch and build on their own. If you are interested to introduce this into the distribution, I would volunteer to fix any outstanding issues with thie patch. Thomas ---------------------------------------------------------------------- Comment By: David Saff (dsaff) Date: 2009-11-16 12:52 Message: This tracker is being shut down. Please move this item to http://github.com/KentBeck/junit/issues ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=365278&aid=1581916&group_id=15278 |