Software testing method, system and device based on AIGC model

By adopting the AIGC model-based method in software testing, building the scoring matrix of functional modules and automatically generating test cases, the problem of manual reliance on test cases in the existing technology is solved, and more efficient test resource allocation and testing is achieved Improve efficiency.

CN119003375BActive Publication Date: 2025-02-07NANJING CHUANGLIAN INTELLIGENT SOFT INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411465353.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-07
Estimated Expiration
2044-10-21

AI Technical Summary

Technical Problem

In the existing software testing methods, the priority sorting of test cases depends on manual experience and subjective judgment, making it difficult to objectively quantify the importance of test cases, resulting in insufficient optimization of the allocation of test resources.

Method used

Using a software testing method based on the AIGC model, by building a scoring matrix based on functional modules, taking into account factors such as usage, failure risk and return value, test cases are automatically generated, and test cases are executed in the order of scoring from high to low.

Benefits of technology

Achieving multi-dimensional scoring ordering of test cases, optimizing the allocation of test resources, significantly improving the testing efficiency, reducing the risk of ignoring important defects during the testing process, ensuring the quality of test results and under limited time and resource conditions. Timely.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003375B_ABST
    Figure CN119003375B_ABST
Patent Text Reader

Abstract

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.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software testing technology, and in particular to a software testing method, system and device based on an AIGC model. Background Art

[0002] Software testing is an important part of ensuring software quality and reliability. It aims to discover and fix potential defects in the software by executing a series of preset test cases. With the increasing complexity of software systems, automated testing has gradually become the mainstream. By building and executing automated test cases, testing efficiency can be improved, development cycles can be shortened, and the software can be guaranteed to achieve the expected performance and stability before release.

[0003] However, existing software testing methods have some obvious shortcomings. Traditional test case prioritization usually relies on manual experience and subjective judgment, which makes it difficult to objectively quantify the importance of test cases, resulting in suboptimal allocation of test resources. Especially when time is limited, it is impossible to ensure that the most critical test cases are executed first, which in turn affects the effectiveness of the test and the final quality of the software. Summary of the invention

[0004] The present application provides a software testing application based on the AIGC model, which solves the problem that the test case priority sorting in the prior art usually relies on manual experience and subjective judgment, and it is difficult to objectively quantify the importance of the test cases, resulting in insufficient optimization of test resource allocation. The 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 the quality and timeliness of the test results under limited time and resource conditions.

[0005] In a first aspect, the present application provides a software testing method based on an AIGC model, which includes the following steps: determining the functional modules of the software, constructing a scoring matrix based on the functional modules, wherein 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 several categories fm according to the number of called functional modules, and sorting them in order from the least to the most in terms of the number of functional modules, and obtaining a sequence FM, wherein the sequence FM is: ,in, A category fm representing the nth test case; calculating the score of each test case in each category fm based on the functional modules called by each test case and the functional module score matrix; using the automated testing framework, executing each category fm in sequence according to the sequence FM, and in the process of executing each category fm, executing the test cases in order from high to low scores, and generating test results until all test cases are executed or the test cannot be completed within the specified time.

[0006] Furthermore, constructing the usage dimension of the functional module in the rating matrix includes the following steps: calculating the similarity between the software and software of the same type, taking the first several software of the same type with the highest similarity as similar software; obtaining review data of similar software, and extracting keywords from the review data using natural language processing technology; matching the extracted keywords with the functional module; counting the keywords in each functional module to obtain the number of keywords in each module; calculating the usage rate U of each functional module, and the usage rate U is: , where F represents the number of keywords in the functional module and T represents the total number of keywords.

[0007] Furthermore, matching the extracted keywords with the functional modules includes the following steps: decomposing the functional modules into more fine-grained sub-functions and assigning a unique identifier to each sub-function; using a semantic similarity algorithm to determine and calculate the degree of association between each sub-function and the keywords; matching keywords with a degree of association greater than a specified value with the sub-functions.

[0008] Furthermore, constructing the failure risk dimension of the scoring matrix functional modules includes: evaluating the complexity of each functional module and the degree of association between each functional module and other functional modules.

[0009] Furthermore, the complexity includes the number of lines of code, a score of business logic complexity, and the number of external services or libraries relied upon.

[0010] Furthermore, the association degree includes: the number of times a functional module directly calls other functional modules, the frequency of data exchange or interaction between a functional module and other functional modules, and the relationship and dependency degree between a functional module and other functional modules.

[0011] Furthermore, constructing the reward value dimension of the scoring matrix function module includes: calculating the reward value R, and the reward value R is: , where C represents complexity.

[0012] Furthermore, 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.

[0013] In the second aspect, the present application provides a software testing system, which adopts the software testing method based on the AIGC model as described in the first aspect, and includes: a module division and scoring construction module, a test case generation module, a test case classification module and a test case execution module.

[0014] The module division and scoring construction module is used to determine the functional modules of the software and construct a scoring matrix based on the functional modules. The scoring matrix includes three dimensions: usage rate, importance and failure risk. The test case generation module is used to construct the functional requirements of the software, input the functional requirements of the software into the AIGC model, and obtain the test cases and the functional modules called by the test cases. The test case classification module is used to divide the test cases into several categories fm according to the number of called functional modules, and sort them in order from the least to the most in terms of the number of functional modules to obtain the sequence FM. The sequence FM is: ,in, A type fm represents the nth test case; the test case execution module is used to calculate the score of each test case in each type fm based on the functional modules called by each test case and the functional module scoring matrix; using the automated testing framework, each type fm is executed in sequence according to the sequence FM, and in the process of executing each type fm, the test cases are executed in sequence from high to low in order of score, and test results are generated until all test cases are executed or the test cannot be completed within the specified time.

[0015] In a third aspect, the present application provides a software testing device, which includes a memory and a processor;

[0016] The memory is used to store a computer program; the processor is used to implement the steps of the software testing method based on the AIGC model as described in the first aspect when executing the computer program.

[0017] The technical solution provided by this application has at least the following technical effects or advantages:

[0018] By building a scoring matrix based on functional modules and combining it with the AIGC model to automatically generate test cases, the system takes into account factors such as the utilization rate of functional modules, failure risk, and return value, ensuring that key test cases are executed first. This effectively solves the problem that the test case priority sorting in the existing technology usually relies on manual experience and subjective judgment, making it difficult to objectively quantify the importance of test cases, resulting in insufficient optimization of test resource allocation. It realizes multi-dimensional scoring and sorting of test cases, optimizes the allocation of test resources, significantly improves test efficiency, reduces the risk of ignoring important defects during the test process, and ensures the quality and timeliness of test results under limited time and resource conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1Flow chart of the software testing method based on the AIGC model in this application;

[0020] Figure 2 A flowchart for constructing the usage dimension of functional modules in the scoring matrix in this application. DETAILED DESCRIPTION

[0021] This application constructs a scoring matrix based on functional modules and automatically generates test cases in combination with the AIGC model. It takes into account factors such as the utilization rate of functional modules, failure risk, and return value, ensures that key test cases are executed first, realizes multi-dimensional scoring and sorting of test cases, optimizes the allocation of test resources, significantly improves test efficiency, reduces the risk of ignoring important defects during the test process, and ensures the quality and timeliness of test results under limited time and resource conditions.

[0022] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0023] Embodiment 1

[0024] A software testing method based on the AIGC model comprises the following steps:

[0025] S100. Determine the functional modules of the software and construct a scoring matrix based on the functional modules. The scoring matrix includes three dimensions: usage rate, failure risk, and return value.

[0026] The scoring matrix includes three key dimensions: usage rate, failure risk, and return value. These dimensions comprehensively consider the usage frequency, potential risks, and business value of software functional modules, and can effectively evaluate the importance and testing priority of each functional module. The usage rate is obtained by analyzing the review data of similar software, the failure risk is determined by evaluating the complexity and correlation of the functional modules, and the return value is the ratio of the usage rate to the complexity.

[0027] The construction of the scoring matrix can be adjusted according to different project requirements. For example, in a software system that focuses more on security, the fault risk dimension in the scoring matrix can be given a higher weight, or more security-related evaluation indicators can be introduced, such as vulnerability density or historical fault records. For more complex software systems, the dimensions of the scoring matrix can be increased to cover more evaluation indicators, such as response time, system load, etc., so as to more comprehensively evaluate the importance of functional modules.

[0028] Each dimension in the scoring matrix can be adapted to different testing needs by dynamically adjusting parameter settings. For example, for projects with a short testing cycle, the complexity of test case generation can be reduced to cover core functional modules faster; while for projects with a long testing cycle, the testing depth can be increased to ensure higher coverage.

[0029] S200. Construct functional requirements of the software, input the functional requirements of the software into the AIGC model, and obtain test cases and functional modules called by the test cases.

[0030] Collect the functional requirements of the software, organize and standardize the collected functional requirements, remove redundant information, and ensure the clarity and consistency of the input data. The AIGC (artificial intelligence generated content) model can automatically generate test cases that meet the functional requirements through machine learning and natural language processing technology. For example, models such as GPT and BERT can be used to convert the organized functional requirements into a format that the model can understand, such as vector representation, and word embedding (Word Embedding) or other encoding methods can be used. Based on the input functional requirements, the model uses its learned knowledge to generate corresponding test cases and organizes the generated test cases into a structured format. In actual testing, the effectiveness and coverage of the generated test cases can be fed back based on the test results to further optimize the generation ability of the AIGC model.

[0031] S300. Divide the test cases into several categories fm according to the number of called function modules, and sort them in order from the smallest to the largest number of function modules to obtain a sequence FM, which is: ,in, Represents the type fm of the nth test case.

[0032] Suppose there is a software system that includes the following functional modules: functional module A, for user login; functional module B for user registration; functional module C for viewing user information; functional module D for modifying user information; functional module E for deleting user accounts. According to the calling of functional modules, various types of test cases include: test case 1, which only tests user login and calls functional module A; test case 2, which is used to test user login and registration, and calls functional modules A and B; test case 3, which is used to test user login, view user information and modify user information, and calls functional modules A, C and D; test case 4, which is used to test user registration, view user information, modify user information and delete user accounts, and calls functional modules B, C, D and E; test case 5, which is used to test user login, registration, view user information, modify user information and delete user accounts, and calls functional modules A, B, C, D and E; then test cases 1 to 5 are classified as follows: - Starting testing from test cases involving a single functional module and gradually increasing the number of functional modules involved can make it easier to identify and locate problems, discover and fix potential defects in a timely manner, thereby improving the quality of the final product, helping testers better understand the functions and interrelationships of each module, and reducing the probability of errors caused by complexity.

[0033] S400. Calculate the score of each test case in each type fm based on the functional modules called by each test case and the functional module scoring matrix; use the automated testing framework to execute each type fm in sequence FM, and in the process of executing each type fm, execute the test cases in order from high to low scores, and generate test results until all test cases are executed or the test cannot be completed within the specified time.

[0034] The test cases automatically generated by the AIGC model can be combined with the scoring matrix of these functional modules to ensure that the execution order of the test cases is arranged in the most optimized way, that is, those test cases with higher scores are executed first. During the test execution process, each test case is executed in turn through the automated testing framework and the test results are generated, so that the process can continue automatically until all test cases are executed or the specified test time limit is reached.

[0035] The use of the AIGC model to automatically generate test cases greatly improves the speed and coverage of test case generation, and reduces the time and error possibility of manually designing test cases. The introduction of the scoring matrix ensures that the priority sorting of test cases is more reasonable, so that test resources can be concentrated on high-risk and high-value functional modules, thereby improving the overall efficiency of testing. Through automated and intelligent test case generation and execution, the reliance on manual testers is reduced, and the labor cost is reduced. In addition, the use of the automated testing framework reduces the repetitive labor of testing, and optimizes the utilization of test resources through intelligent sorting and scheduling, further reducing the testing cost. Through the application of the AIGC model, test cases can be automatically generated according to functional requirements, reducing the omissions or redundancies that may be caused by manually writing test cases. The multi-dimensional evaluation in the scoring matrix ensures the rationality of test priorities, so that high-priority test cases can discover potential problems as early as possible, optimize the test process, and improve the overall efficiency of testing. Testers only need to enter functional requirements, and the system can automatically generate and sort test cases, and execute them in order of priority. This convenient operation method lowers the threshold of testing, so that even inexperienced testers can complete testing tasks efficiently.

[0036] In S110, constructing the usage dimension of the functional module in the rating matrix includes the following steps: S111. Calculating the similarity between the software and the same type of software, taking the first several software of the same type with the highest similarity as similar software; S112. Obtaining the review data of similar software, and extracting keywords from the review data using natural language processing technology; S113. Matching the extracted keywords with the functional modules; S114. Counting the keywords in each functional module to obtain the number of keywords in each module; S115. Calculating the usage rate U of each functional module, the usage rate U is: , where F represents the number of keywords in the functional module and T represents the total number of keywords.

