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 PDF

Info

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
Application number
CN201911293823.7A
Other languages
Chinese (zh)
Inventor
高天寒
邓新洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenyang Xin'an League Technology Co Ltd
Original Assignee
Shenyang Xin'an League Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenyang Xin'an League Technology Co Ltd filed Critical Shenyang Xin'an League Technology Co Ltd
Priority to CN201911293823.7A priority Critical patent/CN110990291A/en
Publication of CN110990291A publication Critical patent/CN110990291A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test 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

Regression test case priority ranking method based on node importance evaluation
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 of
Figure BDA0002319913840000021
Wherein, 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 is
Figure BDA0002319913840000022
Wherein 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
Figure BDA0002319913840000023
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 of
Figure BDA0002319913840000024
Wherein σ 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 of
Figure BDA0002319913840000031
Wherein, 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 is
Figure BDA0002319913840000032
Wherein 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
Figure BDA0002319913840000041
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 of
Figure BDA0002319913840000042
Wherein σ 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;
Figure FDA0002319913830000011
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 of
Figure FDA0002319913830000012
Wherein, 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 is
Figure FDA0002319913830000013
Wherein 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
Figure FDA0002319913830000014
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 of
Figure FDA0002319913830000015
Wherein σ 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.
CN201911293823.7A 2019-12-16 2019-12-16 Regression test case priority ranking method based on node importance evaluation Pending CN110990291A (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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
US20230079768A1 (en) Methods and internet of things (iot) systems for processing abnormality of smart gas pipeline network
US9832280B2 (en) User profile configuring method and device
WO2021000556A1 (en) Method and system for predicting remaining useful life of industrial equipment, and electronic device
EP3039821B1 (en) Apparatus and method for processing data streams in a communication network
CN104185840A (en) Prioritization of continuous deployment pipeline tests
US8332458B2 (en) Monitoring threshold functions over distributed data sets
CN108647329B (en) User behavior data processing method and device and computer readable storage medium
CN113778894B (en) Method, device, equipment and storage medium for constructing test cases
CN110990291A (en) Regression test case priority ranking method based on node importance evaluation
CN115563310A (en) Method, device, equipment and medium for determining key service node
CN114157486B (en) Communication flow data abnormity detection method and device, electronic equipment and storage medium
CN113821418B (en) Fault root cause analysis method and device, storage medium and electronic equipment
CN113495841A (en) Compatibility detection method, device, equipment, storage medium and program product
CN114565105A (en) Data processing method and deep learning model training method and device
CN112882687A (en) Method for realizing efficient universal rule engine
CN106648867B (en) Intelligent graceful restart method and device based on cloud data center
CN117560275B (en) Root cause positioning method and device for micro-service system based on graphic neural network model
CN105512087B (en) Reliability evaluation method of resource-constrained multi-node computing system
CN117113853B (en) Method and system for improving running stability of piston machine
WO2014092536A1 (en) A system and method for dynamic generation of distribution plan for intensive social network analysis (sna) tasks
CN115408163B (en) Model inference scheduling method and system based on batch processing dynamic adjustment
CN114398558B (en) Information recommendation method, device, electronic equipment and storage medium
CN114500326B (en) Abnormality detection method, abnormality detection device, electronic device, and storage medium
CN114154046B (en) Website search ranking method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
CB03 Change of inventor or designer information
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

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