Test script automatic generation method based on domain feature map and data flow constraint

By constructing domain feature maps and data flow models, embedded software test scripts are generated, solving the problems of high cost and difficulty in ensuring consistency in traditional manual design, and realizing efficient and structured automatic generation of test scripts.

CN122450831APending Publication Date: 2026-07-24GUANGZHOU INSTITUTE OF TECHNOLOY XIDIAN UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU INSTITUTE OF TECHNOLOY XIDIAN UNIVERSITY
Filing Date
2026-04-28
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Traditional embedded software testing relies on manual design, resulting in high writing costs, long cycles, and difficulty in ensuring consistency. Existing automatic generation methods lack domain semantic modeling and structured representation, failing to meet the semantic consistency and engineering executability requirements of embedded test scripts.

Method used

By constructing domain feature maps and data flow models, and based on natural language testing requirements and historical test scripts, we define data reading, transmission, and writing mechanisms, train scripts to automatically generate models, and generate test scripts for structured semantic networks.

Benefits of technology

It improves the logical integrity, structural consistency, and multi-scenario coverage of test scripts, and enhances the practicality and engineering executability of generated scripts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122450831A_ABST
    Figure CN122450831A_ABST
Patent Text Reader

Abstract

The application provides a test script automatic generation method based on a field feature graph and a data flow constraint, and the method comprises the following steps: constructing a field feature graph based on a natural language test requirement, a test condition corresponding to the natural language test requirement, and a historical test script; defining a data reading mechanism, a data transmission mechanism, and a data writing mechanism based on nodes of the field feature graph and an association relationship between the nodes in the field feature graph; modeling a test execution process according to the reading mechanism, the data transmission mechanism, the data writing mechanism, and a dependency constraint in the field feature graph to obtain a data flow model; training a script automatic generation model based on the field feature graph, the data flow model, and the historical test script, and generating a test script corresponding to the natural language test requirement through the trained script automatic generation model. The method can improve the logical integrity, the structural consistency, and the multi-scene coverage capability of the generated test script, and the practicability and the landing capability of the generated test script.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of software testing technology, specifically relating to a method for automatically generating test scripts based on domain feature maps and data flow constraints. Background Technology

[0002] With the widespread application of embedded systems in industrial control, smart terminals, and automotive electronics, the complexity and interactivity of software systems are constantly increasing, placing higher demands on the automation level and coverage of testing technologies. As the core carrier driving test execution, the quality of test scripts directly affects the standardization, repeatability, and reliability of the testing process and results.

[0003] In traditional methods, embedded software testing mainly relies on manual test design based on requirements analysis. Embedded software test scripts are usually designed and written manually by testers based on unstructured requirements documents. This is highly dependent on professional experience, resulting in high writing costs, long cycles, and difficulty in ensuring the standardization and consistency of test scripts written by different people.

[0004] In related technologies, CodeT is used to achieve automatic generation of test scripts. However, this method lacks the ability to perform domain semantic modeling, unified structured representation, and engineering constraint integration, and cannot meet the requirements of automatic generation of embedded test scripts in terms of semantic consistency, structural standardization, and engineering executability. Summary of the Invention

[0005] To address the aforementioned problems in existing technologies, this invention provides a method for automatically generating test scripts based on domain feature maps and data flow constraints. The technical problem to be solved by this invention is achieved through the following technical solution: In a first aspect, the present invention provides a method for automatically generating test scripts based on domain feature maps and data flow constraints, comprising: Obtain natural language testing requirements and historical test scripts; A domain feature map is constructed based on the natural language testing requirements, the corresponding test conditions, and the historical test scripts; the test conditions include at least one of interface specifications, parameter constraints, and state transition relationships. Based on the nodes in the domain feature graph and the relationships between the nodes in the domain feature graph, a data reading mechanism, a data transmission mechanism, and a data writing mechanism are defined. Based on the reading mechanism, the data transmission mechanism, the data writing mechanism, and the dependency constraints in the domain feature graph, the test execution process is modeled to obtain a data flow model. Based on the domain feature map, the data flow model, and the historical test scripts, an automatic script generation model is trained to generate test scripts corresponding to the natural language testing requirements.

[0006] In one embodiment of the present invention, the construction of a domain feature map based on the natural language testing requirements, the testing conditions corresponding to the natural language testing requirements, and the historical test scripts includes: Semantic parsing is performed on the natural language testing requirements to obtain the key semantic elements in the natural language testing requirements; the key semantic elements include the test object, input conditions, execution actions, state constraints, exception handling logic, and result determination logic; The key semantic elements, the test conditions corresponding to the natural language test requirements, and the historical test scripts are fused to obtain a test semantic set; Construct a pre-structured requirement framework; the pre-structured requirement framework includes the test object, input-output relationships, execution steps, and result determination logic; The pre-structured requirements and the set of test semantics are semantically normalized to obtain the target features; The domain feature graph is constructed based on the semantic dependencies, triggering conditions, and execution sequence relationships in the target features. At least one of the test object, the input conditions, the interface, the parameters, the test state, the execution action, the exception handling logic, the data entity, and the result determination logic is represented as a node in the domain feature graph.

[0007] In one embodiment of the present invention, the semantic normalization processing of the pre-structured requirements and the test semantic set includes: Through semantic similarity matching, rule template constraints, and terminology normalization, the pre-structured requirements and the set of test semantics are unified into a standardized feature space. Redundant information in the pre-structured requirements and the test semantic set is filtered out. The repetitive semantics in the pre-structured requirements and the test semantic set are merged; The missing features in the pre-structured requirements and the test semantic set are supplemented by combining domain rules.

[0008] In one embodiment of the present invention, the data reading mechanism, data transmission mechanism, and data writing mechanism defined by the nodes in the domain feature map and the association relationships between the nodes in the domain feature map include: The input interface, output interface, and data entity are identified based on the nodes in the domain feature map; the data entity includes input parameters, status data, configuration data, intermediate process data, and observation results. A mapping relationship between interface calls and data usage is established based on the association relationships between nodes in the domain feature graph. Based on the mapping relationship between the input interface, the output interface, the data entity, the interface call and data usage, and the storage paths and access methods of configuration files, input data, intermediate execution data and result data in the engineering environment, the data reading mechanism, the data transmission mechanism and the data writing mechanism are defined.

[0009] In one embodiment of the present invention, the automatic model generation based on the domain feature map, the data flow model, and the historical test script training script includes: Based on the domain feature map and the data flow model, a structured input is constructed for the script automatic generation model, and the script automatic generation model is trained based on the historical test scripts.

[0010] In one embodiment of the present invention, generating the test script corresponding to the natural language testing requirements through the trained script automatic generation model includes: Filter out similar historical test scripts from the historical test scripts that have a similarity to the test objects, data dependencies and result judgment logic in the natural language testing requirements that reaches a preset value; The natural language testing requirements and the similar historical test scripts are input into the script automatic generation model, and the trained script automatic generation model generates the test script corresponding to the natural language testing requirements.

[0011] In one embodiment of the present invention, the method further includes: Construct a multi-dimensional verification mechanism; Based on the multi-dimensional verification mechanism, the syntactic structure, interface call consistency, data dependency integrity, execution order rationality, and actual running results of the test scripts corresponding to the natural language testing requirements are verified to obtain the verification results. Adjust the test script corresponding to the natural language test requirements based on the verification results. Based on the verification results and the adjusted test script corresponding to the natural language testing requirements, the script automatic generation model is retrained.

[0012] Secondly, the present invention provides an automatic test script generation device based on domain feature maps and data flow constraints, comprising: The data acquisition module is used to acquire natural language testing requirements and historical test scripts; The feature map construction module is used to construct a domain feature map based on the natural language testing requirements, the test conditions corresponding to the natural language testing requirements, and the historical test scripts; the test conditions include at least one of interface specifications, parameter constraints, and state transition relationships. The data flow modeling module is used to define a data reading mechanism, a data transmission mechanism, and a data writing mechanism based on the nodes in the domain feature graph and the relationships between the nodes in the domain feature graph. Based on the reading mechanism, the data transmission mechanism, the data writing mechanism, and the dependency constraints in the domain feature graph, the module models the test execution process to obtain a data flow model. The script generation module is used to train an automatic script generation model based on the domain feature map, the data flow model, and the historical test scripts, and to generate test scripts corresponding to the natural language test requirements through the trained automatic script generation model.

[0013] Thirdly, the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor, when executing a program stored in memory, implements any of the methods provided in the first aspect.

