CN104360945A - Test case screening computer implementation method, computer and system - Google Patents

Test case screening computer implementation method, computer and system Download PDF

Info

Publication number
CN104360945A
CN104360945A CN201410657161.8A CN201410657161A CN104360945A CN 104360945 A CN104360945 A CN 104360945A CN 201410657161 A CN201410657161 A CN 201410657161A CN 104360945 A CN104360945 A CN 104360945A
Authority
CN
China
Prior art keywords
test
test elements
weighted value
test case
elements
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
CN201410657161.8A
Other languages
Chinese (zh)
Other versions
CN104360945B (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.)
Telecommunications Science and technology Tenth Research Institute Limited
Original Assignee
TELECOMMUNICATION SCIENCE AND TECHNOLOGY NO 10 RESEARCH INSTITUTE
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 TELECOMMUNICATION SCIENCE AND TECHNOLOGY NO 10 RESEARCH INSTITUTE filed Critical TELECOMMUNICATION SCIENCE AND TECHNOLOGY NO 10 RESEARCH INSTITUTE
Priority to CN201410657161.8A priority Critical patent/CN104360945B/en
Publication of CN104360945A publication Critical patent/CN104360945A/en
Application granted granted Critical
Publication of CN104360945B publication Critical patent/CN104360945B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a test case screening computer implementation method, a computer and a system, and belongs to the field of computers. The method comprises the following steps: acquiring at least one test element in a target system to be tested; setting the weight value of the test element; setting the weight value of a combination comprising at least one test element according to the weight value of the test element; screening at least one test case from test cases stored by a test case storage device according to the weight value of the combination comprising at least one test element. The test cases are screened through the weight value of the combination comprising at least one test element in a target system, so that the integrity of the test cases is ensured, the test case screening efficiency is increased, and the test case screening reliability is enhanced.

Description

