MARATTO

article

A Novel Approach to Test Case Generation in Software Testing Using Pre-Trained Large Language Models

Abstract

The emergence of Large Language Models (LLMs) has revolutionized software engineering due to their ability to understand and generate natural language. Current approaches to test case automation using LLMs, relying solely on focal methods or text, struggle to capture expected behaviors, edge cases, and errors, and are poorly suited for Test-Driven Development (TDD). In this context, we propose an approach that combines text and focal methods for test case generation, using comments within the code alongside the logic of the target method. By leveraging the LLaMA 3-8B model, prompt engineering techniques, and evaluation with an LLM acting as a judge, our method aims to automate and improve test case generation. Tested on open-source projects, it successfully generated 7,606 test cases, achieving a 97% syntax correction rate.

Research topics

  • Software Testing and Debugging Techniques
  • Software Engineering Techniques and Practices
  • Software System Performance and Reliability

Sustainable Development Goals

Read the original research

This page summarises published work. The authoritative version sits with the publisher.

DOI: 10.1109/wincom65874.2025.11313396

Is something wrong with this record? Report it or request removal.

Discussion

Discuss this research

Have you built on this work, tried to replicate it, or seen it applied in practice? Share what you know. Verified researchers and MARATTO™ domain experts can open a discussion, and any member can reply. Contributions are reviewed before they appear.

No discussion yet. Open the first thread.