CN104679656A - Combination testing method for adaptively adjusting defect detection rate - Google Patents

Combination testing method for adaptively adjusting defect detection rate Download PDF

Info

Publication number
CN104679656A
CN104679656A CN201510109637.9A CN201510109637A CN104679656A CN 104679656 A CN104679656 A CN 104679656A CN 201510109637 A CN201510109637 A CN 201510109637A CN 104679656 A CN104679656 A CN 104679656A
Authority
CN
China
Prior art keywords
test case
test
detection rate
dimension
candidate
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.)
Granted
Application number
CN201510109637.9A
Other languages
Chinese (zh)
Other versions
CN104679656B (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.)
Harbin Engineering University
Original Assignee
Harbin Engineering University
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 Harbin Engineering University filed Critical Harbin Engineering University
Priority to CN201510109637.9A priority Critical patent/CN104679656B/en
Publication of CN104679656A publication Critical patent/CN104679656A/en
Application granted granted Critical
Publication of CN104679656B publication Critical patent/CN104679656B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention belongs to the field of software testing, and particularly relates to a combination testing method for adaptively adjusting defect detection rate, which is used for performing adaptive adjustment on the defect detection rate of all dimensions of to-be-tested software. The combination testing method disclosed by the invention comprises the following steps of generating a candidate testing case set; randomly generating a capacity value M of the candidate testing case set; selecting M candidate testing cases from a software model by adopting a random method and adding the M candidate testing cases to the candidate testing case set; selecting optimal testing cases; executing testing; dynamically adjusting the detection rate of all the dimensions; judging whether the end condition of an algorithm is met or not, and if the end condition of the algorithm is not met, executing the flows until the end condition of the algorithm is met. The used adaptive adjustment aiming at the defect detection rate of all dimensions in the software model is just based on the thinking of adaptive control; the software model is fed back through the defect detection rate of all the dimensions of the current testing case, and the defect detection rate of all the dimensions in the software model is further adjusted so as to more approach a true value.

Description

