AS3 Code Coverage
Note A code coverage tool is now available at http://code.google.com/p/flexcover/.
This maybe a little crazy but I'm going to throw it out there. I've been thinking about a way to get code coverage reports for Actionscript 3. We make heavy use of FlexUnit at work, but I'm always curious just how much of our code is really covered with the tests. I've not found anything about code coverage tools with the few Google searches that I've run hence my search for other solutions.
My current idea is to leverage the Flex debugger. Something along the lines of creating a break point on every line in ever file that you want to check coverage of. As the break points get hit, remove them. Once all of the test code is done running, see if there are any break points that haven't been hit.
This isn't elegant by any means but it should be possible to test the theory with a few hours work. If someone knows of a tool that already does this I'd love to hear about it. Otherwise I'll see how my hacking goes.
Comments
Posted by: Steve Sanderson | July 7, 2006 1:13 AM
Posted by: Lance | August 3, 2006 5:27 PM
Posted by: Gregory Golberg | January 12, 2007 9:43 PM
Posted by: David Coletta | January 21, 2007 2:45 PM
Posted by: Michael Labriola | February 13, 2008 12:35 PM
Posted by: Joe Berkovitz | March 27, 2008 11:13 AM
Posted by: Kevin Carr | April 6, 2008 11:52 PM
Posted by: Joe Berkovitz | April 14, 2008 8:40 PM