Search papers, labs, and topics across Lattice.
This paper introduces a RAG-based pipeline, EmbC-Test, to automate the generation of unit tests for embedded C software, addressing the bottleneck of manual test development in fast-paced release cycles. The pipeline grounds a large language model in project-specific artifacts to mitigate hallucinations and ensure project alignment. Evaluation on an industrial dataset demonstrates that the generated tests are syntactically correct and largely pass runtime validation, achieving significant time savings and high test generation rates.
Slash embedded software testing time by up to 66% with an LLM-powered RAG pipeline that generates 270 syntactically correct unit tests per hour.
Manual development of automatic tests for embedded C software is a strenuous and time-consuming task that does not scale well. With the accelerating pace of software release cycles, verification increasingly becomes the bottleneck in the embedded development workflow. This paper presents a Retrieval-Augmented Generation (RAG) pipeline as a solution for partial automation of the verification process. By grounding a large language model in project-specific artifacts, the approach reduces hallucinations and improves project alignment. An industrial evaluation showed that the generated tests are 100 % syntactically correct, with 85 % successfully passing runtime validation. The proposed solution has the potential to save up to 66 % of the testing time compared to manual test writing while generating 270 tests per hour.