Test case generation method, device and equipment, and storage medium

By analyzing code differences and dependencies to generate test requirements, and using a test case generation model to automatically generate test cases, this solves the problems of high integration costs and difficulty in precise targeted testing when manually designing test cases, and achieves efficient code change testing.

CN122240484APending Publication Date: 2026-06-19BEIJING QIYI CENTURY SCI & TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING QIYI CENTURY SCI & TECH CO LTD
Filing Date
2026-03-17
Publication Date
2026-06-19

Smart Images

  • Figure CN122240484A_ABST
    Figure CN122240484A_ABST
Patent Text Reader

Abstract

This disclosure relates to a test case generation method, apparatus, device, and storage medium. The method includes: when a target program is modified, acquiring code differences; parsing the code structure of the code differences to obtain code-changed elements; analyzing the dependencies of the code-changed elements based on the code structure to obtain the code influence scope of the code-changed elements. Here, code differences refer to the textual differences in the code before and after the target program modification; code-changed elements refer to the modified code structures in the target program; and the code influence scope refers to the set of code structures in the target program affected by the code-changed elements. Test requirements are generated based on the code-changed elements and the code influence scope. Test cases are generated based on the test requirements using a pre-trained test case generation model. According to this disclosure, more targeted and comprehensive test cases can be automatically constructed.
Need to check novelty before this filing date? Find Prior Art