This article is old and may contain information that is outdated, irrelevant, or—dare I say it—no longer accurate. Read with care!
Researching a little bit more about automated testing tools led to the discovery of a metric called ‘Code Coverage’, a statistic that gives you a percentage of how much of your code executed during a certain period of time (usually while your automated test was executing).
Screenshot Example of running the tool at yahoo.com
- Mozilla Firefox
- Firebug Extension for Mozilla Firefox
- Does not include statistics on anonymous functions.
- Is limited to function (entry) code coverage, does not include other forms such as exit, statement, condition, or path code coverage. (Description: Wikipedia)
- Is my first Firefox add-on, so there was a learning curve involved.
- Automated integration with Selenium IDE (one button to run tests and do code coverage)
- Better display of results, instead of a big kludge of function names
- Additional types of coverage, depending on what options are available from jsdIDebuggerService
Update: After many requests and much self deliberation, I have decided not to update the plugin to work with newer versions of Firefox. Code Coverage doesn’t belong in the browser, it’s just the wrong place in the tool chain to have something like this. Code Coverage results need to be exportable, and the utility must be executable from the command line to use with unit tests and continuous integration.
Rafael Disqus29 May 2007
Zach Leatherman Disqus31 May 2007
Alex Disqus12 Jun 2007
Aravind Disqus14 Jun 2007
Elephant Disqus06 Aug 2007
Zach Leatherman Disqus06 Aug 2007
David Burns Disqus09 Aug 2007
Zach Leatherman Disqus10 Aug 2007
Mike Cole Disqus20 Sep 2007
Jokin Disqus14 Nov 2007
Zach Leatherman Disqus15 Nov 2007
Zach Leatherman Disqus30 Mar 2008
Daniel Colascione Disqus08 Jan 2009
Zach Leatherman Disqus08 Jan 2009
VELO Disqus08 Jun 2009
Aaron T. Grogg Disqus22 Jun 2009
well Disqus14 Sep 2009
Zach Leatherman Disqus31 Dec 2009