Unit/Functional testing for AJAX functions?

I really have no more input than that, so the subject speaks for
itself. How do you test that AJAX effects shown in the browser are
actually happening? Maybe an auto-complete form field is a good
starting example.

Sean

Sean H. wrote:

I really have no more input than that, so the subject speaks for
itself. How do you test that AJAX effects shown in the browser are
actually happening? Maybe an auto-complete form field is a good
starting example.

Sean


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

You can functionally test the XmlHttpRequest calls from the controller
test cases. There’s the xml_http_request method, which looks like:

def test_xml_http_request
xml_http_request :post, action, {params_for_action}
assert something_about_response
end

That tests the rails side of things. For the browser execution of any
code, you’ll need to break out either Selenium or Watir (or both)
depending on your platform preference.

Thank you! Exactly what I was looking for.

And this pops up on the RoR weblog:

http://www-128.ibm.com/developerworks/java/library/wa-selenium-ajax/index.html?ca=drs-