Thursday, November 16, 2006

JsUnit, take two!

I'd expect a unit testing tool to allow me to do TDD. No really.

The first thing I noticed is that tests are much faster on IE then there are on FireFox. Ok, I'll do this with IE. Except that IE caches the test file. Which means that TDD thing I'd like to do, it's pointless using IE. So, TDD must be done with FireFox. I'll just have to spawn a new IE every time I need to check that things also work on IE. Surely there's a setting somewhere that I can use to stop the JavaScript loading of resources to NOT cache the resource in IE?

Oh, and the thing I really hate about all this is the fact that a stupid little error can cause major headaches. I get no error messages and no static checking of documents out of eclipse. So, misspelling the directory name where the test gets its library code from? That results in an inability of the test to load with an indication that I should check that the file exist, which it did. <sigh> And forgetting to close the parenthesis on a function call? That's no tests are run (it was the first test). Oh the pain...

2 Comments:

At 17 January, 2007 23:36, Blogger alan said...

Hey Doug,

I'm using TDD for my server side POJOs and such and I'd love to do the same for the JS front-end. I was wondering if you had any joy at all with TDD for JavaScript using JSUnit? Or is the whole IE/Firefox/JSUnit thing just too flaky to be productive?

Thanks!

Al

 
At 18 January, 2007 07:04, Blogger Doug said...

Hi Al,

I had more pain than joy. I was able to turn off caching on IE, but I don't remember how. In the end, it was too flaky and too pain for to continue. The amount of value I was going to get was minimal compared to the pain I was going through. Your mileage may vary. And good luck! 8)

Regards,
Doug

 

Post a Comment

Links to this post:

Create a Link

<< Home