Computer implemented method, computing machine and system that a kind of test case is screened
Technical field
The present invention relates to computer realm, particularly a kind of test case computer implemented method, computing machine and system of screening.
Background technology
The test of software is requisite flow process in software development process, relates generally to test resource (instrument, time, manpower) and test team.In a lot of situation, the content of tested system is huge, but the test duration is urgent and personnel shortage, therefore to accomplish that limit test is difficult to realize, how to write complete test case at short notice and to set its priority, and being more difficult according to the priority screening test cases of test case.
Prior art generally adopts manual compiling test case, but the test case of manual compiling exists following problem, cannot ensure integrality by the test case of manual compiling; And formation efficiency is low, poor reliability.
Summary of the invention
In order to solve the problem of prior art, embodiments provide the computer implemented method of a kind of test case screening, computing machine and system.Described technical scheme is as follows:
First aspect, provide the computer implemented method of a kind of test case screening, computing machine and system, described method comprises:
Obtain at least one test elements in the goal systems that will test;
The weighted value of described test elements is set;
According to the weighted value of described test elements, the weighted value of the combination comprising at least one test elements described is set;
According to the described weighted value comprising the combination of at least one test elements described, from the test case that test case memory storage stores, at least screen a test case.
In conjunction with first aspect, in the implementation that the first is possible, described weighted value comprises importance reference value I, complexity O and defect reference value B; The described weighted value arranging described test elements comprises:
Arrange the weighted value of described test elements according to preset algorithm, described preset algorithm comprises:
Defect reference value B* the 3rd number percent of complexity O* the second number percent+test elements of importance reference value I* the first number percent+test elements of the weighted value=test elements of test elements.
In conjunction with the first possible implementation of first aspect, in the implementation that the second is possible, the described weighted value according to described test elements, the weighted value arranging the combination comprising at least one test elements described comprises:
The weighted value of all test elements included by the described combination comprising at least one test elements described is added respectively, described in acquisition, comprises the weighted value of the combination of at least one test elements described.
In conjunction with the implementation that the second of first aspect is possible, in the implementation that the third is possible, comprise the weighted value of the combination of at least one test elements described described in described basis, from the test case that test case memory storage stores, at least screen a test case comprise:
According to the size order of the weighted value of the combination of all test elements, from the test case that test case memory storage stores, at least screen a test case.
Second aspect, provides a kind of computing machine, and described computing machine comprises:
Acquiring unit, for obtaining at least one test elements in the goal systems that will test;
Setting unit, for the described weighted value arranging test elements;
Described setting unit also for, according to the weighted value of described test elements, the weighted value of the combination comprising at least one test elements described is set;
Screening unit, for comprising the weighted value of the combination of at least one test elements described described in basis, at least screens a test case from the test case that test case memory storage stores.
In conjunction with second aspect, in the implementation that the first is possible, described setting unit specifically for:
Arrange the weighted value of test elements according to preset algorithm, described preset algorithm comprises:
Defect reference value B* the 3rd number percent of complexity O* the second number percent+test elements of importance reference value I* the first number percent+test elements of the weighted value=test elements of test elements.
In conjunction with the first possible implementation of second aspect, in the implementation that the second is possible, described setting unit also specifically for:
The weighted value of all test elements included by the described combination comprising at least one test elements described is added respectively, described in acquisition, comprises the weighted value of the combination of at least one test elements described.
In conjunction with the implementation that the second of second aspect is possible, in the implementation that the third is possible, described screening unit specifically for:
According to the size order of the weighted value of the combination of all test elements, from the test case that test case memory storage stores, at least screen a test case.
The third aspect, provide the computer implemented system of a kind of test case screening, described system comprises:
Memory device, for storing at least one test elements in the goal systems that will test;
Test case memory storage, for prestoring multiple test case;
And, as the computing machine as described in arbitrary in second aspect to the third possible implementation of second aspect.
Computer implemented method, computing machine and system that the embodiment of the present invention provides a kind of test case to screen, by the weighted value screening test cases of at least one test elements in goal systems, ensure that the integrality of test case, and improve the screening effeciency of test case, improve the reliability of test case screening.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the computer implemented method flow diagram of a kind of test case screening that the embodiment of the present invention provides;
Fig. 2 is the computer implemented method flow diagram of a kind of test case screening that the embodiment of the present invention provides;
Fig. 3 is a kind of computer organization schematic diagram that the embodiment of the present invention provides;
Fig. 4 is the computer implemented system schematic of a kind of test case screening that the embodiment of the present invention provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
A kind of computer implemented method that the embodiment of the present invention provides test case to screen, with reference to shown in Fig. 1, the method comprises:
101, at least one test elements in the goal systems that will test is obtained;
102, the weighted value of test elements is set;
103, according to the weighted value of test elements, the weighted value comprising the combination of at least one test elements is set;
104, basis comprises the weighted value of the combination of at least one test elements, from the test case that test case memory storage stores, at least screen a test case.
A kind of computer implemented method that the embodiment of the present invention provides test case to screen, by the weighted value screening test cases of at least one test elements in goal systems, ensure that the integrality of test case, and improve the screening effeciency of test case, improve the reliability of test case screening.
A kind of computer implemented method that the embodiment of the present invention provides test case to screen, in embodiments of the present invention, can according to the test elements chosen, form State Tree, this State Tree is formed when being selected test elements generation power set element, according to leaf node in State Tree, export the combination of test elements and the weighted value of respective combination.The combination of test elements that State Tree is formed is orderly, complete, comprehensively and effective, and the test set that test deviser exports according to State Tree, the i.e. number of test elements and weighted value selection test case in test set.
With reference to shown in Fig. 2, the method comprises:
201, at least one test elements in the goal systems that will test is obtained.
Wherein, this test elements is selected in system under test (SUT), separate and can combination in any mutually.
202, the weighted value of test elements is set according to preset algorithm.
Concrete, preset algorithm comprises:
Defect reference value B* the 3rd number percent of complexity O* the second number percent+test elements of importance reference value I* the first number percent+test elements of the weighted value=test elements of test elements.
Wherein, weighted value comprises importance reference value I, complexity O and defect reference value B.
Concrete, the basis of design of weighted value: importance, the complexity of considering test elements.If the version before system had test, then it is also conceivable to the distribution situation of defect.
Each test elements sets its importance reference value i, complexity oand defect reference value b(optional).Therefore the weighted value of each test elements is t=I+O+B;
The defect of 80% appears in the middle of the code of 20%, thus in the weighted value of test elements each element rate of specific gravity be set as importance reference value ithe first number percent be 20%, complexity othe second number percent be 80%(zero defect reference value bwhen making reference, the 3rd number percent is 0%), if the situation that system under test (SUT) has last version to test makes reference, then the first number percent of significance level accounts for 13%, and the second number percent of complexity accounts for 67%, defect reference value bthe 3rd number percent account for 20%, if partial test element value does not have test defect, then also can give a small amount of weighted value.
Wherein importance reference value isetting principle: all test elements are sorted according to significance level, ensure that the importance reference value of test elements is inconsistent.Complexity osetting principle: sort according to the size of code that test elements relates to; Defect reference value bsetting principle: the bug situation of testing according to front edition system, bug is more, then the defect reference value of this test elements bhigher.
Each test elements according to after the sequence of importance reference value, complexity and defect reference value, according to centesimal system test elements weighted value established standards is: total test elements number is respectively n, the weighted value of adjacent test elements difference after sequence x=[100/ n], represent 100/ nafter round, the test elements weighted value that importance reference value (complexity or defect reference value) is the highest i=100, the weighted value of an adjacent rear test elements importance reference value (complexity or defect reference value) is: 100- x, by that analogy.
Table 1 test elements weight table
203, the weighted value of all test elements included by the combination comprising at least one test elements is added respectively, obtains the weighted value comprising the combination of at least one test elements.
Concrete, generate State Tree according to selected test elements, this State Tree illustrates the whole process that test elements is combined to form, and the leaf node generating State Tree contains all array configurations of test elements.
Each test elements in test elements combination can be a set, or empty set, or contains an element in test elements set, or two elements or multiple element in test elements set, also can equal test elements set.Otherwise from each unit of test elements set usually, it only has two states: it or belong to test elements combination, or do not belong to test elements combination.Can regard as in the hope of test elements anabolic process and each element in selected test elements " got " successively or the process of " giving up ".
Can by a State Tree: represent the process that test elements assembled state changes.State Tree has n+1layer, nrepresent the number of test elements in the test elements set selected.The original state (for empty set) that the test elements that represents root node in tree combines; Leaf node, represents its final state.
State Tree forming process is: the 1st layer is root node (for empty), and the 2nd layer of left sibling represents gets the 1st element, and right node represents succession father node; Accept or reject the 2nd element in 3rd layer, on the 2nd layer of basis, increase the 2nd element in left sibling on the basis of father node, right node keeps last layer father node value constant, by that analogy; Represent and to carry out and the ithe branch node of layer, then represent to front i-1process is got/given up to individual element, until the n+ 1 layer, represent right nindividual test elements is got/is given up, and the leaf node of this State Tree is exactly the end-state of test elements combination, and the process therefore asking test elements to combine is the process traveling through whole State Tree.
State Tree has following features:
The level of node defines from root node, and root is ground floor, and the child of root is the second layer.If certain node is ilayer, then the root of its subtree is just the i+1layer, does not have subtree.
Each node only has two stalk trees at the most, and the subtree of State Tree has dividing of left and right, and its order can not be put upside down arbitrarily, and namely this tree also can be referred to as state binary tree.
Concrete, in the State Tree generated, leaf node is all combination of test elements, and mark the test weighted value W of this leaf node, this test weighted value W is all test elements weighted value sums in leaf node.That is: ( for the weighted value of i-th test elements in leaf node, n represents test elements numbers whole in leaf node), export according to the weighted value size descending of leaf node.
204, according to the size order of the weighted value of the combination of all test elements, from the test case that test case memory storage stores, a test case is at least screened.
Concrete, test deviser, according to certain rule, selects corresponding test case.Under normal circumstances, need the number considering test elements in testing combination, and these two factors of weighted value of test elements combination, testing combination can be selected to comprise a test elements, two test elements ... and nthe multiple situation such as individual test elements.
A kind of computer implemented method that the embodiment of the present invention provides test case to screen, by the weighted value screening test cases comprising the combination of at least one test elements in goal systems, ensure that the integrality of test case, and improve the screening effeciency of test case, improve the reliability of test case screening.
Embodiments provide a kind of computing machine 3, with reference to shown in Fig. 3, this computing machine 3 comprises:
Acquiring unit 31, for obtaining at least one test elements in the goal systems that will test;
Setting unit 32, for arranging the weighted value of test elements;
Setting unit 32 also for, according to the weighted value of test elements, arrange and comprise the weighted value of the combination of at least one test elements;
Screening unit 33, comprises the weighted value of the combination of at least one test elements described, from the test case that test case memory storage stores, at least screens a test case for basis.
Wherein, setting unit 32 specifically for:
Arrange the weighted value of test elements according to preset algorithm, preset algorithm comprises:
Defect reference value B* the 3rd number percent of complexity O* the second number percent+test elements of importance reference value I* the first number percent+test elements of the weighted value=test elements of test elements.
In addition, setting unit 32 also specifically for:
The weighted value of all test elements included by the combination comprising at least one test elements is added respectively, obtains the weighted value comprising the combination of at least one test elements.
Wherein, screen unit 33 for:
According to the size order of the weighted value of the combination of all test elements, from the test case that test case memory storage stores, at least screen a test case.
The embodiment of the present invention provides a kind of computing machine, by the weighted value screening test cases comprising the combination of at least one test elements in goal systems, ensure that the integrality of test case, and improve the screening effeciency of test case, improve the reliability of test case screening.
Embodiments provide the computer implemented system of a kind of test case screening, with reference to shown in Fig. 4, this system comprises:
Memory device 41, for storing at least one test elements in the goal systems that will test;
Test case memory storage 42, for prestoring multiple test case;
And, the computing machine 43 as described in as arbitrary to the third possible implementation of second aspect in second aspect.
The computer implemented system that the embodiment of the present invention provides a kind of test case to screen, by the weighted value screening test cases comprising the combination of at least one test elements in goal systems, ensure that the integrality of test case, and improve the screening effeciency of test case, improve the reliability of test case screening.
It should be noted that: the computing machine that above-described embodiment provides is when realizing the computer implemented method of a kind of test case screening, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, inner structure by computing machine is divided into different functional modules, to complete all or part of function described above.In addition, computer implemented method and the computer embodiment of the test case screening that above-described embodiment provides belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
These are only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (9)

