A sample Play framework application. This is specifically showing how to test ajax calls using JWebUnit using NicelyResynchronizingAjaxController.
Java
Latest commit c7746ee Oct 17, 2011 @briannesbitt Improved naming
Permalink
Failed to load latest commit information.
app
conf
lib
public
test
.gitignore
readme.textile

readme.textile

Play framework sample application with JWebUnit and synchronous ajax

It was requested on the google groups to share a sample application showing how to make your ajax calls synchronous to enable more predictive testing using JWebUnit. This removes the necessity of using a random Thread.sleep(X) to wait for the ajax call to be done.

Here is the google group thread

Try it out for yourself

git clone git://github.com/briannesbitt/PlaySampleWithJWebUnitWithAjax.git
cd PlaySampleWithJWebUnitWithAjax
play autotest

You can also run play test and then browse to http://127.0.0.1:9000 to try it or http://127.0.0.1:9000/@tests to run the tests manually.

Read more on my blog