[0014] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the methods provided in the first aspect.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention provides an automatic test script generation method based on domain feature graphs and data flow constraints. This method involves: acquiring natural language test requirements and historical test scripts; constructing a domain feature graph based on the natural language test requirements, corresponding test conditions, and historical test scripts; test conditions including at least one of interface specifications, parameter constraints, and state transition relationships; defining data reading, data transmission, and data writing mechanisms based on the nodes in the domain feature graph and the relationships between nodes; modeling the test execution process according to the reading, transmission, and writing mechanisms and the dependency constraints in the domain feature graph to obtain a data flow model; training an automatic script generation model based on the domain feature graph, data flow model, and historical test scripts; and generating test scripts corresponding to the natural language test requirements using the trained automatic script generation model. On the one hand, this invention constructs a domain feature graph, which unifies the representation of interface specifications, parameter constraints, state transition relationships, and test objects, input conditions, execution actions, state constraints, exception handling logic, and result judgment logic reflected in historical test scripts into a structured semantic network. This allows the automatic generation process of test scripts to be constrained and guided by the structured semantic network, improving the logical integrity, structural consistency, and multi-scenario coverage of the generated test scripts. On the other hand, this invention constructs a data flow model based on the domain feature graph. Through the dual constraints of data dependencies and engineering constraints in the automatic generation process of test scripts, the practicality, implementability, and engineering executability of the generated test scripts can be improved.

[0016] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the implementation process of a test script automatic generation method based on domain feature maps and data flow constraints provided in an embodiment of the present invention. Figure 1 ; Figure 2 This is a schematic diagram of the implementation process of a test script automatic generation method based on domain feature maps and data flow constraints provided in an embodiment of the present invention. Figure 2 ; Figure 3 This is a schematic diagram of the implementation process of a test script automatic generation method based on domain feature maps and data flow constraints provided in an embodiment of the present invention. Figure 3 ; Figure 4 This is a schematic diagram of the implementation process of a test script automatic generation method based on domain feature maps and data flow constraints provided in an embodiment of the present invention. Figure 4 ; Figure 5This is a schematic diagram of the structure of an automatic test script generation device based on domain feature maps and data flow constraints provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the hardware entity of an electronic device to which embodiments of the present invention are applied. Detailed Implementation

[0018] The present invention will be further described in detail below with reference to specific embodiments, but the implementation of the present invention is not limited thereto.

[0019] Please see Figure 1 , Figure 1 This is a schematic diagram of the implementation process of a test script automatic generation method based on domain feature maps and data flow constraints provided in an embodiment of the present invention. Figure 1 The method for automatically generating test scripts based on domain feature maps and data flow constraints provided in this invention may include the following steps: Step S101: Obtain natural language testing requirements and historical test scripts.

[0020] Natural language test requirements are software test requirements described through unstructured text, while historical test scripts are test scripts generated based on software test requirements during the historical software test script generation process.

[0021] For example, natural language testing requirements and historical test scripts can be obtained to automatically generate subsequent software test scripts based on these requirements and scripts. The historical test scripts may include at least one test script.

[0022] Step S102: Construct a domain feature map based on natural language testing requirements, corresponding test conditions, and historical test scripts.

[0023] The test conditions include at least one of the following: interface specifications, parameter constraints, and state transition relationships. Parameter constraints include the range and restriction rules of the values ​​of interfaces, variables, and configuration items. State transition relationships are the switching logic and triggering conditions between working modes or states.

[0024] Test scripts can be embedded software test scripts. Taking the automatic generation process of embedded software test scripts as an example, interface specifications, parameter constraints, state transition relationships, and historical test scripts related to natural language testing requirements can be obtained from the embedded domain knowledge base.

[0025] Please see Figure 2 , Figure 2 This is a schematic diagram of the implementation process of a test script automatic generation method based on domain feature maps and data flow constraints provided in an embodiment of the present invention. Figure 2The method for automatically generating test scripts based on domain feature maps and data flow constraints provided in this invention may include the following steps: Step S201: Perform semantic parsing on the natural language testing requirements to obtain the key semantic elements in the natural language testing requirements.

[0026] For example, semantic parsing of natural language testing requirements can be performed using a large language model to obtain the key semantic elements in the natural language testing requirements.

[0027] Step S202: Integrate key semantic elements, test conditions corresponding to natural language test requirements, and historical test scripts to obtain a test semantic set.

[0028] The key semantic elements include the test object, input conditions, execution actions, state constraints, exception handling logic, and result determination logic. Step S203: Construct a pre-structured requirement.

[0029] The pre-structured requirements include the test object, input-output relationship, execution steps, and result determination logic.

