[Cosmo-dev] [Proposal] Use Windmill for JS Unit testing

Mikeal Rogers mikeal at osafoundation.org
Fri Mar 30 15:32:00 PST 2007


> Because it copied JUnit?

It's actually a little simpler than JUnit because you don't have the  
inheritance requirements that JUnit has.

> The only reason for this is if for some reason a person didn't want  
> to have to have windmill to run the unit tests.
>

Hehe :) I didn't phrase that properly.

Windmill just loads the page in an iFrame, I was wondering why the  
jsunit framework didn't just do the same since it already has to run  
in the browser.

>
> I don't care so long as the test don't rely on windmill being  
> there.   I only envisioned using windmill as a way of triggering an  
> in browser test.   I wasn't thinking of making the unit tests  
> dependent on Windmill.    My other constraint is that I don't want  
> to see us spending time writing our own js unit test framework.    
> Aside from that, Bobby is the person who has/had the most opinions  
> about this topic.
>

The issue is this.

In order for windmill to report results we _must_ replace the jsunit  
assertion methods, there isn't another way to do it.

Thanks Bobby for showing me http://svn.osafoundation.org/server/cosmo/ 
trunk/cosmo/src/test/unit/js/cosmo/datetime/test_timezone.js .

I was looking at http://svn.osafoundation.org/server/cosmo/trunk/ 
cosmo/src/test/unit/js/cosmo/ui/widget/ and the examples on the  
jsunit website.

If we can find a way to dynamically replace the regular jsunit  
assertion methods with our own I think we can do this all pretty easily.

Adam?

> Ted
> _______________________________________________
> cosmo-dev mailing list
> cosmo-dev at lists.osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/cosmo-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.osafoundation.org/pipermail/cosmo-dev/attachments/20070330/04e62e3c/PGP.pgp


More information about the cosmo-dev mailing list