Uppsats
From Java to Python: Assessing LLM Effectiveness in Automated Test Migration
Master-uppsats
Linnéuniversitetet/Institutionen för datavetenskap och medieteknik (DM)
Publicerad: 2026
Språk: Engelska
Sammanfattning
Test suite migration across programming languages is a critical component of code modernization but remains largely manual due to semantic complexity. This thesis evaluates whether large language models can automatically migrate unit tests from Java to Python while preserving semantic equivalence. The study investigates whether pass rate and code coverage serve as reliable proxies for semantic correctness. We systematically analyze 1,249 generated tests across 13 algorithm modules and 254 mapped functions, measuring executability, error patterns, coverage parity, and semantic correctness. Quantitative results show that 95.6% of generated tests are executable (run without runtime errors), with 87.4% having passing assertions. However, despite high executability and pass rates, tests frequently fail to achieve coverage parity with source tests, revealing a decoupling between test executability and semantic fidelity. A taxonomy of 157 execution errors and semantic issues reveals that implementation divergences, language-level semantic differences, and behavioral contract mismatches are the primary failure modes. These findings demonstrate that syntactic correctness alone is insufficient for cross-language test migration and that semantic verification requires explicit cross-language validation. The work establishes empirical evidence of the gap between test executability and semantic equivalence, providing practitioners with guidance on when LLM-based migration is viable and where manual verification is necessary.
Information
- Författare
- Doan, Hai Dang
- Lärosäte / institution
- Linnéuniversitetet/Institutionen för datavetenskap och medieteknik (DM)
- Publiceringsdatum
- 2026
- Uppsatstyp
- Master-uppsats
- Språk
- Engelska
Utforska vidare
Liknande uppsatser
Uppsatser med liknande ämnen och nyckelord.
Kandidat-uppsats, Linnéuniversitetet/Institutionen för datavetenskap och medieteknik (DM)
Lindberg, Leia, Hugosson, Ester
Publicerad: 2026
Kandidat-uppsats, Linnéuniversitetet/Institutionen för datavetenskap och medieteknik (DM)
Lorensson, Linus, Muhtadee, Faiyaz
Publicerad: 2026
Kandidat-uppsats, Linnéuniversitetet/Institutionen för datavetenskap och medieteknik (DM)
Kozak, Ivanna
Publicerad: 2026
Master-uppsats, KTH/Skolan för elektroteknik och datavetenskap (EECS)
Saleh, Abdelrahman
Publicerad: 2026
Master-uppsats, Stockholms universitet/Institutionen för data- och systemvetenskap
Hansson, Martin
Publicerad: 2026
Master-uppsats, Högskolan i Borås/Akademin för bibliotek, information, pedagogik och IT
Anneling, Marie
Publicerad: 2026