Return to search

Comparing Spring REST API test frameworks : A Comparison Study

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.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:lnu-121522
Date January 2023
CreatorsÅkerblom, Sebastian, Huber, Leopold
PublisherLinnéuniversitetet, Institutionen för datavetenskap och medieteknik (DM)
Source SetsDiVA Archive at Upsalla University
LanguageEnglish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess

Page generated in 0.002 seconds