liu.seSearch for publications in DiVA
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • oxford
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Base, Instruct, and Fine-Tune: Evaluating LLMs for Cross-Language Flaky Test Detection
Prince Sultan Univ, Saudi Arabia.
Linköping University, Department of Computer and Information Science, Software and Systems. Linköping University, Faculty of Science & Engineering.
2025 (English)In: IEEE Access, E-ISSN 2169-3536, Vol. 13, p. 205254-205277Article in journal (Refereed) Published
Abstract [en]

Flaky tests exhibit non-deterministic outcomes posing a critical challenge to the reliability of continuous integration (CI) pipelines. While prior approaches rely on static token level features and vocabulary-based heuristics, they often fail to generalize across languages and project domains. In this work, we explore the use of Large Language Models (LLMs) for detecting flaky tests across five programming languages: Java, Python, C++, Go, and JavaScript. We evaluate three families of LLMs: LLaMA3, Mistral, and DS-Coder, in their base, instruction-tuned, and fine-tuned forms. Our empirical results demonstrate that fine-tuned LLMs consistently outperform baseline and vocabulary-driven methods, achieving near perfect F1 scores on high resource languages and substantial improvements in low resource settings. Instruction-tuned variants offer notable benefits, especially in early stage adaptation. Moreover, our cross-language evaluation reveals that LLMs trained on one language can moderately generalize to others, with fine-tuning significantly narrowing the performance gap. The findings highlight the practical value of LLMs as language agnostic flaky test detectors and provide guidance on model adaptation strategies for real world CI/CD environments. This work sets the foundation for future research on generalizable and semantically aware testing tools in multilingual software ecosystems.

Place, publisher, year, edition, pages
IEEE-INST ELECTRICAL ELECTRONICS ENGINEERS INC , 2025. Vol. 13, p. 205254-205277
Keywords [en]
Codes; Java; Semantics; C plus plus languages; Python; Large language models; Vocabulary; Training; Adaptation models; Robustness; Flaky tests; non-deterministic tests; fine-tuning; software testing; large language models; base models
National Category
Computer Systems
Identifiers
URN: urn:nbn:se:liu:diva-220548DOI: 10.1109/ACCESS.2025.3639645ISI: 001635831000010Scopus ID: 2-s2.0-105023883255OAI: oai:DiVA.org:liu-220548DiVA, id: diva2:2030432
Available from: 2026-01-20 Created: 2026-01-20 Last updated: 2026-03-10

Open Access in DiVA

fulltext(3572 kB)41 downloads
File information
File name FULLTEXT01.pdfFile size 3572 kBChecksum SHA-512
7281c30985e09f5e3e1bbed96148a96a19596130d8ec91fd412154baf1ed231b80b648a170c7c1cd997839473baa266062e10bc1049d5e4d5e3a27c9075fc979
Type fulltextMimetype application/pdf

Other links

Publisher's full textScopus

Search in DiVA

By author/editor
Sun, Xin
By organisation
Software and SystemsFaculty of Science & Engineering
In the same journal
IEEE Access
Computer Systems

Search outside of DiVA

GoogleGoogle Scholar
Total: 41 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

doi
urn-nbn

Altmetric score

doi
urn-nbn
Total: 102 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • oxford
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf