Agile Ajax

Javascript, Unit Testing and Code Coverage

Q: Why are there no good Open Source dental practice management software packages? A: Because there are so few dentists who are C++ programmers.

Paul Watson raises the question of why there are no decent code coverage tools available for Javascript:

Am I to think that all those millions of lines of Javascript out there on all those Web 2.0 sites that espouse agile practies with TDD influences don't have code coverage? Sure, some may have unit testing but unit testing without code coverage is a less than ideal situation. You simply don't know if you have tested all functions and all paths in your functions. Unit testing and code coverage go hand in hand, they back each other up.

He has found one commercial tool that is currently in beta, but nothing else. It apparently takes the approach of hooking into the various browser platforms by means of a DLL? I know that there has been some talk about hooking code coverage into Venkman, Rhino and the Komodo IDE. But so far no one is offering a Javascript only, cross-browser solution.

So what are you to do? Venkman at least can give you function level code coverage with profiling, but that's only good for Firefox. Same with the commercial profiler from Tito Software for IE.

Unless the Mozialla and Microsoft guys provide something like this, I don't see it happening in open source. The best open source software is always made by users for users. How many Javascript developers also have the skillset to develop the necessary IE, Firefox, Opera and Safari plugins?



Technorati : , ,

Comments: 1 so far

  1. Nice analogy on the dental front.

    I think the other problem is that professional JavaScript coding is a relatively new thing. Before this recent surge it was seen as a bit of a twine and sticky-tape language that dealt with a tiny bit of your app.

    I’d be happy to work on a Firefox solution but as you say what about Opera, IE and Safari then? I don’t have the plugin expertise for those platforms.

    Comment by Paul Watson, Friday, October 13, 2006 @ 3:40 am

Leave a comment

Powered by WP Hashcash

About Pathfinder

  • We design and build extraordinary applications for companies looking to make the next great idea a reality.
  • learn more

Topics

WordPress

Comments about this site: info@pathf.com