[0037] The usage rate dimension of the functional modules in the scoring matrix is ​​determined by comparing the functional modules of the software with similar software. By calculating the similarity between the software to be tested and the software of the same type, similarity algorithms such as cosine similarity and Jaccard similarity coefficient can be used to screen out the most similar software to ensure that the screened software has a high functional similarity with the software to be tested. Keywords usually reflect the user's usage and focus on specific functional modules of the software. NLP technology can identify high-frequency words or phrases related to functional modules from a large amount of comment data, thereby revealing the user's usage of each functional module. A mapping relationship with keywords is established in each functional module to determine the number of keywords in each functional module. The number of keywords in each functional module is divided by the total number of keywords to reflect the usage of each functional module, thereby calculating the usage rate of each functional module.

[0038] By analyzing user reviews of similar software and extracting high-frequency keywords related to functional modules, we can accurately identify functional modules that are actually used frequently by users, ensuring that test resources can be focused on these key modules first, thereby improving test coverage and efficiency. In particular, when test time or resources are limited, potential problems can be better captured. Natural language processing technology can be used to automatically extract valuable information from large amounts of comment data, reducing the time and cost of manual analysis and screening, and efficiently processing large amounts of text data, so that the test team can quickly obtain usage data for each functional module, thereby more accurately formulating test plans and avoiding waste of resources.

[0039] In S113, matching the extracted keywords with the functional modules includes the following steps: S1131. Decomposing the functional modules into more fine-grained sub-functions and assigning a unique identifier to each sub-function; S1132. Using a semantic similarity algorithm to determine and calculate the degree of association between each sub-function and the keywords; S1133. Matching the keywords with sub-functions whose degree of association is greater than a specified value.

[0040] Dividing complex functional modules into smaller units that are easier to manage and analyze makes the matching process between keywords and functions more accurate. Each sub-function is assigned a unique identifier to ensure accurate positioning and identification in subsequent matching and analysis processes. The semantic similarity algorithm is a key technology in natural language processing that can evaluate the semantic similarity between keywords and sub-function descriptions. Commonly used semantic similarity algorithms include cosine similarity based on word vector models and path distance methods based on semantic networks. By calculating semantic similarity, the system can determine which sub-function a keyword is more associated with. The specified value is usually a pre-set similarity threshold. Only when the semantic similarity between the keyword and the sub-function exceeds this threshold will the two be considered matched, which can effectively filter out noise data and ensure the accuracy and reliability of the matching results.

[0041] In S100, constructing the failure risk dimension of the scoring matrix functional module includes: evaluating the complexity of each functional module and the degree of association between each functional module and other functional modules; the complexity includes the number of lines of code, the score of business logic complexity and the number of external services or libraries relied on; the degree of association includes: the number of times the functional module directly calls other functional modules, the frequency of data exchange or interaction between the functional module and other functional modules, and the relationship and degree of dependence between the functional module and other functional modules.

[0042] For the complexity assessment, by analyzing the number of lines of code, the complexity of business logic, and the number of external services or libraries relied on for each functional module, these factors together reflect the internal complexity of the functional module. The number of lines of code is an intuitive measure of complexity. The more lines of code, the higher the complexity of the module. A large amount of code may mean more logical branches, processing flows, and potential error points. The complexity of business logic is related to the complexity of conditional branches and loop structures in the module. The more complex the logic, the more potential vulnerabilities and error points. Cyclomatic Complexity or Halstead complexity metrics can be used to measure the number and complexity of conditional branches, loop structures, and decision points in the module. The more complex the business logic, the more difficult it is to test. Therefore, the complexity score can effectively reflect the potential risks of the module. The more dependencies a module has with external services or libraries, the more susceptible its stability is to external factors. For example, if a module relies on multiple external APIs or third-party libraries, changes or unavailability of these external dependencies may cause the module to fail. Evaluating the number of external dependencies can help the testing team identify high-risk modules.

[0043] The degree of association can be quantified by the number of times a functional module directly calls other modules, the frequency of data exchange between functional modules, and the dependency and closeness between modules. It can reflect the interaction complexity and dependency of functional modules in the entire system. Through the dual evaluation of the internal complexity and external correlation of functional modules, it can accurately and preferentially capture high-risk areas that may cause failures, thereby improving the pertinence and effectiveness of the test and ensuring the stability and reliability of the system.

