HTML rendering, Javascript and AJAX plays an important role in the development of modern web applications.

How significant is JavaScript when designing test cases for a website that uses it? What issues are likely to occur for sites using AJAX? What are some typical issues that I should write test cases for ?


2 Answers 2


Possibly the biggest one from my perspective would be the data validation: most modern web applications are pulling data from some kind of data source and rendering it, then interacting and modifying the data based on user interaction.

JavaScript, and particularly JavaScript/AJAX, can make finding web controls "interesting", since the page itself can be redrawn based on the data received.

Some of the issues to look for are behavior in different browsers, including different versions of IE, graceful fallback when JavaScript is disabled (particularly important for consumer-based applications - at minimum there should be a prominent warning that the application must have JavaScript enabled if the site detects that no JavaScript is available (I personally dislike this and enable script only if I absolutely must have it)), some kind of clear and obvious indicator when the site is processing data (complete with a warning to the user NOT to use the refresh button - this is particularly important if you're dealing with a site that takes payments).

As I said initially, with a site that deals with data and stores it in a database, you should always start from a known data state (by restoring a backup of a known database into the web application database) and validate that the state of the data when your tests finish is what you expect. You can do this either on a per-transaction basis (which gives a more granular flow and isn't affected as much by a transaction failure earlier in the run, but is much more complex to implement) or at the end of the test run as a single baseline comparison (if an early test fails to complete, you will get a lot of comparison errors due to the number of transactions differing).

If you can't start from a known data state, the best you can do is per-transaction checking to ensure that the data you enter through your tests is correctly saved to the database. Either way, you will need to know the structure of your database and how that relates to the data on the screen (which can be quite different).


Issues to test for:

  • The network is down
  • The network is very slow
  • Test Ajax in different browsers
  • The network is up but server is down
  • The spinner goes away (if network is down)
  • Screen is navigated away from while network is down
  • Try two changes in a row, see if they are queued correctly
  • Try change while network down, change again while network up
  • Bullet points that get longer and longer appear pleasing to my eyes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.