[go: up one dir, main page]

CN119003375B - AIGC model-based software testing method, system and device - Google Patents

AIGC model-based software testing method, system and device Download PDF

Info

Publication number
CN119003375B
CN119003375B CN202411465353.9A CN202411465353A CN119003375B CN 119003375 B CN119003375 B CN 119003375B CN 202411465353 A CN202411465353 A CN 202411465353A CN 119003375 B CN119003375 B CN 119003375B
Authority
CN
China
Prior art keywords
software
module
test
functional
keywords
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.)
Active
Application number
CN202411465353.9A
Other languages
Chinese (zh)
Other versions
CN119003375A (en
Inventor
王祯琦
陆秋红
杨文通
何继强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Chuanglian Smart Soft Information Technology Co ltd
Original Assignee
Nanjing Chuanglian Smart Soft Information Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nanjing Chuanglian Smart Soft Information Technology Co ltd filed Critical Nanjing Chuanglian Smart Soft Information Technology Co ltd
Priority to CN202411465353.9A priority Critical patent/CN119003375B/en
Publication of CN119003375A publication Critical patent/CN119003375A/en
Application granted granted Critical
Publication of CN119003375B publication Critical patent/CN119003375B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

本申请涉及软件测试技术领域,具体公开了一种基于AIGC模型的软件测试方法、系统及装置,主要包括:确定软件的功能模块,构建基于功能模块的评分矩阵,评分矩阵包括使用率、故障风险和回报价值三个维度;构建软件的功能需求,将软件的功能需求输入至AIGC模型,得到测试用例和测试用例所调用的功能模块;按照调用功能模块数量将测试用例分为序列FM,计算每个种类fm中每个测试用例的评分;利用自动化测试框架,依次执行测试用例。本申请实现了对测试用例的多维度评分排序,优化了测试资源的分配,显著提高了测试效率,降低了测试过程中忽略重要缺陷的风险,确保在有限的时间和资源条件下,测试结果的质量和及时性得到保障。

The present application relates to the field of software testing technology, and specifically discloses a software testing method, system and device based on the AIGC model, which mainly include: determining the functional modules of the software, constructing a scoring matrix based on the functional modules, and the scoring matrix includes three dimensions: usage rate, failure risk and return value; constructing the functional requirements of the software, inputting the functional requirements of the software into the AIGC model, and obtaining test cases and functional modules called by the test cases; dividing the test cases into sequences FM according to the number of called functional modules, and calculating the score of each test case in each type of FM; using the automated testing framework, executing the test cases in sequence. The present application realizes multi-dimensional scoring and sorting of test cases, optimizes the allocation of test resources, significantly improves the test efficiency, reduces the risk of ignoring important defects during the test process, and ensures that the quality and timeliness of the test results are guaranteed under limited time and resource conditions.

Description

AIGC model-based software testing method, system and device
Technical Field
The application relates to the technical field of software testing, in particular to a method, a system and a device for testing software based on AIGC model.
Background
Software testing is an important element in ensuring the quality and reliability of software, and aims to discover and repair potential defects in the software by executing a series of preset test cases. With the increasing complexity of software systems, automatic testing is becoming a mainstream, and by constructing and executing automatic test cases, the test efficiency can be improved, the development period can be shortened, and the expected performance and stability of software can be ensured before release.
However, the existing software testing method has some obvious disadvantages, the conventional test case priority ranking usually depends on manual experience and subjective judgment, and the importance of the test cases is difficult to objectively quantify, so that the test resource allocation is not optimized enough, and particularly under the condition of limited time, the most critical test cases cannot be guaranteed to be executed preferentially, and the effectiveness of the test and the final quality of the software are affected.
Disclosure of Invention
The application solves the problems that the priority ordering of the test cases in the prior art is usually dependent on manual experience and subjective judgment, and the importance of the test cases is difficult to objectively quantify, so that the allocation of test resources is not optimized, realizes the multi-dimensional grading ordering of the test cases, optimizes the allocation of the test resources, remarkably improves the test efficiency, reduces the risk of neglecting important defects in the test process, and ensures that the quality and timeliness of test results are ensured under the condition of limited time and resources.
The application provides a software testing method based on AIGC models, which comprises the following steps of determining functional modules of software, constructing a scoring matrix based on the functional modules, wherein the scoring matrix comprises three dimensions of a utilization rate, a fault risk and a return value, constructing functional requirements of the software, inputting the functional requirements of the software into the AIGC models to obtain test cases and functional modules called by the test cases, classifying the test cases into a plurality of types FM according to the number of the called functional modules, and sequencing according to the sequence of the number of the functional modules from less to most to obtain a sequence FM, wherein the sequence FM is: Wherein, the method comprises the steps of, wherein, The method comprises the steps of representing the class FM of an nth test case, calculating the score of each test case in each class FM based on a functional module and a functional module scoring matrix called by each test case, sequentially executing each class FM according to the sequence FM by utilizing an automatic test framework, sequentially executing the test cases according to the sequence from high score to low score in the process of executing each class FM, and generating a test result until all the test cases are executed or the test cannot be completed within a specified time.
Further, constructing the utilization ratio dimension of the function modules in the scoring matrix comprises the following steps of calculating the similarity between the software and the same type of software, taking a plurality of the same type of software with the highest similarity as similar software, obtaining comment data of the similar software, extracting keywords from the comment data by using a natural language processing technology, matching the extracted keywords with the function modules, counting the keywords in each function module to obtain the number of the keywords in each module, and calculating the utilization ratio U of each function module, wherein the utilization ratio U is as follows: wherein F represents the number of keywords in the functional module, and T represents the total number of keywords.
Further, the matching of the extracted keywords with the function modules comprises the steps of decomposing the function modules into sub-functions with finer granularity, distributing a unique identifier for each sub-function, judging and calculating the association degree of each sub-function and the keywords by using a semantic similarity algorithm, and matching the keywords with association degrees larger than a specified value with the sub-functions.
Further, constructing the fault risk dimension of the scoring matrix functional module includes evaluating the complexity of each functional module and the degree of association of each functional module with other functional modules.
Further, the complexity includes the number of lines of code, scoring of business logic complexity, and the number of external services or libraries relied upon.
Further, the association degree comprises the number of times that the function module directly calls other function modules, the frequency of data exchange or interaction between the function module and the other function modules, and the relation and the dependency degree between the function module and the other function modules.
Further, constructing the return value dimension of the scoring matrix functional module includes calculating a return value R, where the return value R is: where C represents complexity.
Further, in the process of executing the test cases in the current category FM, the score of each test case in the next category FM is calculated based on the sequence FM.
In a second aspect, the application provides a software testing system, which adopts the software testing method based on AIGC model in the first aspect, and comprises a module dividing and scoring construction module, a test case generation module, a test case classification module and a test case execution module.
The system comprises a module dividing and grading construction module, a test case generation module, a test case classification module and a sequence FM, wherein the module dividing and grading construction module is used for determining functional modules of software and constructing a grading matrix based on the functional modules, the grading matrix comprises three dimensions of utilization rate, importance and fault risk, the test case generation module is used for constructing functional requirements of the software and inputting the functional requirements of the software into a AIGC model to obtain test cases and functional modules called by the test cases, the test case classification module is used for dividing the test cases into a plurality of categories FM according to the number of called functional modules and sequencing the test cases according to the sequence from less to most of the number of the functional modules to obtain the sequence FM, and the sequence FM is: Wherein, the method comprises the steps of, wherein, The test case execution module is used for calculating the score of each test case in each class FM based on the functional module and the functional module scoring matrix called by each test case, and sequentially executing each class FM according to the sequence FM by utilizing an automatic test framework, sequentially executing the test cases according to the sequence from high to low in the process of executing each class FM, and generating a test result until all the test cases are executed or the test cannot be completed within a specified time.
In a third aspect, the present application provides a software testing apparatus comprising a memory and a processor;
the memory is used for storing a computer program, and the processor is used for realizing the steps of the software testing method based on AIGC model according to the first aspect when executing the computer program.
The technical scheme provided by the application has at least the following technical effects or advantages:
Because the scoring matrix based on the functional module is constructed, and the test cases are automatically generated by combining AIGC models, the priority ordering of the test cases in the prior art is effectively solved because the factors such as the utilization rate, the fault risk and the return value of the functional module are considered, the priority ordering of the test cases is ensured to be executed preferentially, the problem that the test resource allocation is not optimized enough because the importance of the test cases is difficult to objectively quantify is solved, the multi-dimensional scoring ordering of the test cases is realized, the allocation of the test resources is optimized, the test efficiency is obviously improved, the risk of neglecting important defects in the test process is reduced, and the quality and timeliness of the test results are ensured under the condition of limited time and resources.
Drawings
FIG. 1 is a flow chart of a software testing method based on AIGC model in the present application;
FIG. 2 is a flow chart of the usage dimension of the functional modules in the construction of the scoring matrix in the present application.
Detailed Description
According to the application, the scoring matrix based on the functional module is constructed, the test cases are automatically generated by combining the AIGC model, the factors such as the utilization rate, the fault risk and the return value of the functional module are considered, the priority execution of the key test cases is ensured, the multi-dimensional scoring ordering of the test cases is realized, the allocation of test resources is optimized, the test efficiency is obviously improved, the risk of neglecting important defects in the test process is reduced, and the quality and timeliness of the test results are ensured under the condition of limited time and resources.
In order to better understand the above technical solutions, the following detailed description will refer to the accompanying drawings and specific embodiments.
Example 1
A method of software testing based on AIGC models, comprising the steps of:
S100, determining a functional module of software, and constructing a scoring matrix based on the functional module, wherein the scoring matrix comprises three dimensions of utilization rate, fault risk and return value.
The scoring matrix comprises three key dimensions of the utilization rate, the fault risk and the return value, and the dimensions comprehensively consider the utilization frequency, the potential risk and the service value of the software functional modules, so that the importance and the test priority of each functional module can be effectively evaluated. The utilization rate is obtained by analyzing comment data of similar software, the fault risk is determined by evaluating the complexity and the association degree of the functional module, and the return value is the ratio of the utilization rate to the complexity.
The construction of the scoring matrix can be adjusted according to different project requirements. For example, in a more security-oriented software system, the risk of failure dimension in the scoring matrix may be given a higher weight or introduce more security-related evaluation metrics, such as vulnerability density or historical failure records. For more complex software systems, the dimension of the scoring matrix may be increased, covering more evaluation metrics such as response time, system load, etc., to more fully evaluate the importance of the functional module.
Each dimension in the scoring matrix can be adapted to different test requirements by dynamically adjusting the parameter settings. For example, for short cycle test items, the complexity of test case generation can be reduced to cover the core function modules faster, while for long cycle items, the test depth can be increased, ensuring higher coverage.
S200, building functional requirements of the software, and inputting the functional requirements of the software into a AIGC model to obtain the test case and the functional module called by the test case.
And collecting the functional requirements of the software, arranging and standardizing the collected functional requirements, removing redundant information, and ensuring the definition and consistency of input data. AIGC (artificial intelligence generation content) model can automatically generate test cases meeting functional requirements through machine learning and natural language processing technology, for example, models such as GPT, BERT and the like can be adopted to convert the tidied functional requirements into formats which can be understood by the models, such as vector representation, word embedding (Word Embedding) or other coding modes can be used, the models generate corresponding test cases based on the input functional requirements by using the learned knowledge of the models, the generated test cases are tidied into structured formats, and in actual test, the generation capacity of AIGC models can be further optimized according to the validity and coverage rate of the test cases generated by feedback of test results.
S300, classifying test cases into a plurality of types FM according to the number of calling functional modules, and sequencing according to the sequence of the number of the functional modules from less to more to obtain a sequence FM, wherein the sequence FM is as follows: Wherein, the method comprises the steps of, wherein, Representing the class fm of the nth test case.
A software system is assumed to include a function module A for user login, a function module B for user registration, a function module C for viewing user information, a function module D for modifying user information, a function module E for deleting user account, test cases of various types including test case 1 for testing only user login and calling the function module A, test case 2 for testing user login and registration, calling the function modules A and B, test case 3 for testing user login, viewing user information and modifying user information and calling the function modules A, C and D, test case 4 for testing user login, viewing user information, modifying user information and deleting user account, and calling the function modules B, C, D and E, test case 5 for testing user login, registering, viewing user information, modifying user information and deleting user account, and test cases A, B, C, D and E, respectively, test cases 1-test case 5 are classified as-Starting the test from the test cases involving a single functional module and gradually increasing the number of functional modules involved, the problem can be more easily identified and located, and potential defects can be found and repaired in time, thereby improving the quality of the final product, helping the testers to better understand the functions and interrelationships of each module, and reducing the error probability caused by complexity.
S400, calculating the score of each test case in each category FM based on the function module and the function module scoring matrix called by each test case, sequentially executing each category FM according to the sequence FM by utilizing an automatic test framework, sequentially executing the test cases according to the sequence from high to low in the process of executing each category FM, and generating a test result until all the test cases are executed or the test cannot be completed within the specified time.
The test cases automatically generated through the AIGC model can be combined with the scoring matrix of the functional modules, so that the execution sequence of the test cases is ensured to be arranged in an optimized mode, namely, the test cases with higher scores are preferentially executed, and in the process of executing the test, each test case is sequentially executed through an automatic test framework and a test result is generated, so that the automatic execution can be continuously performed until all the test cases are executed or the specified test time limit is reached.
The AIGC model is used for automatically generating the test cases, so that the speed and coverage rate of the test cases are greatly improved, and the time and the error possibility of manually designing the test cases are reduced. The introduction of the scoring matrix ensures that the priority ordering of the test cases is more reasonable, so that the test resources can be concentrated on the functional modules with high risk and high value, the overall efficiency of the test is improved, the dependence on manual testers is reduced through the automatic and intelligent test case generation and execution, and the labor cost is reduced. In addition, the use of an automatic test framework reduces the repeated labor of the test, optimizes the utilization of test resources through intelligent sequencing and scheduling, further reduces the test cost, and through the application of a AIGC model, the test cases can be automatically generated according to the functional requirements, the omission or redundancy problems possibly caused by manually writing the test cases are reduced, the rationality of the test priority is ensured through multi-dimensional evaluation in a scoring matrix, so that the test cases with high priority can find potential problems as early as possible, the test flow is optimized, and the overall efficiency of the test is improved. The test personnel only need to input functional requirements, the system can automatically generate and sequence test cases and sequentially execute the test cases according to the priority, and the convenient operation mode reduces the threshold of the test, so that even the test personnel with insufficient experience can efficiently complete the test task.
In S110, constructing a utilization ratio dimension of a function module in a scoring matrix, wherein the step S111 is to calculate the similarity between software and the same type of software, take a plurality of the same type of software with the highest similarity as similar software, the step S112 is to acquire comment data of the similar software, extract keywords from the comment data by using a natural language processing technology, the step S113 is to match the extracted keywords with the function module, the step S114 is to count the keywords in each function module to obtain the number of the keywords in each module, and the step S115 is to calculate the utilization ratio U of each function module, wherein the utilization ratio U is as follows: wherein F represents the number of keywords in the functional module, and T represents the total number of keywords.
The utilization ratio dimension of the functional module in the scoring matrix is determined by comparing and analyzing the functional module of the software with similar software, and the most similar software can be screened out by calculating the similarity of the software to be tested and the similar software, such as cosine similarity, jaccard similarity coefficient and other similarity algorithms, so as to ensure that the screened software has higher similarity with the software to be tested in function. The keywords generally reflect the use and focus of the user on the specific functional modules of the software, and the NLP technology can identify high-frequency words or phrases related to the functional modules from a large amount of comment data, so that the use of each functional module by the user is revealed. And establishing a mapping relation between each functional module and the keywords to determine the number of the keywords of each functional module, and dividing the number of the keywords in each functional module by the total number of the keywords to reflect the use condition of each functional module so as to calculate the use rate of each functional module.
The method has the advantages that the high-frequency keywords related to the functional modules are extracted through analysis of the user comments of similar software, the functional modules with higher actual use frequency of the user can be accurately identified, and the fact that test resources can be preferentially concentrated on the key modules is ensured, so that the coverage rate and efficiency of testing are improved, potential problems can be better captured especially under the condition that test time or resources are limited, valuable information can be automatically extracted from a large number of comment data through a natural language processing technology, time and cost of manual analysis and screening are reduced, a large amount of text data are efficiently processed, and a test team can rapidly acquire the use rate data of each functional module, so that a test plan is formulated more accurately, and resource waste is avoided.
In S113, matching the extracted keywords with the function modules comprises the following steps of S1131, decomposing the function modules into sub-functions with finer granularity, distributing a unique identifier for each sub-function, S1132, judging and calculating the association degree of each sub-function and the keywords by using a semantic similarity algorithm, and S1133, matching the keywords with the association degree larger than a specified value with the sub-functions.
The complex functional modules are divided into small units which are easier to manage and analyze, so that the matching process of keywords and functions is more accurate, and each sub-function is endowed with a unique identifier so as to ensure accurate positioning and identification in the subsequent matching and analyzing processes. The semantic similarity algorithm is a key technology in natural language processing and can evaluate semantic similarity between keywords and sub-function descriptions. Common semantic similarity algorithms include cosine similarity based on word vector models, path distance method based on semantic networks, and the like. By calculating the semantic similarity, the system can judge which sub-function a certain keyword has higher relevance to. The appointed value is usually a preset similarity threshold value, and only when the semantic similarity of the keywords and the subfunctions exceeds the threshold value, the keywords and the subfunctions are considered to be matched, so that noise data can be effectively filtered, and the accuracy and the reliability of a matching result are ensured.
In S100, constructing fault risk dimensions of the scoring matrix functional modules comprises evaluating complexity of each functional module and association degree of each functional module with other functional modules, wherein the complexity comprises number of code lines, scoring of business logic complexity and number of dependent external services or libraries, and the association degree comprises number of times that the functional modules directly call the other functional modules, frequency of data exchange or interaction between the functional modules and the other functional modules and relationship and dependency degree between the functional modules and the other functional modules.
For complexity assessment, by analyzing the number of code lines per functional module, the complexity of the business logic, and the number of external services or libraries relied upon, these factors collectively reflect the internal complexity of the functional module. The number of code lines is an intuitive complexity measure, and the more the number of code lines, the higher the complexity of the module in general, and the larger the number of codes may mean more logical branches, process flows and potential error points. The complexity of the business logic is related to the complexity of conditional branches and loop structures in the module, the more the logic is complex, the more potential loopholes and error points are, the number and complexity of the conditional branches, loop structures and decision points in the module can be measured by adopting a loop complexity (Cyclomatic Complexity) or Halstead complexity measure, the more the business logic is complex, the more the difficulty of testing is, and therefore, the complexity score can effectively reflect the potential risks of the module. The more the modules are dependent on external services or libraries, the more susceptible their stability is to external factors. For example, if a module relies on multiple external APIs or third party libraries, variations or unavailability of these external dependencies can cause the module to fail, and evaluating the number of external dependencies can help the test team identify high risk modules.
The association degree can be quantified through the times of directly calling other modules by the functional modules, the data exchange frequency among the functional modules, and the dependency relationship and compactness among the modules, so that the interaction complexity and the dependency degree of the functional modules in the whole system can be reflected, and the high-risk area which is likely to cause faults can be accurately and preferentially captured through double evaluation of the internal complexity and the external relevance of the functional modules, thereby improving the pertinence and the effectiveness of the test and guaranteeing the stability and the reliability of the system.
In addition to the number of code lines, business logic complexity scores, and external dependency numbers, other complexity metrics may be introduced. For example, the repetition rate of the code or the degree of modularity of the code may be used to evaluate the complexity. For large projects, the number of code lines and logic complexity can be combined to form a weighted comprehensive scoring system, so that the overall complexity of the module can be reflected more accurately, and for small projects, the scoring mechanism can be simplified, and only the most critical complexity index is focused on to complete the evaluation rapidly. Different code analysis tools and algorithms may be used to calculate the complexity. For example, static code analysis tools may be used to automatically detect complex structures in code and generate detailed complexity reports. For logic complexity, more advanced analysis techniques, such as control flow graph analysis or data flow analysis, can be used to more fully understand the potential complexity in the code, and weights of different complexity indexes can be flexibly set to adapt to different test requirements.
In S100, constructing the return value dimension of the scoring matrix functional module includes calculating a return value R: where C represents complexity.
The report value reflects the relation between the use frequency of the functional modules and the implementation complexity of the functional modules, under the condition of limited resources, the functional modules with high use frequency and lower implementation complexity are preferentially tested, the use rate reflects the use condition of each functional module, the report value is calculated by the ratio of the use rate to the complexity, and the functional modules with higher cost performance, namely the modules with high use rate and lower complexity, can be effectively identified, and generally have larger influence on user experience but are relatively simple to implement, so that under the condition of limited testing resources, the modules can be preferentially tested to ensure the quality of core functions, and the part with the largest influence on the user experience in a system can be covered in a shorter time, thereby improving the overall efficiency of the test and the performance of the system.
Besides the utilization rate and complexity as calculation factors of the return value, other key indexes can be introduced, for example, user feedback scores or user satisfaction data can be used as supplements of the utilization rate, or maintenance cost, failure rate and the like can be used as supplements of the complexity, and the service value of the module can be more comprehensively reflected by introducing more dimension data.
The real-time updating and feedback mechanism can be introduced, so that the calculation result of the return value can be dynamically adjusted in the test process, for example, the use rate and the complexity of the functional module are updated in real time by monitoring the user operation log and the system operation data, and the test strategy can be optimized and adjusted at any time, so that the method can be better adapted to the rapid change of the system.
In the scoring matrix of S100, for the item of special interest in stability, a weight coefficient may be introduced to make the complexity occupy a larger proportion in the calculation of the return value, and for the item of emphasized user experience, the weight of the usage rate may be increased to ensure that the module used at high frequency obtains more test resources.
In S400, in executing the test cases in the current category FM, the score of each test case in the next category FM is calculated based on the sequence FM.
When executing the test cases of the current class fm, the system can re-evaluate the scores of the next class of test cases according to the real-time test results and the latest system state, and generates the scores of each test case in the next class fm as far as possible before the test cases of the current class fm are completed, so that the test operation of each test case in the next class fm can be carried out immediately after the test cases of the current class fm are completed, and the test efficiency is ensured.
Example two
The embodiment provides a software testing system, which adopts a AIGC model-based software testing method in the embodiment I, and comprises a module dividing and scoring construction module, a test case generation module, a test case classification module and a test case execution module.
The system comprises a module dividing and grading construction module, a test case generation module, a test case classification module and a sequence FM, wherein the module dividing and grading construction module is used for determining functional modules of software and constructing a grading matrix based on the functional modules, the grading matrix comprises three dimensions of utilization rate, importance and fault risk, the test case generation module is used for constructing functional requirements of the software and inputting the functional requirements of the software into a AIGC model to obtain test cases and functional modules called by the test cases, the test case classification module is used for dividing the test cases into a plurality of types FM according to the number of called functional modules and sequencing according to the sequence from less to most of the number of the functional modules to obtain the sequence FM, and the sequence FM is: Wherein, the method comprises the steps of, wherein, The system comprises a test case execution module, an automatic test frame, a test case scoring module and a test case scoring module, wherein the test case execution module is used for calculating the score of each test case in each test case type FM based on a functional module and a functional module scoring matrix called by each test case, and sequentially executing each test case type FM according to a sequence FM by utilizing the automatic test frame, sequentially executing the test cases according to the sequence from high score to low score in the process of executing each test case type FM, and generating a test result until all the test cases are executed or the test cannot be completed within a specified time.
This embodiment has all the advantages of the AIGC model-based software testing method in embodiment one, and is capable of automatically implementing all the steps of the AIGC model-based software testing method.
Example III
The embodiment provides a software testing device, which comprises a memory and a processor, wherein the memory is used for storing a computer program, and the processor is used for realizing the steps of the software testing method based on the AIGC model in the first embodiment when the computer program is executed.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.

Claims (8)

1. A method for testing software based on AIGC model, comprising the steps of:
determining a functional module of software, and constructing a scoring matrix based on the functional module, wherein the scoring matrix comprises three dimensions of a utilization rate, a fault risk and a return value;
Building a functional requirement of software, and inputting the functional requirement of the software into a AIGC model to obtain a test case and a functional module called by the test case;
The test cases are divided into a plurality of types FM according to the number of calling functional modules, and are sequenced according to the sequence of the number of the functional modules from less to most to obtain a sequence FM, wherein the sequence FM is as follows: Wherein, the method comprises the steps of, wherein, The category fm representing the nth test case;
utilizing an automatic test framework to execute each type FM in turn according to the sequence FM, executing test cases in turn according to the order of the scores from high to low in the process of executing each type FM, and generating a test result until all the test cases are executed or the test cannot be completed within a set time;
The method for constructing the utilization rate dimension of the functional module in the scoring matrix comprises the following steps:
Calculating the similarity between the software and the same type of software, and taking a plurality of the same type of software with the highest similarity as similar software;
Obtaining comment data of similar software, and extracting keywords from the comment data by using a natural language processing technology;
matching the extracted keywords with the functional module;
Counting the keywords in each functional module to obtain the number of the keywords in each module;
calculating the utilization rate U of each functional module, wherein the utilization rate U is as follows: Wherein F represents the number of keywords in the functional module, and T represents the total number of keywords;
matching the extracted keywords with the functional module comprises the following steps:
Decomposing the function module into sub-functions with finer granularity, and distributing a unique identifier for each sub-function;
judging and calculating the association degree of each sub-function and the keywords by using a semantic similarity algorithm;
and matching the keywords with the association degree larger than the appointed value with the sub-functions.
2. The method for testing software based on the AIGC model as set forth in claim 1, wherein constructing the fault risk dimension of the scoring matrix functional modules includes evaluating a complexity of each functional module and a degree of association of each functional module with other functional modules.
3. The AIGC model based software testing method of claim 2, wherein the complexity includes number of lines of code, scoring of business logic complexity, and number of external services or libraries relied upon.
4. The software testing method based on AIGC model as set forth in claim 2, wherein the degree of association includes the number of times a function module directly invokes other function modules, the frequency of data exchange or interaction between the function module and other function modules, and the relationship and degree of dependence between the function module and other function modules.
5. The method for testing software based on AIGC models as set forth in claim 3, wherein constructing the return value dimension of the scoring matrix functional module includes:
Calculating a return value R, wherein the return value R is as follows: where C represents complexity.
6. The method for testing software based on AIGC model as claimed in claim 1, wherein in the process of executing the test cases in the current category FM, the score of each test case in the next category FM is calculated based on the sequence FM.
7. A software testing system, comprising:
the module dividing and grading construction module is used for determining a functional module of the software and constructing a grading matrix based on the functional module, wherein the grading matrix comprises three dimensions of utilization rate, importance and fault risk;
the test case generation module is used for constructing the functional requirements of the software, inputting the functional requirements of the software into the AIGC model and obtaining the test case and the functional module called by the test case;
The test case classification module is used for classifying the test cases into a plurality of categories FM according to the number of the calling functional modules, and sequencing the test cases according to the sequence of the number of the functional modules from less to most to obtain a sequence FM, wherein the sequence FM is as follows: Wherein, the method comprises the steps of, wherein, The category fm representing the nth test case;
The system comprises a test case execution module, an automatic test framework, a test case generation module, a test result generation module and a test result generation module, wherein the test case execution module is used for calculating the score of each test case in each category FM based on a function module and a function module scoring matrix called by each test case;
The method for constructing the utilization rate dimension of the functional module in the scoring matrix comprises the following steps:
Calculating the similarity between the software and the same type of software, and taking a plurality of the same type of software with the highest similarity as similar software;
Obtaining comment data of similar software, and extracting keywords from the comment data by using a natural language processing technology;
matching the extracted keywords with the functional module;
Counting the keywords in each functional module to obtain the number of the keywords in each module;
calculating the utilization rate U of each functional module, wherein the utilization rate U is as follows: Wherein F represents the number of keywords in the functional module, and T represents the total number of keywords;
matching the extracted keywords with the functional module comprises the following steps:
Decomposing the function module into sub-functions with finer granularity, and distributing a unique identifier for each sub-function;
judging and calculating the association degree of each sub-function and the keywords by using a semantic similarity algorithm;
and matching the keywords with the association degree larger than the appointed value with the sub-functions.
8. The software testing device is characterized by comprising a memory and a processor;
the memory is used for storing a computer program;
The processor is configured to implement the steps of the AIGC model-based software testing method according to any one of claims 1-6 when executing the computer program.
CN202411465353.9A 2024-10-21 2024-10-21 AIGC model-based software testing method, system and device Active CN119003375B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411465353.9A CN119003375B (en) 2024-10-21 2024-10-21 AIGC model-based software testing method, system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411465353.9A CN119003375B (en) 2024-10-21 2024-10-21 AIGC model-based software testing method, system and device

Publications (2)

Publication Number Publication Date
CN119003375A CN119003375A (en) 2024-11-22
CN119003375B true CN119003375B (en) 2025-02-07

Family

ID=93487548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411465353.9A Active CN119003375B (en) 2024-10-21 2024-10-21 AIGC model-based software testing method, system and device

Country Status (1)

Country Link
CN (1) CN119003375B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109062802A (en) * 2018-08-13 2018-12-21 深圳壹账通智能科技有限公司 A kind of method for testing software, computer readable storage medium and terminal device
CN114153748A (en) * 2022-01-13 2022-03-08 阿里巴巴新加坡控股有限公司 Data generation method, data recommendation method, data testing method, electronic device, and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109446076A (en) * 2018-10-15 2019-03-08 广东省科技基础条件平台中心 Software project testing method, system, storage medium and terminal device
CN112463636B (en) * 2020-12-11 2023-01-06 苏州浪潮智能科技有限公司 A test case sorting management method and system
CN116662182A (en) * 2023-06-02 2023-08-29 厦门理工学院 Regression testing mixing method, device and storage medium in continuous integrated environment
CN117608984A (en) * 2023-07-07 2024-02-27 中国移动通信集团江苏有限公司 Software new version scoring methods, devices, equipment and storage media
CN118585428A (en) * 2024-05-20 2024-09-03 武汉烽火技术服务有限公司 A software testing method and device based on private knowledge base

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109062802A (en) * 2018-08-13 2018-12-21 深圳壹账通智能科技有限公司 A kind of method for testing software, computer readable storage medium and terminal device
CN114153748A (en) * 2022-01-13 2022-03-08 阿里巴巴新加坡控股有限公司 Data generation method, data recommendation method, data testing method, electronic device, and storage medium

Also Published As

Publication number Publication date
CN119003375A (en) 2024-11-22

Similar Documents

Publication Publication Date Title
CN103257921A (en) Improved random forest algorithm based system and method for software fault prediction
US20220300820A1 (en) Ann-based program testing method, testing system and application
CN112632179B (en) Model construction method, device, storage medium and equipment
CN114757468B (en) Root cause analysis method for process execution abnormality in process mining
CN118394561A (en) Method and device for diagnosing server fault, storage medium and electronic equipment
CN111859047A (en) A kind of fault solving method and device
CN118586765A (en) A quality management risk control method and system based on big data
CN112416800A (en) Intelligent contract testing method, device, equipment and storage medium
CN114155048B (en) Method, device, electronic device and storage medium for predicting related business
CN119003375B (en) AIGC model-based software testing method, system and device
CN114416573A (en) Defect analysis method, device, equipment and medium for application program
CN112948262A (en) System test method, device, computer equipment and storage medium
CN118551991A (en) A work order management method, system, device and medium
CN110968518A (en) Analysis method and device for automatic test log file
US20230368873A1 (en) An event chain reaction system
Nehi et al. Defects in the next release; software defect prediction based on source code versions
Rana et al. Nomenclature unification of software product measures
CN117724751B (en) Method for instantly predicting change of software architecture based on code submission analysis
CN118626381B (en) Fuzz testing method and platform based on upper competition
CN118093381B (en) Software testing method and system based on artificial intelligence
CN113570333B (en) Process design method suitable for integration
CN119090454B (en) Industrial production intelligent inspection method, system, electronic equipment and medium
Singh et al. Software Quality Analysis Based on Selective Parameters Using Enhanced Ensemble Model
CN119512656A (en) Data processing system, method and electronic equipment
CN109474445B (en) Distributed system root fault positioning method and device

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
GR01 Patent grant
GR01 Patent grant