Welcome to the upgraded BRAC University Institutional Repository. We are currently organizing collections after a recent system upgrade. Homepage category counters may temporarily show lower numbers while syncing, but over 27,000 repository items remain safe and accessible. Please use the search bar to find theses, scholarly outputs, and institutional documents.

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

bracu.degree.levelUndergraduate
bracu.type.groupStudent Works
datacite.rightsOpen Access
dc.contributor.advisorAzmain, Md. Aquib
dc.contributor.advisorGazzali, Fakhruddin
dc.contributor.authorNafis, Sadnan
dc.contributor.authorWalid, Abdullah Al
dc.contributor.authorAnuja, Amatus Subhan
dc.contributor.departmentDepartment of Computer Science and Engineering
dc.date.accessioned2025-09-16T03:53:49Z
dc.date.available2025-09-16T03:53:49Z
dc.date.copyright2025
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.en_US
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.en_US
dc.description.degreeBachelor of Science in Computer Science
dc.description.statementofresponsibilitySadnan Nafis
dc.description.statementofresponsibilityAbdullah Al Walid
dc.description.statementofresponsibilityAmatus Subhan Anuja
dc.format.extent35 pages
dc.identifier.otherID 21201249
dc.identifier.otherID 21201651
dc.identifier.otherID 24141126
dc.identifier.urihttp://hdl.handle.net/10361/26750
dc.language.isoenen_US
dc.publisherBRAC Universityen_US
dc.rightsBRAC University theses are protected by copyright. They may be viewed from this source for any purpose, but reproduction or distribution in any format is prohibited without written permission.
dc.subjectLarge language modelsen_US
dc.subjectSoftware testingen_US
dc.subjectTest case generationen_US
dc.subjectPrompt-engineeringen_US
dc.subjectLLM-based frameworken_US
dc.subjectMutation testingen_US
dc.subjectSoftware evaluationen_US
dc.subjectAutomated test generationen_US
dc.subject.lcshPython (Computer program language).
dc.subject.lcshComputer software--Testing.
dc.subject.lcshApplication software--Development.
dc.subject.lcshSoftware engineering--Quality control.
dc.subject.lcshNatural language processing (Computer science).
dc.titleAn LLM-based framework for automated Python test generation and mutation testing evaluationen_US
dc.typeThesisen_US

Files

Original bundle

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

License bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
license.txt
Size:
1.71 KB
Format:
Item-specific license agreed upon to submission
Description: