JSCoverage is a tool that measures code coverage for JavaScript programs.
Code coverage statistics show which lines of a program have been executed (and which have been missed). This information is useful for constructing comprehensive test suites (hence, it is often called test coverage).
JSCoverage works by instrumenting the JavaScript code used in web pages. Code coverage statistics are collected while the instrumented JavaScript code is executed in a web browser.
JSCoverage supports the complete language syntax described in the ECMAScript Language Specification (ECMA-262, 3rd edition). JSCoverage works with any modern standards-compliant web browser - including Internet Explorer (IE 6, 7, and 8), Firefox, Opera, Safari, and Google Chrome - on Microsoft Windows and GNU/Linux.
JSCoverage is free software, distributed under the GNU General Public License version 2.
JSCoverage 0.5.1 is available for download.
This release contains several bug fixes and improvements:
file:
URLs.
It is recommended that an HTTP server be used instead.
(See the manual for details.)
The JSCoverage user interface now displays a warning when used with
file:
URLs.
--verbose
option to jscoverage
now
produces better output.
jscoverage-server
was started with the
option --ip-address=A
, where A was a
specific IP address, it was impossible to shut it down with
jscoverage-server --shutdown
.
This should be possible now by running
jscoverage-server --shutdown --ip-address=A
from the same machine.
If you would like to see some case studies showing how to use JSCoverage in practice, take a look at the new blog. This week there will be a series of articles about using JSCoverage with various JavaScript testing frameworks. The first article looks at using JSCoverage with the script.aculo.us test suite.
JSCoverage 0.5 is available for download.
This release contains a number of new features and bug fixes:
--mozilla
option (thanks to
Murali Nandigama for help creating this).
new
operator were
instrumented incorrectly; this has now been fixed
(thanks to Guillaume Lung).
jscoverage-server
program now allows more characters in
URLs (thanks to Guillaume Lung).
jscoverage-server
program now handles HTTP headers with
empty values (thanks to Velo).
jscoverage
program now refuses to instrument code which
has already been instrumented (thanks to Velo).
jscoverage
program
was unable to instrument a directory in a drive root; this has now been
fixed.
jscoverage-server
program can no longer bind to the same port multiple times on Windows.
jscoverage-server
's handling of the "chunked"
Transfer-Encoding have been fixed.
-mno-cygwin
flag.
jscoverage-server
has changed. (This change will not have
any visible effects for most users; it will only be of interest to those
who have written code which parses that format.)