[0030] Step S204: Perform semantic normalization on the pre-structured requirements and the test semantic set to obtain the target features.

[0031] Step S205: Represent at least one of the following as nodes in the domain feature graph: test object, input conditions, interface, parameters, test status, execution action, exception handling logic, data entity, and result determination logic.

[0032] For example, test objects, input-output relationships, execution steps, and result determination logic can be hierarchically organized by constructing a pre-structured requirement framework, and these test objects, input-output relationships, execution steps, and result determination logic can be mapped to a domain feature graph. At least one of the following—test objects, input conditions, interfaces, parameters, test states, execution actions, exception handling logic, data entities, and result determination logic—can be represented as nodes in the domain feature graph, and the relationships between nodes can be established.

[0033] In one possible implementation, the pre-structured requirements and test semantic sets can be unified into a standardized feature space through semantic similarity matching, rule template constraints, and terminology normalization; redundant information in the pre-structured requirements and test semantic sets can be filtered; duplicate semantics in the pre-structured requirements and test semantic sets can be merged; and missing features in the pre-structured requirements and test semantic sets can be supplemented by combining domain rules.

[0034] Step S103: Define the data reading mechanism, data transmission mechanism, and data writing mechanism based on the nodes in the domain feature graph and the relationships between the nodes in the domain feature graph. Based on the reading mechanism, data transmission mechanism, data writing mechanism, and the dependency constraints in the domain feature graph, model the test execution process to obtain the data flow model.

[0035] Please see Figure 3 , Figure 3 This is a schematic diagram of the implementation process of a test script automatic generation method based on domain feature maps and data flow constraints provided in an embodiment of the present invention. Figure 3 The method for automatically generating test scripts based on domain feature maps and data flow constraints provided in this invention may include the following steps: Step S301: Identify the input interface, output interface, and data entity based on the nodes in the domain feature map.

[0036] The data entities include input parameters, status data, configuration data, intermediate process data, and observation results.

[0037] Step S302: Establish a mapping relationship between interface calls and data usage based on the association relationship between nodes in the domain feature map.

[0038] Step S303: Based on the mapping relationship between input interfaces, output interfaces, data entities, interface calls and data usage, as well as the storage paths and access methods of configuration files, input data, execution intermediate data and result data in the engineering environment, define the data reading mechanism, data transmission mechanism and data writing mechanism.

[0039] In the above implementation method, based on the mapping relationship between input interface, output interface, data entity, interface call and data use, as well as the storage path and access method of configuration file, input data, execution intermediate data and result data in the project environment, a data reading mechanism, a data transmission mechanism and a data writing mechanism are defined. This allows the process of automatically generating test scripts to establish a consistent resource association relationship with the project environment, thereby constraining the project constraints in the process of automatically generating test scripts, which can improve the implementation capability and project executability of the generated test scripts.

[0040] Step S104: Based on the domain feature map, data flow model and historical test scripts, train the script to automatically generate a model, and use the trained script to automatically generate test scripts corresponding to the natural language test requirements.

[0041] In one possible implementation, a structured input for the script auto-generation model can be constructed based on the domain feature map and data flow model, and the script auto-generation model can be trained based on historical test scripts.

[0042] In one possible implementation, similar historical test scripts that have a similarity to the test objects, data dependencies, and result judgment logic in the natural language testing requirements can be selected from historical test scripts. The natural language testing requirements and similar historical test scripts are input into the script automatic generation model, and the test scripts corresponding to the natural language testing requirements are generated through the trained script automatic generation model.

[0043] The preset value can be a numerical value, and the specific value corresponding to the preset value can be set according to the actual test requirements.

[0044] For example, weights can be assigned to the similarity between historical test scripts and the test objects, data dependencies, and result judgment logic in natural language test requirements according to actual test needs. The similarity between historical test scripts and the test objects, data dependencies, and result judgment logic in natural language test requirements can be weighted and fused to obtain the similarity between historical test scripts and the test objects, data dependencies, and result judgment logic in natural language test requirements.

[0045] Taking a preset value of 80% as an example, similar historical test scripts with a similarity of 80% to the test objects, data dependencies, and result judgment logic in the natural language testing requirements can be selected from historical test scripts. The natural language testing requirements and similar historical test scripts are input into the script to automatically generate a model. The test script corresponding to the natural language testing requirements is generated through the trained script to automatically generate a model.

