Automatic testing method and device based on large model, and electronic equipment

Through the automated testing method based on large models, using large language models to generate and mark test cases, the problem that traditional manual writing of automated test codes is difficult to meet the needs of efficient testing is solved, efficient test case selection and code writing are achieved, and test response is improved Speed ​​and efficiency.

CN119127686APending Publication Date: 2024-12-13IOL WUHAN INFORMATION TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411157202.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

As the product's functional complexity increases, relying solely on traditional manual writing of automated test codes is difficult to meet the needs of efficient testing, especially when time is tight.

Method used

Adopt automated testing methods based on large models, obtain user testing needs, use large language models to generate and mark test cases, generate test code to be executed based on the automated test code framework and target compiled language, and execute it in the test environment to obtain test results .

Benefits of technology

It realizes efficient test case selection and test code writing, saves code debugging time, greatly improves test response speed and efficiency, and ensures product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127686A_ABST
    Figure CN119127686A_ABST
Patent Text Reader

Abstract

The invention provides an automatic test method and device based on a large model, and electronic equipment. The method comprises the following steps: acquiring a test demand of a user; based on the test requirement, the marking result of each test case in a test case library and a large language model, determining a to-be-executed case; generating a to-be-executed test code corresponding to the to-be-executed use case based on an automatic test code framework, a target compiling language and the large language model; and executing the test code to be executed in a test environment to obtain a test execution result. According to the method provided by the invention, the to-be-executed use case is determined by utilizing the powerful capability of the large model, and the to-be-executed test code corresponding to the to-be-executed use case is generated through the large language model on the basis of the automatic test code framework and the target compiling language, so that efficient test case selection and test code compiling are realized, and the test efficiency is improved. And moreover, the code debugging time is saved, the test response speed and the test efficiency are greatly improved, and the quality of the to-be-tested product is further ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an automated testing method, device, and electronic equipment based on a large model. Background Art

[0002] Current testing mainly includes manual testing and automated testing. As the name implies, automated testing is based on mechanical execution of test steps. Generally speaking, during the product development stage, use cases are written based on the product function requirement document, and then the use cases are manually reviewed and written into automated test code. After the product is developed, automated testing can be completed by automatically executing the test code in the test environment.

[0003] However, as product functions become more and more complex, the relationships between product functions become more and more intricate, and the time available for product testing becomes increasingly tight, it is difficult to meet the needs of efficient testing by simply relying on traditional manual automated test code writing. Summary of the invention

[0004] The present invention provides an automated testing method, device, and electronic device based on a large model, so as to solve the defect in the prior art that simply relying on traditional manually written automated testing codes can no longer meet efficient testing requirements.

[0005] The present invention provides an automated testing method based on a large model, comprising: Obtain user testing requirements; Determine the test case to be executed based on the test requirements, the marking results of each test case in the test case library and the large language model; Based on the automated test code framework, the target compiled language and the large language model, generating the test code to be executed corresponding to the test case to be executed; The test code to be executed is executed in the test environment to obtain a test execution result.

[0006] According to an automated testing method based on a large model provided by the present invention, the step of acquiring the test case library includes: Get the requirement text of the function to be tested; Based on the requirement text and the large language model, generating an initial test case corresponding to the function to be tested; Based on the large language model, the initial test case is categorized and labeled to obtain a labeling result; The test case library is constructed based on the initial test case and the marking result.

[0007] According to an automated testing method based on a large model provided by the present invention, generating an initial test case corresponding to the function to be tested based on the requirement text and the large language model includes: Inputting the requirement text and the prototype diagram corresponding to the function to be tested into the large language model to extract key business information; The business-critical information is applied based on the large language model to generate an initial test case corresponding to the function to be tested.

[0008] According to an automated testing method based on a large model provided by the present invention, the category tag includes: at least one of an attribute tag, a priority tag, an applicable stage tag, a business scenario tag, and a use case keyword tag.

[0009] According to an automated testing method based on a large model provided by the present invention, the test code to be executed is executed in a test environment to obtain a test execution result, and then includes: Taking the test case with the test execution result of execution failure as the test case to be verified, and generating an associated test case based on the test case to be verified and the large language model; Based on the associated test cases and the test cases to be verified, regression test cases are obtained.

[0010] According to an automated testing method based on a large model provided by the present invention, the training steps of the large language model include: Obtain a general large language model and sample demand text; Inputting the sample requirement text and the generation instruction into the general large language model to output a sample test case based on the general large language model; The general large language model is fine-tuned based on the sample test case to obtain the large language model.

