Design and Implementation of Full-stack Testing for Web SPA in JavaScript
Loading...
URL
Journal Title
Journal ISSN
Volume Title
Perustieteiden korkeakoulu |
Master's thesis
Unless otherwise stated, all rights belong to the author. You may download, display and print this publication for Your own personal use. Commercial use is prohibited.
Authors
Date
2020-08-18
Department
Major/Subject
Visual Computing and Communication
Mcode
SCI3042
Degree programme
Master's Programme in ICT Innovation
Language
en
Pages
54
Series
Abstract
The landscape of web development has been constantly changing. With the appearance and adoption of new libraries, web applications are becoming more and more sophisticated. Continuous integration and continuous deployment (CI/CD) are also being implemented in more and more projects. These changes have driven the increasing need for automated testing to improve robustness and shorten delivery time. This study investigates how a testing solution can be designed and implemented for a typical web application where JavaScript serves as the prioritized programming language in the technology stack. Firstly, an investigation is made on which tools can be used to fulfill which functionality in web application testing. In each of the functionality category, some of the most popular tools are compared against each other. Then a discussion is made on how to implement a testing solution that covers unit/integration/E2E testing in both the frontend and the backend with tools that fit the given technical requirements best. The focus of work in on improving E2E testing, as E2E testing is generally more time consuming than unit testing or integration testing. This goal is achieved by attempting changes to the architecture in implementation and exploiting some modern JavaScript features. Besides making improvements on a baseline solution, a new approach to drive browser automation is also experimented. The new approach aims to control the browser within the browser itself using client-side JavaScript instead of outside the browser (such as using WebDriver protocol etc.). An experimental implementation of this idea. And the advantages and limitations of this approach are discussed. The implemented solution is evaluated based on functionality requirements given by the target application, execution time as well as error rate.Description
Supervisor
Vuorimaa, PetriThesis advisor
Luukkonen, TeppoKeywords
JavaScript, SPA testing, E2E testing, integration testing, node.js