Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Automated Test Code Generation from Textual Descriptions Using Generative AI
Blekinge Institute of Technology, Faculty of Computing, Department of Computer Science.
2024 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE creditsStudent thesis
Abstract [en]

Background: The growing complexity of software systems has heightened interest in automating various development tasks, with converting textual descriptions into structured code being one such area. Large language models (LLMs) show great promise in automating this process, yet their use in generating XML-based Java Spring Beans configurations remains under explored. This study examines how LLMs can be utilized to enhance code generation.

Problem Statement: The increasing use of LLMs in software development highlights the need for automation in test configuration code generation. Despite advancements in AI, converting textual test case descriptions into XML-based Java Spring Beans configurations remains a challenge. The problem this study addresses is the lack of understanding of how to effectively leverage LLMs to automate this conversion, ensuring accurate, structured code with proper syntax and naming conventions.

Objectives: The project aims to explore how textual test case descriptions can be efficiently transformed into test configuration code using LLMs. It involves analyzing the depth and parameterization needed for generating optimized code and identifying the most suitable LLMs for this task. The project builds and evaluates a trained LLM instance that converts test case descriptions into test configuration code, specifically XML-based Java Spring Beans configurations, demonstrating the practical effectiveness of this approach in automating test configuration code generation.

Methods: This research uses experimentation and a Systematic Literature Review (SLR) to evaluate selected LLMs on datasets with varying levels of detail in test descriptions. It explores different training strategies to optimize model performance, particularly in handling varying input sequence lengths.

Results: The findings indicate that Mistral-7B is the best-performing model among those selected through the SLR. Phi-3-3.8B shows better code generation capabilities compared to CodeLlama-7B under the selected training strategies. The results also demonstrate that the level of detail in test case descriptions significantly improves the accuracy and quality of the generated XML-based Java Spring Beans configurations.

Conclusions: The study concludes that LLMs, particularly Mistral-7B, hold significant potential for automating the generation of XML-based Java Spring Beans configurations from textual descriptions. However, further research is required to explore optimal models, training strategies, and parameters to enhance performance and efficiency.

Place, publisher, year, edition, pages
2024. , p. 59
Keywords [en]
Generative AI, Large Language Models, Automated Code generation, Fine-tuning, PEFT-QLoRA
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:bth-27148OAI: oai:DiVA.org:bth-27148DiVA, id: diva2:1915616
External cooperation
Ericsson, Lund
Subject / course
DV2572 Master´s Thesis in Computer Science
Educational program
DVADA Master Qualification Plan in Computer Science
Presentation
(English)
Supervisors
Examiners
Available from: 2024-12-02 Created: 2024-11-24 Last updated: 2025-09-30Bibliographically approved

Open Access in DiVA

Automated Test Code Generation from Textual Descriptions Using Generative AI(1039 kB)334 downloads
File information
File name FULLTEXT01.pdfFile size 1039 kBChecksum SHA-512
17a924f835e98c9bbc9914ac9c414a7894cfa06f8d25d4341e5559704eb6c2c5c2e429e78c9aceb239c278936a358033e54c5103bc0abe0e3c2d15420f2d5e23
Type fulltextMimetype application/pdf

By organisation
Department of Computer Science
Computer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 334 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 401 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf