主办:陕西省汽车工程学会
ISSN 1671-7988  CN 61-1394/TH
创刊:1976年

汽车实用技术 ›› 2026, Vol. 51 ›› Issue (10): 58-61,67.DOI: 10.16638/j.cnki.1671-7988.2026.010.009

• 设计研究 • 上一篇    

基于大语言模型的车辆测试用例与脚本 生成实践

刘辉,赵莉娜   

  1. 质子汽车科技有限公司
  • 发布日期:2026-05-22
  • 通讯作者: 刘辉
  • 作者简介:刘辉(1989-),男,工程师,研究方向为新能源汽车

Practical Application of Vehicle Test Case and Script Generation Based on Large Language Models

LIU Hui, ZHAO Lina   

  1. Zhizi Automobile Technology Company Limited
  • Published:2026-05-22
  • Contact: LIU Hui

摘要: 为提升车辆测试用例与脚本生成的分析深度与生成效率,推进自动化测试的发展,文 章重点探讨了人工智能(AI)技术在车辆自动化测试中的应用与实践,主要包括自动化测试 用例生成和自动化测试脚本编写两个方面。其中,基于大语言模型的测试用例自动生成方法 通过分析需求文档与历史测试数据,动态构建了更高覆盖率的测试场景;基于大语言模型的 自动化测试脚本则结合强化学习与代码生成技术,实现测试脚本的自动化编写与优化,降低 人工编码错误率的同时提升了脚本维护效率。实践表明,文章提出的基于大语言模型的车辆 测试用例与测试脚本自动化生成系统,可有效提升 18%的用例覆盖度,自动化脚本编写效率 提高 50%,显著缩短了测试周期。

关键词: 大语言模型;车辆测试;自动化测试用例生成;自动化测试脚本编写

Abstract: To enhance the depth of analysis and generation efficiency of vehicle test cases and scripts, and to promote the development of automated testing, this paper focuses on the application and practice of artificial intelligence (AI) technology in vehicle automated testing, mainly covering the generation of automated test cases and the writing of automated test scripts. Specifically, the self-generation method of test cases based on large language models dynamically builds test scenarios with higher coverage by analyzing requirement documents and historical test data. The automated test scripts based on large language models combine reinforcement learning and code generation techniques to achieve the automatic writing and optimization of test scripts, reducing the error rate of manual coding while improving the efficiency of script maintenance. Practical results show that the automated generation system of vehicle test cases and test scripts based on large language models proposed in this paper can effectively increase the coverage of test cases by 18%, improve the efficiency of automated script writing by 50%, and significantly shorten the testing cycle.

Key words: large language model; vehicle testing; automated test case generation; automated test script writing