Software quality testing method and device, electronic equipment and storage medium
By acquiring basic software information, triggering the change impact assessment and risk legacy probability prediction process, and using a risk decision model for quality risk assessment, the problem of low efficiency in software quality testing in existing technologies is solved, and rapid and accurate quality risk prediction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING BAIDU NETCOM SCI & TECH CO LTD
- Filing Date
- 2021-12-30
- Publication Date
- 2026-06-12
AI Technical Summary
Existing software quality testing is inefficient and makes it difficult to fully assess the impact of code changes on other parts of the software, which may lead to problems after deployment.
By acquiring basic information about the software under test, the process of change impact assessment and risk legacy probability prediction is triggered. A risk decision model is used to conduct quality risk assessment, providing information on the probability of risk occurrence and quality assurance intervention.
It improves the efficiency and accuracy of software quality testing, reduces human intervention, and enables rapid and comprehensive prediction of software quality risks.
Smart Images

Figure CN114490349B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer application technology, and in particular to the field of software quality management and testing technology. Background Technology
[0002] In related technologies, as software functionality and complexity increase, the amount of code also grows. To upgrade software services and fix vulnerabilities, developers often need to modify existing code. However, due to the increasing complexity of the software and the hidden call-and-call relationships within much of the code, developers cannot be certain whether modifications will affect other parts of the software. Testers must comprehensively consider the scope of impact of code changes and conduct thorough testing. Incomplete testing can lead to problems after deployment, resulting in low efficiency in software quality testing. Summary of the Invention
[0003] This disclosure provides a software quality testing method, apparatus, electronic device, storage medium, and computer program product.
[0004] According to a first aspect of this disclosure, a software quality testing method is provided, comprising:
[0005] Obtain basic information about the software to be tested;
[0006] In response to software quality testing instructions, based on basic information, a change impact assessment process is triggered to test the change information of the software under test and obtain the change impact assessment results of the software under test.
[0007] Based on the basic information, the risk legacy probability prediction process is triggered to predict the probability of the risk occurring in the software under test, and thus obtain the probability of the risk occurring in the software under test.
[0008] Based on the change impact assessment results and the probability of risk occurrence, the quality risk of the software under test is predicted through a risk decision model, resulting in a quality risk assessment result for the software under test. The quality risk assessment result includes at least the probability of risk occurrence for the software under test and information on quality assurance intervention.
[0009] According to a second aspect of this disclosure, a software quality testing apparatus is provided, comprising:
[0010] The information transmission module is used to acquire basic information about the software under test.
[0011] The information processing module is used to respond to software quality testing instructions, trigger the change impact assessment process based on basic information, test the change information of the software under test, and obtain the change impact assessment results of the software under test.
[0012] This information processing module is also used to trigger a risk legacy probability prediction process based on basic information, predict the probability of risk occurrence of the software under test, and obtain the probability of risk occurrence of the software under test.
[0013] This information processing module is also used to predict the quality risks of the software under test based on the change impact assessment results and the probability of risk occurrence through a risk decision model, thereby obtaining the quality risk assessment results of the software under test. The quality risk assessment results include at least the probability of risk occurrence of the software under test and quality assurance intervention information.
[0014] According to a third aspect of this disclosure, an electronic device is provided, comprising:
[0015] At least one processor; and
[0016] The memory is communicatively connected to the at least one processor; wherein,
[0017] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the methods described above.
[0018] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing a computer to perform the methods described above.
[0019] According to a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the methods described above.
[0020] The technical solution disclosed herein can improve the efficiency of software quality testing.
[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0022] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0023] Figure 1 This is a schematic diagram of the usage environment of the software quality testing method provided in the embodiments of this disclosure;
[0024] Figure 2 This is a flowchart illustrating the software quality testing method provided in this embodiment of the disclosure;
[0025] Figure 3This is an optional process diagram of the software quality testing method in this embodiment of the disclosure;
[0026] Figure 4 This is a schematic diagram illustrating the scope of impact of changes in this embodiment of the disclosure;
[0027] Figure 5 This is a schematic diagram of an optional process for predicting the quality risks of testing software in an embodiment of this disclosure;
[0028] Figure 6 This is a schematic diagram of the structure of the software quality testing device provided in the embodiments of this disclosure;
[0029] Figure 7 This is a block diagram of an electronic device used to implement the software quality testing method of the embodiments of this disclosure. Detailed Implementation
[0030] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0031] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0032] Before providing a further detailed description of the embodiments of this disclosure, the nouns and terms involved in the embodiments of this disclosure will be explained, and the nouns and terms involved in the embodiments of this disclosure shall be interpreted as follows.
[0033] 1) Automated Testing: This generally refers to the automation of software testing. Software testing involves running a system or application under preset conditions and evaluating the results. These preset conditions should include both normal and abnormal conditions. Automated testing transforms human-driven testing actions into machine-executed processes. After test cases are designed and reviewed, testers execute the tests step-by-step according to the procedures described in the test cases, comparing the actual results with the expected results. This can save manpower, time, or hardware resources, and improve testing efficiency.
[0034] 2) Source code (also known as source program) refers to an uncompiled text file written according to a certain programming language specification. It is a series of human-readable computer language instructions. The ultimate goal of source code is to translate human-readable text into binary instructions that a computer can execute. This process is called compilation and is completed by a compiler.
[0035] 3) Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. It encompasses network technology, information technology, integration technology, management platform technology, and application technology based on cloud computing business models. These technologies can form resource pools, allowing for flexible and convenient on-demand use. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to a backend system for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing. The software quality testing method provided in this disclosure can be used to perform quality testing on software awaiting release stored in a cloud server network, ensuring the quality of software awaiting release in the cloud server network, reducing reliance on manual experience for software quality testing in the cloud server network, and improving the accuracy and speed of software testing.
[0036] 4) In response to, used to indicate the conditions or states on which the operation performed depends. When the conditions or states on which it depends are met, one or more operations performed may be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.
[0037] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of this disclosure.
[0038] Therefore, the accompanying drawings and descriptions are to be considered exemplary rather than limiting in nature. The exemplary embodiments of this disclosure are described below in conjunction with the accompanying drawings, including various details of the embodiments of this disclosure to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0039] Figure 1This is a schematic diagram illustrating a use case of the software quality testing method provided in the embodiments of this disclosure. See also: Figure 1 The terminals (including terminals 10-1 and 10-2) are equipped with corresponding clients capable of executing different functions. Each client downloads the corresponding target code from the server 200 via network 300. The terminals connect to the server 200 via network 300, which can be a wide area network (WAN), a local area network (LAN), or a combination of both, using a wireless link for data transmission. The software source code can be program code written in one or more programming languages. The software source code may include program files that execute business logic and test software files that test the program entities executing the business logic. The server 200 can extract the code objects to be tested from the test software files. Additionally, the server 200 can also extract a collection of code objects from the program files executing business logic. Before software testing, testers need to analyze each code object in the software code to filter out the code objects to be tested and those not to be tested. Here, a code object refers to a testable functional module in the software. In software code written in different programming languages, code objects can be different types of code entities. For example, in C language software code, a code object can be a function. In Java language software code, a code object can be a class, and in iOS Objective-C, it can be a piece of object code. In C++ language software code, a code object can be a class or a function. This disclosure does not further distinguish the specific type of the code (object code) object.
[0040] Before sending the corresponding target code to the terminals (terminal 10-1 and / or terminal 10-2) via network 300, server 200 needs to perform corresponding test analysis on the target code using test cases. As an example, server 200 is used to obtain basic information about the software under test; in response to software quality testing instructions, based on the basic information, it triggers a change impact assessment process to test the change information of the software under test and obtain the change impact assessment result; based on the basic information, it triggers a risk legacy probability prediction process to predict the probability of risk occurrence of the software under test and obtain the probability of risk occurrence of the software under test; based on the change impact assessment result and the probability of risk occurrence, it predicts the quality risk of the software under test through a risk decision model and obtains the quality risk assessment result of the software under test, wherein the quality risk assessment result includes at least: the probability of risk occurrence of the software under test and quality assurance intervention information.
[0041] Before introducing the software quality testing methods provided in this disclosure, a brief overview of software testing defects in related technologies is given. Methods used in related technologies to test software and formulate software risk decisions include:
[0042] (1) Relying on the experience of quality assurance personnel, the testers directly judge whether the test activities are successful based on their subjective experience and give a decision. However, this approach is highly dependent on the experience of experts, places high demands on testers, and lacks objective data to support the accuracy of the evaluation conclusions. Therefore, it is only suitable for relatively simple scenarios, is not objective and comprehensive enough, is prone to problems in subsequent software use, and lacks the ability for continuous iterative optimization, which limits the testing of software version updates.
[0043] (2) Quality management personnel analyze the characteristics of risk introduction (code / personnel / project) and risk removal (unit / function / performance / compatibility / anomaly testing), and then use a classification model to predict the probability of risk occurrence, thereby providing risk decisions. The drawback is that it does not consider factors related to the impact of changes in the decision-making process, affecting the accuracy of software testing.
[0044] (3) Manual evaluation and experience are used to judge the scope and importance of the impact of the change. Then, combined with the probability of the risk occurrence, the software quality risk is classified using the risk matrix approach. Risk decisions are made based on the classification. The drawback is that the assessment of the impact of the change relies entirely on human experience. It is difficult to accurately characterize the scope of the impact of complex system changes, the control of the impact, and the importance of the impact through subjective human experience. Moreover, the cost is also very high. At the same time, the lack of continuous iterative optimization capability limits the testing of software version updates.
[0045] To address the aforementioned shortcomings, this disclosure provides a software quality testing method, such as... Figure 2 As shown, the software quality testing method includes:
[0046] S201: Obtain basic information about the software to be tested.
[0047] In this context, "software under test" refers to the target application tested by the application testing system. The goal of the test point acquisition method disclosed herein is to acquire untested test points within the software under test. Specifically, the software under test can be an application from any of the following platforms: iOS, Android, Windows, or Mac. A function call chain is a relationship in the code of the software under test where one function can be called by another function, and so on. This pairwise calling relationship is called a function call chain. The function call relationship includes the calling function and the called function. For example, in the call relationship where function B calls function A, and function C then calls function B, the corresponding function call chain is A--B--C. In this case, function C is called the caller of function B, and function A is called the called function B. A static call chain, on the other hand, refers to the complete function call chain obtained by analyzing the complete code of the software under test and acquiring all function call relationships within it.
[0048] The basic information of the software under test includes at least the following: coverage information and function call chain information.
[0049] S202: In response to the software quality testing instruction, based on this basic information, the change impact assessment process is triggered to test the change information of the software under test and obtain the change impact assessment result of the software under test.
[0050] S203: Based on this basic information, trigger the risk legacy probability prediction process to predict the probability of risk occurrence of the software under test and obtain the probability of risk occurrence of the software under test.
[0051] When implementing the software quality testing method provided in this disclosure, a rule-plus-model approach can be used to predict the probability of legacy risks. The rule part includes: for the identified impact interfaces, if the number of interfaces is 0, it means there are no online risks and it is directly judged as low risk without manual intervention; if the number of interfaces is greater than 0, but the interface test coverage is incomplete, it is directly judged as high risk and manual supplementary testing is required to reduce the risk of the software.
[0052] S204: Based on the impact assessment results of the change and the probability of the risk occurring, the quality risk of the software under test is predicted through a risk decision model to obtain the quality risk assessment result of the software under test. The quality risk assessment result includes at least: the probability of the risk occurring of the software under test and quality assurance intervention information.
[0053] This embodiment of the disclosure obtains basic information about the software under test; responds to a software quality testing instruction, triggers a change impact assessment process based on the basic information, tests the change information of the software under test, and obtains the change impact assessment result of the software under test; based on the basic information, triggers a risk legacy probability prediction process, predicts the probability of risk occurrence of the software under test, and obtains the probability of risk occurrence of the software under test; based on the change impact assessment result and the probability of risk occurrence, a risk decision model is used to predict the quality risk of the software under test, and obtains the quality risk assessment result of the software under test, wherein the quality risk assessment result includes at least: the probability of risk occurrence of the software under test and quality assurance intervention information. In this way, based on different indicators affecting software quality and utilizing the basic information of the software under test in the software development process, software quality prediction can be performed quickly and comprehensively, the quality risk of the software under test can be predicted, and the quality risk assessment result of the software under test can be obtained, effectively reducing the need for testing and improving the efficiency of testing the software under test.
[0054] In some embodiments of this disclosure, such as Figure 3 As shown, the change impact assessment process tests the change information of the software to be tested, specifically including the following steps:
[0055] S301: Based on basic information, trigger the impact scope identification subprocess in the change impact assessment process to identify the impact scope of the changes to the software under test and obtain the change impact scope identification result.
[0056] In some embodiments of this disclosure, based on basic information, an impact scope identification subprocess in the change impact assessment process is triggered to identify the impact scope of the changes to the software under test, and the change impact scope identification result is obtained. This can be achieved in the following ways:
[0057] Based on the coverage information and function call chain information in the basic information, the relationship between the changed functions and interfaces in the software under test is determined; the sub-process is identified by the impact scope in the change impact assessment process; and the output information of the software under test in different states is processed using the coverage information and function call chain information to obtain the change impact scope identification result. (Referencing...) Figure 4 , Figure 4This is a schematic diagram illustrating the identification of the scope of change impact in this embodiment. The identification result mainly includes two parts: offline data collection mapping and online data collection of change impact. During offline data collection mapping, online traffic / offline test case replay (preferably one per interface) is used to collect the mapping relationship between traffic and the covered function list, where the entry function must be included in the covered function list. Online, the diff function call chain is collected to obtain the entry function corresponding to the changed function. The output results of the offline data collection mapping and online data collection of change impact are merged to obtain the interface affected by the changed function. Thus, through the entry function, the association between code changes and affected interfaces can be established, making the identification of change impact possible, eliminating reliance on manual experience and achieving automated software testing. Compared to offline collection methods in related technologies, which cannot cover newly added functions, the solution of this disclosure only requires one interface and one traffic flow, meaning it only needs to set the corresponding entry function according to the type of software to be tested, effectively reducing software testing costs. Furthermore, compared to static collection methods, which suffer from the drawback of inconsistent entry function writing and difficulty in standardization, the solution of this disclosure reduces the technical difficulty of identifying the scope of change impact.
[0058] In some embodiments of this disclosure, for large software with a large amount of source code, the static call chain in the function call chain of the software under test can be obtained; functional testing is performed on the software under test, and the dynamic call chain in the function call chain is recorded during the functional testing process; the function names of the functions in the software under test are extracted, and the static call chain and dynamic call chain corresponding to the function with the same function name are compared to obtain the corresponding test points. Here, the function name refers to the name of all functions included in the software under test. Because the final calculation of test points is performed at the function level, the function name can be used as the linchpin for comparing dynamic call chains, comparing the dynamic call chain corresponding to the current function name with the static call chain. Furthermore, if the code is changed, the function name corresponding to the modified code needs to be obtained. In one embodiment, the correspondence between functions and lines can be obtained at compile time, thereby calculating the function corresponding to the modified code.
[0059] When performing functional testing on software under test, test coverage can be improved by supplementing test points from the perspective of function call chains, thereby increasing testing efficiency and reducing the risk of missed tests. Specifically, during functional testing, the static call chain of the software under test can be obtained by analyzing all the code of the software under test. In one embodiment, a call relationship extraction tool corresponding to the code language can be used to obtain all the static call chains of the software under test. For example, for Java code, the Java code can be compiled first, and then the full JAR package can be obtained. Then, the Java-callgra tool can be used to extract the call relationships of five types in the Java code, including invokevirtual, invokeinterface, invokespecial, invokestatic, and invokedynamic.
[0060] In some embodiments of this disclosure, the application code corresponding to the software under test can be obtained; a function call graph corresponding to the application code can be extracted using a preset function call analysis tool; and the static call chain in the function call chain can be obtained based on the function call graph. Thus, the static call chain corresponding to the software under test can be more effectively analyzed and determined through the function call graph, facilitating the handling of larger test software. Simultaneously, functional testing is performed on the software under test, recording the call paths of each function within the software under test during the testing process; and the dynamic call chain in the function call chain is obtained based on the call paths. Here, the call path refers to the path recording information of each function being called during the functional testing process; one call path corresponds to one dynamic call chain. Furthermore, during functional testing, a change to a function only affects the calling path of the modified function; therefore, only the call chain of this function's calling path is needed. Then, by establishing pairwise call relationships between two functions based on the calling relationships, the various dynamic call chains corresponding to the current function can be further determined, thereby determining all dynamic call chains in the function call chain of the software under test. Thus, the dynamic call chain corresponding to the software under test can be more effectively analyzed and determined through the call paths.
[0061] In some embodiments of this disclosure, the software to be tested can also be compiled; the correspondence between functions and lines of code in the software to be tested can be obtained; the function name of the function can be extracted based on the correspondence between the function and the lines of code; and the static call chain and dynamic call chain corresponding to functions with the same function name can be compared to obtain the corresponding test points. Specifically, the call path refers to the path record information of the current function being called each time during functional testing, and one call path corresponds to one dynamic call chain. In addition, during functional testing, a change to a function will only affect the calling path of the modified function, so only the call chain of the calling function is needed. Then, by establishing the pairwise call relationship between two functions based on the calling relationship, the various dynamic call chains corresponding to the current function can be further determined, thereby determining all the dynamic call chains in the function call chain of the software to be tested. In this way, the dynamic call chain corresponding to the software to be tested can be analyzed and determined more effectively through the call path. The code in the embodiments of this disclosure refers to all the constituent code of the program to be tested. The application is composed of code, and the static call chain in the program to be tested can be extracted by analyzing the application code. The default function call analysis tool can be selected based on the programming language of the application code. For example, for C language application code, the Call Graph tool can be used to obtain function call relationships. For Java language application code, the open-source tool java-callgraph can be used to obtain function call relationships. The call relationships obtained by the default function call analysis tool can be represented by a function call graph, which includes all the functions involved in the call and the pairwise call relationships between these functions.
[0062] S302: Based on the change impact scope identification result of the impact scope identification subprocess, trigger the control completeness evaluation subprocess to evaluate the control completeness of the change impact scope identification result and obtain the control completeness corresponding to the change impact scope identification result.
[0063] In some embodiments of this disclosure, based on the change impact scope identification result of the impact scope identification subprocess, a control completeness evaluation subprocess is triggered to evaluate the control completeness of the change impact scope identification result, thereby obtaining the control completeness corresponding to the change impact scope identification result. This can be achieved in the following ways:
[0064] The control completeness assessment subprocess uses the results of the change impact scope identification to test the interfaces corresponding to the impact of the change and obtain the corresponding interface test results. Based on the interface test results, the corresponding interface coverage ratio is determined, and the control completeness corresponding to the change impact scope identification results is obtained based on the interface coverage ratio.
[0065] Thus, after obtaining the scope of the change's impact, compared to the control completeness obtained through manual experience and quantitative indicators in related technologies, the software quality testing method provided in this disclosure can obtain the coverage of test case interfaces through interface testing tools, obtain the completeness indicators of the interfaces, and achieve automated acquisition of the completeness indicators of online interface monitoring, effectively reducing the degree of manual intervention.
[0066] S303: Based on the identification results of the scope of impact of the change and the completeness of the control, trigger the impact severity assessment subprocess to assess the severity dimension of the impact on the software under test and obtain the severity dimension assessment result of the software under test.
[0067] In some embodiments of this disclosure, the severity dimension evaluation results of the software under test can be obtained in the following ways:
[0068] Based on the completeness of the control, determine the parameters of the severity dimension of the impact of each interface in the interface test results. The parameters of the severity dimension of the impact include at least one of the following: business importance parameter, online access volume parameter, historical defect distribution parameter, and upstream and downstream dependency number parameter. Based on the parameters of the severity dimension of the impact of each interface, determine the severity dimension assessment result of the software under test.
[0069] In this way, by automatically collecting parameters of the severity dimension, the severity dimension evaluation results of the software under test can be obtained automatically. Even when the software version is updated, the amount of code is constantly iterated, and the code complexity is very high, the impact range of the changed code can still be accurately analyzed. This avoids the defects of not being able to accurately analyze the impact range when there are conditional branch relationships in the code, and also avoids the omission when there are call relationships.
[0070] Through the above steps S301 to S303, the change impact assessment process can be triggered based on basic information, the change information of the software under test can be tested, the change impact assessment results of the software under test can be obtained, and the change impact assessment results can be automatically introduced, thereby helping to reduce or avoid the problem of poor accuracy caused by the lack of impact scope.
[0071] In some embodiments of this disclosure, reference is made to Figure 5 , Figure 5 This is a schematic diagram of an optional process for predicting the quality risk of testing software in an embodiment of this disclosure, specifically including the following steps:
[0072] S501: Using a risk decision-making model, classify the quality risks of the software under test based on the results of change impact assessment and the probability of risk occurrence.
[0073] S502: When the classification result of the quality risk of the software under test is greater than the quality risk threshold, determine the probability of risk occurrence and quality assurance intervention information that match the quality risk assessment result of the software under test.
[0074] S503: When the classification result of the quality risk of the software under test is less than or equal to the quality risk threshold, determine the probability of occurrence of the risk that matches the quality risk assessment result of the software under test.
[0075] In some embodiments of this disclosure, the risk decision model can be a classification model. This disclosure does not specifically limit the types of classification models. The quality risk threshold can be set according to the type of software to be tested to adapt to different software quality testing environments.
[0076] In this way, the quality risks of the software under test can be predicted, the results of change impact assessment can be incorporated, and the risk legacy probability can be combined to give automated and intelligent quality risk decision-making conclusions.
[0077] According to embodiments of this disclosure, a software quality testing apparatus is provided, such as... Figure 6 As shown, the software quality testing device includes:
[0078] Information transmission module 610 is used to acquire basic information of the software to be tested;
[0079] The information processing module 620 is used to respond to the software quality test instruction, trigger the change impact assessment process based on the basic information, test the change information of the software under test, and obtain the change impact assessment result of the software under test.
[0080] The information processing module 610 is also used to trigger a risk legacy probability prediction process based on the basic information, predict the probability of risk occurrence of the software under test, and obtain the probability of risk occurrence of the software under test.
[0081] The information processing module 620 is also used to predict the quality risk of the software under test based on the change impact assessment result and the probability of risk occurrence through a risk decision model, and obtain the quality risk assessment result of the software under test. The quality risk assessment result includes at least the probability of risk occurrence of the software under test and quality assurance intervention information.
[0082] In some embodiments, the information processing module 620 is configured to, based on the basic information, trigger an impact scope identification subprocess in the change impact assessment process to identify the impact scope of the change on the software under test and obtain a change impact scope identification result; the information processing module 620 is configured to, based on the change impact scope identification result of the impact scope identification subprocess, trigger a control completeness assessment subprocess to assess the control completeness of the change impact scope identification result and obtain a control completeness corresponding to the change impact scope identification result; the information processing module 620 is configured to, based on the change impact scope identification result and the control completeness, trigger an impact severity assessment subprocess to assess the severity dimension of the impact on the software under test and obtain a severity dimension assessment result for the software under test.
[0083] In some embodiments, the information processing module 620 is used to determine the relationship between the changed functions and interfaces in the software under test based on the coverage information and function call chain information in the basic information; through the impact scope identification subprocess in the change impact assessment process, the output information of different states of the software under test is processed using the coverage information and function call chain information to obtain the change impact scope identification result.
[0084] In some embodiments, the information processing module 620 is used to obtain the static call chain in the function call chain of the software under test; perform functional testing on the software under test and record the dynamic call chain in the function call chain during the functional testing process; extract the function name of the function in the software under test, compare the static call chain and the dynamic call chain corresponding to the function with the same function name, and obtain the corresponding test point.
[0085] In some embodiments, the information processing module 620 is used to obtain the application code corresponding to the software to be tested; extract the function call graph corresponding to the application code using a preset function call analysis tool; and obtain the static call chain in the function call chain based on the function call graph.
[0086] In some embodiments, the information processing module 620 is used to perform functional testing on the software under test, record the call paths of each function in the software under test during the testing process, and obtain the dynamic call chain in the function call chain based on the call paths.
[0087] In some embodiments, the information processing module 620 is used to compile the software under test; obtain the correspondence between functions and lines of code in the software under test; extract the function name of the function based on the correspondence between the function and the lines of code; and compare the static call chain and dynamic call chain corresponding to the function with the same function name to obtain the corresponding test points.
[0088] In some embodiments, the information processing module 620 is configured to, through the control completeness evaluation subprocess, test the interface corresponding to the impact of the change based on the change impact scope identification result, and obtain the corresponding interface test result; determine the corresponding interface coverage ratio based on the interface test result, and obtain the control completeness corresponding to the change impact scope identification result based on the interface coverage ratio.
[0089] In some embodiments, the information processing module 620 is configured to determine the parameters of the severity dimension of the impact of each interface in the interface test results based on the control completeness, wherein the parameters of the severity dimension of the impact include at least one of the following: business importance parameters, online access volume parameters, historical defect distribution parameters, and upstream and downstream dependency number parameters; the information processing module 620 is further configured to determine the severity dimension evaluation result of the software under test based on the parameters of the severity dimension of the impact of each interface.
[0090] In some embodiments, the information processing module 620 is configured to classify the quality risks of the software under test using the change impact assessment results and the risk occurrence probability through the risk decision model; when the classification result of the quality risk of the software under test is greater than the quality risk threshold, determine the risk occurrence probability and quality assurance intervention information that match the quality risk assessment result of the software under test; when the classification result of the quality risk of the software under test is less than or equal to the quality risk threshold, determine the risk occurrence probability that matches the quality risk assessment result of the software under test.
[0091] Those skilled in the art should understand that the functions of each processing module in the software quality testing apparatus of this disclosure can be understood with reference to the relevant description of the software quality testing method described above. Each processing module in the software quality testing apparatus of this disclosure can be implemented by an analog circuit that implements the functions described in the embodiments of this disclosure, or it can be implemented by running software that performs the functions described in the embodiments of this disclosure on an electronic device.
[0092] The software quality testing apparatus of this disclosure can quickly and comprehensively predict software quality, predict the quality risks of the software to be tested, and improve the efficiency of software quality testing.
[0093] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0094] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0095] Figure 7A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0096] like Figure 7 As shown, device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 702 or a computer program loaded from storage unit 708 into random access memory (RAM) 703. The RAM 703 may also store various programs and data required for the operation of device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via bus 704. An input / output (I / O) interface 705 is also connected to bus 704.
[0097] Multiple components in device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of monitors, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0098] The computing unit 701 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as software quality testing methods. For example, in some embodiments, the software quality testing method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the software quality testing method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform software quality testing methods by any other suitable means (e.g., by means of firmware).
[0099] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0100] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0101] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory (EPROM), flash memory, optical fiber, compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0102] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) or liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0103] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0104] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0105] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0106] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A software quality testing method, comprising: Obtain basic information about the software to be tested; In response to a software quality testing instruction, based on the aforementioned basic information, a change impact assessment process is triggered to test the change information of the software under test and obtain the change impact assessment result of the software under test. Based on the aforementioned basic information, a risk legacy probability prediction process is triggered to predict the probability of risk occurrence for the software under test, thereby obtaining the probability of risk occurrence for the software under test. The risk legacy probability prediction process employs a rule-plus-model approach, whereby the rules include: if the number of affected interfaces identified is 0, it is determined to be low risk and no manual intervention is required; if the number of affected interfaces is greater than 0 and interface test coverage is incomplete, it is determined to be high risk and manual supplementary testing is triggered. Based on the change impact assessment results and the risk occurrence probability, the quality risk of the software under test is predicted through a risk decision model to obtain the quality risk assessment result of the software under test. The quality risk assessment result includes at least: the risk occurrence probability of the software under test and quality assurance intervention information. The change impact assessment process includes: Identifying the scope of impact on sub-processes: Identifying the scope of impact of changes based on function call chain analysis; Control completeness assessment subprocess: Calculate the interface coverage ratio through interface testing; Impact severity assessment subprocess: business importance parameters and online traffic parameters; Specifically, in response to a software quality testing instruction, based on the aforementioned basic information, a change impact assessment process is triggered to test the change information of the software under test, thereby obtaining the change impact assessment result of the software under test, including: Based on the coverage information and function call chain information in the basic information, the relationship between the modified functions and interfaces in the software under test is determined. By using the impact scope identification subprocess in the change impact assessment process, and utilizing the coverage information and function call chain information, the output information of the software under test in different states is processed to obtain the change impact scope identification result. Based on the change impact range identification result of the impact range identification subprocess, the control completeness evaluation subprocess is triggered to evaluate the control completeness of the change impact range identification result and obtain the control completeness corresponding to the change impact range identification result. Based on the identification results of the scope of impact of the change and the control completeness, an impact severity assessment subprocess is triggered to assess the severity dimension of the impact on the software under test, and obtain the severity dimension assessment result of the software under test.
2. The method according to claim 1, further comprising: Obtain the static call chain in the function call chain of the software under test; Perform functional testing on the software under test and record the dynamic call chain in the function call chain during the functional testing process; Extract the function names from the functions in the software under test, compare the static call chains and dynamic call chains corresponding to the functions with the same function names, and obtain the corresponding test points.
3. The method according to claim 2, wherein, The step of obtaining the static call chain in the function call chain of the software under test includes: Obtain the application code corresponding to the software to be tested; The function call graph corresponding to the application code is extracted using a preset function call analysis tool; Obtain the static call chain in the function call chain based on the function call graph.
4. The method according to claim 2, wherein, The step of performing functional testing on the software under test and recording the dynamic call chain in the function call chain during the functional testing process includes: Perform functional testing on the software under test and record the call paths of each function in the software under test during the testing process; The dynamic call chain in the function call chain is obtained based on the call path.
5. The method according to claim 2, wherein, The process involves extracting the function names from the software under test, comparing the static and dynamic call chains corresponding to functions with the same function name, and obtaining the corresponding test points, including: The software to be tested is compiled; Obtain the correspondence between functions and lines of code in the software under test; Extract the function name of the function based on the correspondence between the function and the line of code; Compare the static and dynamic call chains of functions with the same function name to obtain the corresponding test points.
6. The method according to claim 1, wherein, The step of triggering a control completeness evaluation subprocess based on the change impact scope identification result of the change impact scope identification subprocess, and evaluating the control completeness of the change impact scope identification result to obtain the control completeness corresponding to the change impact scope identification result includes: Through the control completeness assessment subprocess, based on the change impact scope identification results, the interfaces corresponding to the impact of the change are tested to obtain the corresponding interface test results; Based on the interface test results, the corresponding interface coverage ratio is determined, and the control completeness corresponding to the change impact range identification result is obtained based on the interface coverage ratio.
7. The method according to claim 1, wherein, Based on the identification results of the scope of impact of the change and the control completeness, the impact severity assessment subprocess is triggered to evaluate the severity dimension of the impact on the software under test, and obtain the severity dimension assessment result of the software under test, including: Based on the control completeness, determine the parameters of the severity dimension of the impact of each interface in the interface test results, wherein the parameters of the severity dimension of the impact include at least one of the following: business importance parameter, online access volume parameter, historical defect distribution parameter, and upstream and downstream dependency number parameter. Using the aforementioned impact severity assessment subprocess, the severity dimension assessment result of the software under test is determined based on the parameters of the severity dimension of the impact of each interface.
8. The method according to claim 1, wherein, Based on the change impact assessment results and the probability of risk occurrence, the quality risk of the software under test is predicted using a risk decision model to obtain the quality risk assessment result of the software under test, including: The quality risks of the software under test are classified using the risk decision-making model, based on the change impact assessment results and the probability of risk occurrence. When the classification result of the quality risk of the software under test is greater than the quality risk threshold, determine the probability of occurrence of the risk and the quality assurance intervention information that match the quality risk assessment result of the software under test. When the classification result of the quality risk of the software under test is less than or equal to the quality risk threshold, the probability of occurrence of the risk that matches the quality risk assessment result of the software under test is determined.
9. A software quality testing apparatus, comprising: The information transmission module is used to acquire basic information about the software under test. The information processing module is used to respond to software quality testing instructions, trigger a change impact assessment process based on the basic information, test the change information of the software under test, and obtain the change impact assessment result of the software under test. The information processing module is further configured to trigger a risk legacy probability prediction process based on the basic information, predict the probability of risk occurrence of the software under test, and obtain the probability of risk occurrence of the software under test; wherein, the risk legacy probability prediction process adopts a rule-plus-model approach, and the rules include: if the number of affected interfaces identified is 0, it is determined to be low risk and no manual intervention is required; if the number of affected interfaces is greater than 0 and the interface test coverage is incomplete, it is determined to be high risk and manual supplementary testing is triggered; The information processing module is further configured to predict the quality risk of the software under test based on the change impact assessment results and the risk occurrence probability through a risk decision model, thereby obtaining the quality risk assessment result of the software under test. The quality risk assessment result includes at least: the risk occurrence probability of the software under test and quality assurance intervention information. The change impact assessment process includes: Identifying the scope of impact on sub-processes: Identifying the scope of impact of changes based on function call chain analysis; Control completeness assessment subprocess: Calculate the interface coverage ratio through interface testing; Impact severity assessment subprocess: business importance parameters and online traffic parameters; The information processing module is further configured to: Based on the coverage information and function call chain information in the basic information, the relationship between the modified functions and interfaces in the software under test is determined. By using the impact scope identification subprocess in the change impact assessment process, and utilizing the coverage information and function call chain information, the output information of the software under test in different states is processed to obtain the change impact scope identification result. Based on the change impact range identification result of the impact range identification subprocess, the control completeness evaluation subprocess is triggered to evaluate the control completeness of the change impact range identification result and obtain the control completeness corresponding to the change impact range identification result. Based on the identification results of the scope of impact of the change and the control completeness, an impact severity assessment subprocess is triggered to assess the severity dimension of the impact on the software under test, and obtain the severity dimension assessment result of the software under test.
10. The apparatus according to claim 9, wherein, The information processing module is also used for: Obtain the static call chain in the function call chain of the software under test; Perform functional testing on the software under test and record the dynamic call chain in the function call chain during the functional testing process; Extract the function names from the functions in the software under test, compare the static call chains and dynamic call chains corresponding to the functions with the same function names, and obtain the corresponding test points.
11. The apparatus according to claim 10, wherein, The information processing module is also used for: Obtain the application code corresponding to the software to be tested; The function call graph corresponding to the application code is extracted using a preset function call analysis tool; Obtain the static call chain in the function call chain based on the function call graph.
12. The apparatus according to claim 10, wherein, The information processing module is also used for: Perform functional testing on the software under test and record the call paths of each function in the software under test during the testing process; The dynamic call chain in the function call chain is obtained based on the call path.
13. The apparatus according to claim 10, wherein, The information processing module is also used for: The software to be tested is compiled; Obtain the correspondence between functions and lines of code in the software under test; Extract the function name of the function based on the correspondence between the function and the line of code; Compare the static and dynamic call chains of functions with the same function name to obtain the corresponding test points.
14. The apparatus according to claim 9, wherein, The information processing module is also used for: Through the control completeness assessment subprocess, based on the change impact scope identification results, the interfaces corresponding to the impact of the change are tested to obtain the corresponding interface test results; Based on the interface test results, the corresponding interface coverage ratio is determined, and the control completeness corresponding to the change impact range identification result is obtained based on the interface coverage ratio.
15. The apparatus according to claim 9, wherein, The information processing module is also used for: Based on the control completeness, determine the parameters of the severity dimension of the impact of each interface in the interface test results, wherein the parameters of the severity dimension of the impact include at least one of the following: business importance parameter, online access volume parameter, historical defect distribution parameter, and upstream and downstream dependency number parameter. Using the aforementioned impact severity assessment subprocess, the severity dimension assessment result of the software under test is determined based on the parameters of the severity dimension of the impact of each interface.
16. The apparatus according to claim 9, wherein, The information processing module is also used for: The quality risks of the software under test are classified using the risk decision-making model, based on the change impact assessment results and the probability of risk occurrence. When the classification result of the quality risk of the software under test is greater than the quality risk threshold, determine the probability of occurrence of the risk and the quality assurance intervention information that match the quality risk assessment result of the software under test. When the classification result of the quality risk of the software under test is less than or equal to the quality risk threshold, the probability of occurrence of the risk that matches the quality risk assessment result of the software under test is determined.
17. An electronic device comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-8.
19. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-8.