In recent years, web applications have grown so quickly that they have already become crucial to the success of businesses. However since they are built on internet and open standard technologies, Web application bring new challenges to researchers. Such as dynamic behaviours, heterogeneous representations, novel control flow and data flow mechanisms, etc. In this paper, we propose an agent-based approach for web application testing. While the agent-based framework greatly reduces the complexity of Web applications, a four level dataflow test approach can be employed to perform structure testing on them. In this approach, data flow analysis is performed as function level testing. Function cluster level testing, object level testing, and web application level testing, form low abstract level to high abstract level. Each test agent in the framework takes charge of the testing in an abstract level for a particular type of web document.