[0046] The present invention provides an automatic test script generation method based on domain feature graphs and data flow constraints. This method involves: acquiring natural language test requirements and historical test scripts; constructing a domain feature graph based on the natural language test requirements and corresponding test conditions; test conditions including interface specifications, parameter constraints, state transition relationships, and historical test scripts; defining data reading, data transmission, and data writing mechanisms based on the nodes in the domain feature graph and the relationships between them; modeling the test execution process according to the reading, transmission, and writing mechanisms and the dependency constraints in the domain feature graph to obtain a data flow model; training an automatic script generation model based on the domain feature graph, data flow model, and historical test scripts; and generating test scripts corresponding to the natural language test requirements using the trained automatic script generation model. On the one hand, this invention constructs a domain feature graph, which unifies the representation of interface specifications, parameter constraints, state transition relationships, and test objects, input conditions, execution actions, state constraints, exception handling logic, and result judgment logic reflected in historical test scripts into a structured semantic network. This allows the automatic generation process of test scripts to be constrained and guided by the structured semantic network, improving the logical integrity, structural consistency, and multi-scenario coverage of the generated test scripts. On the other hand, this invention constructs a data flow model based on the domain feature graph. Through the dual constraints of data dependencies and engineering constraints in the automatic generation process of test scripts, the practicality, implementability, and engineering executability of the generated test scripts can be improved.

[0047] Please see Figure 4 , Figure 4 This is a schematic diagram of the implementation process of a test script automatic generation method based on domain feature maps and data flow constraints provided in an embodiment of the present invention. Figure 4 The method for automatically generating test scripts based on domain feature maps and data flow constraints provided in this embodiment of the invention may further include the following steps: Step S401: Construct a multi-dimensional verification mechanism.

[0048] Step S402: Based on the multi-dimensional verification mechanism, verify the syntax structure, interface call consistency, data dependency integrity, execution order rationality, and actual running results of the test scripts corresponding to the natural language testing requirements, and obtain the verification results.

[0049] Step S403: Adjust the test scripts corresponding to the natural language testing requirements based on the verification results.

[0050] Step S404: Based on the verification results and the test script corresponding to the adjusted natural language testing requirements, retrain the script to automatically generate the model.

[0051] For example, test scripts corresponding to natural language testing requirements can be generated in multiple rounds. After each round of test script generation, a multi-dimensional verification mechanism is used to verify the syntactic structure, interface call consistency, data dependency integrity, execution order rationality, and actual running results of the test scripts corresponding to the natural language testing requirements. Verification results are obtained, and the test scripts are adjusted based on these results. The adjusted test scripts are then used as the final output test results, which can improve the quality of the test scripts in the test results. The number of rounds of test script generation can be set according to actual needs. The step of adjusting the test scripts based on the verification results can be completed by an automatic script generation model. For example, the verification results can be input into the automatic script generation model to guide it to make targeted corrections or partial reconstructions of the test scripts based on the verification results.

[0052] Furthermore, the script automatic generation model can be retrained based on the verification results and the test scripts corresponding to the adjusted natural language testing requirements to improve the accuracy and reliability of the test scripts generated by the script automatic generation model.

[0053] Please see Figure 5 , Figure 5 This is a schematic diagram of a test script automatic generation device based on domain feature maps and data flow constraints provided in an embodiment of the present invention. The test script automatic generation device based on domain feature maps and data flow constraints provided by the present invention includes a data acquisition module 501, a feature map construction module 502, a data flow modeling module 503, and a script generation module 504. Data acquisition module 501 is used to acquire natural language testing requirements and historical test scripts; The feature map construction module 502 is used to construct a domain feature map based on natural language testing requirements, corresponding test conditions for natural language testing requirements, and historical test scripts; the test conditions include at least one of interface specifications, parameter constraints, and state transition relationships. The data flow modeling module 503 is used to define the data reading mechanism, data transmission mechanism, and data writing mechanism based on the nodes in the domain feature graph and the relationships between the nodes in the domain feature graph. Based on the reading mechanism, data transmission mechanism, data writing mechanism, and dependency constraints in the domain feature graph, the test execution process is modeled to obtain the data flow model. The script generation module 504 is used to train a script automatic generation model based on domain feature maps, data flow models, and historical test scripts. The trained script automatic generation model generates test scripts corresponding to natural language testing requirements.

