CN102135936A - Method and system for generating test case - Google Patents
Method and system for generating test case Download PDFInfo
- Publication number
- CN102135936A CN102135936A CN2010106202969A CN201010620296A CN102135936A CN 102135936 A CN102135936 A CN 102135936A CN 2010106202969 A CN2010106202969 A CN 2010106202969A CN 201010620296 A CN201010620296 A CN 201010620296A CN 102135936 A CN102135936 A CN 102135936A
- Authority
- CN
- China
- Prior art keywords
- model
- test case
- interface
- man
- resolved
- 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
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the invention provides a method and system for generating a test case, wherein the method comprises the steps of: acquiring basic function models of a tested software system, wherein the basic function models comprise a static interface model, a dynamic interface model, an interface behavior model, an interface data structure, the relationship between the static interface model and the interface data structure, and a human-computer interaction flow model, and the human-computer interaction flow model is obtained according to the pre-established static interface model, the dynamic interface model and the interface behavior model; and analyzing the basic function models of the tested software system and generating the test case of the tested software. The technical scheme is beneficial to improvement of the efficiency of a software test.
Description
Technical field
The present invention relates to software testing technology, relate in particular to a kind of method and system that generates test case, belong to field of computer technology.
Background technology
Graphical user interface (graphics user interface, hereinafter to be referred as: GUI) method for testing software is that image is used in a kind of utilization, the literal of input, the method of testing that the computer interface of the screen of band icon carries out, when utilizing this method of testing to carry out software test, the user need write test case at the different test functions of tested software.And no matter be the GUI manual test, or the GUI automatic test, it is all very frequent that its interface changes, and at the test case of specific interface, its test case and test code etc. all may be invalid on a large scale when testing for other interfaces, can't reuse.This makes that when large software was tested, the user need write a large amount of test cases, makes that the efficient of software test is low.
Summary of the invention
The embodiment of the invention provides a kind of method and system that generates test case, in order to improve the efficient of software test.
The embodiment of the invention provides a kind of method that generates test case, comprising:
Obtain the basic function model of tested software system, described basic function model comprises relation and the man-machine interaction procedural model between static interfaces model, dynamic interface model, interface behavior model, interface data structure, static interfaces model and the interface data structure, and described man-machine interaction procedural model is to obtain according to the described static interfaces model of setting up in advance, dynamic interface model and interface behavior model;
Corresponding relation to interface data structure, static interfaces model and the interface data structure obtained is resolved, and obtains the test data that each testing procedure uses in the test case;
Described dynamic interface model is resolved, and according to the testing procedure of analysis result to the described test case obtained, and the test data that each step is used in the described test case of obtaining is revised;
The test data that each testing procedure in the revised test case is used is filled in the testing procedure of revised test case, generates complete test case.
The embodiment of the invention also provides a kind of system that generates test case, comprising:
Acquisition module, be used to obtain the basic function model of tested software system, described basic function model comprises relation and the man-machine interaction procedural model between static interfaces model, dynamic interface model, interface behavior model, interface data structure, static interfaces model and the interface data structure, and described man-machine interaction procedural model is to obtain according to the described static interfaces model of setting up in advance, dynamic interface model and interface behavior model;
The test case generation module is used for the basic function model of the described tested software system that obtains is resolved, and generates the test case of described tested software, and described test case generation module comprises:
The testing procedure acquiring unit is used for the man-machine interaction procedural model that obtains is resolved, and obtains the testing procedure of each test case;
The test data acquiring unit is used for the corresponding relation of interface data structure, static interfaces structure and the interface data structure obtained is resolved, and obtains the test data that each testing procedure uses in the test case;
Amending unit is used for described dynamic interface model is resolved, and according to the testing procedure of analysis result to the described test case obtained, and the test data that each step is used in the described test case of obtaining is revised;
The test case generation unit is used for the test data that each testing procedure of revised test case uses is filled in the testing procedure of revised test case, generates complete test case.
The method of the test case of generation graphical user interface software provided by the invention and system, the method of the basic function model by obtaining tested software, automatically the basic function model of tested software is resolved by computer system then, generate the test case of tested software, basic function model wherein can be with the static characteristics of tested software, data characteristics, service feature system and describe accurately all, simultaneously by this technical scheme, automatically generate test case by computer system, efficient also can be greatly enhanced.In addition for situations such as software upgradings,, reuse in the test process of software that also can be after upgrading for each model of setting up before the upgrading.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do one to the accompanying drawing of required use in embodiment or the description of the Prior Art below introduces simply, apparently, accompanying drawing in describing below is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 generates the schematic flow sheet of the method embodiment of test case for the present invention;
Fig. 2 is for setting up the synoptic diagram of static interfaces model in the embodiment of the invention;
Fig. 3 is for setting up the synoptic diagram of dynamic interface model in the embodiment of the invention;
The synoptic diagram one of Fig. 4 for linking between control in the embodiment of the invention;
The synoptic diagram two of Fig. 5 for linking between control in the embodiment of the invention;
Fig. 6 is an operation steps synoptic diagram one in the embodiment of the invention;
Fig. 7 is an operation steps synoptic diagram two in the embodiment of the invention;
Fig. 8 is an operation branch synoptic diagram in the embodiment of the invention;
Fig. 9 is an operational constraints synoptic diagram in the embodiment of the invention;
Figure 10 is operation steps and an action pane corresponding relation synoptic diagram in the embodiment of the invention;
Figure 11 is the schematic flow sheet of modelling in the embodiment of the invention;
Figure 12 is the schematic flow sheet that generates test case in the embodiment of the invention;
Figure 13 is a man-machine interaction schematic flow sheet one in the embodiment of the invention;
Figure 14 is a man-machine interaction schematic flow sheet two in the embodiment of the invention;
Figure 15 is a man-machine interaction schematic flow sheet three in the embodiment of the invention;
Figure 16 generates the structural representation of the system embodiment of test case for the present invention;
Figure 17 is the structural representation of acquisition module in the embodiment of the invention;
Figure 18 is the structural representation of test case generation module in the embodiment of the invention;
Figure 19 is the structural representation of the general-purpose network component of the enforcement embodiment of the invention.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Write inefficient defective at test case in the software test procedure of prior art, the embodiment of the invention provides a kind of generation method of graphical user interface software test case, concrete, Fig. 1 generates the schematic flow sheet of the method embodiment of test case for the present invention, as shown in Figure 1, this method comprises the steps:
Step 101, obtain the basic function model of tested software, above-mentioned basic function model comprises relation and the man-machine interaction procedural model between static interfaces model, dynamic interface model, interface behavior model, interface data structure, static interfaces model and the interface data structure, and described man-machine interaction procedural model is to obtain according to the described static interfaces model of setting up in advance, dynamic interface model and interface behavior model;
Step 102, the basic function model of the described tested software of obtaining is resolved, and generate the test case of described tested software, this concrete step comprises resolves the man-machine interaction procedural model that obtains, and obtains the testing procedure of each test case; Corresponding relation to interface data structure, static interfaces model and the interface data structure obtained is resolved, and obtains the test data that each testing procedure uses in the test case; Described dynamic interface model is resolved, and according to the testing procedure of analysis result to the described test case obtained, and the test data that each step is used in the described test case of obtaining is revised; And the test data that each testing procedure in the revised test case is used is filled in the testing procedure of revised test case, generates complete test case.
The generation method of the graphical user interface software test case that the above embodiment of the present invention provides, the method of the basic function model by obtaining tested software, automatically the basic function model of tested software is resolved by computer system then, generate the test case of tested software, basic function model wherein can be with the static characteristics of tested software, data characteristics, service feature system and describe accurately all, simultaneously by this technical scheme, automatically generate test case by computer system, efficient also can be greatly enhanced.In addition for situations such as software upgradings,, reuse in the test process of software that also can be after upgrading for each model of setting up before the upgrading.
Below specific embodiments of the invention are described book, for example static interfaces model wherein is the action pane of describing system under test (SUT), control information etc., for example shown in Figure 2, the action pane A of one tested software system, include a text box A1, button A2 on this action pane A, the title attribute of this concrete action pane is " A ", and the attribute that enables of text box A1 is Enable, and the text attribute of button A2 is " determining ".It is as follows that this action pane is set up the static interfaces model:
[window A object]
Attributes: // community set
Title=A // title attribute is A
Controls=text box A1; Button A2 // control property is for comprising text box A1 and button A2
[text box A1 object]
IsEnable=Enable // enable attribute is Enable
[button A2 object]
Text=determines // text attribute is for determining
In addition, for the dynamic interface model, it mainly is the relation of describing between each action pane of tested software system, concrete can be as shown in Figure 3, the button X on can window A, ejection operation window B, the concrete dynamic interface set up model is as follows:
[window object A]
Title=A // title attribute is A
Controls=button X // control property is for comprising button X
[button object X]
Text=X // text attribute is X
ClickEvent=window object B // click event attribute is window object B
[window object B]
Title=B // title attribute is B
In addition, for the interface behavior property, it is to describe interaction relation between inner each control of action pane of tested software system, and concrete can be as shown in Figure 4 and Figure 5, in action pane A, control wherein comprises check box A1, button A2 and button A3, and when choosing check box A1, button A2 is unavailable, button A3 can use, when not selecting check box A1, button A2 can use, and button A3 is unavailable.The concrete interface set up behavior model is as follows:
[window object A]
Title=A // title attribute is A
Controls=check box A1; Button A2; Button A3 // control property is for comprising check box A1, button A2 and button A3
Rules: // rule
IF check box A1 chooses THEN button A2 unavailable, and button A3 can use
If // check box A1 chooses, then button A2 is unavailable, and button A3 can use
IF check box A1 does not choose THEN button A2 to use.Button A3 is unavailable
If // check box A1 does not choose, then button A2 can use, and button A3 is unavailable
For the interface data structure, it is the data structure that is presented on the action pane, concrete Data Structures and the complex data structure of comprising.For Data Structures, can comprise character string type string, integer int, floating type float, double double, enumerate enum etc.Following data field a1, a2, a3, a4, a5 are for example arranged, and wherein the type of data field a1 is string, invalid value is-symbol " ", " % " and "; "; The type of data field a2 is int; The type of data field a3 is float; The type of data field a4 is that the type of double, data field a5 is enum.For static interfaces model of setting up and the relation between the interface data structure, just be meant the field set up on the action pane (static interfaces model) and the corresponding relation of its interface data structure type, concrete can set up as drag:
Field name | Type | Invalid value | Data area |
a1 | string | @、#、$、^、% | 32 |
a2 | int | 5 | [0,20] |
a3 | float | 3.25 | [0.2,4.4] |
a4 | double | 3.25 | [0.2,4.4] |
a5 | enum | K3 | {K1,K2,K3,K4,K5} |
In addition, for the complex data structure, can be the combination of Data Structures, also can be other, concrete structure such as list structure, tree construction type for example.
For example, the form X of tested software system, this form X contains field A1, A2 and A3, and A1, A2 and A3 be basic data structure, and modeling is as follows:
Field name | Type | Invalid value | Data area |
A1 | String | @、#、$、^、% | 32 |
A2 | Int | 5 | [0,20] |
A3 | Float | 3.25 | [0.2,4.4] |
For list structure X, it is for checking type of data structure, and modeling is as follows:
The composite data type title | Type | The Data Structures that comprises |
X | List structure | A1、A2、A3 |
In addition, for the man-machine interaction procedural model, it mainly is to describe operation steps information, operation branch information, the operational constraints information of using the tested software system, and the corresponding relation of each operation steps and action pane, wherein operation steps comprises operation steps and the interior operation steps of window between window, operation steps and the corresponding relation of action pane also comprise operation steps information in the corresponding window of the control of each action pane, and operation steps information between the window of control correspondence in each action pane.
Concrete operation steps is for describing a kind of logical model of dynamic interface model, for example in the tested software system, adopt following operation steps, the button A1 of clicking operation window A, ejection operation mouth B is after action pane B ejects, the button B1 of clicking operation window B, action pane B closes, and gets back to action pane A, the state of verification operation window A this moment, the A2 button of clicking operation window A, action pane A closes.With reference to figure 6 and Fig. 7, can modeling as follows:
Each operation steps flow process is explained as follows:
" 1 ": expression begins the operation steps of action pane A,
" 2 ": " Input " expression is to the operation (this example does not relate to) of the data class control of action pane A
" 3 ": expression button click A1
" 4 ": ejection operation window B behind the expression button click A1, the operation steps set on action pane B
" 7 ": expression begins the operation steps of action pane B
" 8 ": expression is to the operation (this example does not relate to) of the data class control of action pane A
" 9 ": the button B1 of expression clicking operation window B
" 5 ": behind the button B1 of " Verify " expression clicking operation window B, action pane B closes, the state of verification operation window A
" 6 ": expression finishes the operation steps of action pane A.
For operation branch, be meant different operating to same action pane.For example at window A a text box A1 is arranged, the value of A1 may be 1, also may be 2, and is when the value difference of text box A1, also different to the operation steps of window A.With reference to figure 8, modeling is as follows:
" 1 ": expression begins the operation steps of action pane A
" 2 ": " Input " expression is to the operation (this example does not relate to) of the data class control of action pane A
" 3 ": if the value of the text box A1 of expression action pane A is 1, expect that then the value of text box A1 is 1, carry out " 4 "; If the value of the text box A1 of action pane A is 2, expect that then the value of text box A1 is 2, carry out " 5 "
" 4 ": verification operation step
" 5 ": verification operation step
" 6 ": the expression operation steps finishes
For operational constraints, it is the operation steps of factor affecting windows content inside such as the same action pane internal cause value of description, and perhaps the different operating window is because of operation steps between factor Different Effects windows such as value.For example in example, for the control text box A1 on the action pane A, if the value of A1 is 1, pop-up window B then; If the value of A1 is 2, pop-up window C then, with reference to shown in Figure 9, modeling is as follows:
" 1 ": expression begins the operation steps of action pane A
" 2 ": expression receives the numerical value of input
" 3 ": the input value that receives in the expression " 2 " is 1 o'clock, ejection operation window B
" 4 ": the input value that receives in the expression " 2 " is 2 o'clock, ejection operation window C
" 5 ": the expression operation steps finishes
In addition, corresponding relation about operation steps and action pane, can be referring to following example shown in Figure 10, wherein action pane A has button A1, text box A2, text box A3, the man-machine interaction flow process is in operation steps " Input Para " in, and the description of the corresponding relation of static interfaces model comprises following content: the one, the corresponding relation between the static interfaces model need to be described, for example set up the corresponding relation between text box A3 and the button A1, promptly among the A3 behind the input value button can use; But needs are described the concrete operations step of static interfaces model correspondence, for example after the input data, carry out the operation of button click A1 in text box A2 and A3.
In concrete the above embodiment of the present invention, in the process of the basic function model of setting up the tested software system in advance, can be to set up earlier static interfaces model, dynamic interface model and interface behavior model in advance, and then set up the man-machine interaction procedural model, can be divided into step as shown in figure 11:
Step 201, set up static interfaces model, dynamic interface model and interface behavior model; The concrete method for building up of this class model can be with reference to the embodiment that provides above;
For example when setting up the dynamic interface model, it is modeling method by the dynamic interface model description, the INTERFACE MODEL that each is static is cascaded, the relation of series connection is the dependence in the behavior, promptly for the meeting of the button X on clicking operation window A ejection operation window B, then exist behavior to rely between two static interfaces models of action pane A, action pane B, i.e. button click X;
When setting up the complex data structure, can be based on some Data Structures and carry out logical combination, or the logical combination that carries out once more based on other complex data structure.For example the displaying interface of tested software system one tree shape structure X, that articulate under each node of tree structure X is a chain structure Y, chain structure Y is by (z1, z2 z3...zN) form." compound interface data structure " is exactly tree structure X and chain structure Y so, and tree structure X comprises chain structure Y, and " Data Structures " is exactly z1, z2...zN.
The modeling method of " complex data structure " that present embodiment proposes has guaranteed the versatility and the extendability of modeling method.
In addition, for setting up behavior model, can be to use logic rules (as IF, ELSE, THEN, AOI etc.) to describe the interaction relation of various controls on the same action pane.
Step 202, the dynamic interface model of setting up is in advance resolved, obtain the operation steps information between operation branch information, operational constraints information and the window in the man-machine interaction procedural model; The ejection relation of each action pane is obtained in i.e. parsing " dynamic interface model ".
Step 203, the static interfaces model of above-mentioned foundation is resolved, obtain the operation steps information in the window of control correspondence of each action pane in the man-machine interaction procedural model; Concrete, in the man-machine interaction procedural model, each control element is based on the granularity of an action pane, parsing " static interfaces model " can obtain each action pane and contain which control, and these control element are exactly " operation steps " that each control element need be tested in " man-machine interaction flow process ".
Such as: window A contains window control set R=<c1, c2...ci...〉i<=n, n is a natural number.Control ci correspondence an operation steps oi, the operation steps of action pane A correspondence set O=<o1 then, o2, o3...oi... 〉, in the man-machine interaction procedural model, the control element of respective operations window A just contains operation steps set O=<o1 so, o2, o3...oi... 〉.
Step 204, the interface behavior model of setting up is in advance resolved, and the operation steps information of the control correspondence of described each action pane is revised.
For example contain check box B, text box C and text box D among the action pane A, choose if provided check box B in the behavior model of interface, then text box C can use, if check box B cancellation is chosen, then text box D can use.
According to " interface behavior model ", can obtain following logic state so:
Check box B | Text box C | Text box D |
Choose | Available | Unavailable |
Cancellation is chosen | Unavailable | Available |
As seen from the above table, check box B has controlled text box C and text box D, in the operation steps, should be to the operation of check box B as the first step, otherwise the operation steps that obtains set will be wrong.
Therefore, the set of the operation steps of the action pane A correspondence that obtains after the correction is: the first step, and check box B chooses; In second step, text box C inserts word content; In the 3rd step, text box D inserts word content.
In addition, in the above embodiment of the present invention, can resolve, and generate the test case of described tested software system, the concrete step that can comprise as shown in figure 12 by basic function model to the tested software system that obtains:
For example the tested software system contains action pane A and action pane B, its corresponding two personal-machine interaction flows: man-machine interaction flow process A and man-machine interaction flow process B; And in action pane A, contain text box A1 and button A2, and the static interfaces model of mentioning in the foregoing description, meeting ejection operation window B after button A2 clicks, be operation steps information between the window corresponding that mention in the foregoing description with control action pane, can eject prompting frame X after the text box A1 input 1, can eject prompting frame Y after the input 2, i.e. setting operation constraint information in text box A1, mate by different input informations and the operational constraints information obtained, and two operation branches are provided, man-machine interaction flow process A specifically can be as shown in figure 13.
And contain text box B1 and button B2 at action pane B, and button click B2, action pane B close, i.e. operation steps information in the window of the control correspondence of the action pane of mentioning in the foregoing description, and man-machine interaction flow process B is as shown in figure 14.
Resolve man-machine interaction flow process A and man-machine interaction flow process B, two personal-machine interaction flows are merged, obtain step as shown in figure 15.Use the depth-first algorithm, obtain two groups of test paths.
The testing procedure set that test path 1 comprises=<text box A1 input text content, button click A2, text box B1 input text content, button click X, text box A1 input text content is 1, whether verification ejects prompting frame X 〉;
The testing procedure set that test path 2 comprises=<text box A1 input text content, button click A2, text box B1 input text content, button click X, text box A1 input text content is 2, whether verification ejects prompting frame Y 〉.
The corresponding relation of step 302, the interface data structure to obtaining, static interfaces model and interface data structure is resolved, and obtains the test data that each testing procedure uses in the test case; The test data that obtains in this step specifically comprises legal upper boundary values, lower border value, typical values (producing at random), illegal upper boundary values, lower border value etc.
For example: the corresponding interface data structure of text box A character string B, the maximum length of character string B is 5, and unallowable instruction digit is the character string that contains *, and character string B is the data that must fill in, then obtains following available test data: legal upper boundary values---1sdfe; Legal lower border value---p; Legal typical values---dgk; Illegal upper boundary values---1sdfe
*Illegal lower border value---
*
Rule 1: if A1 chooses, combobox A2 can use, otherwise unavailable;
Rule 2: if combobox A2 selects the X value, text box A3 can use;
Rule 3: if combobox A2 selects the Y value, text box A3 is unavailable;
Rule 4: text box A3 original state is unavailable.
According to above-mentioned rule, can handle according to following algorithm:
Corresponding with the generation method of above-mentioned software test case, the embodiment of the invention also provides a kind of generation system of graphical user interface software test case, Figure 16 generates the structural representation of the system embodiment of test case for the present invention, as shown in figure 16, this system comprises acquisition module 11 and test case generation module 12, wherein acquisition module 11 is used to obtain the basic function model of tested software system, described basic function model comprises the static interfaces model, the dynamic interface model, the interface behavior model, the interface data structure, relation between static interfaces model and the interface data structure and man-machine interaction procedural model, described man-machine interaction procedural model are the described static interfaces models of setting up according in advance, dynamic interface model and interface behavior model obtain; Test case generation module 12 is used for the basic function model of the described tested software system that obtains is resolved, and generates the test case of described tested software.
The generation system of the graphical user interface software test case that the above embodiment of the present invention provides, the method of the basic function model by setting up tested software in advance, automatically the basic function model of tested software is resolved by computer system then, generate the test case of tested software, basic function model wherein can be with the static characteristics of tested software, data characteristics, service feature system and describe accurately all, simultaneously by this technical scheme, automatically generate test case by computer system, efficient also can be greatly enhanced.
Concrete, in specific embodiments of the invention, can at first set up static interfaces model, dynamic interface model and interface behavior model; Then according to above-mentioned modelling man-machine interaction procedural model, as shown in figure 17, above-mentioned acquisition module comprises first acquiring unit 111, second acquisition unit 112, the 3rd acquiring unit 113 and first amending unit 114, and wherein first acquiring unit 111 is used to obtain and sets up static interfaces model, dynamic interface model and interface behavior model in advance; Second acquisition unit 112 is used for the dynamic interface model of setting up is in advance resolved, and obtains operation branch information, operational constraints information and operation steps information in the man-machine interaction procedural model; The 3rd acquiring unit 113 is used for the static interfaces model of setting up is in advance resolved, and obtains the operation steps information of the control correspondence of each action pane in the man-machine interaction procedural model; First amending unit 114 is used for the interface behavior model of setting up is in advance resolved, and the operation steps information of the control correspondence of described each action pane is revised.
In addition as shown in figure 18, test case generation module in the foregoing description can be divided into testing procedure acquiring unit 121, test data acquiring unit 122, second amending unit 123 and test case generation unit 124, wherein testing procedure acquiring unit 121 is used for the man-machine interaction procedural model that obtains is resolved, and obtains the testing procedure of each test case; Test data acquiring unit 122 is used for the corresponding relation of the interface data structure of obtaining, static interfaces structure and interface data structure is resolved, and obtains the test data that each testing procedure uses in the test case; Second amending unit 123 is used for described dynamic interface model is resolved, and according to the testing procedure of analysis result to the described test case obtained, and the test data that each step is used in the described test case of obtaining is revised; Test case generation unit 124 is used for the test data that each testing procedure of revised test case uses is filled in the testing procedure of revised test case, generates complete test case.
The generation method and the system of the gui software test case that the above embodiment of the present invention provides, it is by modeling, with the static nature of tested software system, data characteristics, service feature system, describe exactly, it is more accurate to describe than classic method, in addition by the model of setting up is resolved, automatically generate test case, can be after system under test (SUT) changes, also can reach the effect of quick generation test case, solved under the traditional approach, the system under test (SUT) interface after changing, the problem that test code, test case can't upgrade in time.In addition, generate test case or code automatically, improve the model reusability according to model, and the accuracy of the coverage of test case, test code, can save in test and drop into.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential hardware platform, can certainly all implement by hardware.Based on such understanding, all or part of can the embodying that technical scheme of the present invention contributes to background technology with the form of software product, this computer software product can be stored in the storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be a personal computer, server, the perhaps network equipment etc.) carry out the described method of some part of each embodiment of the present invention or embodiment.
Said method and system embodiment can realize on any general-purpose network component, for example, and computing machine or have enough processing poweies, memory source and network throughput to handle the networking component of its necessary operating load.Figure 19 has schematically shown a kind of typical general-purpose network component 500, and these parts are applicable to realizes one or more embodiment as herein described.This network components 500 comprises that is used for processor 502 (can be described as central processing unit (CPU)), I/O (I/O) equipment 510 and a network connection device 512 that communicates with memory device.Wherein, described memory device comprises supplementary storage 504, ROM (read-only memory) (ROM) 506, random-access memory (ram) 508.This processor 502 can be realized by one or more cpu chips, also can be one or more special ICs (Application SpecificIntegrated Circuits, part ASIC).
This supplementary storage 504 generally includes one or more disc drivers or magnetic tape station, as non-volatile data memory; If the off-capacity of this RAM 508 is to keep all working data, this supplementary storage 504 will be used as the overflow data memory device.This supplementary storage 504 can be used for storing the program of preparing execution among this RAM 508 that is loaded into.This ROM 506 is used for being stored in the instruction and data that program process occurs.This ROM 506 is a kind of non-volatile memory devices, and its memory capacity is usually less than the memory capacity of this supplementary storage 504.This RAM 508 is used for stores volatile data, also is used for storage instruction sometimes.The access speed of this ROM 506 and this RAM 508 is usually faster than this supplementary storage 504.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.
Claims (4)
1. a method that generates test case is characterized in that, comprising:
Obtain the basic function model of tested software system, described basic function model comprises relation, static interfaces model, dynamic interface model, interface behavior model, interface data structure and the man-machine interaction procedural model between static interfaces model and the interface data structure, and described man-machine interaction procedural model is to obtain according to the described static interfaces model of setting up in advance, dynamic interface model and interface behavior model;
The man-machine interaction procedural model that obtains is resolved, obtain the testing procedure of each test case;
The static interfaces model that obtains and corresponding relation, the interface data structure of interface data structure are resolved, obtain the test data that each testing procedure uses in the test case;
Described dynamic interface model is resolved, and according to the testing procedure of analysis result to the described test case obtained, and the test data that each step is used in the described test case of obtaining is revised;
The test data that each testing procedure in the revised test case is used is filled in the testing procedure of revised test case, generates test case.
2. the method for generation test case according to claim 1 is characterized in that, the described man-machine interaction procedural model that obtains the tested software system comprises:
Obtain static interfaces model, dynamic interface model and the interface behavior model set up in advance;
The dynamic interface model of setting up is in advance resolved, obtain operation steps information between operation branch information, operational constraints information and the window in the man-machine interaction procedural model;
The static interfaces model of setting up is in advance resolved, obtain the interior operation steps information of window of the control correspondence of each action pane in the man-machine interaction procedural model;
The interface behavior model of setting up is in advance resolved, and operation steps information in the window of the control correspondence of each action pane described in the man-machine interaction procedural model is revised.
3. a system that generates test case is characterized in that, comprising:
Acquisition module, be used to obtain the basic function model of tested software system, described basic function model comprises relation and the man-machine interaction procedural model between static interfaces model, dynamic interface model, interface behavior model, interface data structure, static interfaces model and the interface data structure, and described man-machine interaction procedural model is to obtain according to the described static interfaces model of setting up in advance, dynamic interface model and interface behavior model;
The test case generation module is used for the basic function model of the described tested software system that obtains is resolved, and generates the test case of described tested software, and described test case generation module comprises:
The testing procedure acquiring unit is used for the man-machine interaction procedural model that obtains is resolved, and obtains the testing procedure of each test case;
The test data acquiring unit is used for the corresponding relation of interface data structure, static interfaces structure and the interface data structure obtained is resolved, and obtains the test data that each testing procedure uses in the test case;
Amending unit is used for described dynamic interface model is resolved, and according to the testing procedure of analysis result to the described test case obtained, and the test data that each step is used in the described test case of obtaining is revised;
The test case generation unit is used for the test data that each testing procedure of revised test case uses is filled in the testing procedure of revised test case, generates complete test case.
4. the system of generation test case according to claim 3 is characterized in that, described acquisition module comprises:
First acquiring unit is used to obtain and sets up static interfaces model, dynamic interface model and interface behavior model in advance;
Second acquisition unit is used for the dynamic interface model of setting up is in advance resolved, and obtains operation steps information between operation branch information, operational constraints information and the window in the man-machine interaction procedural model;
The 3rd acquiring unit is used for the static interfaces model of setting up is in advance resolved, and obtains the interior operation steps information of window of the control correspondence of each action pane in the man-machine interaction procedural model;
Amending unit is used for the interface behavior model of setting up is in advance resolved, and the operation steps information of the control correspondence of described each action pane is revised.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010106202969A CN102135936A (en) | 2010-12-31 | 2010-12-31 | Method and system for generating test case |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010106202969A CN102135936A (en) | 2010-12-31 | 2010-12-31 | Method and system for generating test case |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102135936A true CN102135936A (en) | 2011-07-27 |
Family
ID=44295724
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2010106202969A Pending CN102135936A (en) | 2010-12-31 | 2010-12-31 | Method and system for generating test case |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102135936A (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102508775A (en) * | 2011-10-31 | 2012-06-20 | 彭勇 | Interactive automation test system |
CN102955799A (en) * | 2011-08-25 | 2013-03-06 | 广州银禾网络通信有限公司 | Method and system for structured storage of cells in mobile communication network signaling |
WO2015051735A1 (en) * | 2013-10-09 | 2015-04-16 | Tencent Technology (Shenzhen) Company Limited | Devices and methods for generating test cases |
CN104679519A (en) * | 2015-03-10 | 2015-06-03 | 于秀山 | Method and device for acquiring functions of graphic user interface software |
CN104699608A (en) * | 2015-03-10 | 2015-06-10 | 于秀山 | Automatic test method and device for graphic user interface software |
CN106021102A (en) * | 2016-05-16 | 2016-10-12 | 北京奇虎科技有限公司 | Automated test file generation method and apparatus |
CN102955799B (en) * | 2011-08-25 | 2016-12-14 | 广州银禾网络通信有限公司 | A kind of method and system that cell in mobile communications network signaling is carried out structured storage |
CN107368421A (en) * | 2017-07-28 | 2017-11-21 | 北京深思数盾科技股份有限公司 | The method and system of automatic test interface program |
CN108490922A (en) * | 2018-04-27 | 2018-09-04 | 北京新能源汽车股份有限公司 | Generation method and device of unified diagnostic service test case |
CN109587351A (en) * | 2019-01-23 | 2019-04-05 | 北京三快在线科技有限公司 | A kind of call test method, device, equipment and storage medium |
CN113448829A (en) * | 2020-03-27 | 2021-09-28 | 北京奔影网络科技有限公司 | Dialogue robot test method, device, equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030227480A1 (en) * | 2002-06-11 | 2003-12-11 | Polk George Allyn | Method and apparatus for testing embedded examples in GUI documentation |
CN1851667A (en) * | 2006-02-15 | 2006-10-25 | 华为技术有限公司 | Graphic user interface test method and system |
CN101339534A (en) * | 2008-06-17 | 2009-01-07 | 金蝶软件(中国)有限公司 | Software test apparatus and test method |
-
2010
- 2010-12-31 CN CN2010106202969A patent/CN102135936A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030227480A1 (en) * | 2002-06-11 | 2003-12-11 | Polk George Allyn | Method and apparatus for testing embedded examples in GUI documentation |
CN1851667A (en) * | 2006-02-15 | 2006-10-25 | 华为技术有限公司 | Graphic user interface test method and system |
CN101339534A (en) * | 2008-06-17 | 2009-01-07 | 金蝶软件(中国)有限公司 | Software test apparatus and test method |
Non-Patent Citations (1)
Title |
---|
张博刚等: "基于运行监测的图形用户界面自动化测试模型", 《计算机应用》, vol. 30, no. 10, 31 October 2010 (2010-10-31), pages 2749 - 2753 * |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102955799B (en) * | 2011-08-25 | 2016-12-14 | 广州银禾网络通信有限公司 | A kind of method and system that cell in mobile communications network signaling is carried out structured storage |
CN102955799A (en) * | 2011-08-25 | 2013-03-06 | 广州银禾网络通信有限公司 | Method and system for structured storage of cells in mobile communication network signaling |
CN102508775A (en) * | 2011-10-31 | 2012-06-20 | 彭勇 | Interactive automation test system |
WO2015051735A1 (en) * | 2013-10-09 | 2015-04-16 | Tencent Technology (Shenzhen) Company Limited | Devices and methods for generating test cases |
CN104572031A (en) * | 2013-10-09 | 2015-04-29 | 腾讯科技(深圳)有限公司 | Method and device for generating test case |
CN104699608B (en) * | 2015-03-10 | 2017-10-27 | 于秀山 | Graphic User Interface software automatic test approach and device |
CN104699608A (en) * | 2015-03-10 | 2015-06-10 | 于秀山 | Automatic test method and device for graphic user interface software |
CN104679519A (en) * | 2015-03-10 | 2015-06-03 | 于秀山 | Method and device for acquiring functions of graphic user interface software |
CN104679519B (en) * | 2015-03-10 | 2018-05-15 | 于秀山 | Graphical user interface software function acquisition methods and device |
CN106021102A (en) * | 2016-05-16 | 2016-10-12 | 北京奇虎科技有限公司 | Automated test file generation method and apparatus |
CN106021102B (en) * | 2016-05-16 | 2019-05-28 | 北京奇虎科技有限公司 | The generation method and device of automatic test file |
CN107368421A (en) * | 2017-07-28 | 2017-11-21 | 北京深思数盾科技股份有限公司 | The method and system of automatic test interface program |
CN108490922A (en) * | 2018-04-27 | 2018-09-04 | 北京新能源汽车股份有限公司 | Generation method and device of unified diagnostic service test case |
CN108490922B (en) * | 2018-04-27 | 2020-03-24 | 北京新能源汽车股份有限公司 | Generation method and device of unified diagnostic service test case |
CN109587351A (en) * | 2019-01-23 | 2019-04-05 | 北京三快在线科技有限公司 | A kind of call test method, device, equipment and storage medium |
CN113448829A (en) * | 2020-03-27 | 2021-09-28 | 北京奔影网络科技有限公司 | Dialogue robot test method, device, equipment and storage medium |
CN113448829B (en) * | 2020-03-27 | 2024-06-04 | 来也科技(北京)有限公司 | Dialogue robot testing method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102135936A (en) | Method and system for generating test case | |
US7523440B2 (en) | Dynamic generation of formatted user interfaces in software environments | |
US9754059B2 (en) | Graphical design verification environment generator | |
CN102449598B (en) | Bag design and generation | |
CN106133675B (en) | Assessment is applied to the rule of data | |
JP6033235B2 (en) | Formatting data by example | |
US7865350B1 (en) | Partitioning a model in modeling environments | |
CN108280291A (en) | Reusable simulation model Interface design and interconnection method, device and computer equipment | |
US20180032649A1 (en) | Managing Custom REVIT Inheritance-Based Assembly Families for Manufacturing | |
US20050160411A1 (en) | Apparatus and method for managing design of a software system using dependency structure | |
US20080148235A1 (en) | Runtime inspection of user interfaces | |
US20080109780A1 (en) | Method of and apparatus for optimal placement and validation of i/o blocks within an asic | |
CN104662514A (en) | Modernization of legacy software systems based on modeled dependencies | |
CN107291450A (en) | A kind of quick code automatic generation method for programming friendly | |
CN107273117A (en) | A kind of quick Code automatic build system for programming friendly | |
CN110096263A (en) | Web front end code automatic generation method and device | |
CN105589837B (en) | A kind of automatic errordetecting method of electronic document | |
CN106354492A (en) | Automatic code generation method and system capable of rapidly adjusting transaction process connection | |
CN106294128B (en) | A kind of automated testing method and device exporting report data | |
Fernández et al. | Visual modelling of complex systems: Towards an abstract machine for PORGY | |
JP5460629B2 (en) | Tabular software specification creation support method and apparatus | |
CN109543298A (en) | A kind of method of schematic diagram replacement Component library in cadence | |
CN108170963A (en) | The automation computational methods and device of solid-liquid rocket flight reappearance characteristic | |
Di Noi et al. | OpenLCA 1.7 | |
Amalfitano et al. | Migrating legacy spreadsheets-based systems to Web MVC architecture: An industrial case study |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20110727 |