1. a computer implemented method for test case screening, it is characterized in that, described method comprises:
Obtain at least one test elements in the goal systems that will test;
The weighted value of described test elements is set;
According to the weighted value of described test elements, the weighted value of the combination comprising at least one test elements described is set;
According to the described weighted value comprising the combination of at least one test elements described, from the test case that test case memory storage stores, at least screen a test case.
2. method according to claim 1, is characterized in that, described weighted value comprises importance reference value I, complexity O and defect reference value B; The described weighted value arranging described test elements comprises:
Arrange the weighted value of described test elements according to preset algorithm, described preset algorithm comprises:
Defect reference value B* the 3rd number percent of complexity O* the second number percent+test elements of importance reference value I* the first number percent+test elements of the weighted value=test elements of test elements.
3. method according to claim 2, is characterized in that, the described weighted value according to described test elements, and the weighted value arranging the combination comprising at least one test elements described comprises:
The weighted value of all test elements included by the described combination comprising at least one test elements described is added respectively, described in acquisition, comprises the weighted value of the combination of at least one test elements described.
4. method according to claim 3, is characterized in that, comprises the weighted value of the combination of at least one test elements described, at least screen a test case and comprise from the test case that test case memory storage stores described in described basis:
According to the size order of the weighted value of the combination of all test elements, from the test case that test case memory storage stores, at least screen a test case.
5. a computing machine, is characterized in that, described computing machine comprises:
Acquiring unit, for obtaining at least one test elements in the goal systems that will test;
Setting unit, for arranging the weighted value of described test elements;
Described setting unit also for, according to the weighted value of described test elements, the weighted value of the combination comprising at least one test elements described is set;
Screening unit, for comprising the weighted value of the combination of at least one test elements described described in basis, at least screens a test case from the test case that test case memory storage stores.
6. computing machine according to claim 5, is characterized in that, described setting unit specifically for:
Arrange the weighted value of test elements according to preset algorithm, described preset algorithm comprises:
Defect reference value B* the 3rd number percent of complexity O* the second number percent+test elements of importance reference value I* the first number percent+test elements of the weighted value=test elements of test elements.
7. computing machine according to claim 6, is characterized in that, described setting unit also specifically for:
The weighted value of all test elements included by the described combination comprising at least one test elements described is added respectively, described in acquisition, comprises the weighted value of the combination of at least one test elements described.
8. computing machine according to claim 7, is characterized in that, described screening unit specifically for:
According to the size order of the weighted value of the combination of all test elements, from the test case that test case memory storage stores, at least screen a test case.
9. a computer implemented system for test case screening, it is characterized in that, described system comprises:
Memory device, for storing at least one test elements in the goal systems that will test;
Test case memory storage, for prestoring multiple test case;
And, the computing machine as described in as arbitrary in claim 5 to 8.
CN201410657161.8A 2014-11-18 2014-11-18 A kind of computer implemented method of test case screening, computer and system Active CN104360945B (en)

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 true CN104360945A (en) 2015-02-18
CN104360945B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111930630A (en) * 2020-08-17 2020-11-13 电信科学技术第十研究所有限公司 Big data test case generation method and device based on data flow
CN112383774A (en) * 2020-10-30 2021-02-19 网宿科技股份有限公司 Encoding method, encoder and server

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060184928A1 (en) * 2002-04-08 2006-08-17 Hughes John M Systems and methods for software support
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060184928A1 (en) * 2002-04-08 2006-08-17 Hughes John M Systems and methods for software support
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

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111930630A (en) * 2020-08-17 2020-11-13 电信科学技术第十研究所有限公司 Big data test case generation method and device based on data flow
CN111930630B (en) * 2020-08-17 2024-01-05 电信科学技术第十研究所有限公司 Method and device for generating big data test case based on data stream
CN112383774A (en) * 2020-10-30 2021-02-19 网宿科技股份有限公司 Encoding method, encoder and server
CN112383774B (en) * 2020-10-30 2023-10-03 网宿科技股份有限公司 Encoding method, encoder and server

Also Published As

Publication number Publication date
CN104360945B (en) 2017-07-07

Similar Documents

Publication Publication Date Title
CN106506638A (en) Block storage method and device in block chain
CN106302574B (en) A kind of service availability management method, device and its network function virtualization architecture
CN104636084B (en) A kind of apparatus and method of the large data of electric power being carried out to distributed store
CN109146081B (en) Method and device for creating model project in machine learning platform
CN106201481A (en) Assembly management method and apparatus in application development system
US10761761B2 (en) Method and device for managing storage system
CN103744647A (en) Java workflow development system and method based on workflow GPD
CN109558310A (en) Method for generating test case and device
CN107357689A (en) The fault handling method and distributed memory system of a kind of memory node
CN108415912A (en) Data processing method based on MapReduce model and equipment
CN106844288A (en) A kind of random string generation method and device
CN106406820B (en) A kind of multi-emitting parallel instructions processing method and processing device of network processor micro-engine
US20180095719A1 (en) Sorted linked list with a midpoint binary tree
CN104360945A (en) Test case screening computer implementation method, computer and system
CN103699478A (en) Test case generation system and test case generation method
CN110134646A (en) The storage of knowledge platform service data and integrated approach and system
CN109634714A (en) A kind of method and device of intelligent scheduling
CN107204998A (en) The method and apparatus of processing data
CN108170424A (en) A kind of self extended method and system based on cloud knowledge base
CN106776275B (en) A kind of testing process automatic generation method based on Packet Multiplexing
US10073938B2 (en) Integrated circuit design verification
CN108701148A (en) Use the data mining of categorical attribute
CN109902178A (en) A kind of multistage file classification method and system
CN109086362A (en) The management method of multimode project
CN107749800A (en) A kind of method realized the configuration of communication equipment automatic test and implicitly deleted

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

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

CP01 Change in the name or title of a patent holder