[0054] Please see Figure 6 , Figure 6This is a schematic diagram of the hardware entity of an electronic device applicable to embodiments of the present invention. The electronic device provided in this embodiment includes a processor 601, a communication interface 602, a memory 603, and a communication bus 604. The processor 601, communication interface 602, and memory 603 communicate with each other via the communication bus 604. The memory 603 stores computer programs. When the processor 601 executes the program stored in the memory 603, it implements the steps provided in the above-described method embodiments.

[0055] The communication bus 604 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 604 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, it is represented by only one thick line in the figure, but this does not indicate that there is only one bus or one type of bus.

[0056] Communication interface 602 is used for communication between the above-mentioned electronic device and other devices.

[0057] The memory 603 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory 603 may also be at least one storage device located remotely from the aforementioned processor.

[0058] The processor 601 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0059] The method provided in this invention can be applied to electronic devices. Specifically, the electronic device can be a desktop computer, a portable computer, a smart mobile terminal, a server, etc. No limitation is made herein; any electronic device that can implement this invention falls within the protection scope of this invention.

[0060] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps provided in the above-described method embodiments.

[0061] For the embodiments of the device / electronic device / storage medium, since they are basically similar to the method embodiments, the description is relatively simple. For specific details and beneficial effects, please refer to the description of the method embodiments.

[0062] It should be noted that the device, electronic device and storage medium in the embodiments of the present invention are respectively the radar interference identification hyperparameter smoothing optimization device, electronic device and storage medium applied above. Therefore, all embodiments of the radar interference identification hyperparameter smoothing optimization method described above are applicable to the device, electronic device and storage medium, and can achieve the same or similar beneficial effects.

[0063] The terminal device provided by the embodiments of the present invention can display proper nouns and / or fixed phrases for users to select, thereby reducing user input time and improving user experience.

[0064] This terminal device exists in various forms, including but not limited to: (1) Mobile communication devices: These devices are characterized by their mobile communication capabilities and are primarily designed to provide voice and data communication. These terminals include smartphones (e.g., iPhones), multimedia phones, feature phones, and low-end phones.

[0065] (2) Ultra-mobile personal computer devices: These devices fall under the category of personal computers, possessing computing and processing capabilities, and generally also have mobile internet access features. These terminals include PDAs, MIDs, and UMPCs, such as the iPad.

[0066] (3) Portable entertainment devices: These devices can display and play multimedia content. This category includes audio and video players (such as iPods), handheld game consoles, e-book readers, as well as smart toys and portable car navigation devices.

[0067] (4) Other electronic devices with data interaction functions.

[0068] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0069] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. In addition, those skilled in the art can combine and integrate the different embodiments or examples described in this specification.

[0070] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, disclosure, and appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.

[0071] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus (devices), or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects, all of which are collectively referred to herein as "modules" or "systems." Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The computer program may be stored / distributed in a suitable medium, provided with or as part of other hardware, or may take other distribution forms, such as via the Internet or other wired or wireless telecommunications systems.

[0072] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0073] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0074] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0075] In addition, this embodiment of the invention also provides a display device, which may include the display substrate provided in the above embodiments. The display device can be any product or component with display function, such as an LTPO display device, a Micro LED display device, a liquid crystal panel, electronic paper, an OLED panel, an AMOLED panel, a mobile phone, a tablet computer, a television, a monitor, a laptop computer, or a digital photo frame.

[0076] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.

Claims

1. A method for automatically generating test scripts based on domain feature maps and data flow constraints, characterized in that, include: Obtain natural language testing requirements and historical test scripts; A domain feature map is constructed based on the natural language testing requirements, the corresponding test conditions, and the historical test scripts; the test conditions include at least one of interface specifications, parameter constraints, and state transition relationships. Based on the nodes in the domain feature graph and the relationships between the nodes in the domain feature graph, a data reading mechanism, a data transmission mechanism, and a data writing mechanism are defined. Based on the reading mechanism, the data transmission mechanism, the data writing mechanism, and the dependency constraints in the domain feature graph, the test execution process is modeled to obtain a data flow model. Based on the domain feature map, the data flow model, and the historical test scripts, an automatic script generation model is trained to generate test scripts corresponding to the natural language testing requirements.

