CN101436128A - Software test case automatic generating method and system - Google Patents

Software test case automatic generating method and system Download PDF

Info

Publication number
CN101436128A
CN101436128A CNA2007101775341A CN200710177534A CN101436128A CN 101436128 A CN101436128 A CN 101436128A CN A2007101775341 A CNA2007101775341 A CN A2007101775341A CN 200710177534 A CN200710177534 A CN 200710177534A CN 101436128 A CN101436128 A CN 101436128A
Authority
CN
China
Prior art keywords
path
test case
variable
software
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CNA2007101775341A
Other languages
Chinese (zh)
Other versions
CN101436128B (en
Inventor
宫云战
杨朝红
陈俊亮
肖庆
张威
王雅文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
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 Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN2007101775341A priority Critical patent/CN101436128B/en
Publication of CN101436128A publication Critical patent/CN101436128A/en
Application granted granted Critical
Publication of CN101436128B publication Critical patent/CN101436128B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method for automatically generating software test cases. The method comprises the following steps of: A. reading to-be-tested software, carrying out lexical analysis, syntax analysis and semantic analysis on a source program of the to-be-tested software and generating an abstract syntax tree and a control flow graph of the to-be-tested software; B. preprocessing the source program of the to-be-tested software by traversing the generated abstract syntax tree, identifying initial input-output variables and compressing the space of a definition domain of the initial input variables; and C. generating a path of program elements of the current to-be-tested software by traversing the control flow graph, carrying out assignment operation, implication operation and backtracking operation on the variables in the path, and generating the test cases. The invention also provides a system for automatically generating software test cases. The method and the system for automatically generating the software test cases can accurately and automatically generate the test cases according to the given program elements of the to-be-tested software and verify the generated test cases, thereby improving the accuracy, efficiency and automation degree of the test cases.

Description

Software test case automatic generating method and system
Technical field
The present invention relates to software testing technology, relate in particular to a kind of software test case automatic generating method and system.
Background technology
Software testing technology develops in depth, the method for testing software that new efficient is high continues to bring out, statistics shows, in present stage, in all software test expenses, about 40% flower comprises generating test data and checkout result on test case, about 50% the flower write with compilation script on, about 10% spends in the execution and configuration management of test script.
In numerous method for testing software, coverage test is the most frequently used a kind of method of testing, so-called coverage test, promptly, at first select the paths P of containing element E, then the test case C of generation pass P to given element E, if test case C does not exist, then should select other path P ', if path P ' do not exist illustrates that element E can not carry out.Said process moves in circles, and wherein the test case of generation pass P is a key problem.The test case of path P generation at present mainly is by manually finishing, needing a large amount of time.Under many circumstances, if the path P more complicated, for example, the branching ratio that comprises is more, perhaps branch's more complicated, and it almost is unlikely manually generating test case.
The generation of test case is the basis of software test, and no matter which kind of method of testing all relates to this problem.A variety of method for generating test case are arranged at present, and as genetic algorithm, random approach, climbing method, exploratory method, the method for solving equation etc., but achievement in research also has very big distance from practicality.This also is one of principal element that restricts at present the software testing technology development.In the advanced Software Testing Tool of being developed in the world at present, generally all avoid test case and generate this problem automatically, the mode of semi-automatic generation test case perhaps is provided to multipotency.
Be engaged in both at home and abroad in the enterprise of software test at present, mostly adopting manual type or computer-assisted way to generate use-case.These the two kinds shortcomings that generate the test case method are:
1) generate use-case and require a great deal of time, testing efficiency is low;
2) need very professional software test personnel, and need these personnel very familiar tested software;
3) the test effect is with a low credibility.
Since the last century the nineties, the cost of software test and maintenance is more and more higher, basically to reach 30%~50% of software development total expenses in China, in the U.S., this numeral will reach more than 50%, have in addition up to more than 80%, in this ratio, wherein quite a few is a labour cost, and in software test procedure, manually generates test case and occupied very most of the time.
The automatic generation of test case is one of target of pursuing of software testing technology always, but this is a very complicated problems, many in the world scientists have paid great effort for this reason, but its effect is not very good, with regard to present research level, also there is sizable distance from actual can the use.But it successfully solves improving software quality, and the shortening software development time all has important theoretical meaning and use value.
Summary of the invention
Fundamental purpose of the present invention is to provide a kind of software test case automatic generating method, can generate satisfactory test case set at tested program according to given software under testing program element, has improved the efficient and the automaticity of software test.
Another object of the present invention is to provide a kind of software test case automatic creation system, can realize according to given software under testing program element, search generates satisfactory test case set at tested program, thereby has improved the efficient and the automaticity of software test.
For achieving the above object, technical scheme of the present invention is achieved in that
A kind of software test case automatic generating method, its this method may further comprise the steps:
A, read software under testing, software source program to be measured is carried out lexical analysis, grammatical analysis and semantic analysis, generate the abstract syntax tree and the control flow graph of software under testing;
The abstract syntax tree that B, traversal are generated carries out pre-service to software source program to be measured, and described pre-service comprises: discern original input, output variable, and the field of definition of original input variable is carried out space compression;
C, traversal are controlled flow graph, generate the path of current software under testing program element, and the variable in institute's generation pass is carried out assignment operation, subsume and trace-back operation, generate test case.
In the technique scheme, described step C specifically comprises:
C1, the software under testing program element that provides according to the user generate the path of carrying out the present procedure element by traversal control flow graph;
The rank of variable and correlated variables in C2, the calculating institute generation pass, and initialization condition counter;
C3, the input variable of conditional statement in the described path of step C1 is enumerated assignment, and whether the value of judgment variable be empty, if be sky then execution in step C5, otherwise execution in step C4;
C4, carry out subsume and judge whether new contradiction occurring according to the value of input variable among the step C3, if find new contradiction, execution in step C5 then, otherwise execution in step C6;
C5, the value of input variable is recalled, judged whether also will recall according to the number of times of having recalled, if not, execution in step C1 then; If, then recall, and judge and to recall whether success according to the correlativity of variable, if success then return step C3, otherwise would return step C1;
The current count value of C6, condition counter increases certainly, and judges whether current count value equals or exceeds the conditional number on the path, if then obtain a test case, otherwise return step C3.
Wherein, step C1 further comprises:
C1.1, the software under testing program element that provides according to the user, generate the path of carrying out the present procedure element by traversal control flow graph, and judge whether the path that generates is empty, if be empty, then finish current flow process and point out the failure of user's generation pass, otherwise execution in step C1.2;
The condition of the expression formula in C1.2, the extraction path in the conditional statement, variable and the unique determined value of energy;
C1.3, the original input variable field of definition after step B compression in the path is carried out space compression once more;
C1.4, the unreachable path of calculating also judge whether current path can reach, if current path is unreachable, then returns step C1.1 and regenerate new route.
Above-mentioned steps B further comprises:
B1, in the software under testing program the extra code of plug-in mounting, with the information of acquisition program behavior when being performed.
In the technique scheme, described method further comprises:
D, the test case that step C is obtained are verified.
This step D comprises:
D1, the test case that generates according to step C drive the software under testing program of carrying out, and according to the path of the actual execution of the code record of plug-in mounting;
D2, the actual execution route of comparison and destination path judge whether actual execution route and destination path meet, if do not meet then execution in step C1; If meet, then return to the user with the storage of the test case that obtains and with it.
Described abstract syntax tree comprises object and the symbol table of representing type information.
The present invention provides a kind of software test case automatic creation system simultaneously, and this system comprises:
Analysis module reads software under testing, and software source program to be measured is carried out lexical analysis, grammatical analysis and semantic analysis, generates abstract syntax tree and control flow graph;
Pretreatment module, the abstract syntax tree by the traversal analysis module generates carries out pre-service to software source program to be measured, and described pre-service comprises: discern original input, output variable, and the field of definition of original input variable is carried out space compression;
The test case generation module travels through the control flow graph that is generated, and cyclic search generates test case.
In the technique scheme, described test case generation module further comprises:
The path generation unit, the software under testing program element according to the user provides generates the path of carrying out the present procedure element by traversal control flow graph;
Processing unit is used for calculating the rank of variable and correlated variables in the path that is generated and initialization condition counter;
Assignment is enumerated to the input variable in the conditional statement in institute's generation pass in the assignment unit, and whether the value of judgment variable is empty;
Contain the unit, carry out subsume according to the value of variable in the assignment unit, and judge whether to occur new contradiction;
Trace unit, is recalled the value of variable for empty or when new contradiction occurring in the value of variable;
Judging unit, the current count value of condition counter be from increasing, and declare current count value and whether equal or exceed conditional number on the path.
Wherein, this system further comprises:
Authentication module, the test case of utilizing the test case generation module to generate drive carries out tested program, and according to the path of the actual execution of plug-in mounting code record, verifies whether actual execution route conforms to destination path.
Software test case automatic generating method of the present invention and system, since adopted the compression variable the region of search, utilize branch's contradiction to calculate unreachable path, use subsume to find contradiction as soon as possible, preferentially calculate multiple heuristic strategies such as unique certification condition, so can obtain satisfactory test case set according to given software under testing program element search exactly, the present invention simultaneously also can verify the test case that generates, improve the accuracy of test case, improved the efficient and the automaticity of software test greatly.
Description of drawings
Fig. 1 is the realization flow synoptic diagram of software test case automatic generating method of the present invention;
Fig. 2 carries out pretreated schematic flow sheet in the inventive method to software under testing;
Fig. 3 is the realization flow synoptic diagram that generates test case in the inventive method automatically.
Embodiment
The invention will be further described below in conjunction with specific embodiments and the drawings.
The invention provides a kind of software test case automatic generating method, its basic thought is: at first, read software under testing, software source program to be measured is carried out lexical analysis, grammatical analysis and semantic analysis, generate abstract syntax tree, control flow graph and determine judgement (DD, Decision to Decision) figure; Then, tested program is carried out pre-service, comprising: discern original input, output variable, and the field of definition of original input variable is carried out space compression, the automatic plug-in mounting of the line program of going forward side by side etc.; Then, by traveling through above-mentioned control flow graph, generate the execution route of software under testing program element, the variable of generation pass is carried out assignment operation, subsume and trace-back operation, generate test case; At last, drive to carry out tested program, the actual execution route and the destination path of the above-mentioned program element that provides compared, check whether the gained test case meets the path that requires.
Fig. 1 is the realization flow synoptic diagram of software test case automatic generating method of the present invention, and as shown in Figure 1, this method may further comprise the steps:
Step 1, read software under testing, software source program to be measured is carried out lexical analysis, grammatical analysis and semantic analysis, generate the abstract syntax tree and the control flow graph of software under testing.
Step 2, by the traversal abstract syntax tree, software source program to be measured is carried out pre-service, described pre-service comprises: discern original input, output variable, and the field of definition of original input variable is carried out space compression.
Step 3, traversal are controlled flow graph, generate the path of current software under testing program element, and the variable in institute's generation pass is carried out assignment operation, subsume and trace-back operation, generate test case.
Step 4, the test case of utilizing step 3 to generate drive and carry out the software under testing measuring program, and the test case that obtains is verified.
Wherein step 1 specifically comprises:
Step 1.1, read the software under testing source program, software source program to be measured is carried out lexical analysis;
Software under testing is carried out lexical analysis (Lexical analysis), and this lexical analysis provides needed symbol node for follow-up formation syntax tree, as constant and name.
Step 1.2, on the basis of step 1.1, software source program to be measured is carried out grammatical analysis and semantic analysis, generate abstract syntax tree;
Software under testing is carried out grammatical analysis (Parsing), and described grammatical analysis provides the syntax tree that contains the intermediate node of representing corresponding syntactic structure, and this syntax tree comprises the leafy node of representing non-reserved word terminal symbol and the intermediate node of representing syntactic structure; Semantic analysis (Semantic analysis) is further handled name and action scope, generate abstract syntax tree, this abstract syntax tree comprises object and the symbol table of representing type information, and they are connected into tree structure, this is the most basic output of compiler front-end, abstract syntax tree comprises all from the resulting relevant information of source code, and can embody the syntactic structure of source program fully.
Above-mentioned abstract syntax tree has consistent tactic pattern, is made up of dissimilar nodes, and each category node all is described as a class formation.All syntax tree nodes are all supported unified visitor's pattern interface, so just can carry out further multi-form processing, traversal visit and output to abstract syntax tree by visitor's pattern easily.
Step 1.3, on the basis of generation abstract syntax tree, generate control flow graph and DD figure;
This process is the process of a traversal abstract syntax tree.Usually, program control flow figure representation be (N, E, Entry, Exit).Wherein, N represents the set of node, statement in the reflection program and condition judgment; E represents the set of directed edge, the control flow relation in the reflection program between statement; Entry is the fixing unique entry node of program; Exit be program unique withdraw from node.Briefly: the control flow graph is exactly to have single, fixing entry node and export the digraph of node.On the basis of control flow graph, can analyze and form DD figure.
DD figure is a kind of control flow graph of having simplified: some node in the control flow graph only is in the same branch of program, and this node there is no special use when path analysis, reduces the analysis efficiency of control flow graph sometimes on the contrary, needs to simplify.To control flow graph and further simplify, what obtain is this except the entrance and exit node, and the number of degrees of all the other nodes all are called DD figure greater than 2 control flow graph.
Step 2 specifically comprises:
Step 2.1, by the traversal abstract syntax tree, discern original input variable, and determine its field of definition;
Original input variable generally includes global variable and the static variable of using in function parameter, the function, at first by the traversal abstract syntax tree, identifies these variablees.The field of definition of variable is determined according to type and operating system environment corresponding in the language of tested program usually.The form in variable-definition territory is:
{ (x1, D X1), (x2, D X2) ..., wherein x represents variable name, and D represents its field of definition.
Step 2.2, by the traversal abstract syntax tree, identification output variable and output statement;
Identify global variable, static variable, output statement, the return statement of program and quote shape parameter.
Step 2.3, the field of definition of original input variable is carried out space compression;
According to the field of definition of original input variable, assignment and conditional statement in the program, carry out space compression from top to bottom, the result of compression is: { (x1, D ' X1), (x2, D ' X2) ...;
The field of definition of original input variable is determined that by type of variables and operating system environment the assignment in the calculation procedure and the limited range of conditional statement further compress the value space of original input variable.
Step 2 further comprises:
Step 2.4, in the tested software program, insert extra code, with the information of acquisition program behavior when being performed;
Above-mentioned extra code can be a statement.Plug-in mounting is mainly determined the plug-in mounting point according to the control flow graph, in beginning, the bifurcation of tested program control flow graph tested program is implemented plug-in mounting, generates the plug-in mounting statement tree node on the abstract syntax tree then, abstract syntax tree is changed again being output as source program then.
For example, follow procedure:
if(x>0){
x=3;
}
else{
x=-3;
}
Through shape behind the automatic plug-in mounting as:
if(x>0){
Branch[1] ++; // automatic the statement that inserts
x=3;
}
else{
Branch[2] ++; // automatic the statement that inserts
x=-3;
}
In carrying out the process of tested program, routing information that just can the actual execution of collection procedure.
Control flow graph by traversal in the step 3, use the compression variable the region of search, utilize branch's contradiction to calculate unreachable path, use subsume to find contradiction as soon as possible and preferentially calculate multiple inspiration Test Strategy such as unique determined value condition, cyclic search generates test case;
This step 3 specifically comprises:
Step 3.1, the software under testing program element E that provides according to the user, generate the path P of carrying out present procedure element E by traversal control flow graph, and judge whether the path P that generates is empty, if be empty, then finish current flow process and point out the failure of user's generation pass, otherwise execution in step 3.2;
Above-mentioned path P is not necessarily unique, the software under testing program element E that the user provides can be statement, conditioned disjunction path (if E be the path so P just can only be E, and unique) etc., the software under testing program element E that provides in advance according to the user, according to control flow graph and the automatic paths P who generates executive routine element E of DD figure, P={B 1→ B 2→ ... → B L, this path is not necessarily unique, on path P, has also provided a set of circumstances { B from top to bottom 1→ B 2→ ... → B L;
If the path that generates comprises control flow graph node, then this path is not empty; If the path that generates does not comprise control stream node, then this path is empty.
The condition of the expression formula in step 3.2, the extraction path P in the conditional statement, variable and the unique determined value of energy;
Expression formula in the conditional statement and variable are extracted, and wherein, expression formula is used for the calculating of condition, and variable is as the operand of subsequent searches process.This process is to carry out along the path P that step 3.1 provides, and also will consider assignment statement on the path in the process.Some condition can be determined the value of certain or some variablees uniquely.And these implicit values no longer need further search just as assignment.This can reduce the search volume greatly.To preferentially calculate this condition;
For example, conditional statement: if (a==3) ..., at this moment, the value space of variable a just can only be { 3};
The search principle that the above-mentioned preferential strategy that calculates the condition of the unique determined value of energy is derived is the limited area first search: some variable is at initial or some constraint of process, the region of search is become have only limited several point, this variable of first search helps to find contradiction as early as possible or search for successfully under this condition.
For example, suppose that x is an integer variable, if (1≤x≤3) ..., this condition has been determined x ∈ [1,2,3].
Step 3.3, the original input variable field of definition space in the path P is compressed once more;
Original input variable field of definition space after step 2.3 compression in the path P is compressed once more, because the condition of the unique determined value of energy that in step 3.2, finds, can influence the region of search of some variable, so the region of search of variable will change at any time, with the search volume of minimizing variable;
According to path P and { (x1, D ' X1), (x2, D ' X2) ..., once more field of definition being carried out space compression, the result of compression is: (x1, D " X1), (x2, D " X2) ....
Step 3.4, the unreachable path of calculating also judge whether current path P can reach, if current path is unreachable, then returns step 3.1 and regenerate new route;
Unreachable path is meant that in given input interval this path is may be performed never.
According to the result of step 3.3, check whether the value space of each variable is empty, if the value space of certain variable is sky then means that current path P is unreachable path, then returns step 3.1;
The analysis showed that, have a large amount of unreachable paths in the general program.In the process that produces test case, it is possible selecting unreachable path, and this also is one of principal element that influences testing efficiency, therefore should stop the calculating to this path as early as possible, return step 3.1 regenerating new different paths, thereby get rid of those unreachable paths.
For example:
if(x>0){
x=3;
}
if(x<0){
x=4;
}
In above-mentioned example, software under testing program element E refers to and will cover statement x=3; Get the path that the branch of true value forms in fact be exactly a unreachable path for two if conditions in the program, because x〉0 and x<0 be the condition of two contradictions.
The rank of variable and correlated variables among step 3.5, the calculating current path P;
The variable of a direct or indirect influence of variable is called correlated variables.According to the correlativity of variable, can set up the intersecting chain of variable.The immediate predecessor correlated variables of certain variable is meant first precursor variable of this variable in this intersecting chain, is mainly used in and recalls.The rank of variable, it is defined as: the level definition of input variable is 1; The level definition of output variable adds 1 for the maximum level of the variable in the expression formula of this variable in the middle of one.The rank of variable is valuable for recalling of variable.
Step 3.6, initialization condition counter;
A plurality of condition formation condition set { B that path P comprises 1→ B 2→ ... → B L, condition counter of needs writes down the condition when pre-treatment.When the condition of pre-treatment is designated as Bi, the count value i=1 of initialization condition counter.
Whether step 3.7, the value that the input variable of conditional statement in the path P is enumerated assignment (rollback (Backtracing)) and judgment variable are empty, if be sky then execution in step 3.9;
Each assignment all will have record, be used to prevent that the value of composing from composing again, value for the empty value of variable in the value space that mean all by tax.The value space is that sky is two notions for empty and this time value, though the value space is not empty, all values were all got, and at this time can return null value;
At first extract B iIn still do not have definite value variable set.At condition B iFor really retraining down, from the variable set, select a variable, according to its value space, select a value according to heuristic rule, and judge whether this value is empty, and each value all will guarantee to get the value that those were got, though might the value space not be empty therefore, but all fingers were all got, and at this time can return null value.
Step 3.8, carry out subsume and judge whether new contradiction occurring according to the value of variable in the step 3.7, if find new contradiction then execution in step 3.9, otherwise execution in step 3.10;
Contain (value contains, the codomain computing) and whether be that sky judges whether to occur new contradiction according to the value space of variable; Implication is meant that a variable is enumerated after the assignment in step 3.7, calculates the influence of this variable to other correlated variabless, adjusts the value spatial variations that other correlated variabless produce owing to current assignment; Subsume mainly is in order to find contradiction as soon as possible.In containing computation process; After one or one group of new variate-value are determined, this or this new value of group is implemented subsume can find contradiction as soon as possible, simultaneously concerning software, implication can be determined the value or the span of more heterogeneous pass variable, like this, also can compress the scope of search volume, improve search efficiency.
Step 3.9, the value of variable is recalled, judge whether also will recall according to the number of times of having recalled, if not, then return step 3.1, if then recall, and whether judgement recalls successful according to the correlativity of variable, if success then return step 3.7 otherwise is returned step 3.1;
Whether the value to variable is recalled, and gets back to step 3.1 and sees that having other value of not getting or not can get, judge whether also will recall in the given range of test macro setting according to recalling (Backtracking) number of times;
According to step 3.5 nearby dependent backtrack to B k, recalling number of times and add 1, the current count value i of condition counter is changed to the condition k that dates back to.Whether can continue the definite value variable that still do not have of search in addition judges and to recall whether success according to the condition that dates back to; If the condition that dates back to can not continue to have searched for, be not sky though that is to say the variable-value space in the condition that dates back to, all values were all got, and at this time returned null value.
When producing contradiction, will implement to recall.Recall and help reducing unnecessary computing, algorithm is in the process of search, and the value of some variable may produce contradiction, in case and contradiction produces, just should stop to continue computing, reselect new assignment.
Single condition: at same condition B iIn, may exist two or morely when having identical or relevant variable, may produce contradiction, this contradiction just is confined at B iInner.Owing in variable assignments or the implication function that rollback (Backtracing) process takes place, can change the value or the span of some variable, therefore just might produce contradiction.Rollback is meant composes a new value to input variable, and guarantees that this value and the value of having composed do not repeat.
A plurality of conditions: at { B 1, B 2..., B mIn, when existing two or more branch condition to have identical or relevant variable, may produce contradiction.B for example i=if (a〉4) ..., B j=if (a<=3) ..., just may produce contradiction.
Suppose { x I1, x I2..., x IkBe B iRelated variable set, { x M1, x M2..., x MpBe the set of the variable of determined value, { x J1, x J2..., x JLBe the variable set that this computing needs assignment, { x n 1 , x n 2 , . . . , x nH } &SubsetEqual; { x j 1 , x j 2 , . . . , x jL } Be the set of the variable that conflicts of this computing, { B I1, B I2..., B IjBe and { x N1, x N2..., x NHRelevant branch's set, then from B IjBeginning is recalled successively.In general, the variable that rank is low is preferentially recalled, and calculates fairly simple like this.
The current count value of step 3.10, condition counter is from increasing and judging whether current count value equals or exceeds the conditional number on the path P, if then obtain a test case, execution in step 4 then, otherwise return step 3.7;
Above-mentioned conditional number is by tested program decision itself, and the count value of counter is initialized as 1, and the current count value of condition counter is from increasing 1.
For example:
if(x>0){
x=3;
}
if(x>3){
x=4;
}
Above two if conditions get the path that true value forms and just comprise x 0 and x 3 two conditions.If when the precondition count value is 2 then explanation handles has been the 2nd condition on this paths.
Step 4 further comprises:
Step 4.1, the test case that generates according to step 3.10 drive and carry out the software under testing measuring program, and according to the path of the actual execution of plug-in mounting code record;
Step 4.2, actual execution route and destination path judge whether actual execution route and destination path meet, if do not meet then return step 3.1; If meet, then return to the user with the storage of the test case that obtains and with it.
The plug-in mounting code record of front actual execution route, itself and destination path are compared, if do not meet (promptly inequality), illustrate that the test case that obtains can not cover software under testing program element E, will regenerate, this is because some the simplification approximate treatment in the test case generative process cause.
Following is two more typical examples, shows that program structure complexity, path are many, adopts general algorithm (genetic algorithm, random approach, climbing method, exploratory method, the method for solving equation) to need a large amount of time.
Example 1: calendar converse routine calconv (source, year, month, date, days).This program is write by C++, comprises three modules, is respectively master routine, leap year determining program GetLeap and Transformation Computational Program calconv.
Example 2: draw fan-shaped program: draw fan-shaped by center, radius and starting point, terminal point angle.Functional form be Scir2 (row, col, a, b, t1, t2, color, xor).
Table 1 is program description, and is as shown in table 1.
Program name The line number order The piece number The variable number Number of branches Path number The contradiction path number of branch's contradiction to calculating Contradiction path ratio
calconv 165 71 5 54 32408 31124 96%
Scir2 129 55 6 51 110598 91392 83%
Table 1
1) (branch's coverage test is exactly each branch that wants overlay program, the path covers wants every active path of overlay program (reachable path) exactly) branch's coverage test (the E here is exactly certain branch): generate test case at random, check of the influence of different regions of search testing efficiency.Table 2 is the coverage test result of branch, and is as shown in table 2, and as can be seen, the increase of region of search can produce very significant effects to testing efficiency.
Program Interval 100% branch covers the needed time
calconv Source:[1,10],Year:[1910,2049],month: [1,20],Date:[1,40],Days:[-50,50] 0.6s
calconv Source:[1,100],Year:[1800,2200],month: [1,100],Date:[1,100],Days:[-300,200] 4s
Scir2 Col:[1,500],a:[1,500],b:[1,500],t1: [-300,1000],t2:[-300,600],color:[0,225], xor:[0,9] 12s
Table 2
2) path testing of calconv.To every active path, adopt the use-case technology (the E here is exactly certain path) that generates at random, first group of input span option table 1, " test duration 1 " that test result is as shown in table 2, table 3 is for adding the various inspiration Test Strategies (region of search of compression variable respectively, utilize branch's contradiction to calculate unreachable path, use subsume to find contradiction as soon as possible, the unique determined value condition of preferential calculating) test effect compares " path number 1 of being tested " in path number of being tested such as the table 3.
Limit the random code number Test duration 1 Test duration 2 The path number 1 of being tested Test duration 3 The path number 2 of being tested Test duration 4 The path number 3 of being tested
100 2s 1s 25 1s 83 1s 170
1000 12s 4s 89 5s 181 5s 220
10000 118s 45s 141 47s 223 46s 285
20000 235s 88s 182 92s 251 91s 303
30000 350s 131s 191 136s 263 136s 303
40000 464s 173s 193 182s 276 280s 304
50000 580s 215s 193 227s 276 223s 305
60000 696s 256s 201 273s 278 266s 311
70000 812s 300s 207 319s 287 309s 315
80000 927s 342s 209 364s 288 352s 321
90000 1043s 384s 211 408s 288 397s 329
100000 1158s 426s 212 446s 290 439s 329
Table 3
Test duration 2 is test durations of removing behind the unreachable path.Just on average, the test duration 2 is 37% of test durations 1, raises the efficiency 2.7 times.
Test duration 3 is test results of utilizing the search volume compress technique, removing unreachable path technique, and as can be seen, the test duration 3 is more more a little than the test duration 2, mainly be to have increased some extra calculating, but the path number of being tested increases greatly.Just test same path number, use that this technology is needed recalls number of times at least than not using this technology to lack 1 order of magnitude.
Test duration 4 be utilize the search volume compress technique, remove unreachable path, the test result of condition reckoning technology, implication technology, unique definite condition technology.In fact, in this example, to the above-mentioned field of definition that provides, but the execution route number of this program has only 329.
3) path testing of Scri2.Table 4 is that the test result of various heuristic Test Strategies compares, and the implication of wherein each parameter is with table 3.
Because given example is fewer, so for recalling, the calconv average energy is saved 4s, the Scri2 average energy is saved 3s, and its effect is also not obvious, main cause be example very little.Consider general function,, generally also just arrive hundreds of row, so the purposes of recalling is not very big at tens of row according to the standard of soft project.
Limit the random code number Test duration 1 Test duration 2 The path number 1 of being tested Test duration 3 The path number 2 of being tested Test duration 4 The path number 3 of being tested
100 2203s 658s 871 298s 1345 308s 2488
1000 21635s 6216s 1885 2677s 2273 2756s 3642
2000 5126s 2691 5390s 3980
3000 7766s 2812 7965s 4196
4000 10004s 3232 10502s 4238
5000 12665s 3366 13070s 4443
6000 15011s 3411 15593s 4513
Table 4
Result from the above mentioned as can be known, because software test case automatic generating method of the present invention and system have adopted multiple heuristic strategies, so can obtain satisfactory test case set according to given software under testing program element search exactly, improve the efficient and the automaticity of software test greatly.
In order to realize above-mentioned software test case automatic generating method, the present invention also provides a kind of software test case automatic creation system, and this system comprises: analysis module, pretreatment module, test case generation module and authentication module.
Wherein, analysis module reads software under testing, and software source program to be measured is carried out lexical analysis, grammatical analysis and semantic analysis, generates abstract syntax tree, control flow graph.
Pretreatment module, the abstract syntax tree by the traversal analysis module generates carries out pre-service to software source program to be measured, and described pre-service comprises: discern original input, output variable, and the field of definition of original input variable is carried out space compression.
The test case generation module travels through the control flow graph that is generated, and generates the path of current software under testing program element, and the variable in this path is carried out assignment operation, subsume and trace-back operation, and cyclic search generates test case.
Authentication module, the test case of utilizing the test case generation module to generate drive carries out tested program, and according to the path of the actual execution of plug-in mounting code record, verifies whether actual execution route conforms to destination path.
In the technique scheme, the test case that authentication module utilizes the test case generation module to generate drives the software under testing program of carrying out, and according to the path of the actual execution of plug-in mounting code record, if actual execution route and destination path meet, then return to the user, otherwise the test case generation module regenerates new test case with the storage of the test case that obtains and with it.
Wherein, the test case generation module further comprises:
The path generation unit, the program element to be tested according to the user provides generates the path of carrying out the present procedure element by traversal control flow graph;
Processing unit is used for calculating the rank of variable and correlated variables in institute's generation pass and initialization condition counter;
The assignment unit, whether the value of the input variable in the conditional statement in institute's generation pass being enumerated assignment and judgment variable is empty, if be sky then send instructions, the value of variable recalled, otherwise sent instructions to the subsume of containing the unit value to trace unit;
Contain the unit, carry out subsume according to the value of variable in the assignment unit, and judge whether new contradiction to occur,, the value of variable is recalled, otherwise carried out judging unit if find new contradiction then send instructions to trace unit;
Trace unit is recalled the value of variable, judges whether also will recall according to the number of times of having recalled, and if not, then sends instructions to the path generation unit; If, then recall, and judge and to recall whether success according to the correlativity of variable, if success then send instructions to the assignment unit, otherwise send instructions to the path generation unit;
Judging unit, the current count value of condition counter is from increasing, and judge whether current count value equals or exceeds the conditional number on the path, if surpass then obtain a test case, otherwise assignment is enumerated to the input variable in the current conditional statement in the assignment unit.
Described control flow graph is except the entrance and exit node, and the number of degrees of all the other nodes are all greater than 2 control flow graph.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.

Claims (10)

1, a kind of software test case automatic generating method is characterized in that, this method may further comprise the steps:
A, read software under testing, software source program to be measured is carried out lexical analysis, grammatical analysis and semantic analysis, generate the abstract syntax tree and the control flow graph of software under testing;
The abstract syntax tree that B, traversal are generated carries out pre-service to software source program to be measured, and described pre-service comprises: discern original input, output variable, and the field of definition of original input variable is carried out space compression;
C, traversal are controlled flow graph, generate the path of current software under testing program element, and the variable in institute's generation pass is carried out assignment operation, subsume and trace-back operation, generate test case.
2, software test case automatic generating method according to claim 1 is characterized in that, described step C specifically comprises:
C1, the software under testing program element that provides according to the user generate the path of carrying out the present procedure element by traversal control flow graph;
The rank of variable and correlated variables in C2, the calculating institute generation pass, and initialization condition counter;
C3, the input variable of conditional statement in the described path of step C1 is enumerated assignment, and whether the value of judgment variable be empty, if be sky then execution in step C5, otherwise execution in step C4;
C4, carry out subsume and judge whether new contradiction occurring according to the value of input variable among the step C3, if find new contradiction, execution in step C5 then, otherwise execution in step C6;
C5, the value of input variable is recalled, judged whether also will recall according to the number of times of having recalled, if not, execution in step C1 then; If, then recall, and judge and to recall whether success according to the correlativity of variable, if success then return step C3, otherwise would return step C1;
The current count value of C6, condition counter increases certainly, and judges whether current count value equals or exceeds the conditional number on the path, if then obtain a test case, otherwise return step C3.
3, software test case automatic generating method according to claim 2 is characterized in that, described step C1 further comprises:
C1.1, the software under testing program element that provides according to the user, generate the path of carrying out the present procedure element by traversal control flow graph, and judge whether the path that generates is empty, if be empty, then finish current flow process and point out the failure of user's generation pass, otherwise execution in step C1.2;
The condition of the expression formula in C1.2, the extraction path in the conditional statement, variable and the unique determined value of energy;
C1.3, the original input variable field of definition after step B compression in the path is carried out space compression once more;
C1.4, the unreachable path of calculating also judge whether current path can reach, if current path is unreachable, then returns step C1.1 and regenerate new route.
4, according to each described software test case automatic generating method of claim 1-3, it is characterized in that described step B further comprises:
B1, in the software under testing program the extra code of plug-in mounting, with the information of acquisition program behavior when being performed.
5, software test case automatic generating method according to claim 4 is characterized in that, described method further comprises:
D, the test case that step C is obtained are verified.
6, software test case automatic generating method according to claim 5 is characterized in that, step D comprises:
D1, the test case that generates according to step C drive the software under testing program of carrying out, and according to the path of the actual execution of the code record of plug-in mounting;
D2, the actual execution route of comparison and destination path judge whether actual execution route and destination path meet, if do not meet then execution in step C1; If meet, then return to the user with the storage of the test case that obtains and with it.
7, software test case automatic generating method according to claim 6 is characterized in that, described abstract syntax tree comprises object and the symbol table of representing type information.
8, a kind of software test case automatic creation system is characterized in that, this system comprises:
Analysis module reads software under testing, and software source program to be measured is carried out lexical analysis, grammatical analysis and semantic analysis, generates abstract syntax tree and control flow graph;
Pretreatment module, the abstract syntax tree by the traversal analysis module generates carries out pre-service to software source program to be measured, and described pre-service comprises: discern original input, output variable, and the field of definition of original input variable is carried out space compression;
The test case generation module travels through the control flow graph that is generated, and cyclic search generates test case.
9, software test case automatic creation system according to claim 8 is characterized in that, described test case generation module further comprises:
The path generation unit, the software under testing program element according to the user provides generates the path of carrying out the present procedure element by traversal control flow graph;
Processing unit is used for calculating the rank of variable and correlated variables in the path that is generated and initialization condition counter;
Assignment is enumerated to the input variable in the conditional statement in institute's generation pass in the assignment unit, and whether the value of judgment variable is empty;
Contain the unit, carry out subsume according to the value of variable in the assignment unit, and judge whether to occur new contradiction;
Trace unit, is recalled the value of variable for empty or when new contradiction occurring in the value of variable;
Judging unit, the current count value of condition counter be from increasing, and declare current count value and whether equal or exceed conditional number on the path.
10, according to Claim 8 or 9 described software test case automatic creation systems, it is characterized in that this system further comprises:
Authentication module, the test case of utilizing the test case generation module to generate drive carries out tested program, and according to the path of the actual execution of plug-in mounting code record, verifies whether actual execution route conforms to destination path.
CN2007101775341A 2007-11-16 2007-11-16 Software test case automatic generating method and system Expired - Fee Related CN101436128B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007101775341A CN101436128B (en) 2007-11-16 2007-11-16 Software test case automatic generating method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007101775341A CN101436128B (en) 2007-11-16 2007-11-16 Software test case automatic generating method and system

Publications (2)

Publication Number Publication Date
CN101436128A true CN101436128A (en) 2009-05-20
CN101436128B CN101436128B (en) 2012-10-31

Family

ID=40710577

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007101775341A Expired - Fee Related CN101436128B (en) 2007-11-16 2007-11-16 Software test case automatic generating method and system

Country Status (1)

Country Link
CN (1) CN101436128B (en)

Cited By (59)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101894063A (en) * 2010-06-13 2010-11-24 北京北大众志微系统科技有限责任公司 Method and device for generating test program for verifying function of microprocessor
CN101901188A (en) * 2010-07-23 2010-12-01 哈尔滨工程大学 Reachable path-based software testing method
CN101923618A (en) * 2010-08-19 2010-12-22 中国航天科技集团公司第七一○研究所 Hidden Markov model based method for detecting assembler instruction level vulnerability
CN102103538A (en) * 2011-02-22 2011-06-22 南京航空航天大学 Method for testing palletizing robot control software based on Agent
CN102135937A (en) * 2011-03-15 2011-07-27 西安邮电学院 Pairwise overlay integrated software test case suite generating method
CN102243586A (en) * 2011-07-22 2011-11-16 于秀山 Method for automatically acquiring software function diagram
CN102306102A (en) * 2011-08-25 2012-01-04 中兴通讯股份有限公司 Method and device for automatically generating program file
CN102360336A (en) * 2011-10-20 2012-02-22 上海达梦数据库有限公司 Automatic testing system based on grammatical rules and method
CN102385551A (en) * 2010-08-31 2012-03-21 西门子公司 Method, device and system for screening test cases
CN102436417A (en) * 2011-09-28 2012-05-02 于秀山 Code and function covering mapping system and covering mapping method thereof
CN102567169A (en) * 2010-12-29 2012-07-11 无锡江南计算技术研究所 Test method and device of microprocessor
CN102707705A (en) * 2011-02-11 2012-10-03 费希尔-罗斯蒙特系统公司 Methods, apparatus and articles of manufacture to test batch configurations
CN102799520A (en) * 2012-06-27 2012-11-28 清华大学 Static checking method and device for source code pairing
CN102819489A (en) * 2012-07-05 2012-12-12 北京航空航天大学 Software reliability designing method driven by defects
CN102915271A (en) * 2012-10-31 2013-02-06 北京邮电大学 Method for optimizing unit regression test case set based on control flow diagram
CN103235759A (en) * 2013-05-15 2013-08-07 百度在线网络技术(北京)有限公司 Method and device for generating test cases
CN103377045A (en) * 2012-04-27 2013-10-30 国际商业机器公司 TVT (translation verification testing) method and device
CN103399528A (en) * 2013-03-06 2013-11-20 中国电力科学研究院 Automatic generation method for Modbus slave-station simulator system
CN103425569A (en) * 2012-05-14 2013-12-04 中国银联股份有限公司 Method and device for acquiring reuse degree of software module
CN103443766A (en) * 2011-03-31 2013-12-11 日立公共系统工程公司 Apparatus for setting affecting extent of program, and method of specifying affecting extent and method of extracting affecting program using same
CN103530223A (en) * 2012-07-06 2014-01-22 百度在线网络技术(北京)有限公司 Method and device for automatically generating unit test cases
CN103559044A (en) * 2013-11-20 2014-02-05 无锡儒安科技有限公司 Method and device for formalizing network control codes of wireless sensor
CN103927473A (en) * 2013-01-16 2014-07-16 广东电网公司信息中心 Method, device and system for detecting source code safety of mobile intelligent terminal
CN103942140A (en) * 2013-12-19 2014-07-23 江苏锐天信息科技有限公司 Automatic testing program conversion method
CN104035864A (en) * 2013-12-17 2014-09-10 北京邮电大学 Path generation method based on contradiction fragment mode
CN104050082A (en) * 2014-06-17 2014-09-17 南京大学 Test data automatic generation method oriented toward modified condition/decision coverage
CN104317708A (en) * 2014-10-21 2015-01-28 北京邮电大学 Software testing case automatic generating method and system based on iterative interval arithmetic
CN104484162A (en) * 2014-10-31 2015-04-01 国云科技股份有限公司 Software testing case designing and writing method
CN104636257A (en) * 2015-03-13 2015-05-20 胡兢玉 SQL coverage-based automatic testing method for application software in database based on
CN105354035A (en) * 2015-11-17 2016-02-24 天津橙子科技有限公司 Method for compiling test case of web engineering
CN105393226A (en) * 2013-07-23 2016-03-09 兰德马克绘图国际公司 Automated Generation Of Scripted And Manual Test Cases
CN105988811A (en) * 2015-02-17 2016-10-05 华为技术有限公司 Method and apparatus for obtaining kernel control flow chart of operating system
CN106681903A (en) * 2015-11-11 2017-05-17 阿里巴巴集团控股有限公司 Method and device for generating test case
WO2017084275A1 (en) * 2015-11-20 2017-05-26 乐视控股(北京)有限公司 Software development integration method and apparatus
CN106844190A (en) * 2015-12-07 2017-06-13 中兴通讯股份有限公司 test script automatic generation method and device
CN106959919A (en) * 2016-01-08 2017-07-18 广州市动景计算机科技有限公司 Method for testing software and device based on test path figure
CN107038119A (en) * 2017-03-31 2017-08-11 上海东软载波微电子有限公司 Automatic example generation method and device
CN107341399A (en) * 2016-04-29 2017-11-10 阿里巴巴集团控股有限公司 Assess the method and device of code file security
CN107451057A (en) * 2017-07-31 2017-12-08 郑州云海信息技术有限公司 A kind of branch determines method and device
CN107608873A (en) * 2016-07-11 2018-01-19 珠海优特电力科技股份有限公司 Method for testing software and system and test platform
CN108804304A (en) * 2017-05-05 2018-11-13 北京京东尚科信息技术有限公司 Method for generating test case and device, storage medium, electronic equipment
CN108845933A (en) * 2018-05-24 2018-11-20 广东睿江云计算股份有限公司 The method and device that software test case is write and evaluated
CN109117363A (en) * 2018-06-28 2019-01-01 腾讯科技(深圳)有限公司 A kind of method for generating test case, device and server
CN109299003A (en) * 2018-08-31 2019-02-01 苏州洞察云信息技术有限公司 A kind of full-automatic testing case driving generation system towards complex software
CN109308260A (en) * 2018-08-30 2019-02-05 福建天泉教育科技有限公司 A kind of method and terminal of automatically generating unit test code
CN109508296A (en) * 2018-11-22 2019-03-22 北京知道创宇信息技术有限公司 Data detection method, device and electronic equipment
CN109582559A (en) * 2018-09-28 2019-04-05 阿里巴巴集团控股有限公司 Verification method, device, electronic equipment and the storage medium of system
CN109656813A (en) * 2018-11-21 2019-04-19 恒为科技(上海)股份有限公司 A kind of test case operation method and device
CN109669436A (en) * 2018-12-06 2019-04-23 广州小鹏汽车科技有限公司 A kind of method for generating test case and device of the functional requirement based on electric car
CN109815133A (en) * 2018-12-28 2019-05-28 深圳前海达闼云端智能科技有限公司 A kind of method for testing software, calculates equipment and computer storage medium at device
CN109901984A (en) * 2017-12-08 2019-06-18 北京京东尚科信息技术有限公司 The method and apparatus for generating big data test case
CN110337642A (en) * 2017-02-28 2019-10-15 搜牌逻有限公司 The method and apparatus of test are executed by using test case
CN110377493A (en) * 2018-04-12 2019-10-25 南京慕测信息科技有限公司 A kind of unit testing use-case optimization method of code-oriented readability
CN110543421A (en) * 2019-08-31 2019-12-06 华南理工大学 Unit test automatic execution method based on test case automatic generation algorithm
CN111240772A (en) * 2020-01-22 2020-06-05 腾讯科技(深圳)有限公司 Data processing method and device based on block chain and storage medium
CN111475410A (en) * 2020-03-31 2020-07-31 北京经纬恒润科技有限公司 Test case generation method and device
CN111708542A (en) * 2020-06-24 2020-09-25 中国平安财产保险股份有限公司 Test case generation method, system, device and storage medium
CN113238932A (en) * 2021-04-30 2021-08-10 西南电子技术研究所(中国电子科技集团公司第十研究所) Automatic test case generation method
CN117171053A (en) * 2023-11-01 2023-12-05 睿思芯科(深圳)技术有限公司 Test method, system and related equipment for vectorized programming

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1767453A (en) * 2004-10-31 2006-05-03 中兴通讯股份有限公司 Automatic test method and system

Cited By (93)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101894063A (en) * 2010-06-13 2010-11-24 北京北大众志微系统科技有限责任公司 Method and device for generating test program for verifying function of microprocessor
CN101894063B (en) * 2010-06-13 2012-09-26 北京北大众志微系统科技有限责任公司 Method and device for generating test program for verifying function of microprocessor
CN101901188A (en) * 2010-07-23 2010-12-01 哈尔滨工程大学 Reachable path-based software testing method
CN101923618A (en) * 2010-08-19 2010-12-22 中国航天科技集团公司第七一○研究所 Hidden Markov model based method for detecting assembler instruction level vulnerability
CN102385551A (en) * 2010-08-31 2012-03-21 西门子公司 Method, device and system for screening test cases
CN102385551B (en) * 2010-08-31 2015-04-29 西门子公司 Method, device and system for screening test cases
CN102567169A (en) * 2010-12-29 2012-07-11 无锡江南计算技术研究所 Test method and device of microprocessor
CN102567169B (en) * 2010-12-29 2014-02-26 无锡江南计算技术研究所 Test method and device of microprocessor
CN102707705A (en) * 2011-02-11 2012-10-03 费希尔-罗斯蒙特系统公司 Methods, apparatus and articles of manufacture to test batch configurations
CN102707705B (en) * 2011-02-11 2017-06-30 费希尔-罗斯蒙特系统公司 Method and apparatus for testing batch configuration
CN102103538A (en) * 2011-02-22 2011-06-22 南京航空航天大学 Method for testing palletizing robot control software based on Agent
CN102135937A (en) * 2011-03-15 2011-07-27 西安邮电学院 Pairwise overlay integrated software test case suite generating method
CN103443766A (en) * 2011-03-31 2013-12-11 日立公共系统工程公司 Apparatus for setting affecting extent of program, and method of specifying affecting extent and method of extracting affecting program using same
CN103443766B (en) * 2011-03-31 2017-04-05 日立公共系统有限公司 The coverage setting device of program, and using the device coverage ad hoc approach and the extracting method of impacted program
CN102243586B (en) * 2011-07-22 2015-02-04 于秀山 Method for automatically acquiring software function diagram
CN102243586A (en) * 2011-07-22 2011-11-16 于秀山 Method for automatically acquiring software function diagram
CN102306102A (en) * 2011-08-25 2012-01-04 中兴通讯股份有限公司 Method and device for automatically generating program file
CN102436417A (en) * 2011-09-28 2012-05-02 于秀山 Code and function covering mapping system and covering mapping method thereof
CN102436417B (en) * 2011-09-28 2014-08-06 于秀山 Code and function covering mapping system and covering mapping method thereof
CN102360336A (en) * 2011-10-20 2012-02-22 上海达梦数据库有限公司 Automatic testing system based on grammatical rules and method
CN102360336B (en) * 2011-10-20 2014-12-17 上海达梦数据库有限公司 Automatic testing system based on grammatical rules and method
CN103377045A (en) * 2012-04-27 2013-10-30 国际商业机器公司 TVT (translation verification testing) method and device
CN103377045B (en) * 2012-04-27 2016-12-14 国际商业机器公司 Method and system for Translation Verification Test
US9417991B2 (en) 2012-04-27 2016-08-16 International Business Machines Corporation Translation verification testing
CN103425569B (en) * 2012-05-14 2016-09-28 中国银联股份有限公司 A kind of method and apparatus obtaining reuse degree of software module
CN103425569A (en) * 2012-05-14 2013-12-04 中国银联股份有限公司 Method and device for acquiring reuse degree of software module
CN102799520A (en) * 2012-06-27 2012-11-28 清华大学 Static checking method and device for source code pairing
CN102799520B (en) * 2012-06-27 2016-03-23 清华大学 For static check method and the device of source code pairing
CN102819489A (en) * 2012-07-05 2012-12-12 北京航空航天大学 Software reliability designing method driven by defects
CN103530223B (en) * 2012-07-06 2018-05-04 百度在线网络技术(北京)有限公司 A kind of method and device of automatically generating unit test use-case
CN103530223A (en) * 2012-07-06 2014-01-22 百度在线网络技术(北京)有限公司 Method and device for automatically generating unit test cases
CN102915271A (en) * 2012-10-31 2013-02-06 北京邮电大学 Method for optimizing unit regression test case set based on control flow diagram
CN103927473A (en) * 2013-01-16 2014-07-16 广东电网公司信息中心 Method, device and system for detecting source code safety of mobile intelligent terminal
CN103399528A (en) * 2013-03-06 2013-11-20 中国电力科学研究院 Automatic generation method for Modbus slave-station simulator system
CN103399528B (en) * 2013-03-06 2016-05-25 中国电力科学研究院 A kind of automatic generation method of Modbus slave station simulation system
CN103235759A (en) * 2013-05-15 2013-08-07 百度在线网络技术(北京)有限公司 Method and device for generating test cases
CN103235759B (en) * 2013-05-15 2018-03-09 百度在线网络技术(北京)有限公司 Method for generating test case and device
CN105393226A (en) * 2013-07-23 2016-03-09 兰德马克绘图国际公司 Automated Generation Of Scripted And Manual Test Cases
CN103559044A (en) * 2013-11-20 2014-02-05 无锡儒安科技有限公司 Method and device for formalizing network control codes of wireless sensor
CN104035864B (en) * 2013-12-17 2017-10-20 北京邮电大学 A kind of path generating method based on contradiction fragment schema
CN104035864A (en) * 2013-12-17 2014-09-10 北京邮电大学 Path generation method based on contradiction fragment mode
CN103942140A (en) * 2013-12-19 2014-07-23 江苏锐天信息科技有限公司 Automatic testing program conversion method
CN104050082B (en) * 2014-06-17 2017-04-26 南京大学 Test data automatic generation method oriented toward modified condition/decision coverage
CN104050082A (en) * 2014-06-17 2014-09-17 南京大学 Test data automatic generation method oriented toward modified condition/decision coverage
CN104317708B (en) * 2014-10-21 2017-06-13 北京邮电大学 The software test case automatic generating method and system of the interval arithmetic based on iteration
CN104317708A (en) * 2014-10-21 2015-01-28 北京邮电大学 Software testing case automatic generating method and system based on iterative interval arithmetic
CN104484162B (en) * 2014-10-31 2018-04-03 国云科技股份有限公司 A kind of software test case designs write method
CN104484162A (en) * 2014-10-31 2015-04-01 国云科技股份有限公司 Software testing case designing and writing method
CN105988811A (en) * 2015-02-17 2016-10-05 华为技术有限公司 Method and apparatus for obtaining kernel control flow chart of operating system
CN105988811B (en) * 2015-02-17 2019-09-03 华为技术有限公司 The method and apparatus for obtaining the kernel control flow chart of operating system
CN104636257A (en) * 2015-03-13 2015-05-20 胡兢玉 SQL coverage-based automatic testing method for application software in database based on
CN104636257B (en) * 2015-03-13 2017-10-27 胡兢玉 The DBAS automated testing method covered based on SQL
CN106681903B (en) * 2015-11-11 2020-05-12 阿里巴巴集团控股有限公司 Method and device for generating test case
CN106681903A (en) * 2015-11-11 2017-05-17 阿里巴巴集团控股有限公司 Method and device for generating test case
CN105354035A (en) * 2015-11-17 2016-02-24 天津橙子科技有限公司 Method for compiling test case of web engineering
WO2017084275A1 (en) * 2015-11-20 2017-05-26 乐视控股(北京)有限公司 Software development integration method and apparatus
CN106844190A (en) * 2015-12-07 2017-06-13 中兴通讯股份有限公司 test script automatic generation method and device
CN106844190B (en) * 2015-12-07 2022-06-07 中兴通讯股份有限公司 Automatic test script generation method and device
WO2017096990A1 (en) * 2015-12-07 2017-06-15 中兴通讯股份有限公司 Method and device for automatically generating test script
CN106959919A (en) * 2016-01-08 2017-07-18 广州市动景计算机科技有限公司 Method for testing software and device based on test path figure
CN106959919B (en) * 2016-01-08 2022-01-28 阿里巴巴(中国)有限公司 Software testing method and device based on testing path diagram
CN107341399A (en) * 2016-04-29 2017-11-10 阿里巴巴集团控股有限公司 Assess the method and device of code file security
CN107608873A (en) * 2016-07-11 2018-01-19 珠海优特电力科技股份有限公司 Method for testing software and system and test platform
CN110337642A (en) * 2017-02-28 2019-10-15 搜牌逻有限公司 The method and apparatus of test are executed by using test case
CN107038119B (en) * 2017-03-31 2019-12-03 上海东软载波微电子有限公司 Automatic example generation method and device
CN107038119A (en) * 2017-03-31 2017-08-11 上海东软载波微电子有限公司 Automatic example generation method and device
CN108804304A (en) * 2017-05-05 2018-11-13 北京京东尚科信息技术有限公司 Method for generating test case and device, storage medium, electronic equipment
CN107451057A (en) * 2017-07-31 2017-12-08 郑州云海信息技术有限公司 A kind of branch determines method and device
CN109901984A (en) * 2017-12-08 2019-06-18 北京京东尚科信息技术有限公司 The method and apparatus for generating big data test case
CN110377493A (en) * 2018-04-12 2019-10-25 南京慕测信息科技有限公司 A kind of unit testing use-case optimization method of code-oriented readability
CN108845933A (en) * 2018-05-24 2018-11-20 广东睿江云计算股份有限公司 The method and device that software test case is write and evaluated
CN109117363A (en) * 2018-06-28 2019-01-01 腾讯科技(深圳)有限公司 A kind of method for generating test case, device and server
CN109117363B (en) * 2018-06-28 2020-09-25 腾讯科技(深圳)有限公司 Test case generation method and device and server
CN109308260A (en) * 2018-08-30 2019-02-05 福建天泉教育科技有限公司 A kind of method and terminal of automatically generating unit test code
CN109308260B (en) * 2018-08-30 2021-11-05 福建天泉教育科技有限公司 Method and terminal for automatically generating unit test code
CN109299003A (en) * 2018-08-31 2019-02-01 苏州洞察云信息技术有限公司 A kind of full-automatic testing case driving generation system towards complex software
CN109582559A (en) * 2018-09-28 2019-04-05 阿里巴巴集团控股有限公司 Verification method, device, electronic equipment and the storage medium of system
CN109656813A (en) * 2018-11-21 2019-04-19 恒为科技(上海)股份有限公司 A kind of test case operation method and device
CN109508296A (en) * 2018-11-22 2019-03-22 北京知道创宇信息技术有限公司 Data detection method, device and electronic equipment
CN109669436A (en) * 2018-12-06 2019-04-23 广州小鹏汽车科技有限公司 A kind of method for generating test case and device of the functional requirement based on electric car
CN109669436B (en) * 2018-12-06 2021-04-13 广州小鹏汽车科技有限公司 Test case generation method and device based on functional requirements of electric automobile
CN109815133B (en) * 2018-12-28 2022-08-09 达闼机器人股份有限公司 Software testing method and device, computing equipment and computer storage medium
CN109815133A (en) * 2018-12-28 2019-05-28 深圳前海达闼云端智能科技有限公司 A kind of method for testing software, calculates equipment and computer storage medium at device
CN110543421B (en) * 2019-08-31 2022-03-29 华南理工大学 Unit test automatic execution method based on test case automatic generation algorithm
CN110543421A (en) * 2019-08-31 2019-12-06 华南理工大学 Unit test automatic execution method based on test case automatic generation algorithm
CN111240772A (en) * 2020-01-22 2020-06-05 腾讯科技(深圳)有限公司 Data processing method and device based on block chain and storage medium
CN111475410A (en) * 2020-03-31 2020-07-31 北京经纬恒润科技有限公司 Test case generation method and device
CN111475410B (en) * 2020-03-31 2024-01-09 北京经纬恒润科技股份有限公司 Test case generation method and device
CN111708542A (en) * 2020-06-24 2020-09-25 中国平安财产保险股份有限公司 Test case generation method, system, device and storage medium
CN113238932A (en) * 2021-04-30 2021-08-10 西南电子技术研究所(中国电子科技集团公司第十研究所) Automatic test case generation method
CN113238932B (en) * 2021-04-30 2024-03-19 西南电子技术研究所(中国电子科技集团公司第十研究所) Automatic test case generation method
CN117171053A (en) * 2023-11-01 2023-12-05 睿思芯科(深圳)技术有限公司 Test method, system and related equipment for vectorized programming
CN117171053B (en) * 2023-11-01 2024-02-20 睿思芯科(深圳)技术有限公司 Test method, system and related equipment for vectorized programming

Also Published As

Publication number Publication date
CN101436128B (en) 2012-10-31

Similar Documents

Publication Publication Date Title
CN101436128B (en) Software test case automatic generating method and system
CN103282878B (en) Based on the loop parallelization of Loop partitioning or index array
Hamadi et al. Seven challenges in parallel SAT solving
CN105022691B (en) A kind of increasingly automated method for testing software based on uml diagram
CN103116493B (en) A kind of automatic mapping method being applied to coarse-grained reconfigurable array
Dijkman et al. Aligning business process models
Klein et al. Experiments with deterministic ω-automata for formulas of linear temporal logic
CN100414504C (en) Method and apparatus for recovering data values in dynamic runtime systems
US7673295B1 (en) System and method for compile-time non-concurrency analysis
Wang et al. Cleaning structured event logs: A graph repair approach
Hespe et al. Scalable kernelization for maximum independent sets
CN102073589A (en) Code static analysis-based data race detecting method and system thereof
CN106126413A (en) Software Defects Predict Methods based on two benches packaging type feature selection
CN103713933B (en) Focus function, the assemblage method of variable, apparatus and system in computer program
CN100559347C (en) A kind of recognition methods of nested loop structure
CN105531672A (en) Parser generation
Girkar Functional parallelism: theoretical foundations and implementation
JP6528465B2 (en) State parameterization in symbolic execution for software testing
Domshlak et al. Symmetry breaking: Satisficing planning and landmark heuristics
CN105511867A (en) Optimization mode automatic generation method and optimization device
CN102799960A (en) Parallel operation flow anomaly detection method oriented to data model
Mrasek et al. A new verification technique for large processes based on identification of relevant tasks
CN110443588A (en) A kind of method and system of workflow test
CN105260166A (en) Manual sample set generation method applied to machine learning thread partitioning
CN102495800A (en) Iterative refinement method for abstractly valuing variables in Do statement

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20121031

Termination date: 20171116

CF01 Termination of patent right due to non-payment of annual fee