The embodiment of the invention provides a
test case generation method and device, a storage medium and a program product. In the embodiment of the invention, in the process of converting the historical path
record of the UI automatic test into the structured
knowledge graph, semantic modeling of the path unit is realized through the entity relationship template, so that the test logic has a cross-device and cross-version abstract reuse capability, and most logic can still be reused when the actually measured display interface element changes; a page-element-relation triple is automatically extracted by using a large
language model, and a queriable three-dimensional
network structure is constructed, so that the complex path analysis efficiency is greatly improved; based on the dynamic reasoning ability of the
knowledge graph, advanced test cases for abnormal path detection, behavior prediction and the like can be automatically generated, and the case design time is remarkably shortened. Therefore, cross-version, cross-device or cross-resolution
multiplexing of the
test case is realized, the
test efficiency can be improved, and the test cost can be reduced.