Test case generation method and device, equipment and storage medium

By filtering and transforming the original test data, and using the test case generation model to generate and correct test cases, the problems of inefficiency and insufficient accuracy of traditional methods are solved, and more efficient and accurate test case generation is achieved.

CN119902983APending Publication Date: 2025-04-29RUN TECH CO LTD BEIJING
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411987955.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

Traditional test case generation methods rely on manual writing, are inefficient and error-prone, and are easily affected by personal experience, resulting in low efficiency and accuracy of test case generation.

Method used

By obtaining the original test data, filtering and converting the data, inputting it into the test case generation model, generating intermediate test cases, and obtaining the target test cases through content correction, avoiding manual writing.

Benefits of technology

It improves the objectivity and efficiency of test case generation, reduces human errors, ensures that the content of test cases is more comprehensive and accurate, and improves the comprehensiveness and accuracy of tests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902983A_ABST
    Figure CN119902983A_ABST
Patent Text Reader

Abstract

The invention discloses a test case generation method and device, equipment and a storage medium, and belongs to the technical field of software test.The method comprises the steps that original test data are obtained, data filtering processing is conducted on the original test data, and first test data are obtained; performing data conversion on the first test data to obtain second test data; inputting the second test data into a test case generation model to obtain an intermediate test case; wherein the test case generation model is obtained by training and fine tuning an initial large model through sample test data; and performing content correction on the intermediate test case to obtain a target test case. According to the method, the test case does not need to be written manually, and the influence of human errors and personal experience is avoided, so that the objectivity of generation of the test case is improved, the generation efficiency and accuracy of the test case are improved, test scenes which are possibly ignored by people in the test case are supplemented, and the comprehensiveness and accuracy of the test are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software testing technology, and in particular to a test case generation method, device, equipment and storage medium. Background Art

[0002] In the software testing process, test case generation is a critical and time-consuming step. The traditional test case generation method relies on manual test case writing, that is, software testers analyze test technical documents to design test scenarios and write test cases, which is not only inefficient, but also prone to errors and easily affected by personal experience. Summary of the invention

[0003] The present invention provides a test case generation method, device, equipment and storage medium to improve the objectivity of test case generation and improve the generation efficiency and accuracy of test cases.

[0004] According to one aspect of the present invention, a test case generation method is provided, the method comprising:

[0005] Acquire original test data, and perform data filtering processing on the original test data to obtain first test data;

[0006] Performing data conversion on the first test data to obtain second test data;

[0007] Inputting the second test data into the test case generation model to obtain an intermediate test case; wherein the test case generation model is obtained by training and fine-tuning the initial large model through the sample test data;

[0008] Perform content correction on the intermediate test cases to obtain the target test cases.

[0009] According to another aspect of the present invention, there is provided a test case generating device, the device comprising:

[0010] A first test data determination module is used to obtain original test data and perform data filtering processing on the original test data to obtain first test data;

[0011] A second test data determination module, used for performing data conversion on the first test data to obtain second test data;

[0012] An intermediate test case determination module is used to input the second test data into a test case generation model to obtain an intermediate test case; wherein the test case generation model is obtained by training and fine-tuning an initial large model with sample test data;

[0013] The target test case determination module is used to perform content correction on the intermediate test case to obtain the target test case.

[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the test case generation method of any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the test case generation method of any embodiment of the present invention when executed.

[0019] According to another aspect of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the test case generating method according to any embodiment of the present invention is implemented.

[0020] The technical solution of the embodiment of the present invention obtains the original test data and performs data filtering processing on the original test data to obtain the first test data; performs data conversion on the first test data to obtain the second test data; inputs the second test data into the test case generation model to obtain the intermediate test case; wherein the test case generation model is obtained by training and fine-tuning the initial large model through sample test data; and performs content correction on the intermediate test case to obtain the target test case. The above technical scheme obtains the first test data by performing data filtering processing on the original test data, thereby improving the data quality of the first test data; then, the first test data is converted to obtain the second test data, thereby ensuring that the subsequent test case generation model can correctly read and process the second test data, thereby avoiding the failure of intermediate test case generation due to data format mismatch; then, the test case generation model is used to process the second test data to obtain intermediate test cases, without the need for manual test case writing, thereby avoiding the influence of human errors and personal experience, thereby improving the objectivity of test case generation, improving the efficiency and accuracy of test case generation, supplementing the test scenarios that may be overlooked by humans in the test cases, making the content of the generated test cases more comprehensive, thereby improving the comprehensiveness and accuracy of the test; then, the intermediate test cases are corrected in content, and the erroneous content in the intermediate test cases is corrected, so that the obtained target test cases are more accurate, thereby further improving the accuracy of the test cases.

[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0023] Figure 1 is a flowchart of a test case generation method provided according to Embodiment 1 of the present invention;

[0024] Figure 2 is a flowchart of a test case generation method provided in Embodiment 2 of the present invention;

[0025] Figure 3 is a structural schematic diagram of a test case generating device provided according to Embodiment 3 of the present invention;

[0026] Figure 4 It is a structural schematic diagram of an electronic device for implementing the test case generation method of an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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 should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "target", "intermediate", "first" and "second" in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] In addition, it should be noted that the collection, storage, use, processing, transmission, provision and disclosure of original test data and sample test data involved in the technical solution of the present invention are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0030] Embodiment 1

[0031] Figure 1 This is a flow chart of a test case generation method provided in the first embodiment of the present invention. This embodiment is applicable to the case of automatically generating test cases. The method can be executed by a test case generation device, which can be implemented in the form of hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:

[0032] S101: Acquire original test data, and perform data filtering on the original test data to obtain first test data.

[0033] Among them, the original test data refers to the unprocessed data used to generate test cases; optionally, the original test data includes test technical documents and multiple test points. Test technical documents refer to documents used to record and describe the entire software testing process. The multiple test points in the original test data can be determined based on actual business needs or the experience of technical personnel in this field. Optionally, the multiple test points in the original test data include but are not limited to performance test points, functional test points, compatibility test points, regression test points, and security test points.

[0034] The first test data refers to the data obtained after the original test data is processed by data filtering; optionally, the first test data includes a standardized document and a target test point. The standardized document refers to the document obtained after the test technical document is processed by data filtering. The target test point refers to the test point obtained after multiple test points are processed by data filtering.

[0035] Specifically, the original test data can be obtained from a preset database, and the meaningless word cleaning rule is used to filter the meaningless words (such as irrelevant characters, stop words, and special symbols) in the original test data to obtain the first test data. The meaningless word cleaning rule can be preset according to actual business needs, and the embodiment of the present invention does not specifically limit it.

[0036] Optionally, in order to perform targeted data filtering on the data in the original test data and improve the data quality of the test data, the original test data is filtered to obtain the first test data. It can also be: performing data filtering on multiple test points to obtain target test points; performing data filtering on test technical documents to obtain standardized documents.

[0037] Specifically, determine the test point filtering conditions; perform data filtering processing on multiple test points according to the test point filtering conditions to obtain target test points; determine the document filtering strategy; perform data filtering processing on the test technical document according to the document filtering strategy to obtain a standardized document. The test point filtering conditions refer to the conditions for filtering multiple test points in the original test data. The document filtering strategy refers to the strategy for filtering the test technical document.

[0038] More specifically, the test point filtering conditions can be determined based on the test point type, risk level and importance of multiple test points in the original test data; then, the test points that meet the test point filtering conditions are screened out from the multiple test points as target test points; the document filtering strategy is determined based on actual business needs. For example, if the actual business need is to remove duplicate text in the test technical document, the document filtering strategy can be a text duplication detection algorithm based on natural language processing technology; the document filtering strategy is used to perform data filtering on the test technical document to obtain a standardized document.

[0039] Optionally, in order to improve the data filtering efficiency of the test technical documents while retaining the technical details in the test technical documents, the test technical documents are subjected to data filtering to obtain standardized documents. Alternatively, MNBVC (Massive Never-ending BT Vast Chinese corpus) is used to perform data filtering on the test technical documents to obtain standardized documents.

[0040] S102: Perform data conversion on the first test data to obtain second test data.

[0041] The second test data refers to the data obtained after the first test data is converted. Specifically, the first test data can be case-converted, for example, all lowercase letters in the first test data are converted to uppercase letters, thereby obtaining the converted first test data; and the converted first test data is converted according to the input data format (for example, json format) required by the test case generation model to obtain the second test data.

[0042] S103: Input the second test data into the test case generation model to obtain an intermediate test case.

[0043] The test case generation model is obtained by training and fine-tuning the initial large model through sample test data. Sample test data refers to the test data required for training the initial large model. The initial large model refers to a deep learning model with strong semantic understanding and semantic generation capabilities; optionally, the initial large model can be determined according to actual business needs, for example, the initial large model can be Qwen (i.e. Tongyi Qianwen). Intermediate test cases refer to test cases generated by the test case generation model.

[0044] Specifically, the second test data is input into the test case generation model, and after being processed by the test case generation model, an intermediate test case is obtained.

[0045] S104: Correct the content of the intermediate test case to obtain a target test case.

[0046] The target test case refers to a test case obtained after the intermediate test case is corrected in content. Specifically, the software tester can correct the erroneous content in the intermediate test case to obtain the target test case.

[0047] The technical solution of the embodiment of the present invention obtains the original test data and performs data filtering processing on the original test data to obtain the first test data; performs data conversion on the first test data to obtain the second test data; inputs the second test data into the test case generation model to obtain the intermediate test case; wherein the test case generation model is obtained by training and fine-tuning the initial large model through sample test data; and performs content correction on the intermediate test case to obtain the target test case. The above technical scheme obtains the first test data by performing data filtering processing on the original test data, thereby improving the data quality of the first test data; then, the first test data is converted to obtain the second test data, thereby ensuring that the subsequent test case generation model can correctly read and process the second test data, thereby avoiding the failure of intermediate test case generation due to data format mismatch; then, the test case generation model is used to process the second test data to obtain intermediate test cases, without the need for manual test case writing, thereby avoiding the influence of human errors and personal experience, thereby improving the objectivity of test case generation, improving the efficiency and accuracy of test case generation, supplementing the test scenarios that may be overlooked by humans in the test cases, making the content of the generated test cases more comprehensive, thereby improving the comprehensiveness and accuracy of the test; then, the intermediate test cases are corrected in content, and the erroneous content in the intermediate test cases is corrected, so that the obtained target test cases are more accurate, thereby further improving the accuracy of the test cases.

[0048] Embodiment 2

[0049] Figure 2This is a flow chart of a test case generation method provided in the second embodiment of the present invention. Based on the above embodiment, this embodiment provides a method for determining a test case generation model. It should be noted that for the parts not described in detail in the embodiment of the present invention, reference can be made to the relevant descriptions of other embodiments.

[0050] like Figure 2 As shown, the method includes:

[0051] S201: Acquire sample test data, and perform data filtering processing on the sample test data to obtain first sample test data.

[0052] The sample test data refers to the test data required for training the initial large model; optionally, the sample test data includes a sample test technical document and a sample test point. The sample test technical document refers to the test technical document in the sample test data. The sample test point refers to the test point in the sample test data. The first sample test data refers to the data obtained after the sample test data is filtered.

[0053] Specifically, the test technical documents, test points and test cases of historical software test projects can be used as sample test data; and a preset data filtering algorithm is used to perform data filtering processing on the sample test data to filter out duplicate data, abnormal data and incomplete data in the sample test data, thereby obtaining the first sample test data.

[0054] Optionally, data filtering is performed on the sample test data to obtain first sample test data, which may specifically include: data filtering is performed on sample test points in the sample test data to obtain screened sample test points; data filtering is performed on sample test technical documents in the sample test data to obtain filtered sample test technical documents.

[0055] S202: Perform data conversion on the first sample test data to obtain second sample test data.

[0056] The second sample test data refers to data obtained after data conversion of the first sample test data. Specifically, the first sample test data can be converted according to the input data format required by the initial large model to obtain the second sample test data.

[0057] S203. According to the second sample test data, the initial large model is trained and fine-tuned through the model fine-tuning framework to obtain a test case generation model.

[0058] Among them, the model fine-tuning framework refers to a framework used to fine-tune the initial large model; optionally, the model fine-tuning framework can be pre-set according to actual business needs. For example, the model fine-tuning framework can be LLaMA-Factory (Large Language Model Factory), which is not specifically limited in the embodiments of the present invention.

[0059] Specifically, the second sample test data and the initial large model are loaded into the model fine-tuning framework, and the model parameters of the initial large model (such as training batch size, number of trainings, number of gradient accumulation steps and learning rate, etc.) are set in the model setting interface provided by the model fine-tuning framework; then, the model fine-tuning mode and the parameters of the model fine-tuning mode are set in the model setting interface, for example, the model fine-tuning mode is set to LoRA (Low-Rank Adaptation); then, the training of the initial large model is started to obtain the model training loss; according to the model training loss, the parameters of the model fine-tuning mode or the model parameters of the initial large model are adjusted in the model setting interface until the model training loss is stabilized within the preset range, and the training of the initial large model is stopped to obtain the test case generation model. Among them, the preset range can be pre-set according to actual business needs or the experience of technicians in this field, and the present invention does not specifically limit it.

[0060] S204: Acquire original test data, and perform data filtering processing on the original test data to obtain first test data.

[0061] S205: Perform data conversion on the first test data to obtain second test data.

[0062] S206. Input the second test data into the test case generation model to obtain an intermediate test case; wherein the test case generation model is obtained by training and fine-tuning the initial large model through the sample test data.

[0063] S207: Correct the content of the intermediate test case to obtain a target test case.

[0064] The technical solution of the embodiment of the present invention obtains sample test data and performs data filtering processing on the sample test data to obtain first sample test data; performs data conversion on the first sample test data to obtain second sample test data; according to the second sample test data, trains and fine-tunes the initial large model through the model fine-tuning framework to obtain a test case generation model; obtains original test data and performs data filtering processing on the original test data to obtain first test data; performs data conversion on the first test data to obtain second test data; inputs the second test data into the test case generation model to obtain an intermediate test case; performs content correction on the intermediate test case to obtain a target test case. The above technical scheme obtains a test case generation model after training and fine-tuning the initial large model through sample test data, and provides a model for automatically generating test cases; then, by performing data filtering processing on the original test data, first test data is obtained, thereby improving the data quality of the first test data; then, data conversion is performed on the first test data to obtain second test data, thereby ensuring that the subsequent test case generation model can correctly read and process the second test data, thereby avoiding the failure of intermediate test case generation due to data format mismatch; then, the test case generation model is used to process the second test data to obtain intermediate test cases, without the need for manual test case writing, thereby avoiding the influence of human errors and personal experience, thereby improving the objectivity of test case generation, improving the efficiency and accuracy of test case generation, supplementing the test scenarios that may be overlooked by humans in the test cases, making the content of the generated test cases more comprehensive, thereby improving the comprehensiveness and accuracy of the test; then, the intermediate test cases are corrected in content, and the erroneous content in the intermediate test cases is corrected, so that the obtained target test cases are more accurate, thereby further improving the accuracy of the test cases.

[0065] Embodiment 3

[0066] Figure 3 This is a schematic diagram of the structure of a test case generation device provided in the third embodiment of the present invention. This embodiment is applicable to the case of automatically generating test cases. The device can be implemented in the form of hardware and / or software and can be configured in an electronic device. Figure 3 As shown, the device comprises:

[0067] The first test data determination module 301 is used to obtain original test data and perform data filtering on the original test data to obtain first test data;

[0068] A second test data determination module 302, configured to perform data conversion on the first test data to obtain second test data;

[0069] The intermediate test case determination module 303 is used to input the second test data into the test case generation model to obtain the intermediate test case; wherein the test case generation model is obtained by training and fine-tuning the initial large model through the sample test data;

[0070] The target test case determination module 304 is used to perform content correction on the intermediate test case to obtain the target test case.

[0071] The technical solution of the embodiment of the present invention obtains the original test data and performs data filtering processing on the original test data to obtain the first test data; performs data conversion on the first test data to obtain the second test data; inputs the second test data into the test case generation model to obtain the intermediate test case; wherein the test case generation model is obtained by training and fine-tuning the initial large model through sample test data; and performs content correction on the intermediate test case to obtain the target test case. The above technical scheme obtains the first test data by performing data filtering processing on the original test data, thereby improving the data quality of the first test data; then, the first test data is converted to obtain the second test data, thereby ensuring that the subsequent test case generation model can correctly read and process the second test data, thereby avoiding the failure of intermediate test case generation due to data format mismatch; then, the test case generation model is used to process the second test data to obtain intermediate test cases, without the need for manual test case writing, thereby avoiding the influence of human errors and personal experience, thereby improving the objectivity of test case generation, improving the efficiency and accuracy of test case generation, supplementing the test scenarios that may be overlooked by humans in the test cases, making the content of the generated test cases more comprehensive, thereby improving the comprehensiveness and accuracy of the test; then, the intermediate test cases are corrected in content, and the erroneous content in the intermediate test cases is corrected, so that the obtained target test cases are more accurate, thereby further improving the accuracy of the test cases.

[0072] Optionally, the original test data includes a test technical document and a plurality of test points; the first test data includes a standardized document and a target test point;

[0073] The first test data determination module 301 includes:

[0074] A target test point determination unit is used to perform data filtering processing on multiple test points to obtain a target test point;

[0075] The standardized document determination unit is used to perform data filtering processing on the test technical document to obtain a standardized document.

[0076] Optionally, the target test point determination unit is specifically used to:

[0077] Determine the test point filtering conditions;

[0078] According to the test point filtering conditions, data filtering processing is performed on multiple test points to obtain target test points.

[0079] Optionally, a standardized document determination unit is used to:

[0080] Determine document filtering strategy;

[0081] According to the document filtering strategy, the test technical documents are filtered to obtain standardized documents.

[0082] Optionally, the device further includes a test case generation model determination module, wherein the test case generation model determination module is specifically used to:

[0083] Acquire sample test data, and perform data filtering processing on the sample test data to obtain first sample test data;

[0084] Performing data conversion on the first sample test data to obtain second sample test data;

[0085] According to the second sample test data, the initial large model is trained and fine-tuned through the model fine-tuning framework to obtain a test case generation model.

[0086] The test case generation device provided in the embodiment of the present invention can execute the test case generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing each test case generation method.

[0087] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.

[0088] Embodiment 4

[0089] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0090] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0091] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0092] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a test case generation method.

[0093] In some embodiments, the test case generation method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the test case generation method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the test case generation method in any other appropriate manner (e.g., by means of firmware).

[0094] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0095] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0096] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0097] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0098] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0099] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0100] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0101] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A test case generation method, characterized in that: include: Acquire original test data, and perform data filtering processing on the original test data to obtain first test data; Performing data conversion on the first test data to obtain second test data; Inputting the second test data into a test case generation model to obtain an intermediate test case; wherein the test case generation model is obtained by training and fine-tuning an initial large model with sample test data; Content correction is performed on the intermediate test case to obtain a target test case.

2. The method according to claim 1, characterized in that The original test data includes test technical documents and multiple test points; The first test data includes standardized documents and target test points; Performing data filtering processing on the original test data to obtain first test data includes: Performing data filtering processing on the multiple test points to obtain target test points; The test technical document is subjected to data filtering processing to obtain a standardized document.

3. The method according to claim 2, characterized in that The performing data filtering processing on the plurality of test points to obtain a target test point includes: Determine the test point filtering conditions; According to the test point filtering condition, data filtering processing is performed on the multiple test points to obtain target test points.

4. The method according to claim 2, characterized in that: The data filtering process of the test technical document to obtain a standardized document includes: Determine document filtering strategy; According to the document filtering strategy, data filtering is performed on the test technical document to obtain a standardized document.

5. The method according to claim 1, characterized in that The determination process of the test case generation model is as follows: Acquire sample test data, and perform data filtering processing on the sample test data to obtain first sample test data; Performing data conversion on the first sample test data to obtain second sample test data; According to the second sample test data, the initial large model is trained and fine-tuned through the model fine-tuning framework to obtain a test case generation model.

6. A test case generating device, characterized in that: include: A first test data determination module, used to obtain original test data and perform data filtering processing on the original test data to obtain first test data; A second test data determination module, used for performing data conversion on the first test data to obtain second test data; An intermediate test case determination module is used to input the second test data into a test case generation model to obtain an intermediate test case; wherein the test case generation model is obtained by training and fine-tuning an initial large model with sample test data; The target test case determination module is used to perform content correction on the intermediate test case to obtain the target test case.

7. The device according to claim 6, characterized in that The original test data includes test technical documents and multiple test points; The first test data includes standardized documents and target test points; The first test data determination module comprises: A target test point determination unit, configured to perform data filtering processing on the plurality of test points to obtain a target test point; The standardized document determination unit is used to perform data filtering processing on the test technical document to obtain a standardized document.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the test case generating method according to any one of claims 1 to 5.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the test case generation method according to any one of claims 1 to 5 when executed.

10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the test case generating method according to any one of claims 1 to 5 is implemented.

Citation Information

Cited By

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

    CN121560746A