DISQUS

DISQUS Hello! Life is grand is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

Jump to original thread »
Author

Javascript code coverage MIA

Started by paulmwatson · 10 months ago

Code coverage tools for Javascript are thin on the ground. In fact, I have only found one - JavaScript Coverage Validator - and it isn’t even out of closed beta yet.
Am I to think that all those millions of lines of Javascript out there on all those Web 2.0 sites that espouse agile p ... Continue reading »

6 comments

  • I'm hearing some rumblings too that a similar problem exists with J2ME code coverage tools. Apparently, there is an extension to Cobertura but it does not work correctly (yet).
  • Since JavaScript has closures, I think it's impossible to compute (though may be wrong). You could do it dynamically (i.e. run the scripts for a long time and see what happens) but it's not guaranteed to be correct. You could also get a conservative approximation using standard algorithms.
  • How does JavaScript having closures preclude it from code coverage analysis? Ruby has closures and it has some decent code coverage tools.

    AFAIK most CC tools inject traces into the code and then run the tests, so computing what gets run and what does not.
  • Ah I see. It precludes you from determining the answer statically, is all I meant (i.e. you can't just have a tool that looks at the code and figures it out). It can of course do it in the way you describe.
  • This doesn't help you with your Javascript problem but Cobertura4J2ME does work quite well now on mobile java code.
  • JavaScript Coverage Validator left beta in late October.

    http://www.softwareverify.com/news.html

    Added Firefox 2 support in November

    http://www.softwareverify.com/blog/

    Stephen

Add New Comment

Returning? Login