Reliable Web Applications Through Contracts and Generative Testing

University essay from KTH/Skolan för elektroteknik och datavetenskap (EECS)

Abstract: Client-side web applications have recently gone from progressive enhancements to powering large scale Single-page Applications (SPAs). Testing such applications is a tedious effort, often requiring manually constructing tests and emulating the browser, which leads to high programming effort and low performance. This thesis investigates how web applications can be designed, implemented and tested in order to make reliable applications with high test performance using Design by Contract (DbC) and automatically generated tests without significantly increasing programming effort. The results consist of a formal model for reactive programs using denotational and axiomatic semantics in order to not be tied to a specific programming language. The model is tested by implementing a sample application in Clojure and evaluating different aspects such as test coverage and test performance, in addition to mutation-based testing. Furthermore, the formal model can be used as a blueprint for developing reliable applications and serve as a formal building block for future research on web applications. Additionally, the sample application may be used as a guideline for real world development. The results show that applications implementing the formal model have generated test suites that are likely to detect programmer errors and can achieve high test coverage and performance while requiring less or equal effort when compared to other implementations and manual testing. 

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)