There are many published approaches to test Web application. However, none of these approaches reflects the complete behavior of web applications. This project aims to develop a new model-based testing approach using structural analysis methods, called whiteâ€“box testing. The basic idea is to transform the source code into an intermediate model which is used to generate test cases, test setup information and test oracle information. In addition, our proposed approach introduces a novel coverage metric called â€œContent Coverageâ€. The generation procedure ensures that there are no duplicated and no un-executable test cases as well as 100% content coverage. The approach should guide testers to setup the test environment before running the test cases (e.g. selecting input data and parameters needed to run the tests) and aims to produce expected results which can be automatically compared to the actual program execution.