The invention relates to a
test case generation model training method and a
test case generation method, and the method comprises the steps: carrying out the first-stage
reinforcement learning training of a preset model through employing a first training
data set, and obtaining a first target model; wherein the first training
data set comprises a first function specification sample of a plurality of function points and a first
standard test case, and the preset model is used for generating a first prediction
test case according to the first function specification sample; in the first-stage
reinforcement learning training process, a target
reward value is adopted to guide a prediction model to optimize a generation strategy, and the target
reward value is determined according to a
correctness reward rule, a format reward rule and a coverage rate reward rule according to a first function specification sample, a first
standard test case and a first prediction test case. On the basis, the test case generation model obtained through training can reverse multiple test scenes such as a
test scene, a
test scene corresponding to a market problem and a
test scene corresponding to a boundary condition.