[0044] In addition to the number of lines of code, business logic complexity score, and the number of external dependencies, other complexity indicators can also be introduced. For example, the code repetition rate or the degree of modularity of the code can be used to evaluate complexity. For large projects, the number of lines of code can be combined with the logic complexity to form a weighted comprehensive scoring system to more accurately reflect the overall complexity of the module. For small projects, the scoring mechanism can be simplified and only the most critical complexity indicators can be focused on to quickly complete the evaluation. Different code analysis tools and algorithms can be used to calculate complexity. For example, static code analysis tools can be used to automatically detect complex structures in the 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. The weights of different complexity indicators can be flexibly set to meet different testing needs.

[0045] In S100, constructing the reward value dimension of the scoring matrix function module includes: calculating the reward value R, and the reward value R is: , where C represents complexity.

[0046] The return value reflects the relationship between the frequency of use of a functional module and its implementation complexity. When resources are limited, priority is given to testing those functional modules with high usage frequency and low implementation complexity. The utilization rate reflects the usage of each functional module. The return value is calculated by the ratio of utilization rate and complexity. This can effectively identify those functional modules with high "cost performance", that is, those modules with high utilization rate but relatively low complexity. Such modules usually have a greater impact on user experience but are relatively simple to implement. Therefore, when testing resources are limited, these modules can be tested first to ensure the quality of core functions and to cover the parts of the system that have the greatest impact on user experience in a shorter period of time, thereby improving the overall efficiency of the test and the performance of the system.

[0047] In addition to usage rate and complexity as calculation factors for return value, other key indicators can also be introduced. For example, user feedback scores or user satisfaction data can be used as a supplement to usage rate, or maintenance costs, failure rates, etc. can be used as supplementary factors for complexity. By introducing data in more dimensions, the business value of the module can be more comprehensively reflected.

[0048] A real-time update and feedback mechanism can be introduced so that the calculation results of the return value can be dynamically adjusted during the test process. For example, by monitoring user operation logs and system operation data, the utilization rate and complexity of functional modules can be updated in real time to ensure that the test strategy can be optimized and adjusted at any time, so as to better adapt to the rapid changes in the system.

[0049] In the S100 scoring matrix, for projects that pay special attention to stability, a weight coefficient can be introduced to make complexity account for a larger proportion in the return value calculation. For projects that emphasize user experience, the weight of usage rate can be increased to ensure that frequently used modules receive more testing resources.

[0050] In S400 , during the execution of 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.

[0051] When executing the test case of the current type fm, the system will re-evaluate the score of the next type of test case based on the real-time test results and the latest system status, and try to generate the score of each test case in the next type fm before the test case of the current type fm is completed. In this way, after the test case of the current type fm is completed, the test operation of each test case in the next type fm can be carried out immediately, ensuring the test efficiency.

[0052] Embodiment 2

[0053] This embodiment provides a software testing system, which adopts the software testing method based on the AIGC model as in Embodiment 1, and includes: a module division and scoring construction module, a test case generation module, a test case classification module and a test case execution module.

[0054] The module division and scoring construction module is used to determine the functional modules of the software and construct a scoring matrix based on the functional modules. The scoring matrix includes three dimensions: usage rate, importance and failure risk. The test case generation module is used to construct the functional requirements of the software and input the functional requirements of the software into the AIGC model to obtain test cases and functional modules called by the test cases. The test case classification module is used to divide the test cases into several categories fm according to the number of called functional modules, and sort them in order from the least to the most in terms of the number of functional modules to obtain the sequence FM. The sequence FM is: ,in, The type fm represents the nth test case; the test case execution module is used to calculate the score of each test case in each type fm based on the functional modules called by each test case and the functional module scoring matrix; using the automated testing framework, each type fm is executed in sequence according to the sequence FM. In the process of executing each type fm, the test cases are executed in order from high to low scores, and the test results are generated until all test cases are executed or the test cannot be completed within the specified time.

[0055] This embodiment has all the advantages of the software testing method based on the AIGC model in the first embodiment, and can automatically implement all the steps of the software testing method based on the AIGC model.

[0056] Embodiment 3

[0057] This embodiment provides a software testing device, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to implement the steps of the software testing method based on the AIGC model in the first embodiment when executing the computer program.

[0058] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in a box or multiple boxes. Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

Claims

1. A software testing method based on the AIGC model, characterized in that: It includes the following steps: Determine the functional modules of the software and construct a scoring matrix based on the functional modules, wherein the scoring matrix includes three dimensions: utilization rate, failure risk, and return value; Construct the functional requirements of the software, input the functional requirements of the software into the AIGC model, and obtain test cases and functional modules called by the test cases; The test cases are divided into several categories fm according to the number of function modules called, and sorted in order from the least to the most number of function modules to obtain the sequence FM, which is: ,in, represents the type fm of the nth test case; Calculate the score of each test case in each type fm based on the function modules called by each test case and the function module score matrix; use the automated testing framework to execute each type fm in sequence according to the sequence FM, and in the process of executing each type fm, execute the test cases in order from high to low scores, and generate test results until all test cases are executed or the test fails to be completed within the specified time; Among them, constructing the usage dimension of the functional module in the scoring matrix includes the following steps: Calculate the similarity between the software and software of the same type, and select the first several software of the same type with the highest similarity as similar software; Obtain review data of similar software and use natural language processing technology to extract keywords from the review data; Matching the extracted keywords with the functional modules; Count the keywords in each functional module to get the number of keywords in each module; Calculate the utilization rate U of each functional module. The utilization rate U is: , where 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 modules comprises the following steps: Decompose the functional module into more fine-grained sub-functions and assign a unique identifier to each sub-function; Use semantic similarity algorithm to determine and calculate the degree of association between each sub-function and the keyword; Keywords with a correlation degree greater than a specified value are matched with the sub-function.

2. The software testing method based on the AIGC model according to claim 1, characterized in that: Constructing the failure risk dimension of the scoring matrix functional modules includes: evaluating the complexity of each functional module and the degree of association between each functional module and other functional modules.

3. The software testing method based on the AIGC model as claimed in claim 2, characterized in that: The complexity includes the number of lines of code, a score for business logic complexity, and the number of external services or libraries that are relied upon.

4. The software testing method based on the AIGC model as claimed in claim 2, characterized in that: The association degree includes: the number of times a function module directly calls other function modules, the frequency of data exchange or interaction between a function module and other function modules, and the relationship and dependency degree between a function module and other function modules.

5. The software testing method based on the AIGC model as claimed in claim 3, characterized in that: The return value dimensions of the scoring matrix function module include: Calculate the return value R, the return value R is: , where C represents complexity.

6. The software testing method based on the AIGC model according to claim 1, characterized in that: During the execution of 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, characterized in that: include: Module division and scoring construction module: It is used to determine the functional modules of the software and construct a scoring matrix based on the functional modules. The scoring matrix includes three dimensions: usage rate, importance and failure risk. Test case generation module: It is used to construct the functional requirements of the software, input the functional requirements of the software into the AIGC model, and obtain the test cases and the functional modules called by the test cases; Test case classification module: It is used to classify test cases into several categories fm according to the number of function modules called, and sort them in order from the least to the most number of function modules to obtain a sequence FM. The sequence FM is: ,in, represents the type fm of the nth test case; Test case execution module: it is used to calculate the score of each test case in each type fm based on the function module called by each test case and the function module score matrix; use the automated testing framework to execute each type fm in sequence according to the sequence FM, and in the process of executing each type fm, execute the test cases in order from high to low scores, and generate test results until all test cases are executed or the test fails to be completed within the specified time; Among them, constructing the usage dimension of the functional module in the scoring matrix includes the following steps: Calculate the similarity between the software and software of the same type, and select the first several software of the same type with the highest similarity as similar software; Obtain review data of similar software and use natural language processing technology to extract keywords from the review data; Matching the extracted keywords with the functional modules; Count the keywords in each functional module to get the number of keywords in each module; Calculate the utilization rate U of each functional module. The utilization rate U is: , where 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 modules comprises the following steps: Decompose the functional module into more fine-grained sub-functions and assign a unique identifier to each sub-function; Use semantic similarity algorithm to determine and calculate the degree of association between each sub-function and the keyword; Keywords with a correlation degree greater than a specified value are matched with the sub-function.

8. A software testing device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is used to implement the steps of the software testing method based on the AIGC model as described in any one of claims 1 to 6 when executing the computer program.

Citation Information

Patent Citations

  • Software testing method, computer-readable storage medium and terminal device

    CN109062802A

  • Data generation, recommendation and test method, electronic equipment and storage medium

    CN114153748A