Test code generation at Ericsson using Program Analysis Augmented Fine Tuned LLMs
Not on the map. Why?
Abstract (arXiv)
We describe test code generation using Large Language Models (LLMs) in Ericsson. Our input is a test step in natural language (English) and our output is code (Java) which accomplishes the test step. We describe how straight forward prompting does not suffice and results in LLM assuming functions and signatures which are not present in the code repository. We then show how we alleviate the problem by a combination of Retrieval Augmented Generation (RAG) along with prompt engineering that expanded the simple prompt with additional contextual information using static program analysis. We then describe further improvements that we obtained by fine-tuning the underlying LLM. The fine tuning is done based on a custom designed prompt template which has pre-dependent classes, their public methods as well two exemplar outputs obtained from RAG. Our results establish that our fine tuned models help improve the correspondence or conformity with the original developer written test code as measured by the traditional metrics of F1-score based on the methods used in the generated code. Fine tuning of a 8x7b Mixture of Experts (MoE) model leads to an average improvement of 8% over the base model and is comparable to the scores on a much larger 8x22b MoE model.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). First posted on arXiv 23 Apr 2025.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026Enhancing Large Language Models with Retrieval Augmented Generation for Software Testing and Inspection Automation
- 2025LLM4VV: Evaluating Cutting-Edge LLMs for Generation and Evaluation of Directive-Based Parallel Programming Model Compiler Tests ↗
- 2023LLM4VV: Developing LLM-Driven Testsuite for Compiler Validation
- 2024LLM-based Unit Test Generation via Property Retrieval
- 2024Large Language Models as Test Case Generators: Performance Evaluation and Enhancement
- 2024The Impact of Prompt Programming on Function-Level Code Generation
- 2025Evaluating Large Language Models for Functional and Maintainable Code in Industrial Settings: A Case Study at ASML
- 2025Can LLMs Generate Reliable Test Case Generators? A Study on Competition-Level Programming Problems