A kind of combined test method of self-adaptative adjustment defects detection rate
Technical field
The invention belongs to software test field, be specifically related to a kind of combined test method that defects detection rate for each dimension of software under testing carries out the self-adaptative adjustment defects detection rate of self-adaptative adjustment.
Background technology
In the functional test of software, traditional method of testing tests fully by the combination of all values of all parameters of check system, but along with the increase of systematic parameter number and parameter value, total test case number is explosive growth, and the subset how therefrom selecting scale less is a very important problem in Test cases technology as test use cases.
Combined test is the compromise method of in the performance of system testing and the cost of test, it by abstract for tested software be a system being subject to the impact of multiple factor, wherein the value of each factor is discrete and limited.According to the difference of level of coverage, combined covering method can be divided into single factor test covering, two factors (Pairwise) combined covering, Multifactor Combination cover, wherein two factor combined tests can generate one group of test use cases, cover all combinations of any two factor values, all defects caused by two factor actings in conjunction can be exposed in theory.The test use cases that multifactor (N-way, N>2) combined test generates, can cover all combinations of any N number of factor value, can find all defect caused by N number of factor acting in conjunction in theory.But along with the raising of combination dimension, test case number will in explosive growth, and according to the observation, for large multiple utility program, the defect in software systems is all caused by the interaction of a few parameters.Kuhn and Reilly analyzes the error reporting record of Mozilla browser, the defect of result display more than about 70% is caused by 2 parametric interactions, defect more than 90% is interacted by the parameter within 3 and causes, and the software defect that 4 parametric interactions cause only accounts for less than 10, even less.So current two factor combined tests are extensively studied and are successfully applied in software test field, but the parametric interaction often having more than 4 in software causes defect, these are difficult to the defect detected, and some combined test method can't detect it.Especially the present quality requirements to software is more and more higher, and those defect needs being difficult to detect are detected, and this creates the terminal the Test cases generation algorithm that some can produce more high-dimensional covering.The combined test algorithm of a kind of self-adaptative adjustment defects detection rate that this patent proposes is exactly a kind of Test cases generation algorithm that can produce high-dimensional covering.Because the defects detection rate of traditional combined test algorithm for each dimension can only rule of thumb be guessed, this level that will the result of testing caused largely to depend on tester, and the combined test algorithm of a kind of self-adaptative adjustment defects detection rate that this patent proposes makes it constantly close to real defects detection rate according to the defects detection rate of each dimension of current test result dynamic conditioning, make the ability of the test case detection defect selected by defects detection rate stronger, test is more accurate, improves testing efficiency.
Summary of the invention
The object of the invention is to utilize and calculate and upgrade this means of testing of each dimension defects detection rate in real time, the combined test method of the self-adaptative adjustment defects detection rate of a kind of self-adaptative adjustment each dimension defects detection rate is provided.
The object of the present invention is achieved like this:
A combined test method for self-adaptative adjustment defects detection rate, comprises the steps:
(1) candidate's test use cases is generated: the capability value M of stochastic generation candidate test use cases;
(2) adopt random device from software model, select M candidate's test case to join candidate's test case to concentrate;
(3) select optimum test case: each dimension element combinations in the test case that candidate's test case is concentrated with compare with test use cases, show that each dimension increases element combinations newly, and carry out according to the defects detection rate that each dimension combines the expectation that computational prediction goes out each dimension defect that this test case can be measured, then show that each dimension defect cumulative sum i.e. this test case can be measured overall defect and expect, select to expect that the maximum the most optimum test case of test case carries out this test;
(4) perform test: the optimum test case chosen is tested by we, check the defect whether it can find in the middle of software systems;
(5) verification and measurement ratio of each dimension of dynamic conditioning: the number of combinations of each dimension newly-increased after the defect counts of each dimension detected according to this test case and this test case terminate, recalculates this dimension verification and measurement ratio;
(6) judge whether to meet algorithm termination condition, if do not met, continue to perform above flow process, until meet the termination condition of algorithm.
The beneficial effect of the invention is:
Adaptive control can be regarded as the feedback control system of an energy according to current system change Intelligent adjustment self-characteristic, so that system can according to the standard operation of some settings at optimum state.Our self-adaptative adjustment used for the adjustment of each dimension defects detection rate in the middle of software model just based on the thought of adaptive control, by the defects detection rate of current each dimension of test case, software model is fed back, the defects detection rate of each dimension in further adjustment software model, so that it is more close to actual value.
Accompanying drawing explanation
Fig. 1 is execution schematic flow sheet of the present invention.
Fig. 2 is experimental result picture of the present invention.
Fig. 3 is the partial enlarged drawing of experimental result picture of the present invention.
Fig. 4 is 4-way defects detection rate change procedure figure.
Fig. 5 is the partial enlarged drawing of 4-way defects detection rate change procedure figure.
Fig. 6 is 6-way defects detection rate change procedure figure.
Fig. 7 is the partial enlarged drawing of 6-way defects detection rate change procedure figure.
Embodiment
Below in conjunction with accompanying drawing, the present invention is described further.
The defects detection rate technology of each dimension after the present invention utilizes dynamic calculation often to take turns test process, the method that real-time update each dimension defects detection rate uses to be supplied to next round test.And then the optimum test case needed in selection test process, the test case that namely error detecing capability is the strongest.This object can realize (as shown in Figure 1) according to following steps
The first step: determine candidate's test use cases capability value M
Random mode is adopted to determine the size (such as: M=5, M=20, M=40) of candidate's test case set capability value M.
Second step: select M bar test case
According to the size of candidate's test case set capability value M that we determine, from software model, select M bar test case by random method, put it in the set of candidate's test case, alternatively test case.
3rd step: select optimum test case
We carry out estimating of Flaw detectability, according to the result that we estimate, using test case the strongest for Flaw detectability as optimum test case by current defects detection rate to each the candidate's test case in the set of candidate's test case.
4th step: perform test
The optimum test case chosen is tested by we, checks it whether can find defect.
5th step: upgrade defects detection rate
Test terminates the defect number of each dimension that the number of combinations newly covered according to each dimension of test case and this test case detect by rear algorithm, recalculate and upgrade the defects detection rate of each dimension, the defects detection rate after renewal will be used for selecting in optimum test case process next time.
6th step: algorithm termination condition
If meet termination condition algorithm to stop, if discontented afc algorithm termination condition, the combination that current test case newly covers by we is stored in set Cover, set Cover is the set being used for depositing the combination covered specially, we are called and cover set Cover, then redirect performs second step, continues to perform until meet algorithm termination condition.
Select an optimum method of test example of test process.First, each dimension defects detection rate of a software model is rule of thumb provided by tester, P 1, P 2p tthe 1 dimension defects detection rate that represents respectively ties up defects detection rate to t.According to candidate's test case with show that each dimension number of combinations of this test case increases situation newly, wherein S with comparing of test use cases trepresent this test case t to reform and increase number of combinations, then we can estimate P according to the concept of each dimension defects detection rate t* S tbe exactly the number of defects of the t dimension that this test case can detect, then be the expectation that i-th candidate's test case can measure defect, select to expect that maximum test case carries out the test of software systems.
Dynamic conditioning t ties up verification and measurement ratio method.The initial value that its t ties up verification and measurement ratio is P t, total N ties up element.I-th test case increases t dimension number of combinations newly and is the defect number of the t dimension that i-th test case detects is k t, the total t detected for a front i-1 test case ties up defect number.T then after this test of dynamic calculation i-th ties up verification and measurement ratio
P t i = ( P t i - 1 + ( k t + K t i - 1 ) / ( S t i + Σ j = 1 i = 1 S t j ) ) / 2 .
We select test case to be divided into two steps, the first step we by the capability value M according to the set of candidate's test case, select M bar test case and they to be left in the set of candidate's test case in alternatively test case, second step selects the test case of a test case that error detecing capability is the strongest as final test software systems by certain algorithm from the set of candidate's test case.For the selection of candidate's test set capacity M value, our derivation cleverly of having used mathematical induction to carry out, finally find to be candidate's test case set of M for capability value, M value is larger, the optimum test case Flaw detectability that second step is chosen is stronger, and then can reduce the use of whole test procedure test use-case.
Defects detection rate
The defects detection rate P of each dimension of a software model tbefore (1≤t≤N) is this test, the number of the defect of detected next t dimension and used t tie up the ratio of the number combined, P 1, P 2p trepresent the defects detection rate that 1 dimension defects detection rate is tieed up to t respectively.It can reflect that the defect number of the t dimension existed in Current software model accounts for t in this software model and ties up the ratio of number of combinations, so by the defects detection rate of each dimension, we can estimate that each test case detects the ability of defect.
Self-adaptative adjustment
Embodiment 1
The first step: the size determining candidate's test use cases capability value M, generates candidate's test use cases
The size of the capability value M of stochastic generation candidate test use cases.In an experiment we to M respectively value be 5,10,20,40, then generate candidate test use cases, from software systems, select M bar test case to be stored in candidate's test case at random concentrate, respectively the different values of M are tested, comparative analysis experimental result.
By complicated mathematical derivation, we prove out that M value is larger, the optimum test case Flaw detectability selected from the set of candidate's test case is stronger, thus more defect can be detected by less test case, this is also that we arrange the meaning of test set capability value M, and it will change the efficiency of our algorithm further.Concrete mathematical derivation process does not illustrate, Fig. 2 is our experimental result, time experimental result is presented at and uses identical test case, M value is larger, the defect number detected is more, is exactly that horizontal ordinate is identical in corresponding diagram, shows to use identical test case number, ordinate is larger, illustrates that the defects count detected is more.(as Suo Shi Fig. 2, Fig. 3)
Second step: select optimum test case
From the set of candidate's test case, select an optimum test case, perform test for next step.The defects detection rate P of each dimension of a software model t(1≤t≤N), before being namely this test, the number of the defect of all t dimensions detected and all t used tie up the ratio of the number combined, P 1, P 2p trepresent the defects detection rate that 1 dimension defects detection rate is tieed up to t respectively, it can reflect that the defect number of the t dimension existed in Current software model accounts for the ratio that t in this software model ties up number of combinations, so can estimate by defects detection rate each candidate's test case that candidate's test case concentrates can detect defect number E.For candidate's test case, its t (1≤t≤N) ties up parameter combinations and has individual.T used in the combination of all t dimension and coverage test set of uses case Cover tie up combination compare, remove the combination that previous test case had covered, we can show that the quantity that the t dimension that this candidate's test case newly covers combines is S t.This test case can measure t dimension defect: P t× S t, then this test case can be measured overall defect number and is: then the defect the measured number of more each candidate's test case, the candidate's test case selecting E value maximum, as optimum test case, performs this test.
What we calculated certainly detects that total defect number E is an estimated value, because before not being updated to actual value in defects detection rate, we are inaccurate with the E that it calculates, but can weigh a test case Flaw detectability to a certain extent.So the more accurate E that we estimate of defects detection rate will be more accurate, the Flaw detectability of the optimum test case that we select will be better, and this is also the object that we upgrade it in the 4th step.
3rd step: perform test
We use the mode of experiment simulation, in software systems, mark the combination that can cause different dimensions defect in advance, compare so test process is exactly combination test case covered and all combinations that can cause defect that we implant in advance, if test case successfully can cover some combinations that can cause defect, so this test case just successfully tests out this defect, the defect of different dimensions that after performing test, test case detects by we and cause this defect be combined into line item, avoid the defect that next time, test repetition comparison was tested.
4th step: self-adaptative adjustment defects detection rate
Self-adaptative adjustment defects detection rate readjusts the defects detection rate of each dimension according to current test result.Test the defects detection rate that will each dimension used initial first provided according to standard empirical by tester in test starting stage each dimension defects detection rate, the defects detection rate that each test has afterwards upgraded after once testing before all using and terminating.Suppose that the defects detection rate of testing the dimension of the t after terminating for the i-th-1 time is so we are in i-th test process, and we will use tie up defects detection rate to t to upgrade, familiar lacunas verification and measurement ratio more new formula the t upgraded after can calculating i-th test process ties up defects detection rate wherein be the defect number of the t dimension that i-th test case detects, the total t detected for a front i-1 test case ties up defect number, the new t covered for i-th test case ties up number of combinations, and first we calculate all t dimension number of combinations that i-th test case covers then deducting a front i-1 test case has been number of combinations with the t that leaving in of being covers in combination Cover set, and the t that i-th test case that we will obtain newly covers is number of combinations k t, wherein the scope 1≤t≤N of t, calculates use for upgrading defects detection rate next time.
By the mode of mathematics, the defects detection rate that we derive continuous renewal finally will level off to real defects detection rate, here real defects detection rate is that in software systems, the defect of necessary being calculates, be then that the real defect implanted in advance according to us calculates in our experiment, concrete derivation proof procedure will not do further discussion here.Fig. 4 Fig. 5 illustrates 4-way defects detection rate respectively close to the general trend of real defect verification and measurement ratio and the 4-way defects detection rate details close to real defect verification and measurement ratio enlarged fragmentary portion.Fig. 6 Fig. 7 respectively show 6-way defects detection rate in experimentation adaptive renewal process and 6-way defects detection rate close to the details of real defect verification and measurement ratio enlarged fragmentary portion, in figure, nethermost horizontal linear is exactly real defect verification and measurement ratio, from experimental result, defects detection rate moves closer to real defects detection rate.
5th step: carry out the detection of algorithm termination condition
This algorithm termination condition has two, first be according to software systems in the middle of defect number (bugs_num) whether be 0, whether second be carry out evaluation algorithm according to executed test case number to terminate, and regulation performs 20000 test case algorithms and terminates.For two kinds of termination conditions, we all test, but the algorithm termination condition related in the accompanying drawing related in this patent and arthmetic statement all carries out according to the second termination condition.
After execution test, we will judge whether to meet algorithm termination condition, if met, terminate algorithm, if discontented afc algorithm termination condition, the combination of each dimension this test case newly covered joins and covers in set Cover, empty candidate's test use cases M, for testing preparation next time, jump to step 2 and continue execution algorithm.
Repeat above-mentioned steps, until meet algorithm termination condition.

Claims (1)

1. a combined test method for self-adaptative adjustment defects detection rate, is characterized in that, comprise the steps:
(1) candidate's test use cases is generated: the capability value M of stochastic generation candidate test use cases;
(2) adopt random device from software model, select M candidate's test case to join candidate's test case to concentrate;
(3) select optimum test case: each dimension element combinations in the test case that candidate's test case is concentrated with compare with test use cases, show that each dimension increases element combinations newly, and carry out according to the defects detection rate that each dimension combines the expectation that computational prediction goes out each dimension defect that this test case can be measured, then show that each dimension defect cumulative sum i.e. this test case can be measured overall defect and expect, select to expect that the maximum the most optimum test case of test case carries out this test;
(4) perform test: the optimum test case chosen is tested by we, check the defect whether it can find in the middle of software systems;
(5) verification and measurement ratio of each dimension of dynamic conditioning: the number of combinations of each dimension newly-increased after the defect counts of each dimension detected according to this test case and this test case terminate, recalculates this dimension verification and measurement ratio;
(6) judge whether to meet algorithm termination condition, if do not met, continue to perform above flow process, until meet the termination condition of algorithm.
CN201510109637.9A 2015-03-13 2015-03-13 A kind of combined test method of adaptive adjustment defects detection rate Expired - Fee Related CN104679656B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510109637.9A CN104679656B (en) 2015-03-13 2015-03-13 A kind of combined test method of adaptive adjustment defects detection rate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510109637.9A CN104679656B (en) 2015-03-13 2015-03-13 A kind of combined test method of adaptive adjustment defects detection rate

Publications (2)

Publication Number Publication Date
CN104679656A true CN104679656A (en) 2015-06-03
CN104679656B CN104679656B (en) 2017-10-03

Family

ID=53314738

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510109637.9A Expired - Fee Related CN104679656B (en) 2015-03-13 2015-03-13 A kind of combined test method of adaptive adjustment defects detection rate

Country Status (1)

Country Link
CN (1) CN104679656B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107622007A (en) * 2016-07-14 2018-01-23 北京京东尚科信息技术有限公司 Application testing method and device
CN107844413A (en) * 2016-09-21 2018-03-27 阿里巴巴集团控股有限公司 A kind of method of testing and device
CN108763092A (en) * 2018-05-31 2018-11-06 北京理工大学 A kind of aacode defect detection method and device based on cross validation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63201841A (en) * 1987-02-18 1988-08-19 Hitachi Ltd Program debugging system
CN1595321A (en) * 2004-06-23 2005-03-16 东南大学 Fault detection method of multi-factor industrial system
US20070079280A1 (en) * 2005-08-30 2007-04-05 Motorola, Inc. Method and apparatus for generating pairwise combinatorial tests from a graphic representation
CN101902470A (en) * 2010-07-14 2010-12-01 南京大学 Form feature-based Web security vulnerability dynamic testing method
CN102855185A (en) * 2012-07-24 2013-01-02 河海大学 Pair-wise test method based on priority

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63201841A (en) * 1987-02-18 1988-08-19 Hitachi Ltd Program debugging system
CN1595321A (en) * 2004-06-23 2005-03-16 东南大学 Fault detection method of multi-factor industrial system
US20070079280A1 (en) * 2005-08-30 2007-04-05 Motorola, Inc. Method and apparatus for generating pairwise combinatorial tests from a graphic representation
CN101902470A (en) * 2010-07-14 2010-12-01 南京大学 Form feature-based Web security vulnerability dynamic testing method
CN102855185A (en) * 2012-07-24 2013-01-02 河海大学 Pair-wise test method based on priority

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
王子元等: ""组合测试用例生成技术"", 《计算机科学与探索》 *
王蓁蓁等: ""Walsh函数在组合测试中的应用"", 《计算机学报》 *
陈翔: ""组合测试技术及应用研究"", 《中国博士学位论文全文数据库 信息科技辑》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107622007A (en) * 2016-07-14 2018-01-23 北京京东尚科信息技术有限公司 Application testing method and device
CN107844413A (en) * 2016-09-21 2018-03-27 阿里巴巴集团控股有限公司 A kind of method of testing and device
CN108763092A (en) * 2018-05-31 2018-11-06 北京理工大学 A kind of aacode defect detection method and device based on cross validation
CN108763092B (en) * 2018-05-31 2020-12-01 北京理工大学 Code defect detection method and device based on cross validation

