CN110990291A - Regression test case priority ranking method based on node importance evaluation - Google Patents
Regression test case priority ranking method based on node importance evaluation Download PDFInfo
- Publication number
- CN110990291A CN110990291A CN201911293823.7A CN201911293823A CN110990291A CN 110990291 A CN110990291 A CN 110990291A CN 201911293823 A CN201911293823 A CN 201911293823A CN 110990291 A CN110990291 A CN 110990291A
- Authority
- CN
- China
- Prior art keywords
- node
- total number
- class
- nodes
- pagerank
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 60
- 238000012360 testing method Methods 0.000 title claims abstract description 34
- 238000011156 evaluation Methods 0.000 title claims abstract description 10
- 238000012163 sequencing technique Methods 0.000 claims abstract description 7
- 238000012502 risk assessment Methods 0.000 claims abstract description 6
- 238000013016 damping Methods 0.000 claims description 3
- 230000000694 effects Effects 0.000 claims description 2
- 238000004364 calculation method Methods 0.000 description 7
- 238000013522 software testing Methods 0.000 description 3
- 238000010295 mobile communication Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012913 prioritisation Methods 0.000 description 1
- 238000013102 re-test Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention relates to the technical field of regression testing of object-oriented software systems, and provides a regression testing case priority ranking method based on node importance evaluation. Firstly, converting an object-oriented software system into a class-level directed complex network based on information flow; then, node C is calculatediAnd node CiThe threat, vulnerability and potential safety hazard between the neighboring nodes, and based on the probability risk assessment method, the node C is calculatediAnd node CjThe weight value between; and finally, calculating the PageRank value of each node based on a PageRank algorithm, and sequencing the priority of the test cases corresponding to the nodes according to the PageRank values of the nodes, wherein the higher the PageRank value is, the higher the priority of the test cases corresponding to the nodes is. The invention can reduce the computational complexity of the regression test case priority sequence, compress the computational cost and improve the computational efficiency.
Description
Technical Field
The invention relates to the technical field of regression testing of object-oriented software systems, in particular to a regression testing case priority ranking method based on node importance evaluation.
Background
Currently, computer systems and mobile communications are continuously developed, and software functions provided by the computer systems and the mobile communications are rich and diverse and become indispensable in daily life of people gradually. The whole software development process comprises the stages of requirement analysis, software design, software testing, software operation and maintenance and the like. The software testing stage is an auditing or comparing process between actual output and expected output, the process is not only complicated, but also the cost is expensive, and particularly in the large-scale software development process, an effective software testing method is found, which has the important effects of improving the software quality and reducing the software cost.
Regression testing refers to re-testing after old code has been modified to confirm that the modification did not introduce new errors or cause other code errors. Due to factors such as time and cost, the center of gravity of regression testing is centered on a critical module, and testers hope to sort test cases in a certain way so that the test cases with higher priorities can run earlier.
Most of the existing regression test case priority ranking methods perform priority ranking on test cases through static call graphs of tested programs or through methods of clustering the test cases and the like, and the methods only depend on the complexity of codes and ignore risk factors existing in the running process of software.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a regression test case priority ranking method based on node importance evaluation, which can reduce the calculation complexity and the compression calculation cost of the regression test case priority ranking and improve the calculation efficiency.
The technical scheme of the invention is as follows:
a regression test case priority ranking method based on node importance evaluation is characterized by comprising the following steps:
step 1: converting an object-oriented software system into a class-level directed complex network based on information flow;
step 1.1: representing the object-oriented software system ω as ω ═ C1,C2,...,Ci,...,CI}; wherein, CiThe method comprises the steps that the method is an ith class in an object-oriented software system omega, I belongs to {1, 2.,. I }, and I is the total number of classes in the object-oriented software system omega; ci={mi1,mi2,...,mip,...,mi,Pi,ai1,ai2,...,aiq,...,ai,Qi},mipIs of class CiThe p-th method of (1), aiqIs of class CiIs the qth attribute in (1), P ∈ {1,2i},q∈{1,2,...,Qi},PiIs of class CiTotal number of methods in (1), QiIs of class CiTotal number of attributes in (1);
step 1.2: each class CiSet as a node, if node ChTo node CkPassing information, node C is connectedhAnd node CkFormed with directed edges<Ch,Ck>Converting an object-oriented software system omega into a class-level directed complex network based on information flow; wherein, Ch∈ω,CkE is omega, and h is not equal to k;
step 2: calculating weights among nodes based on a probability risk evaluation method;
step 2.1: note node CiThe neighbor node of (C)j,Cj∈Wi,WiIs node CiThe neighbor node set of (2); computing node CiAnd node CjT betweenij=IDij+ODij(ii) a Wherein, IDijIs node CjTo node CiTotal number of information streams transferred, ODijIs node CiTo node CjTotal number of information streams passed;
step 2.2: computing node CiAnd node CjHas a vulnerability ofWherein, lengthipIs a method mipTotal number of code lines, PIipjIs a method mipSlave node CjTotal number of received parameters, POipjIs a method mipSlave node CiIs transmitted to the node CjThe total number of parameters of (a);
step 2.3: computing node CiAnd node CjThe potential safety hazard between isWherein x isipjIs node CjMiddle exposure method mipTotal number of methods affected by failure, xjpiIs node CiMiddle exposure method mjpTotal number of methods affected by failure;
step 2.4: calculating node C based on probability risk assessment methodiAnd node CjThe weight value between is
And step 3: carrying out priority sequencing on the test cases based on a PageRank algorithm;
step 3.1: computing node CiHas a PageRank value ofWherein σ is a damping coefficient, IiIs node CiSet of neighbor nodes WiTotal number of nodes in;
step 3.2: and sequencing the priority of the test cases corresponding to the nodes according to the PageRank values of the nodes, wherein the higher the PageRank value is, the higher the priority of the test cases corresponding to the nodes is.
The invention has the beneficial effects that:
1. the invention converts an object-oriented software system into a class-level directed complex network based on information flow, converts the problem of case priority ordering in the regression test into the problem of node importance calculation in the weighted complex network, reduces the calculation complexity of the problem and improves the efficiency of case priority ordering in the regression test.
2. The method calculates the threat, the vulnerability and the potential safety hazard between the nodes based on the probability risk assessment method, thereby obtaining the weight between the nodes, fully considering the risk factors existing in the software in the operation process, simply and accurately determining the specific value of each parameter, compressing the calculation cost and saving the calculation time.
3. Based on the PageRank algorithm, the method converts the problem of measuring the importance degree of a specific webpage relative to other webpages in the search engine index into the problem of determining the importance of different nodes in a complex network, and can quickly sequence the priority of test cases according to the PageRank values of the nodes.
Drawings
FIG. 1 is a flowchart of a regression test case prioritization method based on node importance assessment in accordance with the present invention;
fig. 2 is a schematic diagram of converting an object-oriented software system into a class-level directed complex network based on information flow in a specific embodiment.
Detailed Description
The invention will be further described with reference to the accompanying drawings and specific embodiments.
As shown in fig. 1, the regression test case priority ranking method based on node importance evaluation of the present invention includes the following steps:
step 1: converting an object-oriented software system into a class-level directed complex network based on information flow;
step 1.1: representing the object-oriented software system ω as ω ═ C1,C2,...,Ci,...,CI}; wherein, CiThe method comprises the steps that the method is an ith class in an object-oriented software system omega, I belongs to {1, 2.,. I }, and I is the total number of classes in the object-oriented software system omega; ci={mi1,mi2,...,mip,...,mi,Pi,ai1,ai2,...,aiq,...,ai,QiMip is class CiThe p-th method in (1), aiq, is class CiIs the qth attribute in (1), P ∈ {1,2i},q∈{1,2,...,Qi},PiIs of class CiTotal number of methods in (1), QiIs of class CiTotal number of attributes in (1);
step 1.2: as shown in FIG. 2, each class C is divided intoiSet as a node, if node ChTo node CkPassing information, node C is connectedhAnd node CkFormed with directed edges<Ch,Ck>Converting an object-oriented software system omega into a class-level directed complex network based on information flow; wherein, Ch∈ω,CkE ω, and h ≠ k.
Step 2: calculating weights among nodes based on a probability risk assessment method (PRA);
step 2.1: note node CiThe neighbor node of (C)j,Cj∈Wi,WiIs node CiThe neighbor node set of (2); computing node CiAnd node CjT betweenij=IDij+ODij(ii) a Wherein, IDijIs node CjTo node CiTotal number of information streams transferred, ODijIs node CiTo node CjTotal number of information streams passed;
step 2.2: computing node CiAnd node CjHas a vulnerability ofWherein, lengthipIs a method mipTotal number of code lines, PIipjIs a method mipSlave node CjTotal number of received parameters, POipjIs a method mipSlave node CiIs transmitted to the node CjThe total number of parameters of (a);
step 2.3: computing node CiAnd node CjThe potential safety hazard between isWherein x isipjIs node CjMiddle exposure method mipTotal number of methods affected by failure, xjpiIs node CiMiddle exposure method mjpTotal number of methods affected by failure;
step 2.4: calculating node C based on probability risk assessment methodiAnd node CjThe weight value between is
And step 3: carrying out priority sequencing on the test cases based on a PageRank algorithm;
and 3. step 3.1: computing node CiHas a PageRank value ofWherein σ is a damping coefficient, IiIs node CiSet of neighbor nodes WiTotal number of nodes in;
step 3.2: and sequencing the priority of the test cases corresponding to the nodes according to the PageRank values of the nodes, wherein the higher the PageRank value is, the higher the priority of the test cases corresponding to the nodes is. Wherein, the higher the PageRank value is, the higher the importance of the representative node is, and the node needs to be tested preferentially.
It is to be understood that the above-described embodiments are only a few embodiments of the present invention, and not all embodiments. The above examples are only for explaining the present invention and do not constitute a limitation to the scope of protection of the present invention. All other embodiments, which can be derived by those skilled in the art from the above-described embodiments without any creative effort, namely all modifications, equivalents, improvements and the like made within the spirit and principle of the present application, fall within the protection scope of the present invention claimed.
Claims (1)
1. A regression test case priority ranking method based on node importance evaluation is characterized by comprising the following steps:
step 1: converting an object-oriented software system into a class-level directed complex network based on information flow;
step 1.1: representing the object-oriented software system ω as ω ═ C1,C2,...,Ci,...,CI}; wherein, CiThe method comprises the steps that the method is an ith class in an object-oriented software system omega, I belongs to {1, 2.,. I }, and I is the total number of classes in the object-oriented software system omega;mipis of class CiThe p-th method of (1), aiqIs of class CiIs the qth attribute in (1), P ∈ {1,2i},q∈{1,2,...,Qi},PiIs of class CiTotal number of methods in (1), QiIs of class CiTotal number of attributes in (1);
step 1.2: each class CiSet as a node, if node ChTo node CkPassing information, node C is connectedhAnd node CkFormed with directed edges<Ch,Ck>Converting an object-oriented software system omega into a class-level directed complex network based on information flow; wherein, Ch∈ω,CkE is omega, and h is not equal to k;
step 2: calculating weights among nodes based on a probability risk evaluation method;
step 2.1: note node CiThe neighbor node of (C)j,Cj∈Wi,WiIs node CiThe neighbor node set of (2); computing node CiAnd node CjT betweenij=IDij+ODij(ii) a Wherein, IDijIs node CjTo node CiTotal number of information streams transferred, ODijIs node CiTo node CjTotal number of information streams passed;
step 2.2: computing node CiAnd node CjHas a vulnerability ofWherein, lengthipIs a method mipTotal number of code lines, PIipjIs a method mipSlave node CjTotal number of received parameters, POipjIs a method mipSlave node CiIs transmitted to the node CjThe total number of parameters of (a);
step 2.3: computing node CiAnd node CjThe potential safety hazard between isWherein x isipjIs node CjMiddle exposure method mipTotal number of methods affected by failure, xjpiIs node CiMiddle exposure method mjpLoss ofTotal number of methods affected by effect;
step 2.4: calculating node C based on probability risk assessment methodiAnd node CjThe weight value between is
And step 3: carrying out priority sequencing on the test cases based on a PageRank algorithm;
step 3.1: computing node CiHas a PageRank value ofWherein σ is a damping coefficient, IiIs node CiSet of neighbor nodes WiTotal number of nodes in;
step 3.2: and sequencing the priority of the test cases corresponding to the nodes according to the PageRank values of the nodes, wherein the higher the PageRank value is, the higher the priority of the test cases corresponding to the nodes is.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911293823.7A CN110990291A (en) | 2019-12-16 | 2019-12-16 | Regression test case priority ranking method based on node importance evaluation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911293823.7A CN110990291A (en) | 2019-12-16 | 2019-12-16 | Regression test case priority ranking method based on node importance evaluation |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110990291A true CN110990291A (en) | 2020-04-10 |
Family
ID=70094140
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911293823.7A Pending CN110990291A (en) | 2019-12-16 | 2019-12-16 | Regression test case priority ranking method based on node importance evaluation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110990291A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102289408A (en) * | 2011-09-08 | 2011-12-21 | 武汉大学 | regression test case sequencing method based on error propagation network |
CN105046155A (en) * | 2015-06-24 | 2015-11-11 | 北京系统工程研究所 | Risk assessment method and apparatus for software system vulnerability |
CN108009710A (en) * | 2017-11-19 | 2018-05-08 | 国家计算机网络与信息安全管理中心 | Node test importance appraisal procedure based on similarity and TrustRank algorithms |
CN108170613A (en) * | 2018-03-08 | 2018-06-15 | 国家计算机网络与信息安全管理中心 | A kind of software test case automatic generating method |
-
2019
- 2019-12-16 CN CN201911293823.7A patent/CN110990291A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102289408A (en) * | 2011-09-08 | 2011-12-21 | 武汉大学 | regression test case sequencing method based on error propagation network |
CN105046155A (en) * | 2015-06-24 | 2015-11-11 | 北京系统工程研究所 | Risk assessment method and apparatus for software system vulnerability |
CN108009710A (en) * | 2017-11-19 | 2018-05-08 | 国家计算机网络与信息安全管理中心 | Node test importance appraisal procedure based on similarity and TrustRank algorithms |
CN108170613A (en) * | 2018-03-08 | 2018-06-15 | 国家计算机网络与信息安全管理中心 | A kind of software test case automatic generating method |
Non-Patent Citations (2)
Title |
---|
YING WANG 等: "Using reliability risk analysis to prioritize test cases", THE JOURNAL OF SYSTEMS AND SOFTWARE * |
于海 等: "基于风险分析的回归测试用例优先级排序", 计算机学报 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112052151B (en) | Fault root cause analysis method, device, equipment and storage medium | |
US9832280B2 (en) | User profile configuring method and device | |
CN114143326B (en) | Load adjustment method, management node, and storage medium | |
US8332458B2 (en) | Monitoring threshold functions over distributed data sets | |
WO2015030637A1 (en) | Apparatus and method for processing data streams in a communication network | |
CN113778894B (en) | Method, device, equipment and storage medium for constructing test cases | |
CN117560275B (en) | Root cause positioning method and device for micro-service system based on graphic neural network model | |
CN113821418A (en) | Fault tracking analysis method and device, storage medium and electronic equipment | |
CN118246700A (en) | Dynamic adjustment method and system for power distribution network power supply strategy based on graph calculation | |
CN106445788A (en) | Method and device for predicting operating state of information system | |
CN110990291A (en) | Regression test case priority ranking method based on node importance evaluation | |
CN112882687A (en) | Method for realizing efficient universal rule engine | |
CN112800315B (en) | Data processing method, device, equipment and storage medium | |
CN114500326B (en) | Abnormality detection method, abnormality detection device, electronic device, and storage medium | |
CN115563310A (en) | Method, device, equipment and medium for determining key service node | |
WO2014092536A1 (en) | A system and method for dynamic generation of distribution plan for intensive social network analysis (sna) tasks | |
CN113495841A (en) | Compatibility detection method, device, equipment, storage medium and program product | |
CN114841267A (en) | Real-time prediction method and device, electronic equipment and computer program product | |
CN114139039A (en) | Service stability determination method, device, equipment and storage medium | |
CN106648867B (en) | Intelligent graceful restart method and device based on cloud data center | |
CN104965869A (en) | Mobile application sorting and clustering method based on heterogeneous information network | |
CN117113853B (en) | Method and system for improving running stability of piston machine | |
CN116127948B (en) | Recommendation method and device for text data to be annotated and electronic equipment | |
CN115408163B (en) | Model inference scheduling method and system based on batch processing dynamic adjustment | |
CN114358288B (en) | Knowledge graph generation method, information recommendation device and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
CB03 | Change of inventor or designer information |
Inventor after: Gao Tianhan Inventor after: Guan Bing Inventor after: Deng Xinyang Inventor before: Gao Tianhan Inventor before: Deng Xinyang |
|
CB03 | Change of inventor or designer information | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200410 |
|
RJ01 | Rejection of invention patent application after publication |