CN102004691A - Method and system for executing test case - Google Patents

Method and system for executing test case Download PDF

Info

Publication number
CN102004691A
CN102004691A CN2010105431640A CN201010543164A CN102004691A CN 102004691 A CN102004691 A CN 102004691A CN 2010105431640 A CN2010105431640 A CN 2010105431640A CN 201010543164 A CN201010543164 A CN 201010543164A CN 102004691 A CN102004691 A CN 102004691A
Authority
CN
China
Prior art keywords
test
case
factor
state
test case
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
CN2010105431640A
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.)
ZTE Corp
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 CN2010105431640A priority Critical patent/CN102004691A/en
Publication of CN102004691A publication Critical patent/CN102004691A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method and a system for executing a test case, belonging to the field of product testing. The method comprises the following steps of: acquiring a test case; acquiring test factors of the test case; generating a test factor combination according to the test factors; generating a case example by utilizing the test factor combination; and executing the case example and finishing the test of the test case. The system comprises a first acquiring module, a second acquiring module, a first generating module, a second generating module and an executing module. The technical scheme of the invention can stimulate the rapid and effective test of the product and improve the test quality by introducing the test factors.

Description

The method and system of implementation of test cases
Technical field
The present invention relates to the product test field, particularly a kind of method and system of implementation of test cases.
Background technology
Product quality guarantees by test.Test case can cover product function point to be measured comprehensively.It is the general method of testing of a kind of industry that the use test use-case is tested product.Carry out the test of a product, generally can relate to as the next stage:
One, according to product performance, testing requirement etc., plans, designs, writes test case, form test case library, i.e. use-case design phase;
Two,,,,, carry out use-case test, checking or the like, i.e. the use-case execute phase from test case library filler test use-case according to testing requirement such as system testing, regression test etc. at different test phases;
Three, iteration is carried out above-mentioned steps, enriches constantly and improves test case, reaches the comprehensive covering to product test.
Analyze the above-mentioned stage, generally there are the following problems:
One, in the use-case design phase, products characteristics, scale, demand or the like have determined the size of test case library.Generalized case, for a certain function point is reached comprehensive covering, need a lot of bar test cases of design, under the situation especially big, that characteristic is many in the product scale, it is very huge that test case library becomes, and the quality of use-case, redundant, necessary covering etc. is difficult to guarantee.
Two, in the use-case execute phase, the use-case quality of use-case design phase has directly determined the implementation effect of use-case execute phase.Because use-case is in large scale, though the coverage rate of test case reached, very poor aspect operability, testability; And, be difficult to from the storehouse, to filter out suitable test case and test because test case is in large scale; The more important thing is, when test period it is pressed for time, when task is heavy, test execution is difficult to produce a desired effect.
Three, on method for test examples design, industry generally uses methods such as equivalence class method, boundary value method, decision table method, cause-and-effect diagram method, orthogonal experiment to carry out the design of test case.Such as the above-mentioned use-case design phase, adopt the orthogonal experiment design test case, consider product performance, test scale etc., the test case number that is generated is huge, even may cause the use-case execute phase to carry out.
Four, each stage of test process does not independently carry out, and needs close fit between the upstream and downstream.Directly determine the effect in test execution (downstream) such as the test case (upstream) of design phase output, test execution output (upstream) is the direct effect of decision test tracking, fault analysis (downstream) also.
Five, because the complexity of product demand, the complexity of test scene, a general test case are difficult to describe these test points, need several, even much use-cases cooperate these complicated testing requirements of description, and this has brought difficulty for test tracking, fault analysis, scene reproduction etc.
In sum, in the prior art, because test case quantity is huge, available test case information is limited, is difficult to filter out the test case that needs from test case library fast, finishes test; Secondly, the test case screening is coarse, and cause in the test execution stage and be difficult to hold the test emphasis, time waste not only, the test poor effect, also poor effect on the potential problems that excavate product, test mass is not good.
Summary of the invention
In order to promote carrying out fast and effectively of product test, improve test mass, the invention provides a kind of method and system of implementation of test cases, technical scheme is as follows:
A kind of method of implementation of test cases comprises:
Obtain test case;
Obtain the test factor of test case;
Generate the test factor combination according to described test factor;
Utilize described test factor combination to generate the use-case example;
Carry out described use-case example, finish the test of described test case.
In the preferred embodiment of the present invention, described combination comprises according to described test factor generation test factor:
According to the screening parameter of test factor and the condition of screening parameter, described test factor is carried out combination calculation according to this default combination calculation method, obtain described test factor combination.
In the preferred embodiment of the present invention, described default combinations of factors computing method comprise one of following mode:
Multiplication algorithm, addition algorithm, addition and multiplication hybrid algorithm and delineation method.
In the preferred embodiment of the present invention, the screening parameter of described test factor comprises one of following parameter or its combination:
Priority, constraint condition and scene control.
In the preferred embodiment of the present invention, carry out described use-case example, the test of finishing described test case comprises:
Verify the use-case example of described generation, judge whether to finish the test of described test case according to the checking result of described use-case example.
In the preferred embodiment of the present invention, the test according to the checking result of described use-case example judges whether to finish described test case comprises:
The state of the described use-case example of COMPREHENSIVE CALCULATING, if there are the failure clauses and subclauses, then described test case end-state is failure; Or
The state of the described use-case example of COMPREHENSIVE CALCULATING, if there are successful clauses and subclauses, then described test case end-state is successfully; Or
The state of the described use-case example of COMPREHENSIVE CALCULATING, if the failure clauses and subclauses account for total test case number number percent greater than predetermined value, then described test case end-state for the failure; Or
The state of COMPREHENSIVE CALCULATING use-case example, if successful clauses and subclauses account for the number percent of total test case number greater than predetermined value, then described test case end-state is successfully.
In the preferred embodiment of the present invention, after the test of finishing described test case, also comprise:
The executing state of described test case is followed the tracks of and analyzed; Or
Executing state to described use-case example is carried out basis and analysis; Or
The test case of using described test factor or the state of use-case example are followed the tracks of and analyzed; Or
According to described test factor combination test scene is followed the tracks of and analyzed.
A kind of system of implementation of test cases comprises:
First acquisition module is used to obtain test case;
Second acquisition module is used to obtain the test factor of test case;
First generation module is used for generating the test factor combination according to described test factor;
Second generation module is used to utilize described test factor combination to generate the use-case example;
Execution module is used to carry out described use-case example, finishes the test of described test case.
In the preferred embodiment of the present invention, described first generation module, specifically be used for according to the screening parameter of test factor and the condition of screening parameter, described test factor is carried out combination calculation according to this default combination calculation method, obtain described test factor combination.
In the preferred embodiment of the present invention, described default combinations of factors computing method comprise one of following mode:
Multiplication algorithm, addition algorithm, addition and multiplication hybrid algorithm and delineation method.
In the preferred embodiment of the present invention, the screening parameter of described test factor comprises one of following parameter or its combination:
Priority, constraint condition and scene control.
In the preferred embodiment of the present invention, described execution module specifically is used to verify the use-case example of described generation judge whether to finish the test of described test case according to the checking result of described use-case example.
In the preferred embodiment of the present invention, described execution module is further used for the state of the described use-case example of COMPREHENSIVE CALCULATING, if there are the failure clauses and subclauses, then described test case end-state is failure; Or the state of the described use-case example of COMPREHENSIVE CALCULATING, if there are successful clauses and subclauses, then described test case end-state is successfully; Or the state of the described use-case example of COMPREHENSIVE CALCULATING, if the failure clauses and subclauses account for total test case number number percent greater than predetermined value, then described test case end-state for the failure; Or the state of COMPREHENSIVE CALCULATING use-case example, if successful clauses and subclauses account for the number percent of total test case number greater than predetermined value, then described test case end-state is successfully.
In the preferred embodiment of the present invention, also comprise and following the tracks of and analysis module, be used for after the test of finishing described test case, the executing state of described test case being followed the tracks of and being analyzed; Or the executing state of described use-case example carried out basis and analysis; Or the test case of using described test factor or the state of use-case example followed the tracks of and analyze; Or according to described test factor combination is followed the tracks of and is analyzed test scene.
The present invention is by introducing test factor, making needs several of designs, and tens test function points that test case could cover need one or several test case just can finish covering now, test case quantity is reduced significantly, can test fast product.And, because the test case total number is limited, makes the iteration of test case improve process and become more feasible, be guaranteed aspect test case quality, the validity.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes a part of the present invention, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, does not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 is the process flow diagram of the method for implementation of test cases provided by the invention;
Fig. 2 is the logical schematic to the test factor library management provided by the invention;
Fig. 3 is the logical schematic to the test case library management provided by the invention;
Fig. 4 is the process flow diagram of embodiment of the method for implementation of test cases provided by the invention;
Fig. 5 is the particular flow sheet of the method for management of test cases provided by the invention;
Fig. 6 is the structural drawing of the system of implementation of test cases provided by the invention;
Embodiment
In order to make technical matters to be solved by this invention, technical scheme and beneficial effect clearer, clear,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
As shown in Figure 1, the invention provides a kind of method of implementation of test cases, comprising:
Step 101 is obtained test case;
Step 102 is obtained the test factor of this test case;
Step 103 generates the test factor combination according to described test factor;
Step 104 utilizes the test factor combination to generate the use-case example;
Step 105 is carried out the use-case example, finishes the test of test case.
In the preferred embodiment of the present invention, generating the test factor combination according to test factor comprises: according to the screening parameter of test factor and the condition of screening parameter, test factor is carried out combination calculation according to this default combination calculation method, obtain described test factor combination.
In the preferred embodiment of the present invention, these default combinations of factors computing method comprise one of following mode:
Multiplication algorithm, addition algorithm, addition and multiplication hybrid algorithm and delineation method.
In the preferred embodiment of the present invention, the screening parameter of this test factor comprises one of following parameter or its combination:
Priority, constraint condition and scene control.
In the preferred embodiment of the present invention, carry out the use-case example, the test of finishing test case comprises:
The use-case example that checking generates judges whether to finish the test of described test case according to the checking result of use-case example.
In the preferred embodiment of the present invention, the test according to the checking result of use-case example judges whether to finish test case comprises:
The state of COMPREHENSIVE CALCULATING use-case example, if there are the failure clauses and subclauses, then described test case end-state is failure; Or
The state of COMPREHENSIVE CALCULATING use-case example, if there are successful clauses and subclauses, then described test case end-state is successfully; Or
The state of COMPREHENSIVE CALCULATING use-case example, if the failure clauses and subclauses account for total test case number number percent greater than predetermined value, then the test case end-state for the failure; Or
The state of COMPREHENSIVE CALCULATING use-case example, if successful clauses and subclauses account for the number percent of total test case number greater than predetermined value, then the test case end-state is successfully.
In the preferred embodiment of the present invention, after the test of finishing test case, also comprise:
The executing state of test case is followed the tracks of and analyzed; Or
Executing state to the use-case example is carried out basis and analysis; Or
The test case of the use test factor or the state of use-case example are followed the tracks of and analyzed; Or
Combination is followed the tracks of and is analyzed test scene according to test factor.
Below in conjunction with specific embodiment the present invention is described in detail, but this embodiment does not constitute limiting the scope of the invention.Particularly,
As shown in Figure 5, the particular flow sheet of management of test cases provided by the invention, specific as follows:
At first need to finish some initial work, comprising:
The first, need manage test factor, particularly:
A1, the test factor structure is managed, general test factor structure definition test factor class (test factor) two dimensional model promptly is made up of a series of test factor classes, and the test factor class comprises a series of test factor again.Disposed such as attribute informations such as priority, constraint condition, application scenarioss for test factor and test factor class simultaneously.Such as:
Test factor class 1: test factor 11, test factor 12, test factor 13
Test factor class 2: test factor 21, test factor 22
Test factor class 3: test factor 31, test factor 32, test factor 33
The combination calculation method of A2, test factor is promptly constructed the method for combinations of factors according to the combinational algorithm of definition between the test factor class.Wherein, the combination calculation method of test factor includes but not limited to following algorithm:
A21, multiplication, the generation method that the test factor class that promptly participates in calculating multiplies each other and obtains combinations of factors, carrying out multiplication such as above-mentioned test factor class 1 and test factor class 2 calculates, be expressed as: test factor class 1* test factor class 2, obtain (3*2=6) bar combinations of factors, obtain such as test factor 11﹠amp; Test factor 21, test factor 11﹠amp; Test factor 22, test factor 12﹠amp; A series of combine scenes (Shang Shu ﹠amp such as test factor 21; , be expressed as combinations of factors);
A22, addition, the factor type addition that promptly participates in calculating obtains the generation method of combinations of factors, and these factors can free other factors be constructed test scene jointly as dominant factor.Carry out additional calculation such as above-mentioned test factor class 1 with test factor class 2, be expressed as: test factor class 1+ test factor class 2, obtain (2+3=5) bar dominant factor, obtain such as a series of test scenes such as test factor 11, test factor 12, test factor 13, test factor 21, test factor 22, these factors participate in scene as dominant factor, and other can select to participate in scrnario testing arbitrarily.
A23, hybrid algorithm, the degree of freedom of multiplication little (factor that participates in combination must be introduced in the scene), the degree of freedom of addition big (dominant factor+free factor structure test scene), hybrid algorithm is comprehensive multiplication and addition, suitably the control combination degree of freedom.Such as test factor class 1+ test factor class 2* test factor class 3, after promptly test factor class 2,3 multiplies each other again with the test factor class 1 additive combination factor;
A24, delineation method, said method carries out combinations of factors by factor computing, and the delineation method is exactly not require calculation, and directly uses the test factor of delineation to carry out combinations of factors as dominant factor or test factor class.Such as, delineation test factor 12, test factor 21, test factor 22 participate in this computing, and the combinations of factors that obtains like this is: test factor 12, test factor 21, test factor 22.
The management of A3, screening parameter.By limited screening parameter, can control the combination calculation scale of test factor, thereby control use-case to be measured.These screening parameters can be priority, constraint condition, scene control or the like.Further, these screening parameters can be based on the test factor class, also can be based on test factor.
The condition management of A4, screening parameter promptly according to configuration screening parameters such as test pressing degree, testing requirement, priority, is provided with the condition of screening parameter, and combination calculation is carried out under current test condition.
Further, the condition of above-mentioned screening parameter is managed, and the condition range of application of screening parameter is provided, and specifically comprises:
A41, according to when test conditions such as the pressing degree of Pretesting, test priority, the scope of application of current screening parameter condition is set, scope can be:
A42, global application, promptly the screening parameter condition can be suitable in the overall situation, such as all test cases, a certain test, all test scenes or the like of taking turns.
A43, topical application, promptly the screening parameter condition only is suitable in the part, such as certain class testing use-case, some test scene or the like.
To sum up, the related data of above-mentioned test factor is concentrated in the test factor storehouse and is managed, and comprises factor structure management, combination calculation method, the management of screening parameter, the management of screening parameter condition etc., as shown in Figure 2.
The second, test case is managed, as shown in Figure 3, comprise particularly:
Test case is managed except general test case management function, comprise that also test case is related with test factor, the test case version management of test factorization, the test scene structure of test factorization.Wherein, test case is related with test factor, specifically describes to be:
B1, test case are with reference to the test factor class in test factor storehouse, and the use-case factor type of definition test case, this use-case factor type are described the test scene that is applied to this test case corresponding to the test factor class in the test factor storehouse of quoting.
B2, use-case factor type be with reference to the test factor of the test factor class in the test factor storehouse of correspondence, the use-case factor of definition test case.The use-case factor is corresponding to the test factor in the test factor storehouse of quoting.
B3, through above-mentioned structure, the test case association test factor, also be the instantiation process of test factor.
Wherein, the test case version management of above-mentioned test factorization specifically describes and is:
B4, except traditional only be to finish the use-case Version Control by test case, the test case of introducing test factor can also realize the test case Version Control by test factor;
B5, by for the such screening parameter of test factor introducing version, represented the beta version that this test case was suitable for well;
Wherein, the test case scenario of above-mentioned test factorization is constructed, and specifically describes to be:
B6, test case test scene are meant to test case carries out the constraint condition of building, indispensable environment, other dependences or the like, can be loose, also can make urgent;
The test factor of B7, related test case possesses very strong test case test scene construction ability, and this construction ability can be realized by the test factor combinational algorithm easily.
After finishing above-mentioned initial work, the beginning implementation of test cases, i.e. the process of product being tested according to test case as described in Figure 4, comprises as follows:
Step 401 is obtained the attribute information of test case and this test case from test case library;
Step 402 is obtained the employed test factor of this test case from test case library, obtains the attribute information of this test factor from the test factor storehouse;
Step 403 according to the screening parameter of test factor and the condition of screening parameter, is carried out combination calculation to the employed test factor of this test case according to this default combination calculation method, obtains the test factor combination;
Step 404, the test factor example combinations test case according to obtaining promptly generates the use-case example.
Particularly, test factor combination calculation result has determined the clauses and subclauses of test case instantiation, and a general test factor example combinations dissolves a test case example.Each test factor composition theory is understood the test scene that this test case needs, the description that test scene is concrete the execution environment of test case, prerequisite etc.;
After the test case instantiation, the unified test execution storehouse, test case promptly to be measured of being submitted to;
The instantiation process of use-case can be finished before above-mentioned use-case is carried out in batches, traveled through all use-cases to be measured, carried out according to step 401-404, and test execution is directly carried out step 405 and got final product; Also can progressively carry out 401-405, more specifically control the execution of test case in implementation.
Step 405 is verified the use-case example of above-mentioned generation, and comprehensive use-case case verification result finishes the test of this test case to test case.
Particularly, test case needs an end-state, and the checking result of this test case comprehensively is described, such as pass through, failure etc.;
The use-case example also needs a state, this use-case example is described under the scene of test factor combination, and the result of testing authentication is such as by, failure etc.;
The end-state of test case is that the state COMPREHENSIVE CALCULATING by the use-case example goes out, and this end-state has comprehensively illustrated the testing authentication result of test case under current all test scenes.
Further, the state comprehensive strategic of use-case example specifically describes and is:
(1) 0-0 strategy, the state of COMPREHENSIVE CALCULATING use-case example, if there are failure clauses and subclauses (0), then the test case end-state also is failure (0);
(2) 1-1 strategy, the state of COMPREHENSIVE CALCULATING use-case example, if there are successful clauses and subclauses (1), then the test case end-state also is successfully (1);
(3) 0%-0 strategy, the state of COMPREHENSIVE CALCULATING use-case example, if the failure clauses and subclauses (0) number percent greater than predetermined value, then the test case end-state also for the failure (0);
(4) 1%-1 strategy, the state of COMPREHENSIVE CALCULATING use-case example, if the number percent of successful clauses and subclauses (1) greater than predetermined value, then the test case end-state also is successfully (1).
After executing test case, can also follow the tracks of and analyze test result, specifically describe and be:
(1) based on the tracking and the analysis of test case, promptly obtain the current executing state of having surveyed test case, the focus of this method is end-state, percent of pass, mortality, implementation progress of test case or the like, and this method has reflected implementation status, fault covering of test case etc. roughly;
(2) based on the tracking and the analysis of use-case example, promptly obtain the executing state of current use-case example, the focus of this method is state course, implementation progress of test case etc.;
(3) based on the tracking and the analysis of test factor, promptly according to test factor, to the use-case example classify, reductive analysis, focus is to use the test case of this test factor or the state of use-case example;
(4) based on the tracking and the analysis of test factor combination, promptly provide a kind of tracking and analytical approach based on test scene, this method is of value to the fault analysis of test scene.
For clearer description technical scheme of the present invention, below in conjunction with a concrete example present embodiment is carried out further detailed elaboration, particularly,
According to above-mentioned method for test examples design, design such test case.Here only be to use this test case to do explanation, do not guarantee the rationality of test case design; Only provide priority as controllable parameter, wherein priority 1 represents that priority is minimum, and priority 5 expression priority are the highest, and this test case does not constitute any constraint to the present invention; And suppose that the test factor storehouse forms.Particularly,
The test case title: the both sides AC access interface of TC-VPN entry PE and outlet PE is a trunk pattern but vlan disposes asymmetric situation
Test factor class 1:name=type of message, priority=2
Test factor 1:name=message utag is identical with trunk vlan, priority=3
Test factor 2:name=message utag is different with trunk vlan, priority=3
Test factor class 2:name=port type, priority=4
Test factor 1:name=gigabit ether port, priority=3
Test factor 2:name=10,000,000,000 ether ports, priority=5
Test factor 3:name=LAG port, priority=4
Test factor 4:name=MC-LAG port, priority=3
Test factor class 3:name=discharge pattern, priority=5
Test factor 1:name=known unicast stream, priority=3
Test factor 2:name=unknown unicast stream, priority=4
Test factor 3:name=multicast stream, priority=2
Test factor 4:name=broadcast, priority=2
Test factor 5:name=positive flow, priority=4
Test factor 6:name=reverse direction flow, priority=4
At first, according to the test factor combinational algorithm, above-mentioned test factor class is carried out combination calculation:
(1) calculate according to multiplicative combination, do not use priority, promptly test factor class 1* test factor class 2* test factor class 3, obtain following 2*4*6=48 bar test factor combination:
The identical ﹠amp of message utag with trunk vlan; Gigabit ether Duan Kou ﹠amp; Known unicast stream
The identical ﹠amp of message utag with trunk vlan; Gigabit ether Duan Kou ﹠amp; Unknown unicast stream
...
The different ﹠amp of message utag with trunk vlan; Gigabit ether Duan Kou ﹠amp; Known unicast stream
The different ﹠amp of message utag with trunk vlan; Gigabit ether Duan Kou ﹠amp; Unknown unicast stream
...
(2) according to the addition combination calculation, do not use priority, promptly test factor class 1+ test factor class 2+ test factor class 3, obtain the combination of following (2+4+6=12) bar test factor:
Message utag is identical with trunk vlan, and message utag is different with trunk vlan, gigabit ether port, and 10,000,000,000 ether ports ... known unicast stream ...
These factors are as dominant factor, and the factor that can alternative other factor types is constructed test scene jointly, such as the identical alternative gigabit ether port with trunk vlan of message utag, reverse direction flow.
(3) calculate according to multiplicative combination, use priority, minimum test factor class priority=4 then have only factor type 2 and 3 to participate in combinatorial operation, and minimum test factor priority=4 then obtain the combination of following (2*3=6) bar test factor:
10,000,000,000 ether Duan Kou ﹠amp; Unknown unicast stream, 10,000,000,000 ether Duan Kou ﹠amp; Positive flow, 10,000,000,000 ether Duan Kou ﹠amp; Reverse direction flow; LAG Duan Kou ﹠amp; Unknown unicast stream, LAG Duan Kou ﹠amp; Positive flow, LAG Duan Kou ﹠amp; Reverse direction flow,
(4) according to delineation method combination calculation, such as drawing a circle to approve test factor: the LAG port, the MC-LAG port, multicast stream, broadcast, then these four factors are as dominant factor, and from the alternative test factor of other factor types,, known unicast stream identical with trunk vlan such as the alternative message utag of LAG port is constructed test scene jointly.
Said method has been introduced and has been used different combinational algorithms to carry out the scene structure of test factor, and different combinational algorithms can obtain different test factor combine scenes, and the controllability, ease for operation, the test that have strengthened the scene structure are given prominence to the key points.
Secondly, test case instantiation.
Can carry out the instantiation operation of test case according to the test factor combine scenes, carry out instantiation, obtain following use-case example (@ represents the instantiation test factor combination of test case) such as (3) according to the method described above:
The both sides AC access interface of use-case example 1:TC-VPN entry PE and outlet PE is a trunk pattern but vlan disposes asymmetric situation @ 10,000,000,000 ether Duan Kou ﹠amp; Unknown unicast stream
The both sides AC access interface of use-case example 2:TC-VPN entry PE and outlet PE is a trunk pattern but vlan disposes asymmetric situation @ 10,000,000,000 ether Duan Kou ﹠amp; Positive flow
The both sides AC access interface of use-case example 3:TC-VPN entry PE and outlet PE is a trunk pattern but vlan disposes asymmetric situation @ 10,000,000,000 ether Duan Kou ﹠amp; Reverse direction flow
The both sides AC access interface of use-case example 4:TC-VPN entry PE and outlet PE is a trunk pattern but vlan disposes asymmetric Qing Kuang @LAG Duan Kou ﹠amp; Unknown unicast stream
The both sides AC access interface of use-case example 5:TC-VPN entry PE and outlet PE is a trunk pattern but vlan disposes asymmetric Qing Kuang @LAG Duan Kou ﹠amp; Positive flow
The both sides AC access interface of use-case example 6:TC-VPN entry PE and outlet PE is a trunk pattern but vlan disposes asymmetric Qing Kuang @LAG Duan Kou ﹠amp; Reverse direction flow.
Implementation step three, checking case example
Above-mentioned use-case example is verified one by one, provided the checking result, such as use-case example 1=Pass, use-case example 2=Pass, use-case example 3=Fail, use-case example 4=Pass, use-case example 5=Pass, use-case example 6=Pass.(Pass=passes through, the Fail=failure)
According to selected state comprehensive strategic, the checking result of comprehensive use-case example judges with further whether test case is successful to test case.
Such as adopting 0-0 strategy, test case result=Fail; If adopt the 1%-1 strategy, predetermined value=60%, then use-case state=Pass.
Based on the inventive concept identical with method, the invention provides a kind of system of implementation of test cases, as shown in Figure 6, comprising:
First acquisition module 601 is used to obtain test case;
Second acquisition module 602 is used to obtain the test factor of test case;
First generation module 603 is used for generating the test factor combination according to this test factor;
Second generation module 604 is used to utilize this test factor combination to generate the use-case example;
Execution module 605 is used to carry out this use-case example, finishes the test of this test case.
In the preferred embodiment of the present invention, this first generation module 603, specifically be used for according to the screening parameter of test factor and the condition of screening parameter, this test factor is carried out combination calculation according to this default combination calculation method, obtain this test factor combination.
In the preferred embodiment of the present invention, these default combinations of factors computing method comprise one of following mode:
Multiplication algorithm, addition algorithm, addition and multiplication hybrid algorithm and delineation method.
In the preferred embodiment of the present invention, the screening parameter of this test factor comprises one of following parameter or its combination:
Priority, constraint condition and scene control.
In the preferred embodiment of the present invention, this execution module 605 specifically is used to verify the use-case example of this generation judge whether to finish the test of this test case according to the checking result of this use-case example.
In the preferred embodiment of the present invention, this execution module 605 is further used for the state of this use-case example of COMPREHENSIVE CALCULATING, if there are the failure clauses and subclauses, then this test case end-state is failure; Or the state of this use-case example of COMPREHENSIVE CALCULATING, if there are successful clauses and subclauses, then this test case end-state is successfully; Or the state of this use-case example of COMPREHENSIVE CALCULATING, if the failure clauses and subclauses account for total test case number number percent greater than predetermined value, then this test case end-state for the failure; Or the state of COMPREHENSIVE CALCULATING use-case example, if successful clauses and subclauses account for the number percent of total test case number greater than predetermined value, then this test case end-state is successfully.
In the preferred embodiment of the present invention, also comprise: follow the tracks of and analysis module 606, be used for after the test of finishing this test case, the executing state of this test case being followed the tracks of and being analyzed; Or the executing state of this use-case example carried out basis and analysis; Or the test case of using this test factor or the state of use-case example followed the tracks of and analyze; Or according to this test factor combination is followed the tracks of and is analyzed test scene.
Compared with the prior art, the present invention has following beneficial effect:
At first, the method for implementation of test cases provided by the invention is by introducing test factor, making needs several of designs, article tens, the test case test function point that could cover needs one or several test case just can finish covering now, and test case quantity is reduced significantly.And, because the test case total number is limited, makes the iteration of test case improve process and become more feasible, be guaranteed aspect test case quality, the validity.
Secondly, because the test case reduced number the more important thing is that introduce test factor as controllable factor, the test case screening can become more meticulous, thereby accomplishes easily to shoot the arrow at the target.Especially, compare traditional starting with test case and screen analysis, after the introducing test factor, screening is analyzed and is more prone to carry out, and the control granularity is thinner, accuracy is higher.
At last, the method for implementation of test cases provided by the invention because more reference data is provided, except data, also has the test factor combination, and scene structure etc. make fault analysis, trend analysis and problem excavation etc. effectively to carry out.
In a word, the method for implementation of test cases provided by the invention helps testing carrying out fast smoothly of each stage, and is improving a lot aspect the validity of testing, accuracy, the scene structure; In addition, the method for implementation of test cases provided by the invention has just been introduced test factor, realizes simple.
Above-mentioned explanation illustrates and has described a preferred embodiment of the present invention, but as previously mentioned, be to be understood that the present invention is not limited to the disclosed form of this paper, should not regard eliminating as to other embodiment, and can be used for various other combinations, modification and environment, and can in invention contemplated scope described herein, change by the technology or the knowledge of above-mentioned instruction or association area.And change that those skilled in the art carried out and variation do not break away from the spirit and scope of the present invention, then all should be in the protection domain of the appended claim of the present invention.

