Chapter 13. Ajax testing

 

Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration.

Stan Kelly-Bootle

This chapter covers

  • Introducing Ajax testing
  • Testing the Ajax stack
  • Testing JavaScript
  • Testing server services
  • Testing Google Web Toolkit applications

This chapter covers testing Ajax applications. It’s a continuation of chapter 12, which discusses presentation-layer testing in general and introduces two of the libraries and tools used in this chapter: HtmlUnit and Selenium. As in the previous chapter, our goal is finding bugs in the graphical user interface of an application. We describe a divide-and-conquer approach by breaking up tests into three groups: functional testing, testing client-side scripts, and testing server services. We present the technologies relevant to testing each tier. We end by looking at the unique testing challenges presented by Google Web Toolkit (GWT) applications. We start by reviewing Ajax and why testing is difficult.

13.1. Why are Ajax applications difficult to test?

13.2. Testing patterns for Ajax

13.3. Functional testing

13.4. JavaScript testing

13.5. RhinoUnit versus JsUnit

13.6. Checking best practices with JSLint

13.7. Testing services with HttpClient

13.8. Testing Google Web Toolkit applications

13.9. Summary

sitemap