August 15, 2005Quick Fix for JUnitThe TestNG IDEA plug-in has an interesting feature that I just implemented in the Eclipse plug-in: if you press Ctrl-1 (Quick Fix) on a JUnit test class, the plug-in will give you the option to convert it to TestNG, either with JDK5 annotations:
or JavaDoc annotations:
And that's it! These are fairly simple changes and again, I am struck at how intuitive the Eclipse API is. Manipulating the AST is a real pleasure and as you can see above, the ASTRewriter gives you a lot of goodies for free, among which unlimited undo and a nice preview window. Posted by cedric at August 15, 2005 08:44 AM Comments
Can you do it on a whole package tree? Might make it a bit easier to convert a thousand-odd test cases. Certainly, this sort of support would assist people looking to experiment with or migrate to TestNG. Quite a good idea. Posted by: Robert Watkins at August 15, 2005 02:17 PMMake it an ANT task. :-) Posted by: Cameron at August 16, 2005 05:25 AMSir Otaku, You give me Java project! Still getting some of that "Sit Otaku" project request spam... good luck with that. TestNG looks great, I was moderately happy with JUnit for many years, but since you have been pimping TestNG, my subconcious has come up with all sorts of problems with my junit code, and am feeling the need to bite the bullet. Damn you ! Things like this that ease the way are very very much appreciated. Posted by: Michael at August 21, 2005 02:56 AMPost a comment
|