CN101571797A - System and method for generating automatic test case - Google Patents
System and method for generating automatic test case Download PDFInfo
- Publication number
- CN101571797A CN101571797A CNA2008100368234A CN200810036823A CN101571797A CN 101571797 A CN101571797 A CN 101571797A CN A2008100368234 A CNA2008100368234 A CN A2008100368234A CN 200810036823 A CN200810036823 A CN 200810036823A CN 101571797 A CN101571797 A CN 101571797A
- Authority
- CN
- China
- Prior art keywords
- parameter
- case
- test case
- automatic test
- code
- 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
Abstract
The invention discloses a system and a method for generating an automatic test case. The system comprises a code analyzing module and a parameter recognition module, wherein the code analyzing module is used for recognizing relative functions, a calling relation among the functions and a function parameter; and the parameter recognition module comprises a parameter information library and a parameter analyzing tool. The system and the method for generating the automatic test case can automatically create the test case, define a formula of a case generating method, can automatically carry out analysis and study after a new test object is changed, do not need to rewrite a test code and design a test model and can automatically generate the test case without a test engineer with rich experience.
Description
[technical field]
The present invention relates to a kind of test case and produce system and method, particularly a kind of automatic test case produces system and method.
[background technology]
Test case is automatic test most critical and most basic part, also is the bigger part of difficulty, and the design proposal of test case is the basis of follow-up automatic test flow implementation, and it has directly determined the reliability and the scope of application of automatic test.
The test case enormous amount of a complete projects, the time that design and realization are consumed is very long, even automatic test still is difficult to limit all parameter to be measured and paths.
Veteran Test Engineer can design use-case efficiently by experience, covers most of issuable defective with limited test case, and the automatic test cases design can't be accomplished this point.
In view of this, be necessary to propose a kind of automatic test case in fact and produce system and method, the effect that this automatic test case produces system and method is by parsing and study to parameter, automatically create test case, it has defined the formula of a cover based on science test case production method, can analyze automatically and study later at the tested object that more renews, not need to write again test code and design test model.Need not veteran Test Engineer and just can produce test case automatically, and cover most applications.
[summary of the invention]
The object of the invention is to provide a kind of automatic test case to produce system and method, produce system and method by this automatic test case and can create test case automatically, the formula of definition use-case production method, can analyze automatically and study later at the tested object that more renews, do not need to write again test code and design test model, need not veteran Test Engineer and just can produce test case automatically.
For reaching above-mentioned purpose, when input parameter belongs to basic data type, the invention provides a kind of automatic test case and produce system, this system comprises:
One code parsing module, it is used to identify corresponding function, call relation and function parameter between function;
One parameter recognition module, it comprises: parameter information storehouse and parameter analytical tool.
Say that especially the above-mentioned parameter information bank comprises the effective codomain of parameter, parameter attribute value number and title, the science use-case is divided formula, naming rule.
In present embodiment, when input parameter belonged to complex data type, this automatic test case produced system and also comprises: a use-case design module, and it is according to the use-case design proposal, but with computing formula according to the rules combination calculation come out, obtain final a series of datumization test cases.
In addition, the present invention more proposes the method that a kind of automatic test case produces system, and it comprises the steps:
(1) the code analysis module is obtained code source;
(2) resolve this code source and obtain parameter information;
(3) the parameter recognition module information that gets parms;
(4) the parameter analytical tool checks the parameter information storehouse judges whether parameter defines, if undefined this parameter then enters step (5) for "No"; If define this parameter, then enter step (6) for "Yes";
(5) send prompting undated parameter information bank, finish;
(6) but analytic parameter information is converted into Accounting Legend Code with formula;
(7) produce use-case design proposal and output.
More particularly say, automatic test case when belonging to complex data type based on above-mentioned input parameter produces system, this automatic test case produces systems approach and also comprises step (8): the use-case design module obtains the use-case design proposal and carries out combination calculation, obtain a series of datumization test cases, and output.
Automatic test case of the present invention produces system and method, need not veteran Test Engineer and just can produce test case automatically, and cover most applications.
For purpose of the present invention, structural attitude and function thereof are had further understanding, conjunction with figs. is described in detail as follows now:
[description of drawings]
Calcspar when Fig. 1 illustrates automatic test case of the present invention and produces system's input parameter and be basic data type.
Method step process flow diagram when Fig. 2 illustrates automatic test case of the present invention and produces system's input parameter and be basic data type.
Calcspar when Fig. 3 illustrates automatic test case of the present invention and produces system's input parameter and be complex data type.
Method step process flow diagram when Fig. 4 illustrates automatic test case of the present invention and produces system's input parameter and be complex data type.
[embodiment]
With reference to shown in Figure 1, the calcspar when it is basic data type for automatic test case of the present invention produces system's input parameter.
When parameter is basic data type, the invention provides a kind of automatic test case and produce system, this system comprises:
One code parsing module 11, it is used to identify corresponding function, call relation and function parameter between function;
One parameter recognition module 13, it comprises: parameter information storehouse 131 and parameter analytical tool 132, this parameter information storehouse 131 comprise the effective codomain of parameter, parameter attribute value number and title, the science use-case is divided formula, naming rule;
With reference to Fig. 1, shown in Figure 2, when being directed to above-mentioned this automatic test case and producing system's input parameter and be basic data type, a kind of method has been proposed, it comprises the steps:
Step 101: code analysis module 11 is obtained code source 10;
Step 102: code analysis module 11 identifies corresponding function according to C++ syntactic constructs and object-oriented principle with regular expression, call relation and function parameter between function, and obtain parameter information 12;
Step 103: parameter recognition module 13 is obtained above-mentioned parameter information 12;
Step 104: the parameter analytical tool 132 in the parameter recognition module 13 checks parameter information storehouse 131 judges whether parameter defines, if undefined this parameter then enters step 105 for "No"; If define this parameter, then enter step 106 for "Yes";
Step 105: parameter analytical tool 132 sends the essential information in its above-mentioned parameter information bank 131 of prompting renewal, finishes;
Step 106: but parameter analytical tool 132 analytic parameter information 12 and formula is converted into Accounting Legend Code;
Step 107: produce parameter use-case design proposal 14 and output in the parameter recognition module 13, finish.
With reference to shown in Figure 3, the calcspar when it is complex data type for automatic test case of the present invention produces system's input parameter.
When input parameter is complex data type, the invention provides a kind of automatic test case and produce system, this system comprises:
One code parsing module 21, it is used to identify corresponding function, call relation and function parameter between function;
One parameter recognition module 23, it comprises: parameter information storehouse 231 and parameter analytical tool 232, this parameter information storehouse 231 comprise the effective codomain of parameter, parameter attribute value number and title, the science use-case is divided formula, naming rule;
One use-case design module 25, it is according to the use-case design proposal, but with computing formula according to the rules combination calculation come out, obtain final a series of datumization test cases.
With reference to Fig. 3, shown in Figure 4, when being directed to the invention described above automatic test case and producing system's input parameter and be complex data type, a kind of method has been proposed, it comprises the steps:
Step 201: code analysis module 21 is obtained code source 20;
Step 202: code analysis module 21 identifies corresponding function according to C++ syntactic constructs and object-oriented principle with regular expression, call relation and function parameter between function, and obtain parameter information 22;
Step 203: parameter recognition module 23 is obtained above-mentioned parameter information 22;
Step 204: the parameter analytical tool 232 in the parameter recognition module 23 checks parameter information storehouse 231 judges whether parameter defines, if undefined this parameter then enters step 205 for "No"; If define this parameter, then enter step 206 for "Yes";
Step 205: parameter analytical tool 232 sends the essential information in its above-mentioned parameter information bank 231 of prompting renewal, finishes;
Step 206: but parameter analytical tool 232 analytic parameter information 22 and formula is converted into Accounting Legend Code;
Step 207: parameter recognition module 23 produces parameter use-case design proposal 24 and output;
Step 208: the use-case design module 25 use-case design proposal 24 that gets parms is carried out combination calculation, obtains a series of datumization test cases 26, and output, finishes.
Claims (5)
1, a kind of automatic test case produces system, it is characterized in that this system comprises:
One code parsing module, it is used to identify corresponding function, call relation and function parameter between function;
One parameter recognition module, it comprises: parameter information storehouse and parameter analytical tool.
2, automatic test case as claimed in claim 1 produces system, it is characterized in that, the above-mentioned parameter information bank comprises the effective codomain of parameter, parameter attribute value number and title, the science use-case is divided formula, naming rule.
3, automatic test case as claimed in claim 1 produces system, it is characterized in that, when input parameter is complex data type, this system also comprises: a use-case design module, it is according to the use-case design proposal, but with computing formula according to the rules combination calculation come out, obtain final a series of datumization test cases.
4, a kind of automatic test case produces the method for system, and this method is characterized in that based on said system it comprises the steps:
(1) the code analysis module is obtained code source;
(2) resolve this code source and obtain parameter information;
(3) the parameter recognition module information that gets parms;
(4) the parameter analytical tool checks the parameter information storehouse judges whether parameter defines, if undefined this parameter then enters step (5) for "No"; If define this parameter, then enter step (6) for "Yes";
(5) send prompting undated parameter information bank, finish;
(6) but analytic parameter information is converted into Accounting Legend Code with formula;
(7) produce use-case design proposal and output.
5, automatic test case as claimed in claim 4 produces the method for system, it is characterized in that, when input parameter was complex data type, this method also comprised step (8): the use-case design module obtains the use-case design proposal to carry out combination calculation and exports a series of datumization test cases.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2008100368234A CN101571797A (en) | 2008-04-29 | 2008-04-29 | System and method for generating automatic test case |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2008100368234A CN101571797A (en) | 2008-04-29 | 2008-04-29 | System and method for generating automatic test case |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101571797A true CN101571797A (en) | 2009-11-04 |
Family
ID=41231160
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2008100368234A Pending CN101571797A (en) | 2008-04-29 | 2008-04-29 | System and method for generating automatic test case |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101571797A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101894058A (en) * | 2010-05-31 | 2010-11-24 | 北京航空航天大学 | Method and device for analyzing test coverage automatically aiming at automatic test system |
WO2012119267A1 (en) * | 2011-03-08 | 2012-09-13 | Hewlett-Packard Development Comany, L.P. | Creating a test case |
-
2008
- 2008-04-29 CN CNA2008100368234A patent/CN101571797A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101894058A (en) * | 2010-05-31 | 2010-11-24 | 北京航空航天大学 | Method and device for analyzing test coverage automatically aiming at automatic test system |
CN101894058B (en) * | 2010-05-31 | 2011-11-16 | 北京航空航天大学 | Method and device for analyzing test coverage automatically aiming at automatic test system |
WO2012119267A1 (en) * | 2011-03-08 | 2012-09-13 | Hewlett-Packard Development Comany, L.P. | Creating a test case |
US9104810B2 (en) | 2011-03-08 | 2015-08-11 | Hewlett-Packard Development Company, L.P. | Creating a test case |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102880468B (en) | Code intelligent prompting method and system for electronic control unit (ECU) program development | |
Gu et al. | Exploiting statically schedulable regions in dataflow programs | |
CN105512105A (en) | Semantic parsing method and device | |
US20080244541A1 (en) | Code translator and method of automatically translating modeling language code to hardware language code | |
Schwartz et al. | Semantically enriched BIM life cycle assessment to enhance buildings’ environmental performance | |
CN104635507A (en) | Simulation and verification system of realtime airplane running monitoring system | |
CN111581082B (en) | Vehicle-mounted controller test script generation device and method | |
CN108279885A (en) | A kind of method and device that multiple model codes are carried out with Integrated Simulation | |
CN103226488A (en) | Method and device for efficiency control in formalized code generation | |
CN101739258A (en) | Automatic code generation method of architecture analysis and design language (AADL) model | |
CN101430714A (en) | Content structuring process method and system based on model | |
CN110502227A (en) | The method and device of code completion, storage medium, electronic equipment | |
CN106126279A (en) | Automatically the method and system of interpolation BIM model race fileinfo | |
CN110196720A (en) | A kind of Simulink generates the optimization method of dynamic link library | |
CN103235757B (en) | Several apparatus and method that input domain tested object is tested are made based on robotization | |
CN104503767A (en) | System and method for automatically generating codes based on LIN protocol | |
CN103020396B (en) | A kind of method that automatic generation is asserted and device | |
CN101571797A (en) | System and method for generating automatic test case | |
CN103677841A (en) | IETM code generation method and device based on element-level template | |
CN105740579A (en) | Construction method for connection of UVM verification platform | |
CN103838711A (en) | Definable typed semantic parsing system and method based on rules | |
CN106372359B (en) | A kind of equipment virtual prototype system | |
CN103257861B (en) | A kind of method of automatic generation bios code and device | |
CN105045698A (en) | Method for analyzing chip verification progress by using MATPLOTLIB of PYTHON | |
CN104992379A (en) | Dynamic text exchange format management method of big data of power industry |
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 |
Open date: 20091104 |