CN101196817A - Test case generating method and system - Google Patents

Test case generating method and system Download PDF

Info

Publication number
CN101196817A
CN101196817A CNA2008100004149A CN200810000414A CN101196817A CN 101196817 A CN101196817 A CN 101196817A CN A2008100004149 A CNA2008100004149 A CN A2008100004149A CN 200810000414 A CN200810000414 A CN 200810000414A CN 101196817 A CN101196817 A CN 101196817A
Authority
CN
China
Prior art keywords
test
information
cause information
case
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
CNA2008100004149A
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.)
Fujian Star Net Communication Co Ltd
Original Assignee
Fujian Star Net Communication Co Ltd
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 Fujian Star Net Communication Co Ltd filed Critical Fujian Star Net Communication Co Ltd
Priority to CNA2008100004149A priority Critical patent/CN101196817A/en
Publication of CN101196817A publication Critical patent/CN101196817A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a test case generating method, which comprises that: maintaining reason information caused by test error and maintaining test specification description information; matching the maintained reason information and test specification description information to generate the test case. The invention also provides a test case generating device correspondingly, which comprises a first maintenance device for maintaining reason information caused by test error and a second maintenance device for maintaining test specification description information; a case generating device for matching the maintained reason information and test specification description information, so as to generate the test case. According to the test case generated by the scheme, the invention can better test different products in details and increase the generality of the test case.

Description

Method for generating test case and system
Technical field
The present invention relates to computer realm, relate in particular to a kind of method for generating test case and device.
Background technology
Any a product all needs to test before putting goods on the market, and test process just needs the participation of test case (test case).Test case is meant a group of test input, executive condition and expected results developing for specific objective, and its target can be certain Program path of test or examine and whether satisfy certain specific demand.That is to say that test case has instructed the direction of test, the correct output result who has defined the scope that need test, needed test contents and expection.
There are two kinds of method of testings at present in the prior art: Black-box Testing and white-box testing, wherein Black-box Testing (perhaps is called functional test, or data-driven test) is meant according to the function design specification of known product product tested whether meet the requirements with each function of verifying product; White-box testing (perhaps is called structured testing, or logical drive test) is meant according to the internal work process of known product product is tested, whether each built-in function with the checking product meets the design specification requirement, and whether all internal components are through checking.
In the Black-box Testing process, test is carried out at the interface of software, promptly tested object is regarded as a black box, the tester does not consider the logical organization and the bulk properties of tested object program inside, only need the description according to program, the function of the scrutiny program function whether instructions up to specification requires gets final product.Black-box Testing is mainly used in finds following a few class mistakes:
Whether wrong or omit function;
Can what can input correct on interface be accepted or exports correct result;
Whether data structure mistake or external information (for example data file) access errors is arranged;
Whether can meet the demands on the performance;
Whether mistake of initialization or termination property or the like is arranged.
In the white-box testing process, need carry out careful inspection to the details of tested software, promptly tested object is regarded as a box of opening, the tester utilizes the logical organization of program inside to reach for information about, design or selection test case are to test (promptly whether consistent with expecting state with definite virtual condition by the state at the difference scrutiny program) to all logical paths of program.White-box testing is mainly used in to be checked program module, such as: to program module all independently execution route carry out at least one all over the test; Carry out at least one to all logic decision (getting " very " and two kinds of situations of getting " vacation ") all over test; In the boundary of round-robin border and operation, loop body is tested; And the validity of testing inner data structure or the like.
In the test process of reality, test result and the inconsistent phenomenon of expected results appear through regular meeting, and industry is referred to as bug with these inconsistent phenomenons.According to the difference of bug generation reason, bug can be divided into bug and the outer bug of test case in the test case.Wherein the outer bug of test case is meant in test process, except that inspection according to the test case regulation, might be because some fortuitous events (such as the plug of port, specific temperature humidity and carrying out when interconnected or the like) with certain equipment, expose some problems of tested equipment, these fortuitous events are referred to as the outer bug of test case.
As shown in Figure 1,,, the generative process of test case in the prior art is described below in conjunction with Fig. 1 for the generative process synoptic diagram of current tested object test case in the prior art, as follows:
Generate the test case of current tested object according to description, this test case comprises test function and content measurement;
Test case according to above-mentioned generation is tested current tested object;
After test is finished, directly, add in the test case of this tested object the outer bug of the test case that produces in the test process.
Owing to only generate test case usually in the prior art, and do not consider therefore to make other factors of more more needing of details, test and the relatively thicker condition of test result can not satisfy the requirement that makes that as required test result is more detailed-oriented according to description; Further, owing to prior art is applied directly to the outer bug of the test case that produces in the test process in the test case of this tested object, therefore this application is contributed and can not produce other test products object only at this measuring object.
Summary of the invention
The invention provides a kind of method for generating test case and system thereof,, strengthen the versatility of test case with according to the test case that generates detailsization different product is tested more.
The invention provides a kind of method for generating test case, comprise the cause information that the maintenance test mistake produces, and maintenance test specification information; The cause information and the test specification descriptive information that mate described maintenance generate test case.
The cause information that wherein said maintenance test mistake produces specifically comprises: the cause information that the test errors that obtains in test produces, in the time of not within the cause information that the test errors of safeguarding produces, with the described test errors output that obtains; Safeguard the cause information of the test errors generation of extraneous new input, the cause information that the test errors of described new input produces obtains for the test errors of analyzing described output.
Wherein said coupling cause information and test specification descriptive information, generate test case and specifically comprise: near one item missing cause information mates with every test specification descriptive information respectively; Obtain each occurrence of obtaining of coupling as test case.
Wherein said coupling cause information and test specification descriptive information, generating test case specifically comprises at least one cause information execution: according to the key word that comprises in this cause information, this cause information is mated with the every test specification descriptive information that comprises described key word respectively; Obtain at described at least one cause information and carry out each occurrence that obtains after the described matching treatment, as test case.
Wherein said coupling cause information and test specification descriptive information, generating test case specifically comprises at least one cause information execution: according to the scale parameter that comprises in this cause information, choose the test specification descriptive information item of corresponding ratio in all test specification descriptive information items; And this cause information mated with the described every test specification descriptive information that selects respectively; Obtain at described at least one cause information and carry out each occurrence that obtains after the described matching treatment, as test case.
Wherein said coupling cause information and test specification descriptive information generate test case and specifically comprise: test specification descriptive information of picked at random in the test specification descriptive information; And near one item missing cause information mates with the described test specification descriptive information item of choosing respectively; Obtain each occurrence of obtaining of coupling as test case.
The present invention also provides a kind of test case generation system, comprises first attending device, is used for the cause information that the maintenance test mistake produces, and second attending device, is used for maintenance test specification information; The use-case generating apparatus is used to mate the cause information and the test specification descriptive information of described maintenance, generates test case.
Preferably, first attending device comprises: the unit that is used to safeguard the cause information of the test errors generation that sets in advance.
Preferably, first attending device also comprises: be used to judge the cause information that test errors that test obtains produces, whether the unit within the cause information that the test errors that sets in advance produces; Be used in the judged result of judging unit for not the time, the unit of the described test errors output that obtains; Be used to safeguard the unit of the cause information that the test errors of new input produces, the cause information that the test errors of described new input produces obtains for the test errors of analyzing described output.
Preferably, described use-case generating apparatus comprises: be used for the unit that near one item missing cause information mates with every test specification descriptive information respectively; Be used to obtain each occurrence that coupling obtains unit as test case.
Preferably, described use-case generating apparatus comprises: be used for the key word that comprises according to a cause information, the unit that this cause information is mated with the every test specification descriptive information that comprises described key word respectively; Be used to obtain and carry out each occurrence that obtains after the described matching treatment, as the unit of test case at least one cause information.
Preferably, described use-case generating apparatus comprises: be used for the scale parameter that comprises according to a cause information, choose the unit of the test specification descriptive information item of corresponding ratio in all test specification descriptive information items; Be used for unit that this cause information is mated with the described every test specification descriptive information that selects respectively; Be used to obtain and carry out each occurrence that obtains after the described matching treatment, as the unit of test case at least one cause information.
Preferably, described use-case generating apparatus comprises: be used for the unit at a test specification descriptive information of test specification descriptive information picked at random; Be used for the unit that near one item missing cause information mates with the described test specification descriptive information item of choosing respectively; Be used to obtain each occurrence that coupling obtains unit as test case.
The test case that the embodiment of the invention proposes generates scheme, cause information by maintenance test mistake (i.e. the bug that test obtains) generation, cause information and test specification descriptive information that the test errors of safeguarding is produced mate, generate test case, can so that the test case that generates can better detailsization different product is tested, strengthened the versatility of test accuracy and test case thereof.
Description of drawings
Fig. 1 is the structural framing figure that current tested object test case generates in the prior art;
Fig. 2 is the process flow diagram of method for generating test case in the embodiment of the invention;
Fig. 3 is the structural framing figure of test case generation system in the embodiment of the invention;
Fig. 4 is the implementation process synoptic diagram of embodiment of the invention method for generating test case in test case generation system of the present invention.
Embodiment
The design philosophy of the embodiment of the invention is: safeguard the cause information that bug produces, cause information and test specification descriptive information by the coupling maintenance, generate test case, improving the test coverage of test case, and better details, accurately different product is tested.
The test case design that is applicable to Black-box Testing that the embodiment of the invention is preferable, and be applicable to product or the product line that all have general character.
Be explained in detail to the realization principle of technical solution of the present invention, embodiment and to the beneficial effect that should be able to reach below.
Consult shown in Figure 2ly, be the process flow diagram of method for generating test case in the embodiment of the invention, wherein processing procedure is as follows:
Step 1, the cause information that the maintenance test mistake produces;
Step 2, maintenance test specification information;
Step 3 is mated the cause information and the test specification descriptive information of the test errors generation of above-mentioned maintenance, generates corresponding test case.
Consult shown in Figure 3ly, be the structural framing figure of test case generation system in the embodiment of the invention, comprise first attending device 10, be used for the cause information that the maintenance test mistake produces, second attending device 20 is used for maintenance test specification information; Use-case generating apparatus 30 is used to mate the cause information of first attending device, 10 maintenances and the test specification descriptive information that second attending device 20 is safeguarded, generates test case.
Wherein the test case generation system can pass through client/server (C-S, Client/Server) framework software is realized, as shown in Figure 4, be the implementation process synoptic diagram of embodiment of the invention method for generating test case in test case generation system of the present invention, the cause information attending device that bug shown in Fig. 4 produces is the first above-mentioned attending device, the second above-mentioned in addition attending device can place the use-case generating apparatus, also can be provided with separately, be that example illustrates second attending device is placed the use-case generating apparatus among Fig. 4, therefore second attending device is not shown in this Figure.Wherein the use-case generating apparatus can place client, promptly the use-case generating apparatus can be installed on each Test Engineer's the work PC, the Test Engineer is by operation use-case generating apparatus on PC, the cause information of safeguarding in the cause information attending device that the use-case generating apparatus of this operation will produce bug is automatically downloaded, and carry out corresponding coupling with the test specification descriptive information, generate and be used for test case that product is tested, if second attending device is provided with separately, then also to from second attending device, download the test specification descriptive information.
Wherein the cause information of the cause information attending device maintenance of bug generation is included in the bug that sets in advance before the test and produces cause information, and then can also comprise that the new bug that receives produces cause information from the external world, in addition can for the bug that obtains of test in test process not when the row of the cause information that sets in advance, with the bug output that test obtains, analyze the new bug that obtains by extraneous Test Engineer according to the bug that exports and produce cause information.This shows that along with constantly carrying out of test, the bug of maintenance produces cause information in continuous increase, thereby make and generate that to be used for test case coverage rate that subsequent product is tested increasing, more and more higher to the test accuracy of product.
Elaborate the concrete course of work of the cause information attending device of bug generation below:
This device inside can be safeguarded " TestClear " data structure in advance, artificial experience according to the Test Engineer, can in this data structure, write all kinds of common bug in advance and produce cause information, promptly before program comes into operation first, in " TestClear " data structure, defined some common bug and produced cause information.For example, the bug that has write among the TestClear produces cause information can be as shown in table 1 below:
The bug that has write among the table 1:TestClear produces the cause information table
Type of physical port
CPU and internal memory
The incoming message condition
The logic interfacing attribute
Routing property
The operating process relevant with order is set
Function uses restriction special
Relation with other modules
The ultimate value factor
Performance factor (time/CPU, memory usage)
Intercommunity with other manufacturers
Resource contention is with shared
The specific demand of particular client
Abnormal operation and abnormal data
Both property used had both been inserted
In the process that product is tested, this device imports whole Bug that test produces, if the generation reason of a bug, then is referred to this bug " bug in the use-case " at the row of above-mentioned tabulation; If the generation reason of a bug at the row of above-mentioned tabulation, then is not referred to this bug " with exception bug ":
With " with exception bug " that counts, carry out priority queueing according to the indexs such as frequency of the order of severity, appearance, and the result after will lining up presents to the Test Engineer.
The Test Engineer can analyze each " with exception bug " according to the object information that presents, and sums up the general character cause information, forms new bug and produces cause information, and the new cause information that forms is added in the above-mentioned TestClear data structure; Wherein, also it can be added to respectively in the above-mentioned TestClear data structure for the bug that can't put out the general character cause information in order.
Follow-up can be with reference to the TestClear clauses and subclauses of having added behind the new cause information, cease with the product requirement specification letter, generate new test case, be used for next product is tested, therefore along with constantly carrying out of testing, because the TestClear clauses and subclauses are more and more, therefore the test case that generates is more and more detailed, and is just more and more accurate to the test of subsequent product.
Wherein, can be divided into following a few class to the cause information of bug generation:
1, after certain path, complicated, the repeatable operation, disabler appears
Definition: this specific operation may be the process of constantly adding deletion, or the different parameters of order directly switches, or is the variation of correlation function.The process that these operations change might cause certain order input back invalid, even the unusual deadlock that brings switch.
2, certain function goes wrong when using with other function associations
Definition: when a plurality of functions are used simultaneously produce because share CPU, internal memory, medium resource fight for or shared, and have problems.
3, port type coverage rate deficiency
Definition: the whole type of physical ports and the logic port type that do not cover tested product.
4, the result judges deficiency
Definition: in the result's judgement to certain test process, have problem unilateral, distortion, can transmit, but do not judge the speed that message is transmitted or transmit the message content of coming out such as message under the uniform temperature condition.
5, the coverage rate deficiency of incoming message
Definition: various types of incoming messages of not considering possible data communication products.
6, CLI does not reach whole coverings
Definition: do not cover the complete order that has realized at present.
7, index does not reach whole coverings
Definition: do not satisfy description.
This device can also be transformed into the file with forms such as .jpg .xls .csv .txt .xml with the TestClear items for information that adds behind the new cause information, outputs to central server.
Except using the above-mentioned TestClear data structure that provides, the embodiment of the invention can also use other data structures to carry the cause information that all kinds of bug produce.
Elaborate the concrete course of work of use-case generating apparatus below again:
The cause information attending device exchange message that this device can produce with bug, with the input of the TestClear items for information after the cause information attending device processing of bug generation as self, with the test specification instructions, match the test case that is used for next product test.
Second attending device that wherein is used for maintenance test specification information can initiatively receive the test specification descriptive information of extraneous input, also can use the form that imports the .xls file, from a file, import the test specification descriptive information, can also from the server that stores the test specification descriptive information, download the test specification descriptive information.
The use-case generating apparatus can be downloaded up-to-date TestClear clauses and subclauses file automatically from the cause information attending device that bug produces, select the corresponding item entries in the TestClear clauses and subclauses, go the corresponding item entries in the matching test specification information, satisfy the test case of new product test request with generation.
Wherein, can adopt following variety of way to generate new test case based on up-to-date TestClear clauses and subclauses and test specification descriptive information:
Mode one: near one item missing TestClear items for information mates with every test specification descriptive information respectively; Obtain each occurrence of obtaining of coupling as test case.Be that some TestClear clauses and subclauses of mandatory requirement must be mated with any one test specification descriptive information respectively, these TestClear clauses and subclauses can be defined as " S level " clauses and subclauses here.Such as the test specification descriptive information has 5, has 3 " S level " clauses and subclauses in the TestClear clauses and subclauses, can match 5 * 3=15 item according to this mode so, and then can be with match these 15 as newly-generated test case.
Mode two: carry out respectively:, this TestClear items for information is mated with the every test specification descriptive information that comprises described key word respectively according to the key word that comprises in this TestClear items for information at least one TestClear items for information; Obtain at least one cause information and carry out each occurrence that obtains after the above-mentioned matching treatment, as test case.Promptly according to " keyword " information that comprises in some TestClear clauses and subclauses, those TestClear clauses and subclauses and some the test specification descriptive information that includes correspondence " key word " can only be mated, those TestClear clauses and subclauses can be defined as " L level " clauses and subclauses here.
For example: with the TestClear clauses and subclauses is that " dissimilar CPU processing poweies " are example, and the performance when handling big data quantity of these clauses and subclauses is especially obvious, and the performance of entire equipment is brought a lot of influences.So the key word that can define in these clauses and subclauses comprises: the key1=performance, key2=leads (referring to degree descriptions such as ratio, probability), key3=degree.When the test specification descriptive information is described to these key words, will be judged as automatically and need mates with " dissimilar CPU processing poweies " item.
Mode three: carry out at least one TestClear items for information:, in all test specification descriptive information items, choose the test specification descriptive information item of corresponding ratio according to the scale parameter that comprises in this TestClear items for information; And this TestClear items for information mated with the every test specification descriptive information that selects respectively; Obtain at above-mentioned at least one TestClear items for information and carry out each occurrence that obtains after the matching treatment, as test case.Be to comprise a scale parameter information in some TestClear clauses and subclauses, according to this scale parameter, the use-case generating apparatus can be chosen the test specification descriptive information item of corresponding ratio in all test specification descriptive information items, mate with the TestClear clauses and subclauses that comprise this scale parameter respectively, those TestClear clauses and subclauses can be defined as " R level " clauses and subclauses here.
For example, with the TestClear clauses and subclauses is that " temperature " is example, it is 5% that the scale parameter that comprises in these clauses and subclauses is set, (such as whole test specification descriptive informations is 20 to need to choose from whole test specification descriptive informations 5% content exactly, then only needing to select one just satisfies condition), under different temperature environments, test.
Mode four: test specification descriptive information of picked at random in the test specification descriptive information, and near one item missing TestClear items for information mates with the above-mentioned test specification descriptive information item of choosing respectively; Obtain each occurrence of obtaining of coupling as test case.This mode relatively is applicable to special user's demand.
Above-mentioned four kinds of matching ways can choose that wherein one or more are used in combination in concrete test process.
To enumerate an embodiment below comes test case generation scheme of the present invention is carried out better detailed elaboration.It is example that this embodiment tests with the software project that has increased the QINQ function to, the process that generates test case according to the present invention program is described, wherein the QINQ function mainly is to produce for the quantity space of expanding VLAN, it realizes that by increase one deck 802.1Q label again on the basis of original 802.1Q message the quantity of the VLAN that makes is increased to 4K * 4K.
The test specification instructions information of this software project is as shown in table 2 below:
Support the configuration and the deletion of uplink mouth
Support self-defined supplier tpid value
Support duplicating of user's tag priority
Disposed that throughput need reach 100% under the situation of qinq
Generate scheme according to the test case of prior art, only need according to above-mentioned this test specification instructions information, one by one QINQ function itself is carried out the test case design, finish the software of test back output redaction.Like this, only have under the situation that QINQ function itself is used separately, this function can be guaranteed.
Generate scheme according to test case of the present invention, if find bug beyond two use-cases in last once OSPF test event, one is OSPF and RIP when shared, produces mutual influence, and this is referred to as bugA; Another one bug is when ospf protocol is moved, and occur between the equipment of other manufacturers can not intercommunication situation, this is referred to as bugB.
The cause information attending device that Bug produces is after the OSPF test is finished, whole bug that test is obtained import, classify one by one, find that bugA and bugB can't put in order in the TestClear clauses and subclauses that defined in advance, so these two bug are categorized into " with exception bug ", and statistics is obtained these two " with making an exception bug " are notified to the Test Engineer.
After the Test Engineer is notified, carry out analyzing and processing, the introducing of finding these two bug is a kind of new condition and new environment, so define cause information respectively, index of definition value index is respectively 7,8, is defined as follows:
The relation of 7---bugA---and Routing Protocol
8---bugB---interconnect with other manufacturers
Like this, newly-increased reason clauses and subclauses are among the TestClear:
(1) test and the relation of other Routing Protocols, and these clauses and subclauses are set is the L rank, and in these clauses and subclauses definition of keywords key1=route, key2=IP message transmit, the key3=carrying;
(2) whether support and the interconnecting of other manufacturers, and these clauses and subclauses are set is the O rank.
Result after the above-mentioned arrangement will directly act on the production process of the test case that generation tests new product or new project; Can realize like this by constantly analysis and the arrangement of the outer bug of test case, act on generation with repeatedly recurrent with the Bug that makes an exception, thereby improved the coverage rate of test case greatly subsequent product, project testing use-case.
Suppose in advance and be provided with following clauses and subclauses in TestClear data structure the inside:
Clauses and subclauses Rank Key word Scale parameter
At different module types The S level
Comprise different port types The L level The key1=configuration, key=2 adds, the key3=deletion
Consider the type factor of different CPU The L level The key1=performance, key2=leads, the key3=degree
The temperature range that test changes The R level 10%
Confirm to have satisfied special user's requirement The O level
The use-case generating apparatus is handled the test specification instructions information of this software, above-mentioned 7,8 these two newly-increased clauses and subclauses have been arranged in the TestClear data structure after, combine with test specification instructions information, the process that generates test case is specific as follows:
The first step, according to original description information and newly-increased clauses and subclauses, it is as follows to generate test case:
Support the configuration and the deletion of uplink mouth
Support the configuration of self-defined supplier tpid value
The passage bearing IP packet
Disposed that throughput need reach 100% under the situation of qinq
In second step, the test case that generates in the TestClear (being above-mentioned table 1) after the newly-increased clauses and subclauses and the above-mentioned first step is mated.
Wherein, at first use the S level project (at different module types) among the original TestClear, respectively with the above-mentioned first step in each bar test case of generating mate, obtain following test case:
Support the configuration and the deletion of uplink mouth, at different module types
Support self-defined supplier tpid value, at different module types
Support duplicating of user tag priority, at different module types
Disposed that throughput need reach 100% under the situation of qinq, at different module types
Once more, use the corresponding project in the test case that generates in the L level project (comprising different port types) among the original TestClear and the above-mentioned first step to mate, obtain following test case:
Support the configuration and the deletion of uplink mouth, comprise dissimilar ports
Support the configuration of self-defined supplier tpid value, comprise dissimilar ports
Use the corresponding project in the test case that generates in the L level project among the original TestClear (considering the type factor of different CPU) and the above-mentioned first step to mate, obtain following test case:
Disposed that throughput need reach 100% under the situation of qinq, considered the type factor of different CPU
And, use the corresponding project in the test case that generates in the R level project among the original TestClear (temperature range that test changes) and the above-mentioned first step to mate, obtain following test case:
Support the configuration and the deletion of uplink mouth, the temperature range that test changes
At last, use the corresponding project in the test case that generates in the O among the original TestClear (affirmation is satisfied the special user and required) and the above-mentioned first step to mate, obtain following test case:
The function of QINQ confirms to satisfy special user's requirement
In the 3rd step, use among the above-mentioned TestClear newly-increased reason clauses and subclauses (with the relation of Routing Protocol)---the corresponding project in the test case that generates in the L level and the above-mentioned first step is mated, and obtains following test case:
The passage bearing IP packet is with the relation of Routing Protocol
Use among the above-mentioned Testclear newly-increased reason clauses and subclauses (with interconnecting of other manufacturers)---the corresponding project in the test case that generates in the O level and the above-mentioned first step is mated, and obtains following test case:
Whether the function of QINQ is supported and the interconnecting of other manufacturers
The test case that obtains in above-mentioned each step is gathered, and it is as follows to obtain final test case:
The remarks explanation
Support the configuration and the deletion of uplink mouth Generate according to description
Support the configuration of self-defined supplier tpid value
The passage bearing IP packet
Disposed that throughput need reach 100% under the situation of qinq
The passage bearing IP packet is with the relation of Routing Protocol According to bug arrangement by other modules, and the new entries match that produces
Whether the function of QINQ is supported and the interconnecting of other manufacturers
Support the configuration and the deletion of uplink mouth, at different module types According to original entries match
Support self-defined supplier tpid value, at different module types
Support duplicating of user tag priority, at different module types
Disposed that throughput need reach 100 % under the situation of qinq, at different module types
Support the configuration and the deletion of uplink mouth, comprise dissimilar ports
Support the configuration of self-defined supplier tpid value, comprise dissimilar ports
Disposed that throughput need reach 100 % under the situation of qinq, considered the type factor of different CPU
Support the configuration and the deletion of uplink mouth, the temperature range that test changes
The function of QINQ confirms to satisfy special user's requirement
Use-case generating apparatus and then top this case form finally can be exported to the Test Engineer is as the guidance and the foundation of test.
From top this simple example as can be seen, the test case generation scheme that proposes based on the present invention generates test case, only generates test case based on initial description compared to existing technology, can expand three times on the quantity size of generation.And, only generate test case compared to existing technology based on initial description, the test case that generates based on the present invention program is with the test of more realistic network environment, can realize test, thereby strengthen the versatility of test case different product to multi-protocols, many type of messages, multioperation mode.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (16)

1. a method for generating test case is characterized in that, comprising:
The cause information that the maintenance test mistake produces, and
Maintenance test specification information;
The cause information and the test specification descriptive information that mate described maintenance generate test case.
2. the method for claim 1 is characterized in that, the cause information that described maintenance test mistake produces specifically comprises: the cause information of safeguarding the test errors generation that sets in advance.
3. method as claimed in claim 2 is characterized in that, the cause information that described maintenance test mistake produces specifically also comprises: be maintained in the test process cause information that the test errors of new input produces.
4. method as claimed in claim 3 is characterized in that, the cause information that described maintenance test mistake produces specifically also comprises:
The cause information that the test errors that obtains in test produces is not in the time of within the cause information that the test errors of safeguarding produces, with the described test errors output that obtains;
Safeguard the cause information of the test errors generation of new input, the cause information that the test errors of described new input produces obtains for the test errors of analyzing described output.
5. method as claimed in claim 4 is characterized in that, the described test errors output that obtains is specifically comprised:
The described test errors that obtains is sorted according to preset rules; And
With the output of the test errors after the ordering.
6. the method for claim 1 is characterized in that, described coupling cause information and test specification descriptive information generate test case and specifically comprise:
Near one item missing cause information mates with every test specification descriptive information respectively;
Obtain each occurrence of obtaining of coupling as test case.
7. the method for claim 1 is characterized in that, described coupling cause information and test specification descriptive information generate test case and specifically comprise at least one cause information execution:
According to the key word that comprises in this cause information, this cause information is mated with the every test specification descriptive information that comprises described key word respectively; And
Obtain at described at least one cause information and carry out each occurrence that obtains after the described matching treatment, as test case.
8. the method for claim 1 is characterized in that, described coupling cause information and test specification descriptive information generate test case and specifically comprise at least one cause information execution:
According to the scale parameter that comprises in this cause information, in all test specification descriptive information items, choose the test specification descriptive information item of corresponding ratio;
This cause information is mated with the described every test specification descriptive information that selects respectively; And
Obtain at described at least one cause information and carry out each occurrence that obtains after the described matching treatment, as test case.
9. the method for claim 1 is characterized in that, described coupling cause information and test specification descriptive information generate test case and specifically comprise:
Test specification descriptive information of picked at random in the test specification descriptive information;
Near one item missing cause information mates with the described test specification descriptive information item of choosing respectively; And
Obtain each occurrence of obtaining of coupling as test case.
10. a test case generation system is characterized in that, comprising:
First attending device is used for the cause information that the maintenance test mistake produces, and
Second attending device is used for maintenance test specification information;
The use-case generating apparatus is used to mate the cause information and the test specification descriptive information of described maintenance, generates test case.
11. system as claimed in claim 10 is characterized in that, described first attending device comprises: the unit that is used to safeguard the cause information of the test errors generation that sets in advance.
12. system as claimed in claim 11 is characterized in that, described first attending device also comprises:
Be used to judge the cause information that test errors that test obtains produces, whether the unit within the cause information that the test errors that sets in advance produces;
Be used in the judged result of judging unit for not the time, the unit of the described test errors output that obtains;
Be used to safeguard the unit of the cause information that the test errors of new input produces, the cause information that the test errors of described new input produces obtains for the test errors of analyzing described output.
13. system as claimed in claim 10 is characterized in that, described use-case generating apparatus comprises:
Be used for the unit that near one item missing cause information mates with every test specification descriptive information respectively;
Be used to obtain each occurrence that coupling obtains unit as test case.
14. system as claimed in claim 10 is characterized in that, described use-case generating apparatus comprises:
Be used for the key word that comprises according to a cause information, the unit that this cause information is mated with the every test specification descriptive information that comprises described key word respectively;
Be used to obtain and carry out each occurrence that obtains after the described matching treatment, as the unit of test case at least one cause information.
15. system as claimed in claim 10 is characterized in that, described use-case generating apparatus comprises:
Be used for the scale parameter that comprises according to a cause information, in all test specification descriptive information items, choose the unit of the test specification descriptive information item of corresponding ratio;
Be used for unit that this cause information is mated with the described every test specification descriptive information that selects respectively;
Be used to obtain and carry out each occurrence that obtains after the described matching treatment, as the unit of test case at least one cause information.
16. system as claimed in claim 10 is characterized in that, described use-case generating apparatus comprises:
Be used for unit at a test specification descriptive information of test specification descriptive information picked at random;
Be used for the unit that near one item missing cause information mates with the described test specification descriptive information item of choosing respectively;
Be used to obtain each occurrence that coupling obtains unit as test case.
CNA2008100004149A 2008-01-04 2008-01-04 Test case generating method and system Pending CN101196817A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2008100004149A CN101196817A (en) 2008-01-04 2008-01-04 Test case generating method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2008100004149A CN101196817A (en) 2008-01-04 2008-01-04 Test case generating method and system

