Title Mikroservisų testų generavimas iš UML sekų diagramų
Translation of Title Microservice test generation from UML sequence diagrams.
Authors Vainoris, Tomas
Full Text Download
Pages 106
Keywords [eng] microservices ; UML sequence diagrams ; test generation ; Gherkin ; component testing
Abstract [eng] Microservice architecture is widely used in the development of modern software systems in order to achieve greater flexibility, scalability, and independent component development. However, testing microservices introduces additional challenges—each service communicates with others via HTTP requests, therefore the creation of automated tests requires a detailed analysis of interactions and is time-consuming. Although tools exist for monolithic systems that generate tests from UML diagrams, there is currently a lack of solutions adapted to microservice architecture that focus on testing inter-service communication. The aim of the work is to facilitate microservice testing by proposing a methodology for generating behavioral tests for microservices from UML diagrams. The analysis determined that component and contract testing is particularly important in microservice architecture, enabling isolated verification of a microservice’s behavior at the HTTP communication level. After analyzing existing test generation solutions, it was found that none of them simultaneously provide all three functions: generation of test scenarios, visualization, and verification at the microservice communication level. Based on the analysis, a methodology was proposed in which UML sequence diagrams are used to generate Gherkin-format test scenarios. Sequence diagrams represent HTTP requests exchanged between services, and the generated scenarios verify whether the system under test performed the expected requests with correct data. The methodology is oriented toward REST-style communication, defining nine step templates and rules for constructing sequence diagrams. The developed tool is implemented in the C# programming language using the .NET framework. The tool is integrated with the GitHub Copilot extension via the MCP protocol, enabling test generation directly within the Visual Studio Code environment. The Reqnroll library is used for test execution. The results of the experimental study showed that the developed tool correctly generates Gherkin scenarios, handles alternative and option fragments, and correctly formats HTTP request payloads. The generated tests achieved an average code coverage of 92.6% and a mutation testing score of 69.8%. In an expert survey, 84.6% of specialists indicated that the generated tests are useful, and 69.2% would apply the methodology in practice. The obtained results confirm that the proposed methodology can be applied to facilitate the microservice testing process.
Dissertation Institution Kauno technologijos universitetas.
Type Master thesis
Language Lithuanian
Publication date 2026