Search the web
Sign In
New User? Sign Up
TestFirstUserInterfaces
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Re: [agile-testing] Agile Testing Tools   Message List  
Reply | Forward Message #1023 of 1051 |
jfalek wrote:

> All projects use Ajax and
> JavaScript (based on the prototype framework).

To unit test Ajax, you must generally test that your business model has injected
the correct data into the correct entry points in your Ajax library. Don't unit
test the wire protocol itself, or the JavaScript behavior in a browser. Rely on
thru-the-GUI tests to keep that end stable.

To detect business values, I let the HTML layer generate its output, with its
embedded JavaScript. I parse the HTML, as XHTML, with XPath, and tweezer out the
<script> tags. Then I drop their contents into a JavaScript lexer that turns its
variables into a data model. Querying this model should return the correct data
values.

That kind of test intercepts the values at the last moment before the GUI layer
takes them over. And (under Ruby on Rails) the test start by mocking the server,
so we have no excess programs anywhere. No web server, internet wire, web
browser, DOM, or JavaScript come between our unit tests and the tested code.

--
Phlip



Thu Nov 27, 2008 4:59 am

phlipcpp
Offline Offline
Send Email Send Email

Forward
Message #1023 of 1051 |
Expand Messages Author Sort by Date

... To unit test Ajax, you must generally test that your business model has injected the correct data into the correct entry points in your Ajax library. Don't...
Phlip
phlipcpp
Offline Send Email
Nov 27, 2008
5:00 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help