This bachelor thesis presents a comparison of three Java testing frameworks - JUnit 5,TestNG and Spock - with the purpose of evaluating their suitability in testing RESTAPIs built with Spring Boot. As the demand for reliable and high-quality softwaresystems continues to grow, automated testing techniques are crucial in ensuring thecorrect functionality of applications. Our study aims to fill the knowledge gap in thecurrent literature by focusing on unit tests for Java REST APIs running on the Springframework.We developed a single Spring Boot application and applied tests written using thethree selected testing frameworks. We then compared the performance of the frame-works based on execution time, memory usage and code conciseness. Additionally,we conducted a questionnaire to gather developer preferences for the frameworks.Our findings reveal that TestNG outperforms JUnit 5 in terms of performance, whileSpock requires fewer characters, making it more concise. However, JUnit 5 remainsthe most well-known and widely used testing framework among developers. Theresults of our study provide valuable insights into the performance and developerpreferences of the selected testing frameworks.
Identifer | oai:union.ndltd.org:UPSALLA1/oai:DiVA.org:lnu-121522 |
Date | January 2023 |
Creators | Åkerblom, Sebastian, Huber, Leopold |
Publisher | Linnéuniversitetet, Institutionen för datavetenskap och medieteknik (DM) |
Source Sets | DiVA Archive at Upsalla University |
Language | English |
Detected Language | English |
Type | Student thesis, info:eu-repo/semantics/bachelorThesis, text |
Format | application/pdf |
Rights | info:eu-repo/semantics/openAccess |
Page generated in 0.002 seconds