CN106776351B - A kind of combined test use-case prioritization method based on One-test-at-a-time strategy - Google Patents

A kind of combined test use-case prioritization method based on One-test-at-a-time strategy Download PDF

Info

Publication number
CN106776351B
CN106776351B CN201710137624.1A CN201710137624A CN106776351B CN 106776351 B CN106776351 B CN 106776351B CN 201710137624 A CN201710137624 A CN 201710137624A CN 106776351 B CN106776351 B CN 106776351B
Authority
CN
China
Prior art keywords
test
test case
case
combined
rate
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.)
Active
Application number
CN201710137624.1A
Other languages
Chinese (zh)
Other versions
CN106776351A (en
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.)
Zhejiang Sci Tech University ZSTU
Original Assignee
Zhejiang Sci Tech University ZSTU
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 Zhejiang Sci Tech University ZSTU filed Critical Zhejiang Sci Tech University ZSTU
Priority to CN201710137624.1A priority Critical patent/CN106776351B/en
Publication of CN106776351A publication Critical patent/CN106776351A/en
Application granted granted Critical
Publication of CN106776351B publication Critical patent/CN106776351B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Abstract

The invention discloses a kind of combined test use-case prioritization methods based on One-test-at-a-time strategy, belong to software test field.The present invention includes: to select the test case of a highest priority for executing every time in combined test set of uses case by One-test-at-a-time strategic thinking;The sort result that priorities of test cases uses multiple rate to be covered, three impact factors of test case crash rate and test case different degree and weight factor α, β, γ to calculate;According to the test case of test case, impact factor parameter value is adjusted in real time;Further according to impact factor parameter value adjusted, the test case of next highest priority is selected to be executed, repeatedly until reaching test target.The present invention can be used for the sequence of the priorities of test cases of various combination coverage strength generation, effectively can detect more defects using identical test case quantity, improve defects detection efficiency.

Description

