PDA

View Full Version : Unit Testing / Code Coverage



randymay
15 Dec 2008, 9:07 AM
Which tools is everyone using for Unit Testing & Code Coverage for Javascript? I have successfully integrated JSUnit (www.jsunit.net (http://www.jsunit.net)), but now I want to generate code coverage reports.

I am particularly interested in running unit tests and generating coverage reports automatically from a central server, so JSCoverage (http://siliconforks.com/jscoverage/) is not sufficient. That said, I do like the functionality and reports from JSCoverage, but I do need for it to execute the JSUnit tests without User interation.

Thanks in advance,

tryanDLS
15 Dec 2008, 9:18 AM
You might also want to look at YAHOO's new release of a unit testing framework called YUI Test (http://yuiblog.com/blog/2008/12/01/yuitest-getting-started/). It doesn't do code coverage stuff yet, but given the size of the community, that type of functionality might be a candidate for inclusion. Given the apparent lack of current development on JsUnit, I migrated all my unit testing to the new YUI framework with no problems. Note that your code does not need to be based on YUI to use the YUI Unit Testing piece.

quotemstr
10 Jan 2009, 2:22 AM
Hi there. I'm the author of http://hrtimer.mozdev.org/, a Firefox extension that includes a line-by-line code coverage tool. It might be useful.