[0011] The present invention also provides an automatic testing device based on a large model, comprising: Get the unit and the user's testing requirements; Select a use case unit, and determine a use case to be executed based on the test requirements, the marking results of each test case in the test case library, and the large language model; A code generation unit generates a to-be-executed test code corresponding to the to-be-executed use case based on an automated test code framework, a target compiled language, and the large language model; The test execution unit executes the test code to be executed in the test environment to obtain the test execution result.

[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the large model-based automated testing method described above is implemented.

[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the computer program implements any of the above-mentioned large model-based automated testing methods.

[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned large model-based automated testing methods.

[0015] The large-model-based automated testing method, device, and electronic device provided by the present invention utilize the powerful capabilities of the large-scale model to determine the use cases to be executed, and generate the test codes to be executed corresponding to the use cases to be executed based on the automated testing code framework and the target compilation language through the large language model, thereby achieving efficient test case selection and test code writing, saving code debugging time, greatly improving the test response speed and test efficiency, and thus ensuring the quality of the product to be tested. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 This is one of the flow charts of the large model-based automated testing method provided by the present invention; Figure 2 This is the second flow chart of the large model-based automated testing method provided by the present invention; Figure 3 It is a structural schematic diagram of an automatic testing device based on a large model provided by the present invention; Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] In view of the above problems, the present invention provides an automated testing method based on a large model, which has achieved efficient and intelligent automated testing. Figure 1 This is one of the flow charts of the large model-based automated testing method provided by the present invention, such as Figure 1 As shown, the method includes: Step 110, obtaining the user's test requirements; Step 120, determining a test case to be executed based on the test requirements, the marking results of each test case in the test case library and the large language model; Step 130, generating the to-be-executed test code corresponding to the to-be-executed use case based on the automated test code framework, the target compiled language and the large language model; Step 140: execute the test code to be executed in the test environment to obtain a test execution result.

[0020] Specifically, the user's test requirements can be obtained by receiving the user's input operation. The test requirements can include at least one of the attributes, priorities, applicable stages, scenarios, keywords, and other information of the test cases to be executed. Among them, the attributes can include functions, performance, boundary values, etc.; the priority can reflect the business importance and risk level of the functions corresponding to the test cases; the applicable stages can include smoke testing, functional testing, and regression testing; the scenarios can include normal scenarios and abnormal scenarios; the keywords can reflect the business functions corresponding to the test cases, such as login and user binding. For example, the user's test requirements are to perform smoke testing.

[0021] Next, the large language model can be used to select test cases that meet the test requirements from the test case library as test cases to be executed based on the marking results of the test requirements and each test case in the test case library. Here, the test case library refers to automated test cases containing various functions of the product to be tested, which can be manually written or written based on a large language model. The marking results here refer to the marking results of at least one category of information such as the attributes, priority, applicable stage, scenario, keywords, etc. of the test case. Therefore, the test cases to be executed here refer to the test cases in the test case library whose marking results are consistent with the user's test requirements.

[0022] It is understandable that compared with the existing technology, it is more time-consuming to manually screen automated test cases at each version update iteration. However, by using the powerful capabilities of large models to determine the test cases to be executed, efficient selection of automated test cases is achieved, providing a new way to improve software quality and testing efficiency.

[0023] Furthermore, the target compiled language can be translated into the target compiled language for the test cases to be executed according to the existing automated test code framework and the target compiled language through the large language model obtained by training, and the test cases to be executed can be converted into the code language on the automated test code framework to generate the test code to be executed corresponding to the test cases to be executed. It should be noted that, here, the automated test code framework includes reusable APIs corresponding to the functions of the product to be tested, classes corresponding to the division of each function, and other basic components. In order to facilitate the large language model to generate the test code to be executed based on the existing automated test framework and the test cases to be executed, so as to increase the maintainability, readability and producibility of the automated test framework. For example, a unified test script template can be defined, a clear test interface can be defined, etc. The target compiled language here refers to the language used by the automated test code, that is, it can be the programming language of the automated test code framework, and it can be a programming language such as Python.

[0024] It should be noted that, compared with the prior art, the manual writing of automated test code not only requires a lot of time to write, but also requires a lot of time to debug the code. Therefore, the manual writing of automated test code is not suitable for fast-paced test processes, especially in the agile development process, where the iteration rhythm is fast, and there is a higher demand for test response speed. Generating the test code to be executed based on a large language model can not only achieve efficient test code writing, but also save code debugging time, greatly improving the test response speed and test efficiency. In addition, due to the differences in code writing style and level of each person, the test code based on manual writing needs to spend a lot of time to maintain, and the code readability is limited. The test code obtained by encoding based on the large language model has a unified code style and high readability, which is conducive to the long-term maintenance of the test code, and the testers are more invested in the development of the test code framework, thereby greatly improving the practical value of automated testing.

[0025] Finally, the test code to be executed can be automatically executed in the test environment to obtain the test execution results. The test execution results can include success, failure or error.

[0026] The method provided by the embodiment of the present invention utilizes the powerful capabilities of a large model to determine the use cases to be executed, and generates the test code to be executed corresponding to the use cases to be executed based on the automated test code framework and the target compiled language through the large language model, thereby achieving efficient test case selection and test code writing, saving code debugging time, greatly improving the test response speed and test efficiency, and thus ensuring the quality of the product to be tested.

[0027] Based on any of the above embodiments, the step of acquiring the test case library includes: Get the requirement text of the function to be tested; Based on the requirement text and the large language model, generating an initial test case corresponding to the function to be tested; Based on the large language model, the initial test case is categorized and labeled to obtain a labeling result; The test case library is constructed based on the initial test case and the marking result.

[0028] Specifically, it is possible to obtain a pre-written requirement text of the function to be tested. The requirement text may contain key information such as a specific description of the function to be tested, input and output requirements, expected behavior, boundary conditions, exception handling, etc. Then, the requirement text may be input into a large language model, and the initial test case corresponding to the function to be tested may be generated by the large language model based on the requirement text. It should be noted that the large language model here is obtained based on pre-training, and may be obtained by fine-tuning the general large language model based on the sample requirement text, so that the general large language model learns how to generate corresponding test cases based on the requirement text. As a result, the large language model here has the ability to generate test cases. In addition, there may be multiple initial test cases generated here, and a single function to be tested may correspond to multiple initial test cases.

[0029] Next, each initial test case may be categorized and labeled based on the text content of each initial test case and the predefined test case category by the large language model to obtain the labeling result of the initial test case. The predefined test case category here may include at least one of the test case attributes, priority, applicable stage, scenario, keyword and other information.

[0030] Finally, the initial test cases and the marking results of each initial test case can be used as a complete test case to construct a test case library.

[0031] The method provided by the embodiment of the present invention achieves efficient and comprehensive test case writing by making full use of the generation capability of the large language model, and classifies the written test cases based on the large language model to efficiently construct a complete and practical test case library, thereby greatly improving the execution efficiency of automated testing.

[0032] Based on any of the above embodiments, generating an initial test case corresponding to the function to be tested based on the requirement text and the large language model includes: Inputting the requirement text and the prototype diagram corresponding to the function to be tested into the large language model to extract key business information; The business-critical information is applied based on the large language model to generate an initial test case corresponding to the function to be tested.

[0033] Specifically, first, the requirement text and the prototype diagram corresponding to the function to be tested can be input into the large language model, and the business-critical information can be extracted through the large language model. It should be noted that the business-critical information here can be the basic information used to build test cases, such as: specific descriptions, input and output requirements, expected behaviors, boundary conditions, exception handling and other information. Then, the large language model can generate initial test cases corresponding to the function to be tested based on the use case generation instructions and the extracted business-critical information. In actual applications, the generated initial test cases can be reviewed, and the initial test cases that meet the conditions can be saved. Then, the initial test cases that meet the conditions are classified and marked. When an initial test case that does not meet the conditions is generated, the initial test case can be regenerated by adjusting the use case generation instructions or retraining the large language model.

[0034] Based on any of the above embodiments, the category tag includes: at least one of an attribute tag, a priority tag, an applicable stage tag, a business scenario tag, and a use case keyword tag.

[0035] Specifically, attributes may include functions, performance, boundary values, etc. Priority may reflect the business importance and risk level of the functions corresponding to the test cases, for example, it may be divided into 1 to 5 levels. Applicable stages may include smoke testing, functional testing, and regression testing. Scenarios may include normal scenarios and abnormal scenarios. The normal scenario is how the system should respond and perform the expected functions under normal user operation; the abnormal scenario is how the system should respond and handle these situations under abnormal or error conditions. Keywords may reflect the business functions corresponding to the test cases, such as login and user binding.

[0036] Based on any of the above embodiments, executing the test code to be executed in the test environment to obtain the test execution result, then includes: Taking the test case with the test execution result of execution failure as the test case to be verified, and generating an associated test case based on the test case to be verified and the large language model; Based on the associated test cases and the test cases to be verified, regression test cases are obtained.

[0037] Specifically, the large language model can be used to record and save the test cases whose test execution results are failed as test cases to be verified, and diverge based on the test cases to be verified to generate associated test cases. It should be noted that the associated test cases here refer to the test cases associated with the functions corresponding to the test cases that failed to execute. Thus, based on the associated test cases and the test cases to be verified, regression test cases are obtained together, making the regression test more comprehensive, thereby ensuring the quality of the product to be tested and reducing the risk after product iteration.

[0038] Based on any of the above embodiments, the training step of the large language model includes: Obtain a general large language model and sample demand text; Inputting the sample requirement text and the generation instruction into the general large language model to output a sample test case based on the general large language model; The general large language model is fine-tuned based on the sample test case to obtain the large language model.

[0039] Specifically, first, a general large language model and a sample requirement text may be obtained. For example, a historical version of the requirement text may be used as a sample requirement text. Then, the sample requirement text and the generation instruction may be input into the general large language model, and the general large language model may be instructed to generate a sample test case through the generation instruction. It should be noted that the generation instruction here may include conditional restrictions for generating test cases, and the format requirements of the test cases may be limited.

[0040] Therefore, the general large language model can be fine-tuned based on the sample test cases, or the generation instructions can be adjusted to obtain a large language model that can generate qualified test cases.

[0041] It should be noted that by fine-tuning the general large language model and leveraging the general large language model's own powerful generation and understanding capabilities, a large language model with expected generation effects can be obtained without consuming a large amount of training samples and training time.

[0042] Based on any of the above embodiments, Figure 2 This is the second flow chart of the large model-based automated testing method provided by the present invention. Figure 2As shown, the method includes: starting, executing large model training, and determining whether the trained large model meets the training standards. If the training standards are not met, continue to adjust the model parameters; if the training standards are met, generate a test case workflow. In detail, based on the requirement text and the large model, generate initial test cases corresponding to the functions to be tested. Then, review the initial test cases, eliminate test cases that do not meet the requirements, and save the initial test cases that meet the requirements of the crossing river. Then, mark the saved initial test cases, classify the cases, and obtain the cases to be executed. Among them, the category tags include: attribute tags, priority tags, applicable stage tags, business scenario tags, and use case keyword tags.

[0043] Further, enter the automated test execution workflow, generate the test code to be executed corresponding to the test case to be executed based on the automated test code framework, target compilation language and large language model. Execute the test code to be executed in the test environment, and record and analyze the execution results. Then feedback the test results based on the large model, complete the test, and finally end.

[0044] Based on any of the above embodiments, Figure 3 is a schematic diagram of the structure of the large model-based automated testing device provided by the present invention, such as Figure 3 As shown, the device comprises: An acquisition unit 310 is used to acquire a user's test requirements; A case selection unit 320 determines a case to be executed based on the test requirements, the marking results of each test case in the test case library and the large language model; A code generation unit 330 generates a to-be-executed test code corresponding to the to-be-executed use case based on an automated test code framework, a target compiled language, and the large language model; The test execution unit 340 executes the test code to be executed in the test environment to obtain a test execution result.

[0045] The device provided by the embodiment of the present invention utilizes the powerful capabilities of a large model to determine the use cases to be executed, and generates the test code to be executed corresponding to the use cases to be executed based on the automated test code framework and the target compilation language through the large language model, thereby achieving efficient test case selection and test code writing, saving code debugging time, greatly improving the test response speed and test efficiency, and thus ensuring the quality of the product to be tested.

[0046] Based on any of the above embodiments, the device further includes a use case generation unit, and the use case generation unit is specifically used to: Get the requirement text of the function to be tested; Based on the requirement text and the large language model, generating an initial test case corresponding to the function to be tested; Based on the large language model, the initial test case is categorized and labeled to obtain a labeling result; The test case library is constructed based on the initial test case and the marking result.

[0047] Based on any of the above embodiments, the use case generation unit is specifically used for: Inputting the requirement text and the prototype diagram corresponding to the function to be tested into the large language model to extract key business information; The business-critical information is applied based on the large language model to generate an initial test case corresponding to the function to be tested.

[0048] Based on any of the above embodiments, the category tag includes: at least one of an attribute tag, a priority tag, an applicable stage tag, a business scenario tag, and a use case keyword tag.

[0049] Based on any of the above embodiments, the test execution unit includes a regression unit after the test execution unit, and the regression unit is specifically used to: Taking the test case with the test execution result of execution failure as the test case to be verified, and generating an associated test case based on the test case to be verified and the large language model; Based on the associated test cases and the test cases to be verified, regression test cases are obtained.

[0050] Based on any of the above embodiments, the device further includes a training unit, and the training unit is specifically used for: Obtain a general large language model and sample demand text; Inputting the sample requirement text and the generation instruction into the general large language model to output a sample test case based on the general large language model; The general large language model is fine-tuned based on the sample test case to obtain the large language model.

[0051] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute an automated testing method based on a large model, the method comprising: obtaining the test requirements of the user; determining the test case to be executed based on the test requirements, the marking results of each test case in the test case library and the large language model; generating the test code to be executed corresponding to the test case to be executed based on the automated test code framework, the target compiled language and the large language model; executing the test code to be executed in the test environment to obtain the test execution result.

[0052] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0053] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the large model-based automated testing method provided by the above methods, and the method includes: obtaining the user's test requirements; determining the test case to be executed based on the test requirements, the marking results of each test case in the test case library and the large language model; generating the test code to be executed corresponding to the test case to be executed based on the automated testing code framework, the target compiled language and the large language model; executing the test code to be executed in a test environment to obtain the test execution result.

[0054] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the large model-based automated testing method provided by the above-mentioned methods, the method comprising: obtaining the user's test requirements; determining the test case to be executed based on the test requirements, the marking results of each test case in the test case library and the large language model; generating the test code to be executed corresponding to the test case to be executed based on the automated testing code framework, the target compiled language and the large language model; executing the test code to be executed in a test environment to obtain the test execution result.

[0055] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0056] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0057] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An automated testing method based on a large model, It is characterized in that include: Obtain user testing requirements; Determine the test case to be executed based on the test requirements, the marking results of each test case in the test case library and the large language model; Based on the automated test code framework, the target compiled language and the large language model, generating the test code to be executed corresponding to the test case to be executed; The test code to be executed is executed in the test environment to obtain a test execution result.

2. According to the large model-based automated testing method of claim 1, It is characterized in that The steps of obtaining the test case library include: Get the requirement text of the function to be tested; Based on the requirement text and the large language model, generating an initial test case corresponding to the function to be tested; Based on the large language model, the initial test case is categorized and labeled to obtain a labeling result; The test case library is constructed based on the initial test case and the marking result.

3. According to the large model-based automated testing method of claim 2, It is characterized in that The generating, based on the requirement text and the large language model, an initial test case corresponding to the function to be tested comprises: Inputting the requirement text and the prototype diagram corresponding to the function to be tested into the large language model to extract key business information; The business-critical information is applied based on the large language model to generate an initial test case corresponding to the function to be tested.

4. The large model-based automated testing method according to claim 2, It is characterized in that The category tag includes at least one of an attribute tag, a priority tag, an applicable stage tag, a business scenario tag, and a use case keyword tag.

5. The large model-based automated testing method according to any one of claims 1 to 4, It is characterized in that The step of executing the test code to be executed in the test environment to obtain the test execution result further includes: Taking the test case with the test execution result of execution failure as the test case to be verified, and generating an associated test case based on the test case to be verified and the large language model; Based on the associated test cases and the test cases to be verified, regression test cases are obtained.

6. The large model-based automated testing method according to any one of claims 1 to 4, It is characterized in that The training steps of the large language model include: Obtain a general large language model and sample demand text; Inputting the sample requirement text and the generation instruction into the general large language model to output a sample test case based on the general large language model; The general large language model is fine-tuned based on the sample test case to obtain the large language model.

7. An automated testing device based on a large model, It is characterized in that include: Get the unit and the user's testing requirements; Select a use case unit, and determine a use case to be executed based on the test requirements, the marking results of each test case in the test case library, and the large language model; A code generation unit generates a to-be-executed test code corresponding to the to-be-executed use case based on an automated test code framework, a target compiled language, and the large language model; The test execution unit executes the test code to be executed in the test environment to obtain the test execution result.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the large model-based automated testing method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the large model-based automated testing method according to any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the large model-based automated testing method according to any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Industrial software test case generation method and device based on large language model

    CN119917410A

  • An industrial software test case generation method and device based on a large language model

    CN119917410B

  • Game task automatic testing method and device, equipment and storage medium

    CN119971509A

  • Test case generation method and device, electronic equipment, storage medium and program product

    CN120144454A