CN-121979778-A - Software quality detection method and device, electronic equipment and medium
Abstract
The embodiment of the application discloses a software quality detection method, a device, electronic equipment and a medium, which relate to the technical field of computers, and one specific implementation mode of the method comprises the steps of acquiring code data and operation data of software to be detected, historical test defect data and historical operation alarm data; and carrying out quality analysis on the software to be tested based on the software knowledge graph to obtain a quality analysis result so as to generate a quality analysis report according to the quality analysis result. The method can effectively reduce the manpower investment and detection period, and meanwhile, by means of the depth correlation analysis capability of the knowledge graph, the accuracy and the high efficiency of software quality detection are improved, and the method is suitable for the application scene requirements of large-scale centralized production and high-frequency iteration in the financial industry.
Inventors
- ZHANG AIHUA
Assignees
- 中国建设银行股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251222
Claims (10)
- 1. A software quality detection method, comprising: acquiring code data, running data and historical test defect data and historical running alarm data of software to be tested; Constructing a software knowledge graph reflecting the association relationship among internal entities of the software to be tested based on the code data, the operation data, the historical test defect data and the historical operation alarm data; And carrying out quality analysis on the software to be detected based on the software knowledge graph to obtain a quality analysis result so as to generate a quality analysis report according to the quality analysis result.
- 2. The method of claim 1, wherein constructing a software knowledge graph reflecting an association between internal entities of the software under test based on the code data, the operation data, the historical test defect data, and the historical operation alert data comprises: extracting code elements, service objects, operation components and performance indexes from the code data, the operation data, the historical test defect data and the historical operation alarm data; Determining the code element, the business object, the operation component and the performance index as map nodes; constructing a directed edge connected with the map node according to the calling link, the data flow direction, the resource dependence and the logic mapping relation; And constructing the software knowledge graph according to the graph nodes and the directed edges connected with the graph nodes.
- 3. The method according to claim 1, wherein the performing mass analysis on the software to be tested based on the software knowledge graph to obtain a mass analysis result includes: based on the code element nodes in the software knowledge graph and the associated edges of the code element nodes, carrying out static analysis on the software to be tested to obtain a static analysis result; Based on the business object node, the operation component node and the performance index node in the software knowledge graph, dynamically analyzing the software to be tested to obtain a dynamic analysis result; And carrying out fusion treatment on the static analysis result and the dynamic analysis result, and combining a risk level judgment rule to obtain the quality analysis result.
- 4. The method of claim 3, wherein the performing static analysis on the software under test based on the code element nodes in the software knowledge graph and the associated edges of the code element nodes to obtain a static analysis result includes: analyzing and generating a code grammar tree of the software to be tested based on the code element nodes in the software knowledge graph and the associated edges of the code element nodes; and carrying out risk identification and semantic analysis on the code grammar tree based on a preset risk mode rule to obtain the static analysis result, wherein the preset risk mode rule is generated based on the historical test defect data.
- 5. The method of claim 3, wherein dynamically analyzing the software under test based on the business object node, the operation component node, and the performance index node in the software knowledge graph to obtain a dynamic analysis result comprises: Determining model input data based on service object nodes, operation component nodes and performance index nodes in the software knowledge graph; Inputting the model input data to a flow generation model to generate flow simulation data; And restoring a business transaction link of the software to be tested through a flow playback technology, and carrying out performance test and anomaly detection on the software to be tested based on the business transaction link and the flow simulation data to obtain the dynamic analysis result.
- 6. The method according to claim 1, wherein after performing mass analysis on the software to be tested based on the software knowledge graph to obtain a mass analysis result, the method further comprises: based on the effective defect information, the risk association relationship and the adjustment suggestion in the quality analysis result, the map node attribute and the association relationship among the map nodes in the software knowledge map are updated.
- 7. A software quality detection apparatus, the apparatus comprising: The acquisition unit is used for acquiring code data, operation data and historical test defect data and historical operation alarm data of the software to be tested; The construction unit is used for constructing a software knowledge graph reflecting the association relationship among internal entities of the software to be tested based on the code data, the operation data, the historical test defect data and the historical operation alarm data; And the analysis unit is used for carrying out quality analysis on the software to be detected based on the software knowledge graph to obtain a quality analysis result so as to generate a quality analysis report according to the quality analysis result.
- 8. An electronic device comprising a processor and a memory for storing a computer program capable of running on the processor, Wherein the processor is adapted to perform the method of any of claims 1 to 6 when the computer program is run.
- 9. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1 to 6.
- 10. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.
Description
Software quality detection method and device, electronic equipment and medium Technical Field The embodiment of the application relates to the technical field of computers, in particular to a software quality detection method, a device, electronic equipment and a medium. Background With the deep digital transformation of the financial industry, the iteration of an application system is increasingly frequent, and the production scale of an application software version is continuously enlarged. The introduction of new technologies such as cloud primordia, big data, artificial intelligence and the like and the improvement requirement of domestic software and hardware further accelerate the system update rhythm. Under the background, ensuring the quality and stability of large-scale and high-frequency application software production versions has become a key challenge in the field of financial science and technology. At present, the related technology mainly adopts a mode of manual experience and standardized test flow to identify risks and defects existing in the application production version, and the test means mainly comprises code walking, unit test, functional test and nonfunctional test, and relies on manual review to confirm results, so as to identify whether the test content is incomplete and whether the test results have defects. However, the related technology excessively depends on expert experience, so that the test coverage is insufficient, the manpower input is large, the detection period is long, the rules and standards depend on manual writing and maintenance, the updating is lagged, the management cost is high, and the high-frequency iteration requirement cannot be adapted. Disclosure of Invention The application provides a software quality detection method, a device, electronic equipment and a medium, which are used for solving the problems that the test coverage is insufficient, the detection efficiency is low, the maintenance cost of quality detection rules is high and the software cannot be suitable for a large-scale high-frequency software iteration production scene due to excessive dependence on manual experience in the related technology. The embodiment of the application provides a software quality detection method, which comprises the steps of obtaining code data, operation data, historical test defect data and historical operation alarm data of software to be detected, constructing a software knowledge graph reflecting the incidence relation among internal entities of the software to be detected based on the code data, the operation data, the historical test defect data and the historical operation alarm data, and carrying out quality analysis on the software to be detected based on the software knowledge graph to obtain a quality analysis result so as to generate a quality analysis report according to the quality analysis result. In some embodiments, constructing a software knowledge graph reflecting the association relationship between internal entities of software to be tested based on code data, operation data, historical test defect data and historical operation alarm data comprises extracting code elements, service objects, operation components and performance indexes from the code data, the operation data, the historical test defect data and the historical operation alarm data, determining the code elements, the service objects, the operation components and the performance indexes as graph nodes, constructing a directed edge connecting the graph nodes according to a calling link, a data flow direction, a resource dependence and a logic mapping relationship, and constructing the software knowledge graph according to the graph nodes and the directed edge connecting the graph nodes. In some embodiments, based on a software knowledge graph, performing quality analysis on the software to be tested to obtain a quality analysis result, wherein the quality analysis result comprises performing static analysis on the software to be tested based on code element nodes and associated edges of the code element nodes in the software knowledge graph to obtain a static analysis result, performing dynamic analysis on the software to be tested based on service object nodes, operation component nodes and performance index nodes in the software knowledge graph to obtain a dynamic analysis result, and performing fusion processing on the static analysis result and the dynamic analysis result and combining a risk level judgment rule to obtain the quality analysis result. In some embodiments, performing static analysis on the software to be tested based on the code element nodes and the associated edges of the code element nodes in the software knowledge graph to obtain a static analysis result, wherein the static analysis result comprises analyzing and generating a code grammar tree of the software to be tested based on the code element nodes and the associated edges of the code element nodes in the