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.