We are pleased to announce the open source release of a Javascript coverage analysis tool called ScriptCover. It is a Chrome extension that provides line-by-line Javascript code coverage statistics for web pages in real time without user modification of the site. Results are collected when the page loads and continue to be updated as users interact with the page. These results can be viewed in real time through a reporting tool which highlights the executed lines of code for detailed analysis. ScriptCover is useful when performing manual and automated testing and in understanding and debugging complex code.

Short report in Chrome extension popup, detailing both overall scores and per-script coverage.


Sample of annotated source code from the detailed report. First two columns are line number and number of times each instruction has been executed.


We envision many potential features and improvements for ScriptCover, e.g.:
  • support other coverage metrics, e.g. path coverage and condition coverage
  • support richer reports and exporting to HTML and XML
  • submit Javascript coverage statistics to a server and analyze combined statistics for selected users, dates, etc.
  • map user actions to related Javascript code
Want to get involved with ScriptCover and make it better? Join the team! To get started, visit our project page, join the community, read documentation and download the code.

By Ekaterina Kamenskaya, Software Engineer in Test, Google