Automatic test script generation method and terminal
By relying on data in the database and using LLM models and other technical means, text test cases are disassembled and matched, and automated test scripts are generated, which solves the efficiency and accuracy of generating automated test scripts in the existing technology, and realizes efficient and accurate generation of automated test scripts.
Patent Information
- Application Number
- CN202311443397.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-01
- Publication Date
- 2025-05-09
AI Technical Summary
Prior art is difficult to generate automated test scripts efficiently, accurately and completely, especially when dealing with natural language text use cases.
By putting the dependency data into the database, establishing a vector database and script sample library, and using the LLM model and step script generator to disassemble and match the user-provided text test cases, automatically generate test subscripts, and finally synthesize a complete automated test script.
It realizes efficient, accurate and complete generation of automated test scripts based on text use cases, reducing the cost and efficiency of manual recording and maintenance.
Smart Images

Figure CN119961138A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automated testing technology, and in particular to an automated testing script generation method and a terminal. Background Art
[0002] Traditional script generation automation script generation solutions include user behavior recording, template and rule-based, online data recording and playback, etc.:
[0003] 1. User behavior recording
[0004] Although the user behavior recording solution can generate relatively accurate automated test scripts, it requires manual recording and adding assertions. The recording and subsequent maintenance costs are high and the efficiency is low.
[0005] 2. Based on templates and rules
[0006] Text test cases can be converted into automated test scripts through templates and rules, but it is highly dependent on templates and rules, has relatively high requirements on the format of text test cases, and cannot handle natural language text test cases well.
[0007] 3. Online data recording and playback
[0008] Online data recording and playback generates automated test scripts based on real user operation paths. This is based on the premise that the product has been launched and cannot be used during the product testing phase. It is generally suitable for generating online monitoring scripts. Summary of the invention
[0009] The technical problem to be solved by the present invention is to provide a method and a terminal for generating an automated test script, so as to realize efficient, accurate and complete generation of automated test scripts according to text use cases.
[0010] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0011] An automated test script generation method comprises the following steps:
[0012] S1. Store the dependency data into a database to obtain a vector database including interface dependency information and feature vector data and a script sample library including sample script codes;
[0013] S2, disassembling the text test case provided by the user to obtain multiple execution steps, and based on the vector database and the script sample library, using multiple step script generators and LLM models to generate test sub-scripts for the execution steps one by one;
[0014] S3. Use a step script synthesizer to synthesize the multiple test sub-scripts into one test script.
[0015] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0016] An automated test script generation terminal comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the automated test script generation method described above are implemented.
[0017] The beneficial effects of the present invention are as follows: by pre-warehousing the dependency data, a vector database containing interface dependency information and feature vector data and a script sample library containing sample script codes are obtained, and then by step-by-step decomposition of the user text test case, each execution step is matched with the dependency data and the corresponding test sub-script is automatically generated through a step script generator and an LLM model, and finally a final usable automated test script is synthesized through a step script synthesizer, thereby realizing the efficient, accurate and complete generation of automated test scripts according to text cases. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is an overall flow chart of a method for generating an automated test script according to an embodiment of the present invention;
[0019] Figure 2 This is a flow chart of the interface data storage in an embodiment of the present invention;
[0020] Figure 3 This is a flowchart of script style data storage in an embodiment of the present invention;
[0021] Figure 4 is a specific flow chart of step S2 and step S3 in an embodiment of the present invention;
[0022] Figure 5 A flow chart of generation, verification and correction of a test sub-script in an embodiment of the present invention;
[0023] Figure 6 A schematic diagram of the structure of an automated test script generation terminal according to an embodiment of the present invention.
[0024] Description of labels:
[0025] 1. An automated test script generation terminal; 2. A memory; 3. A processor. DETAILED DESCRIPTION
[0026] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.
[0027] Prior to this, the English words and abbreviations appearing in this application are explained as follows:
[0028] LLM: Large Language Model, a large language model based on machine learning and natural language processing technology;
[0029] Token: represents the smallest unit of meaning in the LLM model and is the basic unit of the model;
[0030] Prompt: Prompt, which is used as input text or question of the LLM model in the LLM model to guide the model to generate output.
[0031] Please refer to Figures 1 to 5 , an automated test script generation method, comprising the steps of:
[0032] S1. Store the dependency data into a database to obtain a vector database including interface dependency information and feature vector data and a script sample library including sample script codes;
[0033] S2, disassembling the text test case provided by the user to obtain multiple execution steps, and based on the vector database and the script sample library, using multiple step script generators and LLM models to generate test sub-scripts for the execution steps one by one;
[0034] S3. Use a step script synthesizer to synthesize the multiple test sub-scripts into one test script.
[0035] From the above description, it can be seen that the beneficial effects of the present invention are: by pre-warehousing the dependency data, a vector database containing interface dependency information and feature vector data and a script sample library containing sample script code are obtained, and then the user text test case is decomposed into steps, each execution step is matched with the dependency data, and the corresponding test sub-script is automatically generated through the step script generator and the LLM model, and finally the final usable automated test script is synthesized through the step script synthesizer, thereby realizing the efficient, accurate and complete generation of automated test scripts according to text cases.
[0036] Furthermore, the dependency data includes framework underlying interface data used in generating the automation script and generating the automation script style data;
[0037] The step S1 of storing the dependent data includes storing the interface data and the script style data.
[0038] From the above description, it can be seen that the subsequently generated automated test scripts will rely on the underlying interface of the automation framework and the module interface based on business encapsulation. This part of the dependent data is the necessary data for generating automated scripts.
[0039] Furthermore, the interface data storage is specifically as follows:
[0040] S11, input dependent code files, and extract the function name, input and output parameters, and interface dependency information of the dependent interface through regular expressions;
[0041] S12, submitting the code segment of the interface function to the LLM model, and extracting the function function description through the LLM model;
[0042] S13, submitting the function name, the input and output parameters, the function annotation and the function function description to the LLM model in a preset format, and obtaining the corresponding feature vector data returned by the LLM model;
[0043] S14. Store the interface dependency information and the corresponding feature vector data into the vector database.
[0044] From the above description, it can be seen that dependency data is the data necessary for generating automated scripts. This part of data is generally general data and is not frequently updated. The LLM model can be used to perform a one-time analysis to extract the feature vector data of the corresponding interface dependency information and store it in the vector database, so that the corresponding interface dependency information can be matched by extracting the feature vector of the text test case provided by the user, and the corresponding interface can be obtained to generate test samples.
[0045] Furthermore, the script style data is stored in the database as follows:
[0046] S15. Obtain the existing automation script style through the LLM model, and format it to obtain a sample script code;
[0047] S16, de-redundanting the sample script code, wherein the de-redundanting includes filtering comments and code descriptions through regular expressions, identifying function names and function names exceeding a length threshold through the regular expressions and simplifying them, and simplifying the sample script code through the LLM model;
[0048] S17, storing the formatted and de-redundant sample script code into the script sample library.
[0049] From the above description, it can be seen that the LLM model can generate known automation script styles. If you want the LLM model to generate a custom automation script style, you need to give the existing automation script style and submit it to the LLM model as a context so that the LLM model can generate an automation test script according to the custom style.
[0050] Furthermore, in step S2, the text test case provided by the user is disassembled to obtain multiple execution steps, specifically:
[0051] S21. Use the context token number limitation tool of the LLM model to divide the multiple operation steps in the text test case to obtain multiple execution steps with steps as the smallest unit.
[0052] From the above description, it can be seen that the text test case provided by the user is normally a whole test case, and is usually too long, so it needs to be split; the context token number limitation tool based on the LLM model can effectively split the steps of the text test case into the smallest unit execution steps, so that subsequent test sub-samples can be generated and tested one by one.
[0053] Furthermore, in step S2, based on the vector database and the script sample library, multiple step script generators are used to generate test sub-scripts for the execution steps one by one, specifically:
[0054] S22, extracting corresponding feature vector data according to the information of each of the execution steps, and searching the corresponding interface dependency information from the vector database;
[0055] S23, selecting the corresponding sample script code for each of the execution steps from the script sample library according to the interface dependency information, generating a style sub-template through a step script generator of the corresponding interface, and providing the template to the LLM model;
[0056] S24. The LLM model generates a test sub-script according to the style sub-template.
[0057] From the above description, it can be seen that the automatic generation of each test sub-sample is based on the interface dependency information in the matching vector database, so as to obtain the corresponding interface, and use the step script generator at the interface to generate a style sub-template, so that the LLM model can then generate the corresponding test sub-sample according to the style sub-template, ensuring that the generated test sub-sample conforms to the content to be expressed in each step in the user's text test case.
[0058] Furthermore, the step S2 also includes:
[0059] S25, using a script checker to check the test sub-script, and using the LLM model to correct the test sub-script that does not meet expectations for multiple times until the corrected test sub-script meets expectations.
[0060] Furthermore, in step S25, a script checker is used to check the test sub-script, specifically:
[0061] Identify whether the test sub-script is a script style in the script sample library through a regular expression;
[0062] Determine whether the test sub-script generates assertion code by keyword search;
[0063] Determine whether the dependent interface is found in the test sub-script.
[0064] Furthermore, in step S25, the test sub-script that does not meet expectations is corrected multiple times using the LLM model until the corrected test sub-script meets expectations, specifically:
[0065] If the test sub-script does not belong to the script style in the script sample library, return to step S23 and reselect another sample script code from the script sample library according to the interface dependency information to generate a new style sub-template to provide to the LLM model, and retest to obtain the test sub-script;
[0066] If the test sub-script does not generate assertion code, the assertion code part is supplemented by the LLM model to obtain a new test sub-script;
[0067] If the dependent interface is not found in the test sub-script, return to step S21 to redivide the execution steps, and execute steps S22 to S24 to obtain a new test sub-script.
[0068] From the above description, it can be seen that the purpose of generating test sub-samples is also to be able to correct sub-samples that do not meet the expected requirements, so as to achieve fine-tuning of the entire generated test sample to the smallest unit code, while not affecting the efficiency of test script generation, and effectively ensuring that the final generated test script meets user needs.
[0069] Please refer to Figure 6 , an automated test script generation terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the automated test script generation method described above when executing the computer program.
[0070] From the above description, it can be seen that the beneficial effects of the present invention are: based on the same technical concept, in conjunction with the above-mentioned automated test script generation method, an automated test script generation terminal is provided, by pre-warehousing the dependency data, a vector database containing interface dependency information and feature vector data and a script sample library containing sample script codes are obtained, and then the user text test case is decomposed into steps, each execution step is matched with the dependency data, and the corresponding test sub-script is automatically generated through a step script generator and an LLM model, and finally the final usable automated test script is synthesized through a step script synthesizer, thereby realizing the efficient, accurate and complete generation of automated test scripts according to text cases.
[0071] The present invention provides an automated test script generation method, which is used in a scenario where a test script is automatically generated according to a user's text test case to perform computer software testing, and is specifically described below in conjunction with an embodiment.
[0072] Please refer to Figures 1 to 3 , Embodiment 1 of the present invention is:
[0073] An automated test script generation method, such as Figure 1 As shown, the steps include:
[0074] S1. Store dependency data, including interface data and script style data, to obtain a vector database containing interface dependency information and feature vector data and a script sample library containing sample script codes.
[0075] Among them, the dependent data includes the framework underlying interface data used in generating automation scripts and the style data of generating automation scripts. That is, the subsequently generated automation test scripts will rely on the underlying interfaces of the automation framework, such as the click operation click(elementName) interface of UI automation, the get and post interfaces of interface automation, and the module interfaces based on business encapsulation, such as the login(userName, Password) interface, etc. This part of the dependent data is the necessary data for generating automation scripts.
[0076] Among them, in this embodiment, the dependency data is the data necessary for generating the automation script. This part of data is generally general data and is not frequently updated. It can be parsed once through the LLM model to extract the feature vector data of the corresponding interface dependency information and store it in the vector database, so that it can subsequently match the corresponding interface dependency information by extracting the feature vector of the text test case provided by the user, and obtain the corresponding interface to generate test samples.
[0077] Therefore, if Figure 2 As shown, in this embodiment, the steps of providing interface data storage are specifically as follows:
[0078] S11, input dependent code files, and extract the function name, input and output parameters, and interface dependency information of the dependent interface through regular expressions;
[0079] S12, submitting the code segment of the interface function to the LLM model, and extracting the function function description through the LLM model;
[0080] S13, submitting the function name, input and output parameters, function annotations and function description to the LLM model in a preset format, and obtaining the corresponding feature vector data returned by the LLM model;
[0081] S14. Store the interface dependency information and the corresponding feature vector data into a vector database.
[0082] In addition, in this embodiment, the LLM model can generate known automation script styles, such as BDD (Behavior-Driven Development), PO (Page Object), DDT (Data-Driver Test), etc. If the LLM model is to generate a custom automation script style, it is necessary to give the existing automation script style and submit it to the LLM model as a context, so that the LLM model can generate an automation test script according to the custom style.
[0083] Therefore, if Figure 3 As shown, in this embodiment, the steps for providing script style data storage are specifically as follows:
[0084] Given an existing automation script style;
[0085] S15. Obtain the existing automation script style through the LLM model and format it to obtain the sample script code. After formatting, check whether it is redundant:
[0086] S16, de-redundanting the sample script code, de-redundanting includes filtering comments and code descriptions through regular expressions, identifying function names and function names that exceed a length threshold through regular expressions and simplifying them, and simplifying the sample script code through an LLM model;
[0087] S17. Store the formatted and de-redundant sample script code into a script sample library as a context for subsequent production automation test scripts.
[0088] S2. Decompose the text test case provided by the user to obtain multiple execution steps, and based on the vector database and script sample library, use multiple step script generators and LLM models to generate test sub-scripts for the execution steps one by one.
[0089] S3. Use a step script synthesizer to synthesize multiple test sub-scripts into one test script.
[0090] That is, in this embodiment, by pre-warehousing the dependency data, a vector database containing interface dependency information and feature vector data and a script sample library containing sample script code are obtained, and then the user text test case is decomposed into steps, each execution step is matched with the dependency data, and the corresponding test sub-script is automatically generated through the step script generator and the LLM model. Finally, the final usable automated test script is synthesized through the step script synthesizer, thereby realizing the efficient, accurate and complete generation of automated test scripts according to text cases.
[0091] Please refer to Figure 4 and Figure 5 , Embodiment 2 of the present invention is:
[0092] An automated test script generation method, based on the above-mentioned embodiment 1, in this embodiment, in step S2, the text test case provided by the user is disassembled to obtain multiple execution steps, specifically:
[0093] S21. Use the context token number limitation tool of the LLM model to divide multiple operation steps in the text test case to obtain multiple execution steps with steps as the smallest unit.
[0094] That is, in this embodiment, the text test case provided by the user is normally a whole test case, and is usually too long, so it needs to be split; the use of the context Token number limitation tool based on the LLM model can effectively split the steps of the text test case into the smallest unit execution steps, so that subsequent test sub-samples can be generated and tested one by one.
[0095] Among them, Figure 4 and Figure 5 As shown, in this embodiment, in step S2, multiple step script generators are used to generate test sub-scripts for the execution steps one by one based on the vector database and the script sample library, specifically:
[0096] S22, extracting corresponding feature vector data according to the information of each execution step, and searching corresponding interface dependency information from the vector database,
[0097] S23, selecting a corresponding sample script code for each execution step from the script sample library according to the interface dependency information, generating a style sub-template through a step script generator of the corresponding interface, and providing it to the LLM model;
[0098] S24. The LLM model generates a test sub-script based on the style sub-template.
[0099] That is, the automatic generation of each test sub-sample is based on the interface dependency information in the matching vector database, so as to obtain the corresponding interface, and use the step script generator at the interface to generate a style sub-template, so that the LLM model can then generate the corresponding test sub-sample according to the style sub-template, ensuring that the generated test sub-sample conforms to the content to be expressed in each step of the user's text test case.
[0100] The key step is to extract the data features of each execution step and submit the feature description to the LLM model, so that the LLM model returns its feature vector data for subsequent interface dependency information matching.
[0101] In this embodiment, a disassembly use case is listed as follows:
[0102] Use cases are usually written in scenarios. A scenario contains multiple operation steps. Due to the limitation of the number of context tokens in LLM, test cases are generated with steps as the smallest unit, and multiple test cases form a test script. Table 1 below is a test case for purchasing items in an online mall:
[0103] Table 1:
[0104]
[0105] The step decomposition is to generate test sub-scripts separately for steps 1-5 in Table 1.
[0106] Meanwhile, in this embodiment, step S2 also includes:
[0107] S25, use the script checker to check the test sub-script, and use the LLM model to correct the test sub-script that does not meet expectations for multiple times until the corrected test sub-script meets expectations. The specific process can be seen in Figure 5 shown.
[0108] In this embodiment, the style sub-template generated by the interface is actually equivalent to the input text Prompt used as the LLM model, that is, generating LLMPrompt. In this embodiment, Prompt can be equivalent to step execution description + step verification description + step dependency interface + generated script style, and its format is as follows:
[0109] {Robot role description, what work the robot is to complete}
[0110] {Step execution description + step verification description}
[0111] The interfaces used in the middle:
[0112] {List of dependent interfaces}
[0113] Generate automation script template:
[0114] {Style sub-template}.
[0115] At the same time, in step S25 of this embodiment, a script verifier is used to verify the test sub-script, specifically:
[0116] Use regular expressions to identify whether the test sub-script is a script style in the script sample library;
[0117] Determine whether the test sub-script generates assertion code through keyword search;
[0118] Determine whether the dependent interface is found in the test sub-script.
[0119] Correspondingly, in step S25, the test sub-script that does not meet the expectations is corrected multiple times using the LLM model until the corrected test sub-script meets the expectations. Specifically:
[0120] If the test sub-script does not belong to the script style in the script sample library, return to step S23 and select another sample script code from the script sample library according to the interface dependency information to generate a new style sub-template and provide it to the LLM model, and re-test to obtain the test sub-script;
[0121] If the assertion code is not generated for the test sub-script, supplement the assertion code part through the LLM model to obtain a new test sub-script;
[0122] If the dependent interface is not found in the test sub-script, return to step S21 to re-divide the execution steps, and execute steps S22 to S24 to obtain a new test sub-script.
[0123] That is, the purpose of generating the test sub-sample is also to be able to correct the sub-sample that does not meet the expected requirements, so as to realize the fine-tuning of the entire generated test sample to the smallest unit code. Without affecting the test script generation efficiency, it can also effectively ensure that the finally generated test script meets the user's needs.
[0124] The following are examples of correcting the test sub-script that does not meet the expected requirements:
[0125] The script validator fails the verification, the assertion code is not generated, and only the assertion comment is generated, prompting the user to add it manually, such as:
[0126] deftest_login(self):
[0127] login(name=”张三”,password=”123456”)
[0128] login_status=get_current_login_status()
[0129] #Assert that the current status is the logged-in status
[0130] Then the corrected test sub-script should be:
[0131] Please use the built-in assert in Python to generate the assertion code.
[0132] Submit the "fine-tuned Prompt" to the LLM, and the LLM will supplement the assertion part code:
[0133] deftest_login(self):
[0134] login(name="Zhang San", password="123456")
[0135] login_status = get_current_login_status()
[0136] # Assert that the current status is the logged-in status
[0137] assert login_status == 1
[0138] Note: The return value of the get_current_login_status function for the login status, 0 for not logged in, 1 for logged in, is defined in the dependent interface data.
[0139] In the software testing process, after writing the test cases, according to the development design document, encapsulate the dependent interfaces, input the dependent interfaces into the method of this embodiment for data storage. If a custom script style needs to be generated, the custom script style also needs to be input into this system. After completing the preparatory work, the test cases can be submitted to the system, and the system returns the test script to the user.
[0140] Please refer to Figure 6 , Embodiment 3 of the present invention is:
[0141] An automated test script generation terminal 1, as Figure 6 shown, includes a memory 2, a processor 3, and a computer program stored on the memory 2 and executable on the processor 3. When the processor 3 executes the computer program, it implements the steps in the above Embodiment 1 or Embodiment 2.
[0142] In summary, an automated test script generation method provided by the present invention, based on the powerful language processing ability of the LLM (Large Language Model) represented by OpenAI's ChatGPT, submits text test cases and dependent data information of interfaces to the LLM model to generate corresponding automated test scripts. After verifying and optimizing the generated scripts with the LLM, available automated test scripts are generated. The entire generation process involves data analysis, data decomposition, data feature extraction and matching, LLM model language processing, LLMPrompt construction, and LLM result optimization technologies, achieving efficient, accurate, and complete automated test script generation.
[0143] The above are only embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent transformation made using the content of the specification and drawings of the present invention, or directly or indirectly applied in related technical fields, is similarly included in the patent protection scope of the present invention.
Claims
1. A method for generating an automated test script, characterized in that: Includes steps: S1. Store the dependency data into a database to obtain a vector database including interface dependency information and feature vector data and a script sample library including sample script codes; S2, disassembling the text test case provided by the user to obtain multiple execution steps, and based on the vector database and the script sample library, using multiple step script generators and LLM models to generate test sub-scripts for the execution steps one by one; S3. Use a step script synthesizer to synthesize the multiple test sub-scripts into one test script.
2. The method for generating an automated test script according to claim 1, characterized in that: The dependency data includes the framework underlying interface data used in generating the automation script and the style data of generating the automation script; The step S1 of storing the dependent data includes storing the interface data and the script style data.
3. The method for generating an automated test script according to claim 2, characterized in that: The interface data storage is specifically as follows: S11, input dependent code files, and extract the function name, input and output parameters, and interface dependency information of the dependent interface through regular expressions; S12, submitting the code segment of the interface function to the LLM model, and extracting the function function description through the LLM model; S13, submitting the function name, the input and output parameters, the function annotation and the function function description to the LLM model in a preset format, and obtaining the corresponding feature vector data returned by the LLM model; S14. Store the interface dependency information and the corresponding feature vector data into the vector database.
4. The method for generating an automated test script according to claim 2, characterized in that: The script style data storage is specifically as follows: S15. Obtain the existing automation script style through the LLM model, and format it to obtain a sample script code; S16, de-redundanting the sample script code, wherein the de-redundanting includes filtering comments and code descriptions through regular expressions, identifying function names and function names exceeding a length threshold through the regular expressions and simplifying them, and simplifying the sample script code through the LLM model; S17, storing the formatted and de-redundant sample script code into the script sample library.
5. The method for generating an automated test script according to claim 1, characterized in that: In step S2, the text test case provided by the user is disassembled to obtain multiple execution steps, specifically: S21. Use the context token number limitation tool of the LLM model to divide the multiple operation steps in the text test case to obtain multiple execution steps with steps as the smallest unit.
6. The method for generating an automated test script according to claim 5, characterized in that: In step S2, multiple step script generators are used to generate test sub-scripts for the execution steps one by one based on the vector database and the script sample library, specifically: S22, extracting corresponding feature vector data according to the information of each of the execution steps, and searching the corresponding interface dependency information from the vector database, S23, selecting the corresponding sample script code for each of the execution steps from the script sample library according to the interface dependency information, generating a style sub-template through a step script generator of the corresponding interface, and providing the template to the LLM model; S24. The LLM model generates a test sub-script according to the style sub-template.
7. The method for generating an automated test script according to claim 6, characterized in that: The step S2 also includes: S25, using a script checker to check the test sub-script, and using the LLM model to correct the test sub-script that does not meet expectations for multiple times until the corrected test sub-script meets expectations.
8. The method for generating an automated test script according to claim 6, characterized in that: In step S25, the test sub-script is verified by using a script verifier, specifically: Identify whether the test sub-script is a script style in the script sample library through a regular expression; Determine whether the test sub-script generates assertion code by keyword search; Determine whether the dependent interface is found in the test sub-script.
9. The method for generating an automated test script according to claim 8, characterized in that: In step S25, the test sub-script that does not meet expectations is corrected multiple times using the LLM model until the corrected test sub-script meets expectations, specifically: If the test sub-script does not belong to the script style in the script sample library, return to step S23 and reselect another sample script code from the script sample library according to the interface dependency information to generate a new style sub-template to provide to the LLM model, and retest to obtain the test sub-script; If the test sub-script does not generate assertion code, the assertion code part is supplemented by the LLM model to obtain a new test sub-script; If the dependent interface is not found in the test sub-script, return to step S21 to redivide the execution steps, and execute steps S22 to S24 to obtain a new test sub-script.
10. An automated test script generation terminal, characterized in that: It comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps in the method for generating an automated test script as described in any one of claims 1 to 9 are implemented.
Citation Information
Cited By
Test case execution code generation method and system based on large model
CN122412305A