Claims (14)

1. the method for an implementation of test cases is characterized in that, comprising:
Obtain test case;
Obtain the test factor of test case;
Generate the test factor combination according to described test factor;
Utilize described test factor combination to generate the use-case example;
Carry out described use-case example, finish the test of described test case.
2. the method for claim 1 is characterized in that, described combination comprises according to described test factor generation test factor:
According to the screening parameter of test factor and the condition of screening parameter, described test factor is carried out combination calculation according to this default combination calculation method, obtain described test factor combination.
3. method as claimed in claim 2 is characterized in that, described default combinations of factors computing method comprise one of following mode:
Multiplication algorithm, addition algorithm, addition and multiplication hybrid algorithm and delineation method.
4. method as claimed in claim 2 is characterized in that, the screening parameter of described test factor comprises one of following parameter or its combination:
Priority, constraint condition and scene control.
5. the method for claim 1 is characterized in that, carries out described use-case example, and the test of finishing described test case comprises:
Verify the use-case example of described generation, judge whether to finish the test of described test case according to the checking result of described use-case example.
6. method as claimed in claim 5 is characterized in that, the test according to the checking result of described use-case example judges whether to finish described test case comprises:
The state of the described use-case example of COMPREHENSIVE CALCULATING, if there are the failure clauses and subclauses, then described test case end-state is failure; Or
The state of the described use-case example of COMPREHENSIVE CALCULATING, if there are successful clauses and subclauses, then described test case end-state is successfully; Or
The state of the described use-case example of COMPREHENSIVE CALCULATING, if the failure clauses and subclauses account for total test case number number percent greater than predetermined value, then described test case end-state for the failure; Or
The state of COMPREHENSIVE CALCULATING use-case example, if successful clauses and subclauses account for the number percent of total test case number greater than predetermined value, then described test case end-state is successfully.
7. the method for claim 1 is characterized in that, also comprises after the test of finishing described test case:
The executing state of described test case is followed the tracks of and analyzed; Or
Executing state to described use-case example is carried out basis and analysis; Or
The test case of using described test factor or the state of use-case example are followed the tracks of and analyzed; Or
According to described test factor combination test scene is followed the tracks of and analyzed.
8. the system of an implementation of test cases is characterized in that, comprising:
First acquisition module is used to obtain test case;
Second acquisition module is used to obtain the test factor of test case;
First generation module is used for generating the test factor combination according to described test factor;
Second generation module is used to utilize described test factor combination to generate the use-case example;
Execution module is used to carry out described use-case example, finishes the test of described test case.
9. system as claimed in claim 8, it is characterized in that described first generation module specifically is used for according to the screening parameter of test factor and the condition of screening parameter, described test factor is carried out combination calculation according to this default combination calculation method, obtain described test factor combination.
10. system as claimed in claim 9 is characterized in that, described default combinations of factors computing method comprise one of following mode:
Multiplication algorithm, addition algorithm, addition and multiplication hybrid algorithm and delineation method.
11. system as claimed in claim 9 is characterized in that, the screening parameter of described test factor comprises one of following parameter or its combination:
Priority, constraint condition and scene control.
12. system as claimed in claim 8 is characterized in that, described execution module specifically is used to verify the use-case example of described generation judge whether to finish the test of described test case according to the checking result of described use-case example.
13. system as claimed in claim 12 is characterized in that, described execution module is further used for the state of the described use-case example of COMPREHENSIVE CALCULATING, if there are the failure clauses and subclauses, then described test case end-state is failure; Or the state of the described use-case example of COMPREHENSIVE CALCULATING, if there are successful clauses and subclauses, then described test case end-state is successfully; Or the state of the described use-case example of COMPREHENSIVE CALCULATING, if the failure clauses and subclauses account for total test case number number percent greater than predetermined value, then described test case end-state for the failure; Or the state of COMPREHENSIVE CALCULATING use-case example, if successful clauses and subclauses account for the number percent of total test case number greater than predetermined value, then described test case end-state is successfully.
14. system as claimed in claim 8 is characterized in that, also comprises following the tracks of and analysis module, is used for after the test of finishing described test case the executing state of described test case being followed the tracks of and being analyzed; Or the executing state of described use-case example carried out basis and analysis; Or the test case of using described test factor or the state of use-case example followed the tracks of and analyze; Or according to described test factor combination is followed the tracks of and is analyzed test scene.
CN2010105431640A 2010-11-12 2010-11-12 Method and system for executing test case Pending CN102004691A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010105431640A CN102004691A (en) 2010-11-12 2010-11-12 Method and system for executing test case

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010105431640A CN102004691A (en) 2010-11-12 2010-11-12 Method and system for executing test case