A kind of combined test use-case priority row based on One-test-at-a-time strategy Sequence method
Technical field
The invention belongs to software test fields, and in particular to a kind of combination survey based on One-test-at-a-time strategy Example prioritization method on probation.
Background technique
In the epoch that computer industry rapidly develops, novel software product emerges one after another, software product upgrading Paces also step to be getting faster, this rises the frequency that regression test is carried out to software product constantly.However, for developer For, taking a significant amount of time, consuming a huge sum of money also can only be to get half the result with twice the effort.Under this high-cost expense, how effectively The short time low cost under the premise of find that this problem of the defect of software product becomes tester and constantly opens up as early as possible The emphasis of innovation.
The prioritization techniques of test case are a kind of measuring technologies of highly effective.With priorities of test cases skill The introducing of art completes this letter of the degree of test target according to test case in order to preferably reach test target faster Breath is ranked up, and contributes higher test case thereby executing preferential execute.
Combined test is one of important method of software test, and this method has been widely used in the generation of test case In, this method can reduce the scale of test use cases.Due to resource constraint, combined test can not in most cases be generated Test case carry out Complete test, therefore can only the preferential higher test case of execution part percentage contribution as much as possible.
Existing combined test use-case priority algorithm is substantially from combined angle is covered, and passes through some standard Corresponding priority is measured and provided to test case, then test case is surveyed one by one by the progress of these priority Examination.Or priority is dynamically adjusted in the process of implementation to test case for test process itself.In most cases, right The selection of combined test test case prioritizing factor is excessively single, and the real time problem for not accounting for test process itself and triggering.
Therefore, for defect existing for combined test use-case priority, the invention proposes one kind for fixed dynamics group The method for closing priorities of test cases sequence: firstly, generating situation, initialization test use-case according to existing combined test use-case Collection.By One-test-at-a-time strategic thinking, one test case of selection is for executing every time.By test case according to The result that multiple impact factors calculate jointly is ranked up, and weighs important relationship using weight between impact factor.According to current The test case of test case adjusts impact factor parameter value to adapt to the real-time sequence of test case.After adjustment Impact factor parameter value, select next highest priority test case executed, repeatedly until all tests use Example sequence finishes or reaches test target.
Summary of the invention
The purpose of the present invention is improving to original combined priorities of test cases algorithm, increase multiple priority rankings Impact factor and the strategy that impact factor value is adjusted according to actual test result provide a kind of significantly more efficient combined test use Example prioritization method.
The technical solution adopted by the present invention to solve the technical problems is as follows:
Definition:
In a software under testing system (abbreviation SUT), it is assumed that there are n influence factor, these influence factors constitute one A finite aggregate { f1, f2,…,fn, wherein each influence factor fiValue be vi={ p1, p2,…,pk}.So, the one of SUT Test case tc={ x1, x2,…,xn}(x1∈v1, x2∈v2,…,xn∈vn)。
In combined test, the generation of test case is all the certain dynamics combination for requiring to be completely covered, to reach generation Test use cases scale purpose as the smallest as possible.Use-case is stored using combined test set covering theory, combined test set covering theory Every a line represents a test case, and each column represent an influence factor, and each single item is the value of corresponding influence factor.
Combined test set covering theory is divided into fixed dynamics set covering theory CA=(N;λ,n,|v1||v2|…|vn|) and variable force Spend set covering theory VCA=(N;λ,n,|v1||v2|…|vn|, C), the present invention only discusses the combination about fixed dynamics set covering theory The case where test case.Wherein, N is test case number, and λ is combined covering dynamics, and n is influence factor number, | vi| it is shadow Ring factor fiValue quantity.CA=(N;λ, n, | v1||v2|…|vn|) be a N × n matrix, it is desirable that any N × λ square Battle array contains all λ tuples in codomain at least once.
For any one test case tc={ x1, x2,…,xn, it must coverA group It closes.CombSetλ(tc) it can be described as:
One-test-at-a-time strategy:
One-test-at-a-time strategy is widely used in the research of combined test, it is simple, effectively, convenient for extension The characteristics of the strategy is preferably improved and is applied in priorities of test cases sort algorithm.In grinding for combined test In studying carefully, the frame of One-test-at-a-time construction of strategy Greedy algorithm can be utilized.The strategy is One-Dimensional Extended mechanism, Select global greedy algorithm that can reach optimal state.When selecting a test case to be executed every time, select excellent The first highest test case of grade.
Fixed dynamics combined test prioritizing algorithm:
The prioritizing algorithm (abbreviation MICP) of the fixation dynamics combined test set of uses case of multiple coverage is one kind in list The algorithm improved on the basis of the combined test prioritization method (abbreviation ICBP) of one covering.ICBP is every time from time Select in test use cases T, select a test case ts, enable ts cover-most combined test use-case sequence S not yet The λ member of covering combines.MICP be also select a test case tc every time from candidate test use cases T so that tc with combine The similarity of all test case Multiple Combination coverage informations is minimum in test case sequence S.Cover λ member combining parameter values Similitude (abbreviation CVCSλ) number for the publicly-owned λ member parameter group that test case tc and candidate test use cases T is covered is described, And CVCSλ(tc, T)=| CombSetλ(tc)∩CombSetλ(T)|.Normalized similarity measurement (abbreviation NCVCSλ) it is phase Like the metric form that property calculates, calculate as follows:
MICP and ICBP is to fix dynamics combined test present combination covering dynamics λ as main sort by.ICBP Only consider the coverage condition of all tuples of present combination covering dynamics λ, and MICP is λ and λ with reference to whole combined covering dynamics The similar situation of following tuple.MICP is calculated as follows using the multiple similarity measurement (abbreviation MICS) for being covered with information:
Wherein 0 < ωi≤ 1.0 and
MICP is superior to ICBP in combining parameter values rate and error detection rate.Therefore the present invention uses and is similar to MICP Mode is covered with combined calculating for multiple.
Combined test use-case prioritization method proposed by the present invention can be used for the survey of various combination coverage strength generation In the sequence of example priority on probation, it can effectively detect more to lack using identical test case quantity It falls into, improves the efficiency of defects detection.
Detailed description of the invention
Fig. 1 is One-test-at-a-time policing algorithm flow chart.
Fig. 2 is the calculation flow chart of test case rate to be covered.
Fig. 3 is the combined test use-case prioritizing algorithm flow chart based on One-test-at-a-time strategy.
Specific embodiment
Further describe the present invention below with reference to the accompanying drawings and specific embodiments.
Fig. 1 is the One-test-at-a-time policing algorithm flow chart implemented in inventive algorithm.
Combined test use-case priority approach of the present invention, One-test-at-a-time strategy, multiple target is excellent Change thought and combined test use-case prioritizing algorithm to combine, proposes a kind of multiple priority ranking impact factors and root The factually strategy of border test result adjustment impact factor value, is used for combined test use-case priority ranking, as shown in Fig. 2, packet Include following steps:
Step 1: initialization test use-case sequence setsInput combined test set of uses case It is t0The test at moment is used Example sequence sets,It is t0The combined test set of uses case at moment.At this point, i=0.
Step 2: calculating the priority of every test case having not carried out
Wherein, tcjIt is test case, tiIt is current time, λ is combined covering dynamics,It is to survey Example tc on probationjMultiple rate to be covered.Indicate test case tcj, in tiMoment coverage test use-case sequenceDynamics is combined in addition For all combined intensity of λ and λ or less.It is test case tcjCrash rate.It indicates in test process, tiMoment test Use-case tcjCrash rate.It is test case tcjSignificance level.α, β, γ respectively indicate multiple rate to be covered, test case The weight of crash rate and test case significance level, and alpha+beta+γ=1.
Step 2.1: calculating test test case tcjMultiple rate to be covered
Wherein 0 < ωk≤ 1.0 andMultiple rate to be covered is then to consider test case tcjCoverage test Use-case sequence setsIn not yet cover the probability of combination, and require covering k member combining parameter values, when k difference, covering There is also differences for combined situation.Therefore the concept of weight is introduced, made using the weighted average of all k member combining parameter values coverage rates For multiple rate to be covered.Consider test case tcjCoverage condition, test case tcjIt being capable of coverage test use-case sequence setsIn Still unlapped combination is more, then test case tcjIt is easier to be selected the use-case tested for next.If k is fixed, only K member combining parameter values coverage rate is calculated, therefore uses test case tcjCoverage test use-case sequence setsMiddle combined probability It negates, obtains test case tcjNon- coverage test use-case sequence setsMiddle combined probability.Fig. 3 is that test case is to be covered The calculation flow chart of rate.
Wherein,It is test case tcjRate to be covered indicates test case tcj, in tiMoment is covered Lid test case sequenceMiddle combination dynamics is the intensity of k combination.
Step 2.2: calculating test case tcjCrash rate
Wherein,It is parameter value crash rate.It indicates in test process, tiMoment test case tcjInfluence Factor fkIn, value is the crash rate of p.It is parameter value failure number.Indicate test case tcjIn, tiMoment ginseng Number value crash rate is not 0 parameter value number, i.e.,Parameter value number.
Step 2.3: calculating test case tcjSignificance level
Wherein, ω (fk, p) and it is parameter value weights.Indicate influence factor fkIn, the priority that value is p is weighed Value.N is test case tcjThe number of middle parameter.
Step 2.4: calculating test case tcjPriority
Step 2.5: step 2.1~2.4 are repeated, until combined test set of uses caseIn all test cases priority Until calculating result.
Step 3: finding tiThe test use cases equalSet of moment highest priority.There may be multiple highest priorities Test case, by these priority are identical and the test case of highest priority is expressed as the test an of highest priority and uses Example collection.
Step 4: randomly selecting a test case from test use cases equalSetAnd implementation of test casesAnd Obtain test result.
Step 5: according to test caseTest result, adjust the crash rate of test case, i.e., adjusting parameter value is lost EfficiencySo that ti+1The crash rate of the test case at moment can be adjusted dynamically during the test.It is testing In the process, the execution of test case can feed back the mistake and defect that may currently exist, then the ginseng that test case is covered The crash rate of number value needs to make corresponding adjustment, to guarantee that test case crash rate can calculate in real time, it is ensured that final excellent The accuracy of first grade sequence.If tiMoment, test caseDetect existing defects in software under testing system, test result can only Software failure is reacted, but can not judge it is the failure caused by which parametric interaction actually.It therefore, can only be rightCovering The crash rate of all parameter values is increase accordingly, and the crash rate of other parameters value remains unchanged.Then ti+1Moment, each parameter take Value crash rate can use following formula:
Wherein, Δ c is the value added of crash rate.
If tiMoment, test caseExisting defects in software under testing system are not detected, then the test case covers The crash rate of all parameter values becomes 0, and the crash rate of other parameters value remains unchanged.Then ti+1Moment, each parameter value lose Efficiency can use following formula:
Step 6: moment i increases.By test caseIt is inserted into test case sequence setsTail portion, by test caseFrom combined test set of uses caseMiddle rejecting.
Step 7: step 2~6 are repeated, until combined test set of uses caseUntil the number of middle test case is equal to 0.
Step 8: output test case sequence sets

Claims (1)

1. a kind of combined test use-case prioritization method based on One-test-at-a-time strategy, which is characterized in that Include the following steps:
(1) initialization test use-case sequence sets input combined test set of uses case;
(2) priority of every test case having not carried out is calculated;
Priorities of test cases calculation method in the step (2) are as follows:
Calculate the priority of test caseIts formula is as follows:
Wherein, tcjIt is test case, tiIt is current time, λ is combined covering dynamics,It is test case tcjMultiple rate to be covered,It is test case tcjCrash rate,It is test case tcjSignificance level, α, β, γ difference Indicate the weight of multiple rate to be covered, test case crash rate and test case significance level, and alpha+beta+γ=1;
Multiple rate to be coveredCalculation method are as follows:
Wherein 0 < ωk≤ 1.0 and
Test case rate to be coveredCalculation method are as follows:
Wherein, CombSetk(tcj) it is test case tcjThe set of all k members combination of middle covering;
Test case crash rateCalculation method are as follows:
Wherein,It is parameter value crash rate, fkIt is the influence factor of combined test, p fkValue,It is ginseng Number value failure number;
Test case significance level calculation method
Wherein, ω (fk, p) and it is parameter value weights, n is test case tcjThe number of middle parameter;
(3) test use cases for finding current time highest priority will when there are the test case of multiple highest priorities These priority are identical and the test case of highest priority is expressed as the test use cases of a highest priority;
(4) test case is randomly selected from the test use cases of highest priorityAnd it executes this test case and obtains Take test result;
(5) according to implementation of test casesTest result, adjust the crash rate of test case;
The method of adjustment of test case crash rate in the step (5) are as follows:
According to test caseTest result, adjust the crash rate of test case, i.e. adjusting parameter value crash rateSo that ti+1The crash rate of the test case at moment can be adjusted dynamically during the test;If tiMoment surveys Example on probationDetect existing defects in software under testing system, then ti+1The adjustment at moment, each parameter value crash rate is as follows:
Wherein, Δ c is the value added of crash rate;
If tiMoment, test caseExisting defects in software under testing system are not detected, then ti+1Moment, each parameter value failure The adjustment of rate is as follows:
(6) test case that will be executedIt is inserted into the tail portion of test case sequence sets, by the test case executed from group It closes test case and concentrates rejecting;
(7) step (2)~(6) are repeated, until the number of test case in combined test set of uses case is equal to 0;
(8) test case sequence sets are exported.
CN201710137624.1A 2017-03-09 2017-03-09 A kind of combined test use-case prioritization method based on One-test-at-a-time strategy Active CN106776351B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710137624.1A CN106776351B (en) 2017-03-09 2017-03-09 A kind of combined test use-case prioritization method based on One-test-at-a-time strategy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710137624.1A CN106776351B (en) 2017-03-09 2017-03-09 A kind of combined test use-case prioritization method based on One-test-at-a-time strategy

Publications (2)

Publication Number Publication Date
CN106776351A CN106776351A (en) 2017-05-31
CN106776351B true CN106776351B (en) 2019-08-16

Family

ID=58961121

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710137624.1A Active CN106776351B (en) 2017-03-09 2017-03-09 A kind of combined test use-case prioritization method based on One-test-at-a-time strategy

Country Status (1)

Country Link
CN (1) CN106776351B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766245B (en) * 2017-10-18 2020-12-15 浙江理工大学 OTT strategy-based online sequencing method for priority of variable-strength combined test cases
CN108073518A (en) * 2018-01-24 2018-05-25 广东睿江云计算股份有限公司 A kind of testing case management and device
CN108415841B (en) * 2018-03-19 2021-06-22 南京邮电大学 Combined test case priority ordering method based on coverage strength increment
CN109783349B (en) * 2018-12-10 2022-02-15 江苏大学 Test case priority ranking method and system based on dynamic feedback weight
CN109815108B (en) * 2018-12-10 2021-12-21 江苏大学 Weight-based combined test case set prioritization ordering method and system
CN109726124B (en) * 2018-12-20 2023-06-02 北京爱奇艺科技有限公司 Test system, test method, management device, test device and computing equipment
CN110134588B (en) * 2019-04-16 2023-10-10 江苏大学 Test case priority ordering method and test system based on code and combination coverage
CN110515845B (en) * 2019-08-20 2022-12-30 义乌工商职业技术学院 Combined test case optimization generation method based on improved IPO strategy
CN111510839B (en) * 2020-04-13 2021-10-29 广东思派康电子科技有限公司 Testing method and testing system of earphone
CN111666209B (en) * 2020-05-20 2023-03-31 牡丹江师范学院 Multi-objective optimization-based test case priority ordering method
CN113127350B (en) * 2021-04-20 2022-07-01 南华大学 Combined test data generation method based on interactive relation and related equipment
CN115809202A (en) * 2023-01-04 2023-03-17 南京邮电大学 Test case priority ordering method facing parameter value switching
CN117271377B (en) * 2023-11-23 2024-02-02 中国人民解放军海军工程大学 Two-stage Bayesian verification method and system for reliability of safety key software

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855185A (en) * 2012-07-24 2013-01-02 河海大学 Pair-wise test method based on priority
CN102880545A (en) * 2012-08-30 2013-01-16 中国人民解放军63928部队 Method for dynamically adjusting priority sequence of test cases
CN105446885A (en) * 2015-12-28 2016-03-30 西南大学 Regression testing case priority ranking technology based on needs

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855185A (en) * 2012-07-24 2013-01-02 河海大学 Pair-wise test method based on priority
CN102880545A (en) * 2012-08-30 2013-01-16 中国人民解放军63928部队 Method for dynamically adjusting priority sequence of test cases
CN105446885A (en) * 2015-12-28 2016-03-30 西南大学 Regression testing case priority ranking technology based on needs

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
多目标优化的测试用例优先级在线调整策略;张娜、姚澜、包晓安、董萌、桂宁;《软件学报》;20151031;第26卷(第10期);第2451-2464页
组合测试用例的自适应随机生成与优先级排序方法研究;黄如兵;《中国博士学位论文全文数据库 信息科技辑》;20150215;正文第1-75页

Also Published As

Publication number Publication date
CN106776351A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106776351B (en) A kind of combined test use-case prioritization method based on One-test-at-a-time strategy
Reid et al. A 2.5 per cent measurement of the growth rate from small-scale redshift space clustering of SDSS-III CMASS galaxies
CN107766245B (en) OTT strategy-based online sequencing method for priority of variable-strength combined test cases
Syaikhuddin et al. Conventional software testing using white box method
Hopkins et al. The ASKAP/EMU source finding data challenge
US20190048556A1 (en) Soil quality determination device, soil quality determination method, and recording medium having program stored thereon
Thorp et al. Testing the consistency of dust laws in SN Ia host galaxies: a BAYESN examination of Foundation DR1
CN106680238B (en) Method based on infrared spectrum analysis material component content
CN103605711B (en) Construction method and device, classification method and device of support vector machine
Hayashi et al. Luminosity-dependent clustering of star-forming BzK galaxies at redshift 2
Cibirka et al. CODEX weak lensing: concentration of galaxy clusters at z∼ 0.5
CN110956613B (en) Image quality-based target detection algorithm performance normalization evaluation method and system
CN109343060A (en) ISAR imaging method and system based on deep learning time frequency analysis
CN110188862A (en) Searching method, the device, system of model hyper parameter for data processing
CN112098756A (en) Method, device, equipment and storage medium for positioning electromagnetic compatibility problem
CN110309822A (en) Hyperspectral image band selection method based on quantum evolution particle swarm algorithm
Greenman et al. Benchmarking uncertainty quantification for protein engineering
CN105843744B (en) Transformation relation preference grade sort method for concurrent program metamorphic testing
CN106408571B (en) A kind of variable class remote sensing image segmentation method based on the selection of optimal fuzzy factor
CN117349185B (en) System testing method based on interface strength dependence grading
CN109376080B (en) Time-adaptive automatic defect positioning method and device
Ion-Mărgineanu et al. A comparison of machine learning approaches for classifying multiple sclerosis courses using MRSI and brain segmentations
KR20150137073A (en) Solution search system and method, and solution search program
CN103699811B (en) A kind of adaptive nulling antenna synthetic effectiveness evaluation method
CN109409590A (en) A kind of system for fresh-water aquatic organisms water quality reference prediction

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant