[Javascript] Unit testing AJAX calls (Was: Probe...)
Scott Reynen
scott at randomchaos.com
Fri Jan 9 09:08:38 CST 2009
On [Jan 7], at [ Jan 7] 10:44 , Matt Warden wrote:
>> Does anyone do unit testing on AJAX calls, and if so, how?
>
> I generally point to a static version of the XML that I know is valid
> for "unit testing" purposes in this regard. It's more just removing
> the variables introduced by the server side code than unit testing.
Yeah, as you said, that's not really unit testing. The whole point of
unit testing is to ensure that sections of code are working properly
so I don't have to worry about them ever again as I use them in
conjunction with other sections of code. I can't really be confident
the production code is working properly if I tested something slightly
different. But I don't see a way to test code with AJAX calls without
changing the code itself, as you suggested. Apparently no one does
real unit testing on AJAX calls. Thanks anyway.
Peace,
Scott
More information about the Javascript
mailing list