CN104360945B - A kind of computer implemented method of test case screening, computer and system - Google Patents
A kind of computer implemented method of test case screening, computer and system Download PDFInfo
- Publication number
- CN104360945B CN104360945B CN201410657161.8A CN201410657161A CN104360945B CN 104360945 B CN104360945 B CN 104360945B CN 201410657161 A CN201410657161 A CN 201410657161A CN 104360945 B CN104360945 B CN 104360945B
- Authority
- CN
- China
- Prior art keywords
- test
- test elements
- weighted value
- elements
- combination
- 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
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Computer implemented method, computer and system the invention discloses a kind of screening of test case, belong to computer realm.The method includes:Obtain at least one of the goal systems to be tested test elements;The weighted value of test elements is set;According to the weighted value of test elements, the weighted value of the combination comprising at least one test elements is set;A test case is at least screened according to the weighted value of the combination comprising at least one test elements, in the test case stored from test case storage device.The weighted value screening test cases that the present invention passes through the combination comprising at least one test elements in goal systems, it is ensured that the integrality of test case, and the efficiency of the screening of test case is improve, improve the reliability of test case screening.
Description
Technical field
The present invention relates to computer realm, more particularly to a kind of computer implemented method, the calculating of test case screening
Machine and system.
Background technology
The test of software is essential flow in software development process, relates generally to test resource(Instrument, the time,
Manpower)With test team.In many cases, the content for being tested test system is huge, but the testing time is urgent and personnel shortage, because
This will accomplish that limit test is difficult to be difficult to, and complete test case how is write in a short time and to set its preferential
Level, and be relatively difficult according to the priority screening test cases of test case.
Prior art typically uses manual compiling test case, but the test case of manual compiling has problems with,
Integrality cannot be ensured by the test case of manual compiling;And formation efficiency is low, poor reliability.
The content of the invention
In order to solve problem of the prior art, the embodiment of the invention provides a kind of computer of test case screening and realize
Method, computer and system.The technical scheme is as follows:
First aspect, there is provided a kind of computer implemented method of test case screening, computer and system, the side
Method includes:
Obtain at least one of the goal systems to be tested test elements;
The weighted value of the test elements is set;
According to the weighted value of the test elements, the weighted value of the combination comprising at least one test elements is set;
According to the weighted value of the combination comprising at least one test elements, deposited from test case storage device
A test case is at least screened in the test case of storage.
With reference in a first aspect, in the first possible implementation, the weighted value includes importance reference value I, answers
Miscellaneous degree O and defect reference value B;The weighted value for setting the test elements includes:
The weighted value of the test elements is set according to preset algorithm, and the preset algorithm includes:
The complexity of the first percentages of the importance reference value I*+test elements of the weighted value=test elements of test elements
The percentages of defect reference value B* the 3rd of the second percentages of O*+test elements.
With reference to the first possible implementation of first aspect, in second possible implementation, the basis
The weighted value of the test elements, the weighted value for setting the combination comprising at least one test elements includes:
The weighted value of all test elements included by the combination comprising at least one test elements is distinguished
It is added, obtains the weighted value of the combination comprising at least one test elements.
With reference to second possible implementation of first aspect, in the third possible implementation, the basis
The weighted value of the combination comprising at least one test elements, from the test case that test case storage device is stored
In at least screen a test case and include:
According to the size order of the weighted value of the combination of all test elements, from the survey that test case storage device is stored
A test case is at least screened in example on probation.
Second aspect, there is provided a kind of computer, the computer includes:
Acquiring unit, for obtaining at least one of the goal systems to be tested test elements;
Setting unit, for the weighted value of the setting test elements;
The setting unit is additionally operable to, and according to the weighted value of the test elements, sets comprising described at least one test
The weighted value of the combination of element;
Screening unit, for the weighted value according to the combination comprising at least one test elements, uses from test
A test case is at least screened in the test case that example storage device is stored.
With reference to second aspect, in the first possible implementation, the setting unit specifically for:
The weighted value of test elements is set according to preset algorithm, and the preset algorithm includes:
The complexity of the first percentages of the importance reference value I*+test elements of the weighted value=test elements of test elements
The percentages of defect reference value B* the 3rd of the second percentages of O*+test elements.
With reference to the first possible implementation of second aspect, in second possible implementation, the setting
Unit also particularly useful for:
The weighted value of all test elements included by the combination comprising at least one test elements is distinguished
It is added, obtains the weighted value of the combination comprising at least one test elements.
With reference to second possible implementation of second aspect, in the third possible implementation, the screening
Unit specifically for:
According to the size order of the weighted value of the combination of all test elements, from the survey that test case storage device is stored
A test case is at least screened in example on probation.
The third aspect, there is provided a kind of computer implemented system of test case screening, the system includes:
Storage device, for storing at least one of the goal systems to be tested test elements;
Test case storage device, for prestoring multiple test cases;
And, the computer as described in any in the third possible implementation of second aspect to second aspect.
The embodiment of the present invention provides a kind of computer implemented method of test case screening, computer and system, passes through
The weighted value screening test cases of at least one of goal systems test elements, it is ensured that the integrality of test case, and carry
The screening efficiency of test case high, improves the reliability of test case screening.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, below will be to that will make needed for embodiment description
Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for
For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings
Accompanying drawing.
Fig. 1 is a kind of computer implemented method flow diagram of test case screening provided in an embodiment of the present invention;
Fig. 2 is a kind of computer implemented method flow diagram of test case screening provided in an embodiment of the present invention;
Fig. 3 is a kind of computer configuation schematic diagram provided in an embodiment of the present invention;
Fig. 4 is a kind of computer implemented system schematic of test case screening provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention
Formula is described in further detail.
The embodiment of the present invention provides a kind of computer implemented method of test case screening, shown in reference picture 1, the method
Including:
101st, at least one of the goal systems to be tested test elements are obtained;
The 102nd, the weighted value of test elements is set;
103rd, according to the weighted value of test elements, the weighted value of the combination comprising at least one test elements is set;
104th, according to the weighted value of the combination comprising at least one test elements, stored from test case storage device
A test case is at least screened in test case.
The embodiment of the present invention provides a kind of computer implemented method of test case screening, by goal systems extremely
Few weighted value screening test cases for test elements, it is ensured that the integrality of test case, and improve test case
Screening efficiency, improves the reliability of test case screening.
The embodiment of the present invention provides a kind of computer implemented method of test case screening, in embodiments of the present invention,
State Tree can be formed, when this State Tree is selected test elements generation power set element according to the test elements for choosing
Formed, according to leaf node in State Tree, export the combination of test elements and the weighted value of respective combination.What State Tree was formed
The combination of test elements is ordered into, completely, comprehensively and effective, the test set that test designer exports according to State Tree,
The number of test elements and weighted value selection test case i.e. in test set.
Shown in reference picture 2, the method includes:
201st, at least one of the goal systems to be tested test elements are obtained.
Wherein, the test elements are selected in system under test (SUT), separate and can mutually be combined.
The 202nd, the weighted value of test elements is set according to preset algorithm.
Specifically, preset algorithm includes:
The complexity of the first percentages of the importance reference value I*+test elements of the weighted value=test elements of test elements
The percentages of defect reference value B* the 3rd of the second percentages of O*+test elements.
Wherein, weighted value includes importance reference value I, complexity O and defect reference value B.
Specifically, the basis of design of weighted value:Consider importance, the complexity of test elements.If the version before system
There is test, then it is also conceivable to the distribution situation of defect.
Each test elements sets its importance reference valueI, complexityOAnd defect reference valueB(It is optional).Therefore it is every
The weighted value of one test elements isT=I+O+B;
80% defect is appeared in the middle of 20% code, thus in the weighted value of test elements each element rate of specific gravity setting
It is importance reference valueIThe first percentage be 20%, complexityOThe second percentage be 80%(Zero defect reference valueBMake reference
When, the 3rd percentage is 0%)If the situation that system under test (SUT) has previous version test makes reference, the first percentage of significance level
Than accounting for 13%, the second percentage of complexity accounts for 67%, defect reference valueBThe 3rd percentage account for 20%, if partial test element value
There is no test defect, then can also assign a small amount of weighted value.
Wherein importance reference valueISetting principle:All test elements are ranked up according to significance level, it is ensured that survey
The importance reference value for trying element is inconsistent.ComplexityOSetting principle:Arranged according to the size of code that test elements are related to
Sequence;Defect reference valueBSetting principle:According to the bug situations that preceding edition system is tested, bug is more, then the test elements is scarce
Fall into reference valueBIt is higher.
After each test elements sorts according to importance reference value, complexity and defect reference value respectively, according to percentage
Test elements weighted value established standardses processed are:Total test elements number isn, the power of adjacent test elements difference after sequence
Weight valuesx=[100/n], represent 100/nAfter round, importance reference value(Complexity or defect reference value)Highest test unit
Plain weighted valueI=100, adjacent latter test elements importance reference value(Complexity or defect reference value)Weighted value be:
100-x, by that analogy.
The test elements weight table of table 1
203rd, the weighted value of all test elements included by the combination comprising at least one test elements is separately summed,
Obtain the weighted value of the combination comprising at least one test elements.
Specifically, generating State Tree according to selected test elements, the State Tree illustrates test elements and combines what is formed
Whole process, the leaf node for generating State Tree contains all combining forms of test elements.
Each test elements in test elements combination can be one and gather, or empty set, or contain test unit
An element in element set, or two elements or multiple elements in test elements set, it is also possible to equal to test elements
Set.Conversely, from each unit of test elements set usually, it only has two states:It belongs to test elements combination, or
Person is not belonging to test elements combination.In the hope of test elements anabolic process can regard as to select test elements in each
Element " take " successively or " giving up " process.
A State Tree can be used:Represent the process of test elements assembled state change.State Tree hasn+1Layer,nRepresent
The number of test elements in selected test elements set.Root node in tree represents the original state of test elements combination(For
Empty set);Leaf node, represents its final state.
State Tree forming process is:1st layer is root node(It is sky), the 2nd layer of left sibling represent and take the 1st element, right section
Point is represented inherits father node;The 2nd element is accepted or rejected in 3rd layer, on the basis of the 2nd layer, in father node in left sibling
On the basis of increase the 2nd element, right node keeps last layer father node value constant, by that analogy;Expression carry out andiLayer point
Branch node, then it represents that to precedingi-1Individual element has carried out taking/house treatment, Zhi Daon+ 1 layer, it is right to representnIndividual test elements
Take/give up, the leaf node of the State Tree is exactly the end-state of test elements combination, therefore asked what test elements were combined
Process is the process for traveling through whole State Tree.
State Tree has following features:
The level of node is defined since root node, and root is ground floor, and the child of root is the second layer.If certain node isi
Layer, then the root of its subtree is just thei+1Layer, does not have subtree.
Each node at most only has two stalk trees, and the subtree of State Tree has dividing for left and right, and its order can not arbitrarily run
, i.e., this tree can also be referred to as state binary tree.
Specifically, in the State Tree of generation, leaf node is all of combination of test elements, marks the leaf node
Test weighted value W, test weighted value W are all test elements weighted value sums in leaf node.I.e.:(It is i-th weighted value of test elements in leaf node, n represents the test elements number of whole in leaf node), according to leaf
The weighted value size descending output of child node.
204th, according to all test elements combination weighted value size order, stored from test case storage device
Test case at least screen a test case.
Specifically, test designer selects corresponding test case according to certain rule.Under normal circumstances, it is necessary to consider
The number of test elements in test combination, and test elements combination weighted value the two factors, test can be selected to combine
Include a test elements, two test elements ... ... andnVarious situations such as individual test elements.
The embodiment of the present invention provides a kind of computer implemented method of test case screening, by the bag in goal systems
The weighted value screening test cases of the combination containing at least one test elements, it is ensured that the integrality of test case, and improve
The screening efficiency of test case, improves the reliability of test case screening.
A kind of computer 3 is the embodiment of the invention provides, shown in reference picture 3, the computer 3 includes:
Acquiring unit 31, for obtaining at least one of the goal systems to be tested test elements;
Setting unit 32, the weighted value for setting test elements;
Setting unit 32 is additionally operable to, and according to the weighted value of test elements, sets the combination comprising at least one test elements
Weighted value;
Screening unit 33, for the weighted value of combination of the basis comprising at least one test elements, from test case
A test case is at least screened in the test case that storage device is stored.
Wherein, setting unit 32 specifically for:
The weighted value of test elements is set according to preset algorithm, and preset algorithm includes:
The complexity of the first percentages of the importance reference value I*+test elements of the weighted value=test elements of test elements
The percentages of defect reference value B* the 3rd of the second percentages of O*+test elements.
In addition, setting unit 32 also particularly useful for:
The weighted value of all test elements included by the combination comprising at least one test elements is separately summed, is obtained
The weighted value of the combination comprising at least one test elements.
Wherein, screening unit 33 is used for:
According to the size order of the weighted value of the combination of all test elements, from the survey that test case storage device is stored
A test case is at least screened in example on probation.
The embodiment of the present invention provides a kind of computer, by the combination comprising at least one test elements in goal systems
Weighted value screening test cases, it is ensured that the integrality of test case, and improve the screening efficiency of test case, improve
The reliability of test case screening.
A kind of computer implemented system of test case screening is the embodiment of the invention provides, shown in reference picture 4, this is
System includes:
Storage device 41, for storing at least one of the goal systems to be tested test elements;
Test case storage device 42, for prestoring multiple test cases;
And, the computer 43 as described in the third possible implementation of second aspect to second aspect is any.
The embodiment of the present invention provides a kind of computer implemented system of test case screening, by the bag in goal systems
The weighted value screening test cases of the combination containing at least one test elements, it is ensured that the integrality of test case, and improve
The screening efficiency of test case, improves the reliability of test case screening.
It should be noted that:The computer that above-described embodiment is provided is realizing a kind of computer realization of test case screening
Method when, only carried out with the division of above-mentioned each functional module for example, in practical application, can as needed will be above-mentioned
Function distribution is completed by different functional module, will the internal structure of computer be divided into different functional modules, to complete
All or part of function described above.In addition, the computer implemented side of the test case screening that above-described embodiment is provided
Method belongs to same design with computer embodiment, and it implements process and refers to embodiment of the method, repeats no more here.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can be by hardware
To complete, it is also possible to instruct the hardware of correlation to complete by program, program can be stored in a kind of storage of computer-readable
In medium, storage medium mentioned above can be read-only storage, disk or CD etc..
Presently preferred embodiments of the present invention is these are only, is not intended to limit the invention, it is all in the spirit and principles in the present invention
Within, any modification, equivalent substitution and improvements made etc. should be included within the scope of the present invention.
Claims (7)
1. a kind of computer implemented method that test case is screened, it is characterised in that methods described includes:
Obtain at least one of the goal systems to be tested test elements;
The weighted value of the test elements is set, and the weighted value includes that importance reference value I, complexity O and defect are referred to
Value B;Setting the weighted value of the test elements includes being set according to preset algorithm the weighted value of the test elements, wherein, institute
State the first percentages of the importance reference value I*+test elements of weighted value=test elements of the preset algorithm including test elements
The second percentages of complexity O*+test elements the percentages of defect reference value B* the 3rd;
According to the weighted value of the test elements, the weighted value of the combination comprising at least one test elements is set;
According to the weighted value of the combination comprising at least one test elements, stored from test case storage device
A test case is at least screened in test case.
2. method according to claim 1, it is characterised in that the weighted value according to the test elements, sets bag
The weighted value of the combination containing at least one test elements includes:
The weighted value of all test elements included by the combination comprising at least one test elements is separately summed,
Obtain the weighted value of the combination comprising at least one test elements.
3. method according to claim 2, it is characterised in that at least one test elements are included described in the basis
Combination weighted value, a test case is at least screened in the test case stored from test case storage device to be included:
According to the size order of the weighted value of the combination of all test elements, the test stored from test case storage device is used
A test case is at least screened in example.
4. a kind of computer, it is characterised in that the computer includes:
Acquiring unit, for obtaining at least one of the goal systems to be tested test elements;
Setting unit, the weighted value for setting test elements according to preset algorithm, the preset algorithm includes:Test elements
The second percentages of the complexity O*+survey of the first percentages of the importance reference value I*+test elements of weighted value=test elements
Try the percentages of defect reference value B* the 3rd of element;
The setting unit is additionally operable to, and according to the weighted value of the test elements, sets and includes at least one test elements
Combination weighted value;
Screening unit, for the weighted value according to the combination comprising at least one test elements, deposits from test case
A test case is at least screened in the test case that storage device is stored.
5. computer according to claim 4, it is characterised in that the setting unit also particularly useful for:
The weighted value of all test elements included by the combination comprising at least one test elements is separately summed,
Obtain the weighted value of the combination comprising at least one test elements.
6. computer according to claim 5, it is characterised in that the screening unit specifically for:
According to the size order of the weighted value of the combination of all test elements, the test stored from test case storage device is used
A test case is at least screened in example.
7. the computer implemented system that a kind of test case is screened, it is characterised in that the system includes:
Storage device, for storing at least one of the goal systems to be tested test elements;
Test case storage device, for prestoring multiple test cases;
And, the computer as described in claim 4 to 6 is any.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410657161.8A CN104360945B (en) | 2014-11-18 | 2014-11-18 | A kind of computer implemented method of test case screening, computer and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410657161.8A CN104360945B (en) | 2014-11-18 | 2014-11-18 | A kind of computer implemented method of test case screening, computer and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104360945A CN104360945A (en) | 2015-02-18 |
CN104360945B true CN104360945B (en) | 2017-07-07 |
Family
ID=52528209
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410657161.8A Active CN104360945B (en) | 2014-11-18 | 2014-11-18 | A kind of computer implemented method of test case screening, computer and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104360945B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111930630B (en) * | 2020-08-17 | 2024-01-05 | 电信科学技术第十研究所有限公司 | Method and device for generating big data test case based on data stream |
CN112383774B (en) * | 2020-10-30 | 2023-10-03 | 网宿科技股份有限公司 | Encoding method, encoder and server |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101226502A (en) * | 2008-02-03 | 2008-07-23 | 中兴通讯股份有限公司 | Automatization test method and system |
CN102521376A (en) * | 2011-12-20 | 2012-06-27 | 上海电机学院 | Method for simplifying software test case suite |
CN103365765A (en) * | 2012-03-28 | 2013-10-23 | 腾讯科技(深圳)有限公司 | Test case screening method and test case screening system for testing |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8776042B2 (en) * | 2002-04-08 | 2014-07-08 | Topcoder, Inc. | Systems and methods for software support |
-
2014
- 2014-11-18 CN CN201410657161.8A patent/CN104360945B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101226502A (en) * | 2008-02-03 | 2008-07-23 | 中兴通讯股份有限公司 | Automatization test method and system |
CN102521376A (en) * | 2011-12-20 | 2012-06-27 | 上海电机学院 | Method for simplifying software test case suite |
CN103365765A (en) * | 2012-03-28 | 2013-10-23 | 腾讯科技(深圳)有限公司 | Test case screening method and test case screening system for testing |
Also Published As
Publication number | Publication date |
---|---|
CN104360945A (en) | 2015-02-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Comellas et al. | Recursive graphs with small-world scale-free properties | |
CN103516733A (en) | Method and apparatus for processing virtual private cloud | |
CN105204920B (en) | A kind of implementation method and device of the distributed computing operation based on mapping polymerization | |
CN104484233B (en) | A kind of resource allocation methods | |
CN106919370A (en) | The acquisition methods and device of a kind of object attribute values | |
CN104980462B (en) | Distributed computing method, device and system | |
Kang et al. | Flow rounding | |
CN104360945B (en) | A kind of computer implemented method of test case screening, computer and system | |
CN108415912A (en) | Data processing method based on MapReduce model and equipment | |
CN107204998A (en) | The method and apparatus of processing data | |
CN110362854B (en) | Automatic processing method and device for fault tree graphical modeling node layout | |
CN106648839A (en) | Method and device for processing data | |
CN110134646A (en) | The storage of knowledge platform service data and integrated approach and system | |
CN106384292A (en) | System and method for collecting relation among social network users | |
CN102420812A (en) | Automatic quality of service (QoS) combination method supporting distributed parallel processing in web service | |
CN109634714A (en) | A kind of method and device of intelligent scheduling | |
Kordi et al. | On the complexity of duplication-transfer-loss reconciliation with non-binary gene trees | |
CN109784286A (en) | Based on multiple target mould because the remote sensing image sky of optimization algorithm composes non-supervised classification | |
CN110413226A (en) | A kind of storage pool capacity utilizes method, system, electronic equipment and storage medium | |
CN106487535A (en) | A kind of sorting technique of network flow data and device | |
CN109117135A (en) | A kind of method and device of determining scheme of colour | |
CN109389274A (en) | Scorecard configuration method, device, equipment and readable storage medium storing program for executing | |
CN108280176A (en) | Data mining optimization method based on MapReduce | |
CN107103381A (en) | A kind of method and system for planning of data center | |
CN106686076B (en) | Key feature sequence choosing method in resource service network based on cluster |
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 | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 710000 Yanta West Road, Xi'an, Shaanxi Province, No. 6 Patentee after: Telecommunications Science and technology Tenth Research Institute Limited Address before: 710000 Yanta West Road, Xi'an, Shaanxi Province, No. 6 Patentee before: TELECOMMUNICATION SCIENCE AND TECHNOLOGY NO. 10 RESEARCH INSTITUTE |