fredag 23 november 2007

A Quick Evaluation of Testing Frameworks : Crosscheck

Been checking out the Crosscheck Framework. It is a open-source testing framework for testing your javascripts. It is a quite ordinary unit testing framework but the thing is that it, unlike frameworks as jsunit, runs without a real browser. Instead it simulates some of the best known browsers such as Firefox and IE. According to what I heard it actually do it quite well also. So what is the major benifit of this, you may ask. The answer is speed. It allows you to run cross-browser check in a couple of seconds. That also means that we can integrate our javascript tests with our Continuous Integration system Cruise Control.rb. A major benifit. Especially, as in this cae, when it could be done on multiple browser engines.

The main drawback (for us) with this framework seems to be difficulties about how we should integrate it with the rest of the testing system. Crosscheck has some support for loading the DOM and then use that for tests. The problem is that we need access to rest of the testing enviroment to generate the right DOMs. There might be some obvious solution to this that I just missed. I have to think about it. Crosscheck is written i java, so for a while I was thinking we should run it from JRuby. This makes it possible to both access all of crosscheck and all of our rails system. The problem here is that it may introduce to many bugs.

Alternative some simple patch could solve the problem for us. I have to return to this subject later. Any ways, crosscheck seems to be a real great alternative for us and I'm definitely going to trying out. Soon.

Inga kommentarer: