CN106610891A - Test method and device - Google Patents

Test method and device Download PDF

Info

Publication number
CN106610891A
CN106610891A CN201510690301.6A CN201510690301A CN106610891A CN 106610891 A CN106610891 A CN 106610891A CN 201510690301 A CN201510690301 A CN 201510690301A CN 106610891 A CN106610891 A CN 106610891A
Authority
CN
China
Prior art keywords
test case
test
defect
outfield
layer
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
CN201510690301.6A
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.)
Shanghai Zhongxing Software Co Ltd
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201510690301.6A priority Critical patent/CN106610891A/en
Priority to PCT/CN2016/075281 priority patent/WO2016188170A1/en
Publication of CN106610891A publication Critical patent/CN106610891A/en
Pending legal-status Critical Current

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

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 provides a test method and device. The method comprises the steps of acquiring a test case corresponding to a test item, and building a test case table, wherein at least one test case is corresponding to each test item; respectively allocating the test cases corresponding to different test items in the test case table to different priority layers for sequencing, and building a test case execution sequence table; and performing test according to the test case execution sequence table. By sequencing the test cases, a test key point is highlighted, defects existing in software can be found out as early as possible, the test efficient is improved, out-field defects are prevented from being happened again, and the customer satisfaction is improved to a certain extent.

Description

Method of testing and device
Technical field
The present invention relates to computer testing technology field, more particularly to a kind of method of testing and device.
Background technology
It is with developing rapidly for computer testing technology, in computer program testing and exploitation, particularly quick Under prompt development management mode, be to meet user's request to require cycle time, program code, test case and Test script scale growth rate is lifted quickly.In order to lift test case service efficiency, for test case Selection, the method for adjustment execution sequence, related personnel have done many research work, the supposed premise of research Be test case be complete, test case completeness has very big impact for test result.
No matter how complete Test Sample Design is, and application version publisher always has client with afterwards The defect for affecting to use is found in use, and general this kind of defect is referred to as outfield defect.And these failures In system test it is not mined out, and has certain reproduction probability in later release is issued, The version branch of application program is more, and this phenomenon can be more obvious.Such case, illustrates existing test case There is disappearance or not enough.
Demand is changed and the appearance of new demand is often that defect introduces a key factor, can introduce test case Respective change.Test case is not covered with for demand change, and the probability that defect occurs in program will increase. It is very important to the coverage condition that demand is changed to assess test case before testing.Demand is become by this patent More represent with the change of new demand unification demand.
In addition, on the premise of program function is not changed in, code refactoring can introduce program on certain probability Defect, test case may need to do corresponding change, to adapt to code refactoring.
But, at present in conventional method of testing, do not carry out test case complete evaluation and using survey The method of example layer sorting on probation, therefore there is a problem of that testing efficiency is not high.
The content of the invention
The present invention provides a kind of method of testing and device.Testing efficiency for solving prior art is not high, uses In lifting testing efficiency.
It is up to above-mentioned purpose, on the one hand, the present invention provides a kind of method of testing, including:
Test case corresponding with test event is obtained, test case table is set up;Wherein, each test event At least one test case is corresponded to therewith;
The corresponding test case of different test events in the test case table is separately dispensed into into different priorities Layer in, be ranked up, set up test case execution sequence table;
According to the test case execution sequence table, tested.
Further, the test event is at least included one in following items:
Outfield defect, internal flaw, demand change, code refactoring.
Further, before the test case to obtaining is ranked up, also include entering test case completeness Row assessment, specifically includes:
Judge whether each test event has corresponding test case in the test case table, such as Fruit is then to perform follow-up Test Case Prioritization operation;If it is not, then corresponding test case is generated, And the test case for generating is added in the test case table.
Further, test case complete evaluation is triggered by software configuration management SCM.
Further, the corresponding test case of different test events in the test case table is separately dispensed into not In the layer of same priority, specifically include:
Outfield defect and the corresponding test case of internal flaw are set to ground floor;Demand changes corresponding test Use-case is set to the second layer;The corresponding test case of code refactoring is set to third layer;Remaining test case It is set to the 4th layer;Ground floor is gradually lowered to the 4th layer of priority.
Further, the corresponding test case of outfield defect in ground floor is ranked up using following rule:
The failure for obtaining each outfield defect solves the duration T of time to current time;
For T is more than or equal to the outfield defect of Ts, then the corresponding test case of outfield defect is no longer performed; Ts is the duration threshold value for pre-setting;
For T is less than the outfield defect of Ts, then according to the size of 1/T, to each corresponding survey of outfield defect Example on probation is ranked up;During the same outfield defect multiple test cases of correspondence, carry out randomly ordered or according to volume Number sequence.
Further, the corresponding test case of internal flaw in ground floor is ranked up using following rule:
It is ranked up according to the corresponding priority of internal flaw;The wherein multiple tests of ad eundem internal flaw correspondence During use-case, carry out randomly ordered or according to number sorting.
Further, the demand of the second layer is changed corresponding test case and is ranked up using following rule:
Corresponding test case is changed to demand using Si values to be ranked up, same demand changes corresponding test When use-case has multiple, carry out randomly ordered or according to number sorting;
Wherein, Si=Li × Ci/Cavg;
Li represents the priority of i-th demand;Ci represents the i-th demand change code cyclomatic complexity, and M is change The total quantity of more demand, Cavg are average complexities.
Further, the sort method of the corresponding test case of third layer reconfiguration code is consistent with the second layer.
On the other hand, the present invention provides a kind of test device, including:
Acquisition module, for obtaining test case corresponding with test event, sets up test case table;Wherein, At least one test case of each test event is corresponded to therewith;
Order module, for the corresponding test case of different test events in the test case table is divided respectively It is fitted in the layer of different priorities, is ranked up, sets up test case execution sequence table;
Test module, for according to the test case execution sequence table, being tested.
Further, the acquisition module also includes:
Before the test case to obtaining is ranked up, test case completeness is estimated, specially: Judge whether each test event has corresponding test case in the test case table, if it is, Follow-up Test Case Prioritization operation is performed then;If it is not, then corresponding test case is generated, and will During the test case of generation adds the test case table;
Wherein, the test event is at least included one in following items:Outfield defect, internal flaw, need Ask change, code refactoring.
Further, the order module is additionally operable to:
Outfield defect and the corresponding test case of internal flaw are set to into ground floor;Demand is changed corresponding Test case is set to the second layer;Code refactoring corresponding test case is set to into third layer;Will be remaining Test case is set to the 4th layer;Ground floor is gradually lowered to the 4th layer of priority.
Further, the order module is advised using following to the corresponding test case of outfield defect in ground floor Then it is ranked up:
The failure for obtaining each outfield defect solves the duration T of time to current time;
For T is more than or equal to the outfield defect of Ts, then the corresponding test case of outfield defect is no longer performed; Ts is the duration threshold value for pre-setting;
For T is less than the outfield defect of Ts, then according to the size of 1/T, to each corresponding survey of outfield defect Example on probation is ranked up;During the same outfield defect multiple test cases of correspondence, carry out randomly ordered or according to volume Number sequence.
Further, the order module is advised using following to the corresponding test case of internal flaw in ground floor Then it is ranked up:
It is ranked up according to the corresponding priority of internal flaw;The wherein multiple tests of ad eundem internal flaw correspondence During use-case, carry out randomly ordered or according to number sorting.
Further, the order module changes corresponding test case using following rule to the demand of the second layer It is ranked up:
Corresponding test case is changed to demand using Si values to be ranked up, same demand changes corresponding test When use-case has multiple, carry out randomly ordered or according to number sorting;
Wherein, Si=Li × Ci/Cavg;
Li represents the priority of i-th demand;Ci represents the i-th demand change code cyclomatic complexity, and M is change The total quantity of more demand, Cavg are average complexities.
Further, ordering rule and of the order module to the corresponding test case of third layer reconfiguration code Two layers consistent.
Using above-mentioned technical proposal, the present invention has following advantages:
The present invention highlights test emphasis, in can finding software as early as possible by being ranked up to test case Existing defects, lift testing efficiency, it is to avoid outfield defect occurs again, improve client to a certain extent full Meaning degree.
Description of the drawings
Fig. 1 is a kind of flow chart of method of testing in the embodiment of the present invention;
Fig. 2 is a kind of structural representation of test device in the embodiment of the present invention;
Fig. 3 is the test case layer sorting flow chart of embodiment according to the present invention 1;
Fig. 4 associates schematic diagram with data pool for test case management storehouse in embodiment according to the present invention 1;
Fig. 5 is the test case complete evaluation flow process in embodiment according to the present invention 2 based on trigger mechanism Figure.
Specific embodiment
First, this patent is explained to the technical term being related in following examples:
Demand is changed:Refer to after project of having signed or program development agreement, before completing to pay, Ke Huti The function or non-functional change requirement to project or program for going out.This patent is by newly increased requirement and demand Change is all referred to as demand change.
Defect:For present in computer applied algorithm, program or software certain destroy its normal service ability Problem, mistake.
Outfield defect:After application program commercialization, find that impact program uses function by client and attendant Defect.
Internal flaw:The bugs found by tester or script before program is commercial.
Software configuration management (Software Configuration Management, referred to as SCM):It is a kind of The technology of mark, tissue and control modification, is the general designation of software code management tool in the patent, is abbreviated as SCM。
As shown in figure 1, be the present embodiments relate to a kind of method of testing, including:
Step S101, obtains test case corresponding with test event, sets up test case table;Wherein, often At least one test case of individual test event is corresponded to therewith.
In this step, test event is at least included one in following items:Outfield defect, internal flaw, need Ask change, code refactoring.Due to different projects, it is necessary to possess corresponding test case, therefore, Complete evaluation is carried out firstly the need of to test case.
Outfield defect is the problem of client's discovery, typically meeting during commercial network use after version is issued Affect client to use, but do not have tested discovery in system test, can be entered by fault management system Row management.
Internal flaw can be not as the assessment of test case completeness, because internal flaw is existing test case Defect is found after execution, complete evaluation meaning is carried out to which smaller.In but the test of last time version finds It is very big that the test case of portion's defect performs meaning again, and repairing defect can cause code to change, and correspondence is tested Use-case can be screened in evaluation process.
Demand change can be tracked by requirement management systems, and code refactoring actually belongs to demand again Realize, can also include requirement management systems and be tracked.
Interface is provided by fault management system and requirement management systems, data pool, data pool data and survey is formed Example on probation sets up a kind of 1:At least 1 test of the demand data of the mapping relations of N, i.e., 1 or outfield defect Use-case is corresponded to therewith, in test case management system to arrange parameter joint demand number, failure number.
Test case evaluation process can be triggered by SCM, or other modes triggering.Obtain test case pipe Reason system and data pool data and SCM provide software change related data, by assessing outfield defect, needing Change, code refactoring (according to demand) correspondence test case situation are asked, assessment result is generated.Assessment result It is primarily used to illustrate test case completeness.If pointed out in assessment result, lack test case, i.e.,: One or more test events do not select corresponding test case, then need artificial or pass through script Corresponding test case is generated, restarts above-mentioned assessment.If pointed out in assessment result, each test item Mesh has test case to correspond to therewith, i.e.,:Test case is complete, then generating one includes test case With outfield defect, demand change, code refactoring, internal flaw corresponding relation test case table.
Step S102, the corresponding test case of different test events in the test case table is separately dispensed into In the layer of different priorities, it is ranked up, sets up test case execution sequence table.
In this step, hierarchical priority is arranged to the test case in test case table obtained in the previous step, outward Field defect and the corresponding priorities of test cases highest of internal flaw, are set to ground floor, demand change correspondence Priorities of test cases is set to the second layer, and code refactoring correspondence test case is set to third layer;It is remaining to survey Example on probation is set to the 4th layer.
Ground floor is the corresponding test case of defect.Outfield defect correspondence test case point can be by following rule Then it is ranked up:
The failure for obtaining each outfield defect solves the duration T of time to current time;
For T is more than or equal to the outfield defect of Ts, then the corresponding test case of outfield defect is no longer performed;Ts For the duration threshold value for pre-setting.T is bigger, represents that outfield defect is longer apart from the now time, its importance Lower, for example, T=5 represents that the defect is the outfield defect found before 5 years, and possible version alternates already not Exist, or solve already.Therefore, can be without testing for too early outfield defect.
When for T is less than the outfield defect of Ts, then according to the size of 1/T, to each corresponding survey of outfield defect Example on probation is ranked up;During the same outfield defect multiple test cases of correspondence, carry out randomly ordered or according to volume Number sequence.
Last revision finds the corresponding test case of internal flaw, can be carried out according to the priority of internal flaw Sequence, general internal flaw have 4 grades:It is fatal, serious, general, slight.For ad eundem test is used Example can be with randomly ordered, it is also possible to according to number sorting.
The second layer is that demand changes corresponding test case, and priority and change scale according to demand are carried out carefully Point.Wherein the priority of demand just has determined that at the beginning of demand foundation change scale is changed by code Scale is estimated.Assume that priority is represented with L, the span of L be it is relevant with demand total scale, such as The priority that 1~999, Li represents i-th demand can be taken;Change scale can be used with change code cyclomatic complexity C represents that Ci represents the i-th demand change code cyclomatic complexity, and Cavg is average complexity.
Wherein, M change request quantity, obtains average complexity according to above-mentioned formula.
Si=Li × Ci/Cavg (2)
Wherein, for being ranked up to the priority of demand change correspondence test case, single demand is corresponding for Si values Test case may have multiple, in order to simplify process, be ranked up according to test case original number, or Person is randomly ordered.
The row that the ordering rule of third layer reconfiguration code correspondence test case can be adopted and second layer demand is changed Sequence rule identical rule.
In test and management system in addition to the above-mentioned use-case for screening, also there are a large amount of test cases ( Four layers of test case), these test cases do not have code change corresponding with demand change, however it is necessary that returning Return test, the Test Case Prioritization in regression test, having, such as to demand classes, The parameter weightings such as defects detection, complexity summation is ranked up.Here repeat no more.
Step S103, according to the test case execution sequence table, is tested.
In addition, as shown in Fig. 2 the embodiment of the present invention further relates to a kind of test device for realizing said method, bag Include:
Acquisition module 201, for obtaining test case corresponding with test event, sets up test case table;Its In, at least one test case of each test event is corresponded to therewith;
Order module 202, for the corresponding test case of different test events in the test case table is distinguished It is assigned in the layer of different priorities, sorts, set up test case execution sequence table;
Test module 203, for according to the test case execution sequence table, being tested.
Wherein, acquisition module 201 also includes:
Before the test case to obtaining is ranked up, test case completeness is estimated, specially: Judge whether each test event has corresponding test case in the test case table, if it is, Follow-up Test Case Prioritization operation is performed then;If it is not, then corresponding test case is generated, and will During the test case of generation adds the test case table.Test event is at least included one in following items: Outfield defect, internal flaw, demand change, code refactoring.
Order module 202 is additionally operable to:
Outfield defect and the corresponding test case of internal flaw are set to into ground floor;Demand is changed corresponding Test case is set to the second layer;Code refactoring corresponding test case is set to into third layer;Will be remaining Test case is set to the 4th layer;Ground floor is gradually lowered to the 4th layer of priority.
Order module 202 is arranged using following rule to the corresponding test case of outfield defect in ground floor Sequence:
The failure for obtaining each outfield defect solves the duration T of time to current time;
For T is more than or equal to the outfield defect of Ts, then the corresponding test case of outfield defect is no longer performed;Ts For the duration threshold value for pre-setting;
For T is less than the outfield defect of Ts, then according to the size of 1/T, to each corresponding test of outfield defect Use-case is ranked up;During the same outfield defect multiple test cases of correspondence, carry out randomly ordered or according to numbering Sequence.
Order module 202 is arranged using following rule to the corresponding test case of internal flaw in ground floor Sequence:
It is ranked up according to the corresponding priority of internal flaw;The wherein multiple tests of ad eundem internal flaw correspondence During use-case, carry out randomly ordered or according to number sorting.
Order module 202 is changed corresponding test case to the demand of the second layer and is ranked up using following rule:
Corresponding test case is changed to demand using Si values to be ranked up, same corresponding test of demand change is used Example is when having multiple, carries out randomly ordered or according to number sorting;
Wherein, Si=Li × Ci/Cavg;
Li represents the priority of i-th demand;Ci represents the i-th demand change code cyclomatic complexity, and M is needed for change The total quantity asked, Cavg are average complexities.
Order module 202 is consistent with the second layer to the ordering rule of the corresponding test case of third layer reconfiguration code.
As can be seen from the above-described embodiment, test case was added before test execution effectively to assess, lifted Test case completeness;For defect, demand change, code refactoring dependence test use-case carry out layer sorting, Test emphasis is highlighted, existing defects in software is found as early as possible, is lifted testing efficiency;Avoid outfield defect again Secondary appearance, can be improved customer satisfaction to a certain extent.
Below, two specific embodiments are given, are described in detail.
Embodiment 1
As shown in figure 3, after version issues test, triggering the evaluation process to use-case.Data pool is to defect (outfield Defect and internal flaw), demand change, the information unification management of the corresponding demand of code refactoring, in pond, data are joined Number has numbering, change type, time, software change to be incorporated into the parameters such as version number.Outfield defect, demand become More, code refactoring demand, internal flaw follow identical data coding rule in data pool.By changing class Type distinguishes situation not of the same race, and change type leads to commonly used digital expression, for example, 1- outfields defect, the change of 2- demands, 3- code refactorings, 4- internal flaws.Numeral is more convenient in routine processes, naturally it is also possible to using its other party Formula change type, in subsequent treatment, efficiency has discount.In software version alternates, demand change, generation Which version number code reconstruct, amendment internal flaw are incorporated into, and which version just has corresponding software code change,
Therefore only chosen according to version number and be currently needed for the demand change being incorporated into of beta version, code refactoring, inside Defect, then carries out test case incidence relation verification.Select External Defect get along well version association, only With solution defect association in time.
Fig. 4 associates schematic diagram with data pool for test case management storehouse, it is assumed that current version number to be tested is 100A, " change type " that 100A versions are selected in data pool is 3 and 4 for 2 correspondences " data number ", by ginseng Number " joint demand " can find in test case management system correspondence " test case numbering " for (3, 4,5) in corresponding data pond, numbering is 3, and " test case numbering " for 6 corresponding data ponds " data number " is 4;In data pool, numbering is 1, is External Defect, is 1 in test case reference numeral.In this way may be used To be estimated to test case completeness, " data number " is if in test case library " joint demand " Match in list less than illustrating that test case has disappearance, then need " data number " for lacking test case Export as assessment result.Can match if all of " data number ", then needing will correspondence Test case information sifting is out exported as assessment result, and " data number " assessment result is sky.
When judging whether test case is complete, it is whether basis " data number " assessment result is empty first Judged, if being not sky, export " data number ", corresponding survey is supplemented by artificial or script Example on probation;If sky, then test case is complete, and the test case table for screening is passed to sequence mould Block.
Test case is divided into 4 layers by order module, ground floor be the corresponding test case of outfield defect, the second layer Corresponding test case is changed for demand, third layer is the corresponding test case of code refactoring, and the 4th layer is front Three layers of regression test case not included.Three first layers are successively adjusted according to the method that embodiment before is described Whole priorities of test cases, is ranked up.4th level is not minimum, can be ranked up according to existing method. After sequence, the test case execution sequence table of a layering is exported.
According to test case execution sequence table, test can be performed automatically manually or by script.
In the embodiment, test case and demand, Defect Correlation table, it is possible to achieve efficiently simple to assess, Accomplish it is had altered have test case go cover.
Embodiment 2
2 methods described of embodiment is roughly the same with embodiment 1, and difference is, as shown in figure 5, embodiment 2 is logical SCM triggering test case assessments are crossed, with reference to Fig. 5, when software code change is submitted to by SCM, is such as led to After crossing a kind of svn (Subversion) software (Version Management Software) submission code change, triggering is called and is made by oneself Adopted script, initiate test case assessment, while by code modification information (such as change code cyclomatic complexity, Change lines of code, version number) and data pool in correspondence " data number " pass to test case assess mould Block.Then test case evaluation module is looked in test case management system according to data pool " data number " Corresponding test case is looked for, if do not found, a waiting task in task management module, is generated, Triggering mail notification related personnel complete to supplement use-case task.Use-case is supplemented after completing, and related personnel can be with Waiting task is set to complete, task module triggers automatically test case and reevaluated in task module Journey, if assessment passes through, test case is added in use-case list to be measured.
The version of SCM issues test case evaluation process of the test process triggering to outfield defect, to be assessed logical Later, can enter in Test Case Prioritization flow process, this flow process is identical with embodiment 1, is not just repeating.
Embodiment 2 and 1 difference of embodiment are that the evaluation process of embodiment 2 is that code change is triggered automatically, Dynamic evaluation can be accomplished, real-time tracking code is realized, demand is changed and test case corresponding relation, more Adapt to automatic test or mega project management test.
Here again to test case complete evaluation illustratively, test be divided into Black-box Testing and white-box testing, Black-box Testing is more paid close attention to and the functional test to software requirement, implements granule size and does not seek unity of standard, it is difficult to Go to weigh test case effectiveness, the effectiveness of use-case can only be lifted in case designing by evaluation, therefore To Black-box Testing, it is proposed that carry out complete evaluation to demand coverage condition with test case, i.e., all of demand There is corresponding test case.White-box testing has a variety of algorithms, and such as path covers, circulation is covered etc., Its fineness is higher, for white-box testing use-case complete evaluation, can set up enterprising in statistical basis Row assessment, such as code have 3 paths, then test case entry covers complete 3 paths, at least will There are 3 test cases, in this enforcement, rule can be with self-defined according to different application.Assessment ring in embodiment 2 Section is made an amendment, and is adapted to different test requests.
By the explanation of specific embodiment, should be to the present invention to reach the technology taken by predetermined purpose Means and effect are able to more go deep into and specific understanding, but appended diagram is only to provide and refers to and explanation With not for being any limitation as to the present invention.

Claims (16)

1. a kind of method of testing, it is characterised in that include:
Test case corresponding with test event is obtained, test case table is set up;Wherein, each test event At least one test case is corresponded to therewith;
The corresponding test case of different test events in the test case table is separately dispensed into into different priorities Layer in, be ranked up, set up test case execution sequence table;
According to the test case execution sequence table, tested.
2. method of testing according to claim 1, it is characterised in that the test event at least includes One in following items:
Outfield defect, internal flaw, demand change, code refactoring.
3. method of testing according to claim 1 and 2, it is characterised in that use in the test to obtaining Before example is ranked up, also includes being estimated test case completeness, specifically include:
Judge whether each test event has corresponding test case in the test case table, such as Fruit is then to perform follow-up Test Case Prioritization operation;If it is not, then corresponding test case is generated, And the test case for generating is added in the test case table.
4. method of testing according to claim 3, it is characterised in that by software configuration management SCM Triggering test case complete evaluation.
5. method of testing according to claim 1, it is characterised in that by the test case table not It is separately dispensed in the layer of different priorities with the corresponding test case of test event, specifically includes:
Outfield defect and the corresponding test case of internal flaw are set to ground floor;Demand changes corresponding test Use-case is set to the second layer;The corresponding test case of code refactoring is set to third layer;Remaining test case It is set to the 4th layer;Ground floor is gradually lowered to the 4th layer of priority.
6. method of testing according to claim 5, it is characterised in that the outfield defect pair in ground floor The test case answered is ranked up using following rule:
The failure for obtaining each outfield defect solves the duration T of time to current time;
For T is more than or equal to the outfield defect of Ts, then the corresponding test case of outfield defect is no longer performed; Ts is the duration threshold value for pre-setting;
For T is less than the outfield defect of Ts, then according to the size of 1/T, to each corresponding survey of outfield defect Example on probation is ranked up;During the same outfield defect multiple test cases of correspondence, carry out randomly ordered or according to volume Number sequence.
7. method of testing according to claim 5, it is characterised in that the internal flaw pair in ground floor The test case answered is ranked up using following rule:
It is ranked up according to the corresponding priority of internal flaw;The wherein multiple tests of ad eundem internal flaw correspondence During use-case, carry out randomly ordered or according to number sorting.
8. method of testing according to claim 5, it is characterised in that the demand change correspondence of the second layer Test case be ranked up using following rule:
Corresponding test case is changed to demand using Si values to be ranked up, same demand changes corresponding test When use-case has multiple, carry out randomly ordered or according to number sorting;
Wherein, Si=Li × Ci/Cavg; Cavg = ( Σ i = 1 M Ci ) / M ;
Li represents the priority of i-th demand;Ci represents the i-th demand change code cyclomatic complexity, and M is change The total quantity of more demand, Cavg are average complexities.
9. method of testing according to claim 8, it is characterised in that third layer reconfiguration code is corresponding The sort method of test case is consistent with the second layer.
10. a kind of test device, it is characterised in that include:
Acquisition module, for obtaining test case corresponding with test event, sets up test case table;Wherein, At least one test case of each test event is corresponded to therewith;
Order module, for the corresponding test case of different test events in the test case table is divided respectively It is fitted in the layer of different priorities, is ranked up, sets up test case execution sequence table;
Test module, for according to the test case execution sequence table, being tested.
11. test devices according to claim 10, it is characterised in that the acquisition module also includes:
Before the test case to obtaining is ranked up, test case completeness is estimated, specially: Judge whether each test event has corresponding test case in the test case table, if it is, Follow-up Test Case Prioritization operation is performed then;If it is not, then corresponding test case is generated, and will During the test case of generation adds the test case table;
Wherein, the test event is at least included one in following items:Outfield defect, internal flaw, need Ask change, code refactoring.
12. test devices according to claim 10, it is characterised in that the order module is additionally operable to:
Outfield defect and the corresponding test case of internal flaw are set to into ground floor;Demand is changed corresponding Test case is set to the second layer;Code refactoring corresponding test case is set to into third layer;Will be remaining Test case is set to the 4th layer;Ground floor is gradually lowered to the 4th layer of priority.
13. test devices according to claim 12, it is characterised in that the order module is to first The corresponding test case of outfield defect in layer is ranked up using following rule:
The failure for obtaining each outfield defect solves the duration T of time to current time;
For T is more than or equal to the outfield defect of Ts, then the corresponding test case of outfield defect is no longer performed; Ts is the duration threshold value for pre-setting;
For T is less than the outfield defect of Ts, then according to the size of 1/T, to each corresponding survey of outfield defect Example on probation is ranked up;During the same outfield defect multiple test cases of correspondence, carry out randomly ordered or according to volume Number sequence.
14. test devices according to claim 12, it is characterised in that the order module is to first The corresponding test case of internal flaw in layer is ranked up using following rule:
It is ranked up according to the corresponding priority of internal flaw;The wherein multiple tests of ad eundem internal flaw correspondence During use-case, carry out randomly ordered or according to number sorting.
15. test devices according to claim 12, it is characterised in that the order module is to second The demand of layer is changed corresponding test case and is ranked up using following rule:
Corresponding test case is changed to demand using Si values to be ranked up, same demand changes corresponding test When use-case has multiple, carry out randomly ordered or according to number sorting;
Wherein, Si=Li × Ci/Cavg; Cavg = ( Σ i = 1 M Ci ) / M ;
Li represents the priority of i-th demand;Ci represents the i-th demand change code cyclomatic complexity, and M is change The total quantity of more demand, Cavg are average complexities.
16. test devices according to claim 15, it is characterised in that the order module is to the 3rd The ordering rule of the corresponding test case of layer reconfiguration code is consistent with the second layer.
CN201510690301.6A 2015-10-22 2015-10-22 Test method and device Pending CN106610891A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510690301.6A CN106610891A (en) 2015-10-22 2015-10-22 Test method and device
PCT/CN2016/075281 WO2016188170A1 (en) 2015-10-22 2016-03-02 Test method and device, apparatus and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510690301.6A CN106610891A (en) 2015-10-22 2015-10-22 Test method and device

Publications (1)

Publication Number Publication Date
CN106610891A true CN106610891A (en) 2017-05-03

Family

ID=57393732

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510690301.6A Pending CN106610891A (en) 2015-10-22 2015-10-22 Test method and device

Country Status (2)

Country Link
CN (1) CN106610891A (en)
WO (1) WO2016188170A1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391376A (en) * 2017-07-26 2017-11-24 成都科来软件有限公司 A kind of regression testing method
CN107729256A (en) * 2017-11-16 2018-02-23 郑州云海信息技术有限公司 The correlating method and system of a kind of project demands and test case
CN108255653A (en) * 2018-01-02 2018-07-06 深圳壹账通智能科技有限公司 The test method and its terminal of a kind of product
CN108681505A (en) * 2018-04-13 2018-10-19 广东睿江云计算股份有限公司 A kind of Test Case Prioritization method and apparatus based on decision tree
CN109639735A (en) * 2019-01-24 2019-04-16 重庆邮电大学 A kind of test method of IPv6 industry wireless network security level
CN109947656A (en) * 2019-03-29 2019-06-28 北京奇艺世纪科技有限公司 A kind of testing case management and device
CN111008148A (en) * 2019-12-20 2020-04-14 广州品唯软件有限公司 Code testing method and device and computer readable storage medium
CN114526925A (en) * 2022-02-21 2022-05-24 中国第一汽车股份有限公司 Vehicle offline detection method and device, electronic equipment and storage medium
CN117033251A (en) * 2023-10-09 2023-11-10 杭州罗莱迪思科技股份有限公司 Regression testing method and device for multi-version system of mobile electronic equipment

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765005B (en) * 2019-09-29 2022-06-17 武汉船舶通信研究所(中国船舶重工集团公司第七二二研究所) Software reliability evaluation method and device
CN110633222B (en) * 2019-11-01 2023-01-20 中国银行股份有限公司 Method and device for determining regression test case
CN111427772A (en) * 2020-03-05 2020-07-17 广东睿江云计算股份有限公司 Multidimensional test case priority ordering method
CN111324544A (en) * 2020-03-12 2020-06-23 惠州市德赛电池有限公司 LabView-based test method and test system
CN112131108B (en) * 2020-09-18 2024-04-02 电信科学技术第十研究所有限公司 Feature attribute-based test strategy adjustment method and device
CN114546738B (en) * 2022-01-20 2023-11-07 苏州浪潮智能科技有限公司 Universal test method, system, terminal and storage medium for server
CN115017040A (en) * 2022-05-31 2022-09-06 苏州浪潮智能科技有限公司 Test case screening method and system, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102063376B (en) * 2011-02-16 2013-01-16 哈尔滨工程大学 Test case selection method
CN102214139B (en) * 2011-06-01 2013-11-27 北京航空航天大学 Automatic test performance control and debugging method facing distributed system
CN102495804A (en) * 2011-12-27 2012-06-13 创新科存储技术(深圳)有限公司 Automatic software testing method
CN102880545A (en) * 2012-08-30 2013-01-16 中国人民解放军63928部队 Method for dynamically adjusting priority sequence of test cases

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391376A (en) * 2017-07-26 2017-11-24 成都科来软件有限公司 A kind of regression testing method
CN107729256A (en) * 2017-11-16 2018-02-23 郑州云海信息技术有限公司 The correlating method and system of a kind of project demands and test case
CN108255653B (en) * 2018-01-02 2021-05-04 深圳壹账通智能科技有限公司 Product testing method and terminal thereof
CN108255653A (en) * 2018-01-02 2018-07-06 深圳壹账通智能科技有限公司 The test method and its terminal of a kind of product
CN108681505A (en) * 2018-04-13 2018-10-19 广东睿江云计算股份有限公司 A kind of Test Case Prioritization method and apparatus based on decision tree
CN108681505B (en) * 2018-04-13 2021-08-17 广东睿江云计算股份有限公司 Test case ordering method and device based on decision tree
CN109639735B (en) * 2019-01-24 2021-12-17 重庆邮电大学 Method for testing safety level of IPv6 industrial wireless network
CN109639735A (en) * 2019-01-24 2019-04-16 重庆邮电大学 A kind of test method of IPv6 industry wireless network security level
CN109947656A (en) * 2019-03-29 2019-06-28 北京奇艺世纪科技有限公司 A kind of testing case management and device
CN111008148A (en) * 2019-12-20 2020-04-14 广州品唯软件有限公司 Code testing method and device and computer readable storage medium
CN111008148B (en) * 2019-12-20 2024-02-02 广州品唯软件有限公司 Code testing method and device and computer readable storage medium
CN114526925A (en) * 2022-02-21 2022-05-24 中国第一汽车股份有限公司 Vehicle offline detection method and device, electronic equipment and storage medium
CN117033251A (en) * 2023-10-09 2023-11-10 杭州罗莱迪思科技股份有限公司 Regression testing method and device for multi-version system of mobile electronic equipment
CN117033251B (en) * 2023-10-09 2024-01-09 杭州罗莱迪思科技股份有限公司 Regression testing method and device for multi-version system of mobile electronic equipment

Also Published As

Publication number Publication date
WO2016188170A1 (en) 2016-12-01

Similar Documents

Publication Publication Date Title
CN106610891A (en) Test method and device
Huang et al. A history-based cost-cognizant test case prioritization technique in regression testing
Shihab et al. An industrial study on the risk of software changes
CN105718371B (en) A kind of regression testing method, apparatus and system
Filó et al. A catalogue of thresholds for object-oriented software metrics
Hassan et al. Using decision trees to predict the certification result of a build
Chu et al. Review of quantitative software reliability methods
Isabella et al. Study paper on test case generation for GUI based testing
CN107861876A (en) Method of testing, device, computer equipment and readable storage medium storing program for executing
Kelly et al. Scientific software testing: Analysis with four dimensions
CN102831055A (en) Test case selection method based on weighting attribute
CN109344053A (en) Interface coverage test method, system, computer equipment and storage medium
CN110347580A (en) A method of building non-embedded software reliability test process model
CN109491922A (en) One kind being based on model-driven test method and apparatus
Suleiman et al. A survey on prioritization regression testing test case
Dhanalaxmi et al. A review on software fault detection and prevention mechanism in software development activities
Karnavel et al. Automated software testing for application maintenance by using bee colony optimization algorithms (BCO)
CN106095662A (en) Test case set reduction method based on program slicing
CN107844427A (en) A kind of Test Case Prioritization method perceived based on test resource
Sapna et al. Prioritization of scenarios based on uml activity diagrams
Fouché et al. Towards incremental adaptive covering arrays
CN107423219A (en) A kind of construction method of the software fault prediction technology based on static analysis
Chaudhary et al. Test case prioritizationusing fuzzy logic for gui based software
CN109800176A (en) Chip code coverage rate delivery method and system
Thelin et al. Applying sampling to improve software inspections

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20171020

Address after: 201203 B, block 889, blue wave road, Zhangjiang hi tech park, Shanghai, 205

Applicant after: Shanghai Zhongxing Software Co., Ltd.

Address before: 518057 Nanshan District Guangdong high tech Industrial Park, South Road, science and technology, ZTE building, Ministry of Justice

Applicant before: ZTE Corporation

WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170503