An LLM-based framework for automated Python test generation and mutation testing evaluation

dc.contributor.advisorAzmain, Md. Aquib
dc.contributor.advisorGazzali, Fakhruddin
dc.contributor.authorNafis, Sadnan
dc.contributor.authorWalid, Abdullah Al
dc.contributor.authorAnuja, Amatus Subhan
dc.date.accessioned2025-09-16T03:53:49Z
dc.date.available2025-09-16T03:53:49Z
dc.date.issued2025-06
dc.descriptionCataloged from PDF version of thesis.
dc.descriptionIncludes bibliographical references (pages 28-30).
dc.descriptionThis thesis is submitted in partial fulfillment of the requirements for the degree of Bachelor of Science in Computer Science, 2025.
dc.description.abstractThe reliability of software systems lies in effective test case design, especially in mutation testing, where the objective is to detect subtle faults introduced as mutants. Manually writing unit tests is time-consuming and increases development costs. While traditional test generation tools like Pynguin and Klara provide baseline automation, recent advancements in Large Language Models (LLMs) offer a promising alternative. In this research, we first conducted a comparative analysis between four state-of-the-art LLMs: ChatGPT, Gemini, Claude, and Llama and traditional test generation tools for Python, using mutation score as the primary metric. Motivated by the superior performance of LLMs, we developed a fully automated test generation tool that leverages prompt-based LLMs to create unit tests for Python functions. This tool not only generates syntactically valid and executable tests but also evaluates their quality using both mutation score (via MutPy) and test coverage metrics. The tool employs prompt-engineering strategies, repair loops, and error-driven feedback to iteratively refine failing test cases. The results show that our tool can be reliably harnessed for automated test generation and can outperform traditional tools in both mutation detection and coverage on Python programs.
dc.identifier.otherID 21201249
dc.identifier.otherID 21201651
dc.identifier.otherID 24141126
dc.identifier.otherhttps://dspace.bracu.ac.bd/server/api/core/items/eca30820-4ae2-400e-9656-619b397be642
dc.identifier.urihttp://hdl.handle.net/10361/26750
dc.language.isoen
dc.publisherBRAC University
dc.sourceBRAC University Institutional Repository
dc.subjectLarge language models
dc.subjectSoftware testing
dc.subjectTest case generation
dc.subjectPrompt-engineering
dc.subjectLLM-based framework
dc.subjectMutation testing
dc.subjectSoftware evaluation
dc.subjectAutomated test generation
dc.titleAn LLM-based framework for automated Python test generation and mutation testing evaluation
dc.typeThesis

Files

Original bundle

Now showing 1 - 1 of 1
Thumbnail Image
Name:
21201249, 21201651, 24141126_CSE.pdf
Size:
516.88 KB
Format:
Adobe Portable Document Format