Test Suite Augmentation using Language Models -Applying RAG to Improve Robustness Verification
Abstract
This paper presents a novel approach to test suite augmentation using large language models and retrieval augmented generation (RAG) techniques. By leveraging the power of GPT-4 and a customised RAG framework, we show the effectiveness of automating test case generation to improve robustness verification in safety-critical embedded software systems. Our method involves indexing and retrieving relevant information from the entire software repository, including design documents, requirement specifications, prior test cases, and source code. The generated test cases are then integrated into the Cantata test framework, targeting key areas such as invalid values, overflow scenarios, timeout conditions, and improper state transitions. We applied our approach to two open-source projects, PX4 Autopilot and Apollo Auto, and achieved promising results in terms of increased test coverage, defect detection, and compliance with industry standards like DO-178C and ISO 26262. Compared to human-authored test suites, our method generated a larger volume of tests, exposed a broader array of test scenarios, and unveiled additional high-severity defects. The results validate the potential of advanced language models and RAG techniques in enhancing software reliability and safety through automated testing. Future work aims to refine these techniques further and expand their applications in the software development lifecycle.
Origin | Files produced by the author(s) |
---|