The invention discloses a multi-
modal-based automatic
test script generation method and
system, and the method comprises the steps: a user describes a test demand through a
natural language, uploads an interface screenshot to carry out multi-
modal input, and calls a large
language model to generate an AIRTEST script; performing
mode matching on the generated script by using a
regular expression, extracting all picture element names, and performing reordering
processing to form an element name
list; the original interface screenshot and the element name
list are input into the visual
large model, and the visual
large model is required to return standardized coordinate data; image
cutting operation is executed based on the coordinate data, and actual image resources are provided for the
test script; and automatically generating a. Air item folder named by a
timestamp, creating a Python script file with the same name in a
directory, writing a
test script code generated previously, storing picture resources obtained by
cutting into the item folder, and forming a complete
executable test suite meeting the requirements of an AIRTEST framework. According to the invention, the core pain points of high learning cost and difficult maintenance of a traditional automatic test tool can be solved.