GTAC Liveblog: Taming the Beast: How to Test an AJAX Application by Markus Clermont and John Thomas

This involves the testing of an application created with <a href=” http://code.google.com/webtoolkit/”> Google Web Toolkit</a> 

 

GWT, as I hear it’s called, is being used extensively at my work.  Therefore, seeing this type of application tested will really help me out.  The session abstract says that they are focusing on testing for GWT that goes “beyond the gui.” 

 They asked how many people had heard of GWT and got a big vacuuous silence. 

The example shows how many emploees they have in different locations doing different tasks.  

use cases for testing the app:

apply/remove filter

increaste/decrese number of items

querying the current balance

they asked the audience for more use cases.  My favorite is having a user update the app in one location then have another user check in another location.  Another good one, fill one field with quotes and add a sql script.  

Now they are asking how many test cases you would have and it ends up being hundreds of tests to automate.  How much time would it take you?  How long does it take the tests to run?  

The next set of questions is for the audience.  How many tests are you responsible for? How often do you run them?  How many are flaky?   Most people are running daily sets of tests.  But I think they were mostly asking about webapps. 

They’re actually going beyond unit tests.  After talking about the architecture of a webapp, they’re showing pictures of the architecture and talking about tests that excercise all levels of the app from ui to datastore and how these tests can be too big.  There are also medium tests that test certain sets of layers. 

Questions for testing the backend?  Sending invalid requests.  Removing the connection to the database and using a mock that will, at times, not answer requests or send a malformed response.  What happnes if there is no table?  Load testing.  Each of these test would take much less time which creates an improvement over tests that would take about 15 minutes to run. 

How would you want to test RPC?  In htis type of test would want to mock out the rpc call/rpc backend.  Use DOM objects.  Use fake messages, could also mock out the servlet.  

Testing in layer-pairs, communication between layers.  Use lots of mocks for servelets, tables, etc. 

After the integration tests, still have to system tests.  Not hundreds, but maybe 20 or 15.  “One test per use-case is probably sufficient”

Q: how does 20 use cases placate the customer?

A:  have a discussion with customer about the other testing.

from the audience:  how many people have customers who would take their word for it?

(laughter)

Presenters tell the guy it’s an interesting topic, but they need to move on in the slides (read:  EPIC FAIL)

hmm…the presenters are wrapping up, but leaving some unanswered questions.  They should have just chucked the rest of their presentation and gone with the discussion.  They did get across their main point which is that AJAX testing should not be completed solely through the GUI.  Let’s see how the Q&A goes…

Q:  running 50,000 individual tests for GMail…how can they say they are reducing test steps?

A:  the presenter is in the middle of shortening the steps now

Q: if in interface lots of functions that are not being used, won’t testing yield false positives?

A:  you should drop the functions.

Q: but what about 3rd party api’s

A: have to draw the line somewhere about how deep you’ll go with testsing

Q: are the products in google tested in the way you are advocated

A: he won’t give a name