2. The method for automatically generating test scripts based on domain feature maps and data flow constraints according to claim 1, characterized in that, The construction of a domain feature map based on the natural language testing requirements, the corresponding testing conditions, and the historical test scripts includes: Semantic parsing is performed on the natural language testing requirements to obtain the key semantic elements in the natural language testing requirements; the key semantic elements include the test object, input conditions, execution actions, state constraints, exception handling logic, and result determination logic; The key semantic elements, the test conditions corresponding to the natural language test requirements, and the historical test scripts are fused to obtain a test semantic set; Construct a pre-structured requirement framework; the pre-structured requirement framework includes the test object, input-output relationships, execution steps, and result determination logic; The pre-structured requirements and the set of test semantics are semantically normalized to obtain the target features; The domain feature graph is constructed based on the semantic dependencies, triggering conditions, and execution sequence relationships in the target features. At least one of the test object, the input conditions, the interface, the parameters, the test state, the execution action, the exception handling logic, the data entity, and the result determination logic is represented as a node in the domain feature graph.

3. The method for automatically generating test scripts based on domain feature maps and data flow constraints according to claim 2, characterized in that, The semantic normalization process for the pre-structured requirements and the test semantic set includes: Through semantic similarity matching, rule template constraints, and terminology normalization, the pre-structured requirements and the set of test semantics are unified into a standardized feature space. Redundant information in the pre-structured requirements and the test semantic set is filtered out. The repetitive semantics in the pre-structured requirements and the test semantic set are merged; The missing features in the pre-structured requirements and the test semantic set are supplemented by combining domain rules.

4. The method for automatically generating test scripts based on domain feature maps and data flow constraints according to claim 1, characterized in that, The nodes based on the domain feature map and the relationships between nodes in the domain feature map define a data reading mechanism, a data transmission mechanism, and a data writing mechanism, including: The input interface, output interface, and data entity are identified based on the nodes in the domain feature map; the data entity includes input parameters, status data, configuration data, intermediate process data, and observation results. A mapping relationship between interface calls and data usage is established based on the association relationships between nodes in the domain feature graph. Based on the mapping relationship between the input interface, the output interface, the data entity, the interface call and data usage, and the storage paths and access methods of configuration files, input data, intermediate execution data and result data in the engineering environment, the data reading mechanism, the data transmission mechanism and the data writing mechanism are defined.

5. The method for automatically generating test scripts based on domain feature maps and data flow constraints according to claim 1, characterized in that, The automatic model generation based on the domain feature map, the data flow model, and the historical test script training script includes: Based on the domain feature map and the data flow model, a structured input is constructed for the script automatic generation model, and the script automatic generation model is trained based on the historical test scripts.

6. The method for automatically generating test scripts based on domain feature maps and data flow constraints according to claim 1, characterized in that, The step of automatically generating test scripts corresponding to the natural language testing requirements using the trained script generation model includes: Filter out similar historical test scripts from the historical test scripts that have a similarity to the test objects, data dependencies and result judgment logic in the natural language testing requirements that reaches a preset value; The natural language testing requirements and the similar historical test scripts are input into the script automatic generation model, and the trained script automatic generation model generates the test script corresponding to the natural language testing requirements.

7. The method for automatically generating test scripts based on domain feature maps and data flow constraints according to claim 1, characterized in that, The method further includes: Construct a multi-dimensional verification mechanism; Based on the multi-dimensional verification mechanism, the syntactic structure, interface call consistency, data dependency integrity, execution order rationality, and actual running results of the test scripts corresponding to the natural language testing requirements are verified to obtain the verification results. Adjust the test script corresponding to the natural language test requirements based on the verification results. Based on the verification results and the adjusted test script corresponding to the natural language testing requirements, the script automatic generation model is retrained.

8. A test script automatic generation device based on domain feature maps and data flow constraints, characterized in that, include: The data acquisition module is used to acquire natural language testing requirements and historical test scripts; The feature map construction module is used to construct a domain feature map based on the natural language testing requirements, the test conditions corresponding to the natural language testing requirements, and the historical test scripts; the test conditions include at least one of interface specifications, parameter constraints, and state transition relationships. The data flow modeling module is used to define a data reading mechanism, a data transmission mechanism, and a data writing mechanism based on the nodes in the domain feature graph and the relationships between the nodes in the domain feature graph. Based on the reading mechanism, the data transmission mechanism, the data writing mechanism, and the dependency constraints in the domain feature graph, the module models the test execution process to obtain a data flow model. The script generation module is used to train an automatic script generation model based on the domain feature map, the data flow model, and the historical test scripts, and to generate test scripts corresponding to the natural language test requirements through the trained automatic script generation model.

9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.