Publications (1)

Publication Number Publication Date
CN102004691A true CN102004691A (en) 2011-04-06

Family

ID=43812067

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010105431640A Pending CN102004691A (en) 2010-11-12 2010-11-12 Method and system for executing test case

Country Status (1)

Country Link
CN (1) CN102004691A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799525A (en) * 2012-07-04 2012-11-28 中国科学技术大学 Method and apparatus for generating test case
CN102831052A (en) * 2011-06-16 2012-12-19 中国银联股份有限公司 Automatic generating device and method for test case
CN102855185A (en) * 2012-07-24 2013-01-02 河海大学 Pair-wise test method based on priority
WO2013143392A1 (en) * 2012-03-28 2013-10-03 腾讯科技(深圳)有限公司 Test case screening method and system
CN104614601A (en) * 2014-12-26 2015-05-13 惠州Tcl移动通信有限公司 Terminal fault positioning method, device and system
CN104850494A (en) * 2015-04-29 2015-08-19 百度在线网络技术(北京)有限公司 Method and device for testing storage system
CN106845781A (en) * 2016-12-22 2017-06-13 中信银行股份有限公司 The generation system and method for scene and flow for operational trials
CN108345979A (en) * 2017-01-23 2018-07-31 阿里巴巴集团控股有限公司 A kind of service test method and device
CN111382057A (en) * 2018-12-29 2020-07-07 北京字节跳动网络技术有限公司 Test case generation method, test method and device, server and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1503136A (en) * 2002-11-21 2004-06-09 深圳市中兴通讯股份有限公司 Embedded software test method
CN101046763A (en) * 2006-03-29 2007-10-03 盛趣信息技术(上海)有限公司 Implementing method of automatic test system based on scenario
CN101645012A (en) * 2009-09-11 2010-02-10 兰雨晴 Combinational selection method of foundational software platform integrated test
CN101984416A (en) * 2010-11-02 2011-03-09 中兴通讯股份有限公司 Method and device for generating test case

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1503136A (en) * 2002-11-21 2004-06-09 深圳市中兴通讯股份有限公司 Embedded software test method
CN101046763A (en) * 2006-03-29 2007-10-03 盛趣信息技术(上海)有限公司 Implementing method of automatic test system based on scenario
CN101645012A (en) * 2009-09-11 2010-02-10 兰雨晴 Combinational selection method of foundational software platform integrated test
CN101984416A (en) * 2010-11-02 2011-03-09 中兴通讯股份有限公司 Method and device for generating test case

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831052A (en) * 2011-06-16 2012-12-19 中国银联股份有限公司 Automatic generating device and method for test case
CN102831052B (en) * 2011-06-16 2016-03-09 中国银联股份有限公司 Test exemple automation generating apparatus and method
WO2013143392A1 (en) * 2012-03-28 2013-10-03 腾讯科技(深圳)有限公司 Test case screening method and system
CN102799525A (en) * 2012-07-04 2012-11-28 中国科学技术大学 Method and apparatus for generating test case
CN102855185A (en) * 2012-07-24 2013-01-02 河海大学 Pair-wise test method based on priority
CN102855185B (en) * 2012-07-24 2015-04-08 河海大学 Pair-wise test method based on priority
CN104614601B (en) * 2014-12-26 2019-02-15 惠州Tcl移动通信有限公司 A kind of terminal fault localization method, apparatus and system
CN104614601A (en) * 2014-12-26 2015-05-13 惠州Tcl移动通信有限公司 Terminal fault positioning method, device and system
CN104850494A (en) * 2015-04-29 2015-08-19 百度在线网络技术(北京)有限公司 Method and device for testing storage system
CN104850494B (en) * 2015-04-29 2018-05-25 百度在线网络技术(北京)有限公司 A kind of method and apparatus for memory system testing
CN106845781A (en) * 2016-12-22 2017-06-13 中信银行股份有限公司 The generation system and method for scene and flow for operational trials
CN108345979A (en) * 2017-01-23 2018-07-31 阿里巴巴集团控股有限公司 A kind of service test method and device
CN108345979B (en) * 2017-01-23 2021-07-09 阿里巴巴集团控股有限公司 Service testing method and device
CN111382057A (en) * 2018-12-29 2020-07-07 北京字节跳动网络技术有限公司 Test case generation method, test method and device, server and storage medium
CN111382057B (en) * 2018-12-29 2024-02-02 北京字节跳动网络技术有限公司 Test case generation method, test method and device, server and storage medium

Similar Documents

Publication Publication Date Title
CN102004691A (en) Method and system for executing test case
Kaplunovich et al. Fast and reliable screening of N-2 contingencies
Zhang et al. Observability and estimation uncertainty analysis for PMU placement alternatives
Cui et al. Data-driven joint voltage stability assessment considering load uncertainty: A variational Bayes inference integrated with multi-CNNs
CN102521131B (en) Defect positioning test case reduction method based on dynamic basic block
Zhao et al. PMU based robust dynamic state estimation method for power systems
Choi et al. Impact analysis of locational marginal price subject to power system topology errors
Wang et al. Cloud-based parallel power flow calculation using resilient distributed datasets and directed acyclic graph
Li Distributed transmission-distribution coordinated energy management based on generalized master-slave splitting theory
CN110287113A (en) Automation interface test method
Thompson et al. A hetero-functional graph resilience analysis of the future American electric power system
Kolster et al. Providing distributed flexibility for curative transmission system operation using a scalable robust optimization approach
Chu et al. Can predictive filters detect gradually ramping false data injection attacks against PMUs?
Yin et al. An automated test case generation approach based on activity diagrams of SysML
Ariza et al. A blockchain solution for operational parameters monitoring platform for dc microgrids
Liu et al. Simulation optimization for mro systems operations
Rahman et al. Scalable cellular computational network based WLS state estimator for power systems
Papadopoulos et al. Aggregate load modeling in microgrids using online measurements
Kesherwani et al. Synchrophasor measurement‐based approach for online available transfer capability evaluation
CN109828923B (en) Non-atomic instruction sequence prototype verification method based on application program structure
Lin et al. A nested decomposition method and its application for coordinated operation of hierarchical electrical power grids
Rodemann et al. Simulation-based design and evaluation of a smart energy manager
Nikfard et al. Functional testing on web applications
Yumoto et al. Analysing test basis and deriving test cases based on data design documents
Wong et al. Component-based dynamic load modeling of a paper mill

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20110406