Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

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 ?

share|improve this question
add comment

1 Answer

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).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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