Publications (1)

Publication Number Publication Date
CN101196817A true CN101196817A (en) 2008-06-11

Family

ID=39547251

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2008100004149A Pending CN101196817A (en) 2008-01-04 2008-01-04 Test case generating method and system

Country Status (1)

Country Link
CN (1) CN101196817A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101984416A (en) * 2010-11-02 2011-03-09 中兴通讯股份有限公司 Method and device for generating test case
CN101505241B (en) * 2008-08-20 2011-04-27 北京星网锐捷网络技术有限公司 Method and apparatus for generating test instances
CN101414935B (en) * 2008-07-09 2011-06-22 北京星网锐捷网络技术有限公司 Method and system for generating test case
CN101901183B (en) * 2009-05-31 2012-09-19 西门子(中国)有限公司 Method and device of test case for filtering
CN105022694A (en) * 2015-08-19 2015-11-04 上海斐讯数据通信技术有限公司 Test case generation method and system for mobile terminal test
WO2016107145A1 (en) * 2014-12-31 2016-07-07 中兴通讯股份有限公司 Method for implementing white-box test and test control terminal
CN106155894A (en) * 2015-04-10 2016-11-23 中兴通讯股份有限公司 A kind of generation method and device of test case
CN106201538A (en) * 2016-07-18 2016-12-07 北京航空航天大学 A kind of browsing real-time data method based on RUCM
CN106210897A (en) * 2016-08-09 2016-12-07 深圳创维数字技术有限公司 A kind of Set Top Box automatic test approach based on serial ports and system thereof
CN107609026A (en) * 2017-08-09 2018-01-19 中南大学 A kind of data-intensive applications integration test method and system
CN111385164A (en) * 2018-12-29 2020-07-07 江苏迪纳数字科技股份有限公司 Communication protocol gateway function test method for actively reporting multi-protocol free combination message
CN111782250A (en) * 2020-08-11 2020-10-16 杭州溪塔科技有限公司 Software upgrading compatibility testing method, system and storage medium
CN114706769A (en) * 2022-03-30 2022-07-05 天津大学 Log-based regression test-oriented black box test case sequencing method

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101414935B (en) * 2008-07-09 2011-06-22 北京星网锐捷网络技术有限公司 Method and system for generating test case
CN101505241B (en) * 2008-08-20 2011-04-27 北京星网锐捷网络技术有限公司 Method and apparatus for generating test instances
CN101901183B (en) * 2009-05-31 2012-09-19 西门子(中国)有限公司 Method and device of test case for filtering
CN101984416B (en) * 2010-11-02 2014-12-10 中兴通讯股份有限公司 Method and device for generating test case
CN101984416A (en) * 2010-11-02 2011-03-09 中兴通讯股份有限公司 Method and device for generating test case
WO2016107145A1 (en) * 2014-12-31 2016-07-07 中兴通讯股份有限公司 Method for implementing white-box test and test control terminal
CN106155894A (en) * 2015-04-10 2016-11-23 中兴通讯股份有限公司 A kind of generation method and device of test case
CN105022694B (en) * 2015-08-19 2018-07-13 上海斐讯数据通信技术有限公司 Method for generating test case and system for mobile terminal test
CN105022694A (en) * 2015-08-19 2015-11-04 上海斐讯数据通信技术有限公司 Test case generation method and system for mobile terminal test
CN106201538A (en) * 2016-07-18 2016-12-07 北京航空航天大学 A kind of browsing real-time data method based on RUCM
CN106201538B (en) * 2016-07-18 2019-05-31 北京航空航天大学 A kind of browsing real-time data method based on RUCM
CN106210897A (en) * 2016-08-09 2016-12-07 深圳创维数字技术有限公司 A kind of Set Top Box automatic test approach based on serial ports and system thereof
CN106210897B (en) * 2016-08-09 2019-12-10 深圳创维数字技术有限公司 set top box automatic test method based on serial port and system thereof
CN107609026A (en) * 2017-08-09 2018-01-19 中南大学 A kind of data-intensive applications integration test method and system
CN107609026B (en) * 2017-08-09 2020-11-06 中南大学 Data intensive application integration test method and system
CN111385164A (en) * 2018-12-29 2020-07-07 江苏迪纳数字科技股份有限公司 Communication protocol gateway function test method for actively reporting multi-protocol free combination message
CN111385164B (en) * 2018-12-29 2021-11-30 江苏迪纳数字科技股份有限公司 Communication protocol gateway testing method for actively reporting multi-protocol free combination message
CN111782250A (en) * 2020-08-11 2020-10-16 杭州溪塔科技有限公司 Software upgrading compatibility testing method, system and storage medium
CN114706769A (en) * 2022-03-30 2022-07-05 天津大学 Log-based regression test-oriented black box test case sequencing method

