The World Wide Web has become an interesting opportunity for companies to deliver services and products at distance. Correspondingly, the quality of Web applications, responsible for the related transactions, has become a crucial factor. It can be improved by properly modeling the application during its design, but if the whole life cycle is considered, the availability of a consistent model of the application is fundamental also during maintenance and testing. In this chapter, the problem of recovering a model of a Web application from the implementation is faced. Algorithms are provided to obtain it even in presence of a highly dynamic structure. Based upon such a model, several static analysis techniques, among which reaching definitions and slicing, are considered, as well as some restructuring techniques. White box testing exploits the model in that the related coverage levels are based on it, while statistical testing assumes that transitions in the model are labeled with the conditional probabilities of being traversed.