Also Published As

Publication number Publication date
CN104679656B (en) 2017-10-03

Similar Documents

Publication Publication Date Title
JP6027400B2 (en) Apparatus and method for estimating internal resistance of battery pack
CN104766175A (en) Power system abnormal data identifying and correcting method based on time series analysis
CN103999003B (en) The method determining the calibration interval of the calibration of measurement apparatus
CN105225010A (en) A kind of transformer equipment lifetime estimation method based on reliability
CN104679656A (en) Combination testing method for adaptively adjusting defect detection rate
CN104462757A (en) Sequential verification test method of Weibull distribution reliability based on monitoring data
CN108205114B (en) Method and system for predicting service life of battery
CN104901425A (en) Wide area measurement system adaptive time-delay compensation method
CN106529018A (en) Fatigue crack growth prognostics method based on Gaussian weight-hybrid particle filtering
CN103217649A (en) Method and device for displaying electric quantity, and mobile device
CN105929340A (en) Method for estimating battery SOC based on ARIMA
CN105488307A (en) Evaluation method of slope monitoring and early warning system based on Big Dipper
Honda et al. A generalized software reliability model considering uncertainty and dynamics in development
JP5342160B2 (en) Battery state detection method and battery state detection device
CN103970129B (en) Control valve viscous detection method
Çiçek et al. Do inflation expectations converge toward inflation target or actual inflation? Evidence from expectation gap persistence
CN106202906A (en) A kind of Corrosion Fatigue Properties characterizes and life estimation method
CN103501257B (en) A kind of system of selection of IP network fault probe
Newman et al. Risk metrics for dynamic complex infrastructure systems such as the power transmission grid
CN116383048A (en) Software quality information processing method and device
EP3252630A1 (en) Simulation apparatus and operating method thereof
CN109871559B (en) Analysis method for information fault scanning of power system
CN105571061B (en) Air conditioner temperature controlling method based on homogeneous control theory and device
CN104007312B (en) Signal frequency real-time measuring method based on low-frequency square signal frequency prediction
CN103310073B (en) A kind of software cost model modeling method considering software test and running environment difference

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20171003

CF01 Termination of patent right due to non-payment of annual fee