CN118193378A - Software testing method and device based on intelligent language model - Google Patents
Software testing method and device based on intelligent language model Download PDFInfo
- Publication number
- CN118193378A CN118193378A CN202410307564.3A CN202410307564A CN118193378A CN 118193378 A CN118193378 A CN 118193378A CN 202410307564 A CN202410307564 A CN 202410307564A CN 118193378 A CN118193378 A CN 118193378A
- Authority
- CN
- China
- Prior art keywords
- test
- language model
- intelligent language
- test case
- software
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 72
- 238000013522 software testing Methods 0.000 title claims abstract description 66
- 238000012360 testing method Methods 0.000 claims abstract description 442
- 238000012549 training Methods 0.000 claims abstract description 26
- 230000015654 memory Effects 0.000 claims description 36
- 230000008569 process Effects 0.000 claims description 11
- 238000013135 deep learning Methods 0.000 claims description 5
- 230000006870 function Effects 0.000 description 8
- 238000013515 script Methods 0.000 description 7
- 238000011056 performance test Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 4
- 238000011990 functional testing Methods 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 235000019800 disodium phosphate Nutrition 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000011076 safety test Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- KLDZYURQCUYZBL-UHFFFAOYSA-N 2-[3-[(2-hydroxyphenyl)methylideneamino]propyliminomethyl]phenol Chemical compound OC1=CC=CC=C1C=NCCCN=CC1=CC=CC=C1O KLDZYURQCUYZBL-UHFFFAOYSA-N 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013136 deep learning model Methods 0.000 description 1
- 201000001098 delayed sleep phase syndrome Diseases 0.000 description 1
- 208000033921 delayed sleep phase type circadian rhythm sleep disease Diseases 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000012634 fragment Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003058 natural language processing Methods 0.000 description 1
- 230000035515 penetration Effects 0.000 description 1
- 238000004549 pulsed laser deposition Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention relates to a software testing method and device based on an intelligent language model, comprising the following steps: classifying the reference test cases based on a preset test case classification criterion to obtain reference test cases of a plurality of test types; acquiring automatic test case data of the reference test case of each test type, and acquiring an automatic test case data set corresponding to each test type; training the intelligent language model through each automatic test case data set to enable the intelligent language model to successfully identify a test scheme of each test type; and performing software testing on the software to be tested based on the target intelligent language model which is successfully trained. Therefore, the intelligent language model is trained through a large number of test cases to generate automatic test cases, so that when a corresponding test device receives a test signal, a corresponding test case file is obtained, software testing is carried out according to the test case file, the personnel cost can be reduced, and the efficiency of the software testing is improved.
Description
Technical Field
The embodiment of the invention relates to the technical field of software testing, in particular to a software testing method and device based on an intelligent language model.
Background
At present, during the test of software products, manual test, script writing or automatic frame test are generally directly carried out, but the manual test has higher labor cost and slower efficiency, and the influence of the outside on testers is larger; script or automated testing has higher professional requirements on testers, and has the problems of scarcity of testers, high personnel cost and the like.
Disclosure of Invention
In view of the above, in order to solve the above technical problems or some technical problems, an embodiment of the present invention provides a software testing method and apparatus based on an intelligent language model.
In a first aspect, an embodiment of the present invention provides a software testing method based on an intelligent language model, including:
classifying the reference test cases based on a preset test case classification criterion to obtain reference test cases of a plurality of test types;
acquiring automatic test case data of the reference test case of each test type, and acquiring an automatic test case data set corresponding to each test type;
Training an intelligent language model through each automatic test case data set to enable the intelligent language model to successfully identify a test scheme of each test type;
And performing software testing on the software to be tested based on the target intelligent language model which is successfully trained.
In one possible embodiment, the method further comprises:
acquiring a test task and identifying a target test type corresponding to a reference test case carried in the test task;
invoking the target intelligent language model based on the target test type to enable the target intelligent language model to generate a plurality of automated test cases based on the target test type;
and performing software testing on the software to be tested based on the plurality of automatic test cases.
In one possible embodiment, the method further comprises:
Presetting an automatic test case catalog;
Updating the automatic test case catalog after the target intelligent language model generates a plurality of automatic test cases based on the target test type;
Traversing the automatic test case catalog after the identification update, and starting a test execution signal;
and carrying out software testing on the software to be tested through the plurality of automatic test cases based on the test execution signals.
In one possible embodiment, the method further comprises:
Recording test information and test results of each test step in the software test process;
and generating a test report based on the test information and the test result.
In one possible embodiment, the method further comprises:
carrying out key test case data identification on each automatic test case data set by adopting a natural language understanding and deep learning method;
the intelligent language model is trained based on the identified key test case data.
In one possible embodiment, the method further comprises:
randomly selecting a reference test case from each test type to test the trained intelligent language model;
After the trained intelligent language model can accurately identify the test scheme corresponding to the reference test case, the intelligent language model is determined to be successfully trained.
In one possible embodiment, the method further comprises:
and deploying the intelligent language model successfully trained into a test task management system.
In a second aspect, an embodiment of the present invention provides a software testing apparatus based on an intelligent language model, including:
the classification module is used for classifying the reference test cases based on a preset test case classification criterion to obtain reference test cases of a plurality of test types;
The acquisition module is used for acquiring the automatic test case data of the reference test case of each test type and obtaining an automatic test case data set corresponding to each test type;
The training module is used for training the intelligent language model through each automatic test case data set so that the intelligent language model successfully identifies the test scheme of each test type;
and the testing module is used for carrying out software testing on the software to be tested based on the target intelligent language model which is successfully trained.
In a third aspect, an embodiment of the present invention provides a computer apparatus, including: the processor is used for executing the software testing program based on the intelligent language model stored in the memory so as to realize the software testing method based on the intelligent language model in the first aspect.
In a fourth aspect, an embodiment of the present invention provides a storage medium, including: the storage medium stores one or more programs executable by one or more processors to implement the intelligent language model-based software testing method described in the first aspect above.
According to the software testing scheme based on the intelligent language model, the standard testing cases are classified based on the preset testing case classification criteria, so that the standard testing cases with multiple testing types are obtained; acquiring automatic test case data of the reference test case of each test type, and acquiring an automatic test case data set corresponding to each test type; training an intelligent language model through each automatic test case data set to enable the intelligent language model to successfully identify a test scheme of each test type; and performing software testing on the software to be tested based on the target intelligent language model which is successfully trained. Compared with manual testing, script writing or automatic frame testing, the method has the advantages of high labor cost, low efficiency and high professional requirements. According to the scheme, the intelligent language model is trained through a large number of test cases to generate automatic test cases, so that when a corresponding test device receives a test signal, a corresponding test case file is obtained, software testing is carried out according to the test case file, the personnel cost can be reduced, the efficiency of the software testing is improved, and the professional requirements are reduced.
Drawings
FIG. 1 is a schematic flow chart of a software testing method based on an intelligent language model according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method for testing software based on an intelligent language model according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a software testing device based on an intelligent language model according to an embodiment of the present invention;
Fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
For the purpose of facilitating an understanding of the embodiments of the present invention, reference will now be made to the following description of specific embodiments, taken in conjunction with the accompanying drawings, which are not intended to limit the embodiments of the invention.
The first embodiment of the application provides a software testing method based on an intelligent language model. Fig. 1 is a schematic flow chart of a software testing method based on an intelligent language model according to an embodiment of the present application, as shown in fig. 1, the method specifically includes:
s11, classifying the reference test cases based on a preset test case classification criterion to obtain the reference test cases of a plurality of test types.
In the embodiment of the present invention, a detailed description is made with reference to a flowchart of a software testing method based on an intelligent language model shown in fig. 2: firstly, a tester can input a preset test case classification criterion into a system, and the standard test case is classified through system analysis. The preset test case classification criteria such as business functions, business processes and the like can be adjusted and expanded according to actual project requirements; the benchmark test cases may be some typical test cases.
S12, acquiring the automatic test case data of the reference test case of each test type, and obtaining an automatic test case data set corresponding to each test type.
In order for the intelligent language model to fully understand the software test case contents and test steps, a test team needs to prepare a large amount of automated test case data for each test type obtained above, and train the intelligent language model by using the automated test case data set.
S13, training the intelligent language model through each automatic test case data set to enable the intelligent language model to successfully identify a test scheme of each test type.
The intelligent language model is trained through each automatic test case data set, and the training process can adopt the existing natural language processing technology and deep learning models such as BERT, GPT and the like. Specifically, key test case data identification is performed on each automated test case data set, and the intelligent language model is trained based on the identified key test case data, so that the intelligent language model successfully identifies a test scheme of each test type, wherein the test scheme comprises, but is not limited to, test steps of a software system.
Randomly selecting a reference test case from each test type to test the trained intelligent language model; after the trained intelligent language model can accurately identify the test scheme corresponding to the reference test case, the intelligent language model is determined to be successfully trained. Thus, the successfully trained target intelligent language model can generate automatic test cases with different test types and meet different service requirements. And deploying the successfully trained target intelligent language model into a test task management system.
S14, performing software testing on the software to be tested based on the target intelligent language model which is successfully trained.
Acquiring a test task, wherein a test task management system can automatically start a corresponding test device according to a test requirement and a set trigger condition, and identify a target test type corresponding to a reference test case carried in the test task; calling a target intelligent language model based on the target test type so that the target intelligent language model generates a plurality of automatic test cases based on the target test type, wherein the automatic test cases can be code fragments operated aiming at different platforms or systems and are used for automatically testing software; and performing software testing on the software to be tested based on a plurality of automatic test cases.
Specifically, an automatic test case catalog is preset; updating an automatic test case catalog after the target intelligent language model generates a plurality of automatic test cases based on the target test type; traversing the automatic test case catalog after the identification update, and starting a test execution signal, wherein the method can comprise starting a corresponding test execution framework, configuring a test environment and the like; and performing software testing on the software to be tested through a plurality of automatic test cases (executing the automatic test case scripts) based on the test execution signals.
Further, recording the test information and test results of each test step in the software test process; a test report is generated based on the test information and the test results. The test report mainly comprises information such as test coverage rate, test passing rate, problem list and the like, and is used for a test team and a development team to refer to and improve software quality.
It should be noted that, the tester may enter the test task execution record to check the execution progress, execution status, test case passing rate and other information of the current test task. After the test task is executed, a tester can enter the test case execution record to check the execution time length, the execution result, the execution data and other information of each test step of the test case, and can also enter an email box or a test report list to open a test report of the test task which is just executed.
According to the software testing method based on the intelligent language model, the standard test cases are classified based on the preset test case classification criteria, so that the standard test cases of a plurality of test types are obtained; acquiring automatic test case data of the reference test case of each test type, and acquiring an automatic test case data set corresponding to each test type; training an intelligent language model through each automatic test case data set to enable the intelligent language model to successfully identify a test scheme of each test type; and performing software testing on the software to be tested based on the target intelligent language model which is successfully trained. Compared with manual testing, script writing or automatic frame testing, the method has the advantages of high labor cost, low efficiency and high professional requirements. According to the method, the intelligent language model is trained through a large number of test cases to generate automatic test cases, so that when a corresponding test device receives a test signal, a corresponding test case file is obtained, software testing is carried out according to the test case file, the personnel cost can be reduced, the efficiency of the software testing is improved, and the professional requirements are reduced.
The second embodiment of the application provides a software testing method based on an intelligent language model. Specifically, the standard test cases are classified according to a preset test case classification criterion. The test cases can cover different test scenarios and requirements, including functional tests, performance tests, security tests, and the like. And obtaining the reference test case sets of a plurality of test types through classification. And acquiring the automation test case data of the reference test case of each test type. Such automated test case data may include input data, expected output, etc. information for driving automated test execution. Through this step, an automated test case dataset for each test type is obtained. Training each automated test case dataset using an intelligent language model to enable the model to successfully identify and understand the test plan for each test type. This involves using an automated test case dataset as training data, using an iterative training process to improve the performance and accuracy of the model. The intelligent language model is successfully trained and can accurately identify the test scheme of each test type, so that the intelligent language model can be applied to the software to be tested. And comparing the output of the model with an expected result, and performing software testing. This may help to find potential problems, errors or anomalies, and provide an assessment of software quality and stability. By the intelligent language model-based software testing method, test cases can be automatically executed, testing efficiency and accuracy are improved, and problems are found and solved in the software development process. Meanwhile, by training the intelligent language model, the performance and the adaptability of the model can be gradually improved so as to adapt to the continuously changing test requirements and scenes.
For example: an e-commerce web site is tested and a software testing method based on an intelligent language model is used. Classifying the reference test cases based on a preset test case classification criterion: test cases are classified into functional tests, performance tests, and security tests. The function test focuses on whether each function of the website runs normally, the performance test focuses on response time and load capacity of the website, and the safety test focuses on a data protection and protection mechanism of the website. Acquiring automated test case data of a reference test case of each test type: for function testing, test scripts are written to simulate the user's shopping on a website, adding to a shopping cart, placing orders, etc., and to verify that the functions are functioning as intended. For performance test, a load test case is designed, multiple users are simulated to access websites at the same time, and performance performances of the load test case under different loads are tested. For security testing, scripts for penetration testing of security vulnerabilities of websites are written to test the security of websites. Training the intelligent language model through each automated test case dataset: using these automated test case data as training data, it is input into an intelligent language model that trains the model to identify and understand test scenarios for different test types. Through the iterative training process, the accuracy and performance of the model are improved.
Software testing is carried out on the software to be tested based on the target intelligent language model which is successfully trained: once the intelligent language model is successfully trained, the test scheme of each test type can be accurately identified and applied to the e-commerce website to be tested. And comparing the model output with an expected result, and performing functional test, performance test and safety test. This may help discover potential problems, errors, or anomalies and provide an assessment of website quality and stability. By the intelligent language model-based software testing method, various test cases can be automatically executed, and testing efficiency and accuracy are improved. Meanwhile, by iteratively training the intelligent language model, the performance and the adaptability of the model can be gradually improved so as to adapt to the continuously-changing test requirements
The third embodiment of the application provides a software testing device based on an intelligent language model. Fig. 3 is a schematic structural diagram of a software testing device based on an intelligent language model according to an embodiment of the present application, which specifically includes:
the classification module 301 is configured to classify the reference test cases based on a preset test case classification criterion, so as to obtain reference test cases of multiple test types;
The acquiring module 302 is configured to acquire automated test case data of a reference test case of each test type, and obtain an automated test case data set corresponding to each test type;
The training module 303 is configured to train the intelligent language model through each automated test case data set, so that the intelligent language model successfully identifies a test scheme of each test type;
And the testing module 304 is used for performing software testing on the software to be tested based on the target intelligent language model which is successfully trained.
In one possible implementation manner, the training module 303 is specifically configured to perform key test case data identification on each of the automated test case data sets by using a natural language understanding and deep learning method; the intelligent language model is trained based on the identified key test case data.
In a possible implementation manner, the training module 303 is further configured to arbitrarily select a reference test case from each test type to test the trained intelligent language model; after the trained intelligent language model can accurately identify the test scheme corresponding to the reference test case, the intelligent language model is determined to be successfully trained.
In one possible implementation, the training module 303 is further configured to deploy the intelligent language model that is successfully trained into a test task management system.
In a possible implementation manner, the test module 304 is specifically configured to obtain a test task and identify a target test type corresponding to a reference test case carried in the test task; invoking the target intelligent language model based on the target test type to enable the target intelligent language model to generate a plurality of automated test cases based on the target test type; and performing software testing on the software to be tested based on the plurality of automatic test cases.
In one possible implementation manner, the test module 304 is further configured to preset an automation test case catalog; updating the automatic test case catalog after the target intelligent language model generates a plurality of automatic test cases based on the target test type; traversing the automatic test case catalog after the identification update, and starting a test execution signal; and carrying out software testing on the software to be tested through the plurality of automatic test cases based on the test execution signals.
In a possible implementation manner, the test module 304 is further configured to record test information and test results of each test step in the software test process; and generating a test report based on the test information and the test result.
The software testing device based on the intelligent language model provided in this embodiment may be the software testing device based on the intelligent language model shown in fig. 3, and may perform all steps of the software testing method based on the intelligent language model shown in fig. 1-2, so as to achieve the technical effects of the software testing method based on the intelligent language model shown in fig. 1-2, and specifically please refer to the related description of fig. 1-2, which is not repeated herein for brevity.
Fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present invention, and the computer device 400 shown in fig. 4 includes: at least one processor 401, memory 402, at least one network interface 404, and other user interfaces 403. The various components in computer device 400 are coupled together by bus system 405. It is understood that the bus system 405 is used to enable connected communications between these components. The bus system 405 includes a power bus, a control bus, and a status signal bus in addition to a data bus. But for clarity of illustration the various buses are labeled as bus system 405 in fig. 4.
The user interface 403 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, a trackball, a touch pad, or a touch screen, etc.).
It will be appreciated that the memory 402 in embodiments of the invention can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM) which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available, such as static random access memory (STATIC RAM, SRAM), dynamic random access memory (DYNAMIC RAM, DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate Synchronous dynamic random access memory (Double DATA RATE SDRAM, DDRSDRAM), enhanced Synchronous dynamic random access memory (ENHANCED SDRAM, ESDRAM), synchronous link dynamic random access memory (SYNCH LINK DRAM, SLDRAM), and Direct memory bus random access memory (DRRAM). The memory 402 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some implementations, the memory 402 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 4021 and application programs 4022.
The operating system 4021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application programs 4022 include various application programs such as a media player (MEDIA PLAYER), a Browser (Browser), and the like for implementing various application services. A program for implementing the method of the embodiment of the present invention may be included in the application program 4022.
In the embodiment of the present invention, the processor 401 is configured to execute the method steps provided in the method embodiments by calling a program or an instruction stored in the memory 402, specifically, a program or an instruction stored in the application program 4022, for example, including:
Classifying the reference test cases based on a preset test case classification criterion to obtain reference test cases of a plurality of test types; acquiring automatic test case data of the reference test case of each test type, and acquiring an automatic test case data set corresponding to each test type; training an intelligent language model through each automatic test case data set to enable the intelligent language model to successfully identify a test scheme of each test type; and performing software testing on the software to be tested based on the target intelligent language model which is successfully trained.
In one possible implementation mode, a test task is obtained, and a target test type corresponding to a reference test case carried in the test task is identified; invoking the target intelligent language model based on the target test type to enable the target intelligent language model to generate a plurality of automated test cases based on the target test type; and performing software testing on the software to be tested based on the plurality of automatic test cases.
In one possible implementation, an automated test case catalog is preset; updating the automatic test case catalog after the target intelligent language model generates a plurality of automatic test cases based on the target test type; traversing the automatic test case catalog after the identification update, and starting a test execution signal; and carrying out software testing on the software to be tested through the plurality of automatic test cases based on the test execution signals.
In one possible implementation, test information and test results of each test step in the software test process are recorded; and generating a test report based on the test information and the test result.
In one possible implementation manner, a natural language understanding and deep learning method is adopted to identify key test case data of each automatic test case data set; the intelligent language model is trained based on the identified key test case data.
In one possible implementation manner, a reference test case is arbitrarily selected from each test type to test the trained intelligent language model; after the trained intelligent language model can accurately identify the test scheme corresponding to the reference test case, the intelligent language model is determined to be successfully trained.
In one possible implementation, the intelligent language model that is successfully trained is deployed into a test task management system.
The method disclosed in the above embodiment of the present invention may be applied to the processor 401 or implemented by the processor 401. The processor 401 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 401 or by instructions in the form of software. The Processor 401 described above may be a general purpose Processor, a digital signal Processor (DIGITAL SIGNAL Processor, DSP), an Application SPECIFIC INTEGRATED Circuit (ASIC), an off-the-shelf programmable gate array (Field Programmable GATE ARRAY, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software elements in a decoding processor. The software elements may be located in a random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 402, and the processor 401 reads the information in the memory 402 and, in combination with its hardware, performs the steps of the above method.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application SPECIFIC INTEGRATED Circuits (ASICs), digital signal processors (DIGITAL SIGNAL Processing, DSPs), digital signal Processing devices (DSPDEVICE, DSPD), programmable logic devices (Programmable Logic Device, PLDs), field-Programmable gate arrays (Field-Programmable GATE ARRAY, FPGA), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units for performing the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units that perform the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The computer device provided in this embodiment may be a computer device as shown in fig. 4, and may perform all the steps of the software testing method based on the intelligent language model as shown in fig. 1-2, so as to achieve the technical effects of the software testing method based on the intelligent language model as shown in fig. 1-2, and the detailed description will be omitted herein for brevity.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium here stores one or more programs. Wherein the storage medium may comprise volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid state disk; the memory may also comprise a combination of the above types of memories.
When one or more programs in the storage medium are executable by one or more processors, the method for testing the software based on the intelligent language model, which is executed on the computer equipment side, is realized.
The processor is used for executing the software testing program based on the intelligent language model stored in the memory to realize the following steps of the software testing method based on the intelligent language model executed on the computer equipment side:
Classifying the reference test cases based on a preset test case classification criterion to obtain reference test cases of a plurality of test types; acquiring automatic test case data of the reference test case of each test type, and acquiring an automatic test case data set corresponding to each test type; training an intelligent language model through each automatic test case data set to enable the intelligent language model to successfully identify a test scheme of each test type; and performing software testing on the software to be tested based on the target intelligent language model which is successfully trained.
In one possible implementation mode, a test task is obtained, and a target test type corresponding to a reference test case carried in the test task is identified; invoking the target intelligent language model based on the target test type to enable the target intelligent language model to generate a plurality of automated test cases based on the target test type; and performing software testing on the software to be tested based on the plurality of automatic test cases.
In one possible implementation, an automated test case catalog is preset; updating the automatic test case catalog after the target intelligent language model generates a plurality of automatic test cases based on the target test type; traversing the automatic test case catalog after the identification update, and starting a test execution signal; and carrying out software testing on the software to be tested through the plurality of automatic test cases based on the test execution signals.
In one possible implementation, test information and test results of each test step in the software test process are recorded; and generating a test report based on the test information and the test result.
In one possible implementation manner, a natural language understanding and deep learning method is adopted to identify key test case data of each automatic test case data set; the intelligent language model is trained based on the identified key test case data.
In one possible implementation manner, a reference test case is arbitrarily selected from each test type to test the trained intelligent language model; after the trained intelligent language model can accurately identify the test scheme corresponding to the reference test case, the intelligent language model is determined to be successfully trained.
In one possible implementation, the intelligent language model that is successfully trained is deployed into a test task management system.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of function in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.
Claims (10)
1. A software testing method based on an intelligent language model, comprising:
classifying the reference test cases based on a preset test case classification criterion to obtain reference test cases of a plurality of test types;
acquiring automatic test case data of the reference test case of each test type, and acquiring an automatic test case data set corresponding to each test type;
Training an intelligent language model through each automatic test case data set to enable the intelligent language model to successfully identify a test scheme of each test type;
And performing software testing on the software to be tested based on the target intelligent language model which is successfully trained.
2. The method of claim 1, wherein the software testing of the software to be tested based on the successfully trained target intelligent language model comprises:
acquiring a test task and identifying a target test type corresponding to a reference test case carried in the test task;
invoking the target intelligent language model based on the target test type to enable the target intelligent language model to generate a plurality of automated test cases based on the target test type;
and performing software testing on the software to be tested based on the plurality of automatic test cases.
3. The method of claim 2, wherein the software testing the software under test based on the plurality of automated test cases comprises:
Presetting an automatic test case catalog;
Updating the automatic test case catalog after the target intelligent language model generates a plurality of automatic test cases based on the target test type;
Traversing the automatic test case catalog after the identification update, and starting a test execution signal;
and carrying out software testing on the software to be tested through the plurality of automatic test cases based on the test execution signals.
4. A method according to claim 3, characterized in that the method further comprises:
Recording test information and test results of each test step in the software test process;
and generating a test report based on the test information and the test result.
5. The method of claim 1, wherein training the intelligent language model with each automated test case dataset to successfully identify test scenarios for each test type comprises:
carrying out key test case data identification on each automatic test case data set by adopting a natural language understanding and deep learning method;
the intelligent language model is trained based on the identified key test case data.
6. The method of claim 5, wherein the method further comprises:
randomly selecting a reference test case from each test type to test the trained intelligent language model;
After the trained intelligent language model can accurately identify the test scheme corresponding to the reference test case, the intelligent language model is determined to be successfully trained.
7. The method of claim 6, wherein the method further comprises:
and deploying the intelligent language model successfully trained into a test task management system.
8. A software testing device based on an intelligent language model, comprising:
the classification module is used for classifying the reference test cases based on a preset test case classification criterion to obtain reference test cases of a plurality of test types;
The acquisition module is used for acquiring the automatic test case data of the reference test case of each test type and obtaining an automatic test case data set corresponding to each test type;
The training module is used for training the intelligent language model through each automatic test case data set so that the intelligent language model successfully identifies the test scheme of each test type;
and the testing module is used for carrying out software testing on the software to be tested based on the target intelligent language model which is successfully trained.
9. A computer device, comprising: a processor and a memory, the processor being configured to execute a smart language model-based software test program stored in the memory to implement the smart language model-based software test method of any one of claims 1 to 7.
10. A storage medium storing one or more programs executable by one or more processors to implement the intelligent language model-based software testing method of any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410307564.3A CN118193378A (en) | 2024-03-18 | 2024-03-18 | Software testing method and device based on intelligent language model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410307564.3A CN118193378A (en) | 2024-03-18 | 2024-03-18 | Software testing method and device based on intelligent language model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118193378A true CN118193378A (en) | 2024-06-14 |
Family
ID=91414739
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410307564.3A Pending CN118193378A (en) | 2024-03-18 | 2024-03-18 | Software testing method and device based on intelligent language model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118193378A (en) |
-
2024
- 2024-03-18 CN CN202410307564.3A patent/CN118193378A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018010552A1 (en) | Test method and device | |
US10176079B2 (en) | Identification of elements of currently-executing component script | |
US10353809B2 (en) | System and method for executing integration tests in multiuser environment | |
US20100115496A1 (en) | Filter generation for load testing managed environments | |
US8397104B2 (en) | Creation of test plans | |
US10049031B2 (en) | Correlation of violating change sets in regression testing of computer software | |
CN106776338B (en) | Test method, test device and server | |
US11422917B2 (en) | Deriving software application dependency trees for white-box testing | |
CN112560372B (en) | Chip prototype verification method, device, equipment and medium | |
CN111814354B (en) | Simulation test method, system, medium and electronic device for instrument performance | |
Wendland et al. | Andror2: A dataset of manually-reproduced bug reports for android apps | |
CN111198811A (en) | Page automatic test method and device, electronic equipment and storage medium | |
US20130339798A1 (en) | Methods for automated software testing and devices thereof | |
CN107704389B (en) | Page testing method and device | |
US9274933B2 (en) | Pretest setup planning | |
CN112860587B (en) | UI automatic test method and device | |
CN116719736A (en) | Test case generation method and device for testing software interface | |
CN111400171A (en) | Interface testing method, system, device and readable storage medium | |
CN118193378A (en) | Software testing method and device based on intelligent language model | |
WO2023275887A1 (en) | System and method for automated software testing | |
CN116383539A (en) | Automatic testing method, device and equipment for Web pages | |
CN110134602A (en) | Webpage Automation regression testing method, system, medium and electronic equipment | |
US20180225165A1 (en) | Configurable system wide tests | |
CN114490337A (en) | Debugging method, debugging platform, equipment and storage medium | |
CN111309311B (en) | Vulnerability detection tool generation method, device, equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |