The invention discloses an automatic
test case generation method and
system based on a
large model, and the method comprises the steps: multi-
modal data fusion: receiving a
natural language demand, a UML design drawing, an API document, a historical defect log and
system monitoring data, aligning text and image features through a CLIP model, analyzing the interface constraint through CodeBERT, and carrying out the multi-
modal data fusion;
feature fusion is realized by adopting a cross-
modal attention mechanism; a dynamic
test scene modeling step: constructing an environment simulator based on
reinforcement learning, and simulating high-
concurrency, distributed abnormal and other complex scenes; and a layered
test case generation step: generating a function
test case, a boundary test case and an increment test case through GPT-4, GAN and LSTM respectively, and introducing an entropy evaluation model to quantify the effectiveness of the cases. According to the method, the multi-
modal data is brought into the test case
generation process for the first time, the test case
generation time is shortened by 80%, the complex scene coverage rate is increased to 95%, the
semantic matching degree reaches 92%, and the intelligent level and efficiency of
software testing are remarkably improved.