Similar Documents

Publication Publication Date Title
CN101196817A (en) Test case generating method and system
CN102402481B (en) The fuzz testing of asynchronous routine code
RU2430409C2 (en) Method of measuring coverage in interconnection structural condition
CN103095475B (en) The method for inspecting and system of multimode communication device
CN109522228A (en) Interface automatic test data configuration method, apparatus, platform and storage medium
CN113572726A (en) Multi-mode network control-data plane consistency verification method and device
US10830818B2 (en) Ensuring completeness of interface signal checking in functional verification
Horn et al. A precise and expressive lattice-theoretical framework for efficient network verification
CN106802865B (en) Response simulator and method for software test
CN106649837B (en) Database compatibility method
CN116955097A (en) Test flow display method and device and test flow display system
CN112363939A (en) Method, system and equipment for quickly generating fuzzy test network protocol template
Koster et al. Engineering trust alignment: Theory, method and experimentation
Bonhomme Decentralized state estimation and diagnosis of p-time labeled Petri nets systems
CN104536887B (en) communication data detection method and device
CN114598680B (en) Domain name management method, device and storage medium
CN113835946B (en) Pressure test method for data exchange
Babac et al. AgentTest: A specification language for agent-based system testing
CN108521350A (en) A kind of industrial gateway equipment automatization test method driving script based on XML
CN104579743B (en) A kind of method and system of telecommunication apparatus remote maintenance
US7149995B2 (en) Graphical interface to layout processing components and connections
Xie et al. The strong local diagnosability of a hypercube network with missing edges
Geng et al. Failure diagnosis for distributed stochastic discrete event systems
CN110659215A (en) Open type industrial APP rapid development and test verification method
Meijer Efficient learning and analysis of system behavior

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: 20080611