Work

Kvantisoitu LLM-pohjainen kehys automatisoidulle ohjelmistotestaukselle

Year: 2026
Type: dissertation
Abstract: Unit testing remains one of the most expensive recurring activities in software development, especially in small teams where test maintenance competes with feature delivery. Although automated test generation has improved, many approaches remain difficult to operationalize in everyday workflows because outputs are brittle, execution reliability is inconsistent, and cloud-dependent inference introduces confidentiality and reproducibility concerns. This thesis addresses that gap by implementing and evaluating a local, reproducible framework for LLM-assisted unit test generation for Python repositories. The framework combines repository file discovery, sandboxed module isolation, promptdriven test generation with a fine-tuned and quantized Qwen2.5-Coder-1.5B model, AST-based post-processing, pytest execution under Coverage.py, and iterative refinement using error feedback. The implementation is available in both command-line and web-based forms, with persistent run artefacts, per-file reports, and explicit handling of difficult cases through skip and mark-complete controls. Empirical evaluation is based on eight recorded runs and 22 non-skipped file-level evaluations. The mean per-file statement coverage is 93.82%, with median 100%, minimum 83%, and maximum 100%. The strict pytest pass rate is 81.8% (18/22), while operational completion reaches 90.9% (20/22) when marked-complete outcomes are included. Refinement is required for 4/22 files, with a mean of 0.27 refinement attempts. Results show that the framework can reliably bootstrap compact executable tests on small modules in an offline setting. The main remaining limitation is oracle-level assertion mismatch rather than syntax or import failure, indicating that future improvements should prioritize semantic guidance and stronger correctness signals during refinement. The workflow supports transparent replay, inspection, and iterative configuration tuning.
Language: English
Subfield: Software
Open Access status: green
OpenAlex ID: W7159748837
Cites: 17
Cited by:
Related to: 10