
Load Testing of Vaadin Flow applications UNIVERSITY OF TURKU Department of Future Technologies Master of Science in Technology Thesis Communication Systems March 2020 Anastasiia Smirnova Supervisors: Antti Hakkala Seppo Virtanen The originality of this thesis has been checked in accordance with the University of Turku quality assurance system using the Turnitin OriginalityCheck service UNIVERSITY OF TURKU Department of Future Technologies Anastasiia Smirnova: Load testing of Vaadin Flow applications Master of Science in Technology Thesis, 80 p., 34 app. p. Communication Systems March 2020 All types of businesses, from small start-ups to big enterprises, have an online presence. Their web pages and applications can be used to acquire products ans services and are thus expected to be efficient. Yet, the web environment imposes additional requirements on software, such as the need for reliable security and adequate response times. To ensure these requirements are met and the product is of the expected quality, various types of testing are utilized during development. This master’s thesis evaluates a procedure for verifying a non-functional requirement of a web application – its performance. It focuses on load testing, which is used to analyze and assess an application’s behavior with different user loads. The scope of applications is limited to server-side applications that are developed with the latest long-term support version of the Vaadin framework. The effects of the performance arising from the server-side architecture of the framework and the Java ecosystem are reviewed. Furthermore, an overview of available improvement techniques, such as cache and load balancers, is given. From a load testing perspective, the biggest challenges that arise from Vaadin’s architecture are its unique features. These include node values of user interface components, synchronization and Cross-Site Request Forgery protection tokens. The defined universal regular expressions that capture these attributes can be used again later. The main contribution of this thesis is formulating a ready-to-use method of load testing a Vaadin Flow application. Once established and analyzed, the method is then applied to a real-life situation to verify its applicability and usefulness. Two widely used load testing tools are utilized – JMeter and Gatling. Furthermore, a method to estimate a web application’s session size is presented. Potential bottlenecks and other potential issues are identified by using a profiled to track the application’s memory consumption during a test run. After the load test is finalized and completed, a session size estimation is conducted. As a result of test execution, a potential bottleneck is identified and fixed in the application. Complete test plans for both JMeter and Gatling are defined and implemented. Alternatives and possible improvements to the proposed solution are reviewed. Based on the literature review, when deploying an application on multiple servers, the best solution is enabling the sticky sessions feature. Keywords: Load Testing, Vaadin, Performance, JMeter, Gatling, Java Acknowledgments This Master’s thesis is the biggest independent project I have ever completed, but I didn’t do it alone. I would like to thank my supervisors at the University of Turku, Antti Hakkala and Seppo Virtanen, for reviewing my thesis and offering valuable advice and suggestions. Finding a topic and writing my thesis would not have been possible without the help of my supervisor at Vaadin, Johannes Tuikkala, who provided me with technical guidance and expertise. I would like to express my gratitude to the Finnish Meteorological Institute and especially Mikko Parviainen for giving me access to the application and providing me with vital information. I also want to thank everyone at Vaadin who found the time to answer my questions or lend me advice. Special thanks are owed to Leif Åstrand and Denis Anisimov for all their technical assistance and Erik Lumme and Matti Hosio for helping me to find and set up the FMI project. Achieving this milestone would not have been possible without the dedication and influence of my teachers over the years. I would like to thank every teacher whose course I enrolled in at Kovdor’s school, Salla’s gymnasium, Shanghai’s Fudan University and the University of Turku. I have never received anything, but encouragement from all of you. Most of all, I would like to thank two people who supported me the entire way, who had trust in me, when I had little in myself and whom I love the most - Ville and my mum, to whom this thesis is dedicated. Table of Contents 1 Introduction ............................................................................................................... 1 2 Load testing and application performance ................................................................ 3 2.1 Performance testing ............................................................................................ 3 2.1.1 Load testing ................................................................................................. 4 2.1.2 Scalability testing ........................................................................................ 4 2.2 Performance enhancements ................................................................................ 5 2.2.1 Load balancers ............................................................................................ 5 2.2.2 Cache ........................................................................................................... 7 2.3 Java ................................................................................................................... 11 2.3.1 JVM memory management ....................................................................... 11 2.3.2 Performance pitfalls and countermeasures................................................ 12 3 Vaadin Flow applications ........................................................................................ 15 3.1 Communication model ..................................................................................... 15 3.1.1 Deployment ............................................................................................... 15 3.1.2 Push ........................................................................................................... 16 3.1.3 User session ............................................................................................... 17 3.2 Client-side ........................................................................................................ 17 3.2.1 Shadow Domain Object Model ................................................................. 18 3.2.2 HTML Template ....................................................................................... 18 3.2.3 Custom Elements ...................................................................................... 18 3.2.4 Optimizations and IE11 support................................................................ 21 3.3 Performance ...................................................................................................... 21 4 Designing load tests for a Flow application ............................................................ 24 4.1 Flow features .................................................................................................... 24 4.1.1 An HTTP request ...................................................................................... 24 4.1.2 A csrfToken ............................................................................................... 25 4.1.3 v-uiId and node ......................................................................................... 25 4.1.4 Synchronization tokens ............................................................................. 26 4.2 JMeter ............................................................................................................... 26 4.2.1 Recording .................................................................................................. 27 4.2.2 Listeners .................................................................................................... 29 4.2.3 Regular Expression Extractor ................................................................... 29 4.3 Gatling .............................................................................................................. 30 4.3.1 Recording .................................................................................................. 31 4.3.2 A request building blocks ......................................................................... 31 4.3.3 Reports ...................................................................................................... 32 5 Load Test Implementation and testing .................................................................... 33 5.1 Overview .......................................................................................................... 33 5.2 Prerequisites ..................................................................................................... 35 5.2.1 Versions .................................................................................................... 36 5.2.2 Browser proxy set-up ................................................................................ 37 5.2.3 Regular expressions .................................................................................. 37 5.2.4 Scenario ....................................................................................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages124 Page
-
File Size-