CN104252408B - Method and device for providing test case - Google Patents

Method and device for providing test case Download PDF

Info

Publication number
CN104252408B
CN104252408B CN201310257810.0A CN201310257810A CN104252408B CN 104252408 B CN104252408 B CN 104252408B CN 201310257810 A CN201310257810 A CN 201310257810A CN 104252408 B CN104252408 B CN 104252408B
Authority
CN
China
Prior art keywords
test
program
test case
constraints
modification
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.)
Expired - Fee Related
Application number
CN201310257810.0A
Other languages
Chinese (zh)
Other versions
CN104252408A (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.)
International Business Machines Corp
Original Assignee
International Business Machines Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by International Business Machines Corp filed Critical International Business Machines Corp
Priority to CN201310257810.0A priority Critical patent/CN104252408B/en
Priority to US14/298,239 priority patent/US9811446B2/en
Publication of CN104252408A publication Critical patent/CN104252408A/en
Application granted granted Critical
Publication of CN104252408B publication Critical patent/CN104252408B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring

Abstract

The invention discloses a method and a device for providing a test case for a modified program. The method comprises the following steps: acquiring a modification item for modifying the previous version of a program; locating the modification item behind a first test probe in a plurality of test probes inserted into the program and in front of a second test probe; acquiring an execution path which is positioned between the first test probe and the second test probe and is related to the modification of the modified program, as well as a constraint group which corresponds to the execution path; acquiring an execution result which is output by the first test probe and is obtained by executing the program of the previous version by using an original test case; determining a test case suitable for the execution path based on the execution result and the constraint group. The device corresponds to the method. According to the method and the device, a suitable test case is provided specific to the modified part of the program based on the original test case, so that the test case providing efficiency is increased.

Description

The method and apparatus that test case is provided
Technical field
The present invention relates to be used for the test case of software test, more specifically, be related to provide test case method and Device.
Background technology
In software development process, developer compiles the source code of written-out program for software function to be realized, then Tester is tested to the software built based on source code using test case.It is appreciated that a program is often utilized Conditional judgment builds multiple flow chart branches with redirecting, so as to form multiple execution routes.Therefore, it is intended that selecting appropriate test to use Example constitutes test use cases so that each test case that test case is concentrated can correspond respectively to different flow chart branches, Different execution routes are covered, so as to comprehensively test to the various possible practice condition of program.For this purpose, in existing skill In art, it has been proposed that semiology analysis(symbolic execution)Method carry out the implementation procedure of analysis program.The method May be used for the appropriate test case of Program Generating.
In the method for semiology analysis, for program construction controlling stream graph to be tested(Control Flow Graph, CFG).Controlling stream graph(CFG)It is a kind of abstract data structure that a program process is represented with directed graph.Fig. 1 is illustrated The controlling stream graph of one program and corresponding execution route.Specifically, multiple nodes and multiple connecting nodes are contained in Fig. 1 Directed edge, wherein each node Ni represents a program basic block, that is, without any sequential statement generation for redirecting Code block;Redirecting in each directed edge Ei representation programs, and connect two basic blocks as the beginning and end for redirecting(Save Point).In due to program redirect it is general by execution condition limiting, therefore a directed edge is corresponding to from the directed edge Point node jumps to the execution condition of peripheral node.For example, in a specific example, including including x and y defined in program Multiple variables.Performing node N1Afterwards, the value of program judgment variable x and y.If(x+y)>=0, then jump to node N2, If (x+y)<0 and y>0, then jump to node N3.So, directed edge E1Corresponding to the condition of execution(x+y)>=0;Directed edge E2It is right Should be in the condition of execution (x+y)<0 and y>0.Connect different nodes via different directed edges, different execution roads can be formed Footpath.Specifically, Fig. 1 also show the combination of the directed edge corresponding to different execution routes, such as execution route p1Via having To side E0, E1, E3, E7And E9, perform sequence node N1, N2, N6, N5, Nf.As it was previously stated, each directed edge is corresponding to oriented from this The starting point node on side jumps to the execution condition of peripheral node.Therefore, each execution route pi is may correspond to by the group of directed edge Close limited execution condition group, or referred to as set of constraints.Then, the set of constraints can be solved.If the set of constraints without Solution, then illustrate that execution route pi is unreachable.For reachable path, program performing can be obtained by carrying out solving to set of constraints The condition and range of path pi.Further, test case ti can be generated in the condition and range.So, in test case ti Parameters meet the condition and range of path pi, and then, when being tested using test case ti, program will necessarily be along road Footpath pi is performed, so as to realize the test to path pi.That is, test case ti applies to the survey of execution route pi Example on probation.In the same way, each the different execution route that can be directed to program generate different test cases to profit.Thus, The different test cases of generation can just cover different execution routes, so as to meet the requirement of comprehensive test.
However, to meet various demands of the user to software function, many programs have the complicated substantial amounts of stream of logical sum Journey branch.It is appreciated that often increasing a flow chart branches, will combine on the basis of original execution route and produce new holding Walking along the street footpath.Therefore, the number of execution route exponential growth with the increase of number of branches.Substantial amounts of flow chart branches can be produced The execution route of tremendous amount, this is also called path status Space Explosion.For such situation, for each execution route by One its set of constraints of solution becomes not enough practical generating the method for test case due to the low of efficiency.
On the other hand, writing for software program is gradually completing.Developer(For large software, typically Multiple developers)Constantly modification record is submitted to program source code(track), so as to modify to source code, supplement With it is perfect.In order to ensure the software program for passing through repeatedly modification normally can run, need to carry out regression test to software program (regression testing), to determine the modification for causing program to go wrong record.According to prior art, survey returning During examination, tested using the program of same test case set pair different editions.However, in fact, to the every of program Secondary modification is likely to cause the execution route of program to change.Therefore, it is possible to there is such situation:Suitable for master In this program, the test case of specific execution route is possible to be no longer desirable for amended program, conversely, because modification of program And the new execution route for generating can not find applicable test case.For this reason it would be desirable to be directed to amended program use to test Example collection is updated, so as to provide applicable test case.However, as it was previously stated, the logic of one side program becomes increasingly complex, The enormous amount of execution route;On the other hand, the modification of program is very frequent.The factor of these two aspects is caused for the every of program The cost that secondary modification regenerates test case is very high.
Therefore, it is intended that proposing new scheme, the test case being suitable for can be provided for the modification of program more efficiently.
The content of the invention
In view of posed problems above, proposes the present invention, it is desirable to provide a kind of scheme, can be in the base of original test case On plinth, the program for changing provides the test case being suitable for, so as to overcome at least a portion problem of the prior art.
According to one embodiment of the invention, it is proposed that a kind of method that program for modification provides test case, including:Obtain Take the modification item that the last revision to program is modified;The modification item is navigated to insertion multiple tests in a program to visit After the first test probe in pin and before the second test probe;Obtain amended program described first test probe and The execution route related to the modification and the corresponding set of constraints of the execution route between second test probe;Obtain described The original test case of utilization of the first test probe output performs the implementing result of the program of the last revision;And based on institute Implementing result and the set of constraints are stated, it is determined that suitable for the test case of the execution route.
According to another embodiment, it is proposed that a kind of device for test case is provided for the program of modification, including:Modification Item acquiring unit, is configured to obtain the modification item that the last revision to program is modified;Positioning unit, is configured to repair described After changing the first test probe that item is navigated in insertion multiple test probes in a program and before the second test probe;Road Footpath acquiring unit, is configured to obtain amended program and is repaiied with described between the described first test probe and the second test probe Change the execution route and the corresponding set of constraints of the execution route of correlation;Implementing result acquiring unit, is configured to obtain described The original test case of utilization of the first test probe output performs the implementing result of the program of the last revision;And determine single Unit, is configured to the implementing result and the set of constraints, it is determined that suitable for the test case of the execution route.
Using said method and device, based on original test case, the test being suitable for is provided for the modification part of program Use-case.New test case is regenerated for whole program due to avoiding, improve the efficiency that test case is provided, accordingly Ground, promotes the regression test process of program.
Description of the drawings
Disclosure illustrative embodiments are described in more detail by combining accompanying drawing, the disclosure above-mentioned and its Its purpose, feature and advantage will be apparent from, wherein, in disclosure illustrative embodiments, identical reference number Typically represent same parts.
Fig. 1 illustrates the controlling stream graph of a program and corresponding execution route;
Fig. 2 shows the block diagram for being suitable to the exemplary computer system/server 12 for realizing embodiment of the present invention;
Fig. 3 illustrates the flow chart that the program for modification according to an embodiment of the invention provides the method for test case;
Fig. 4 schematically shows controlling stream graph and execution route between two test probes;
Fig. 5 illustrates the sub-step for determining the test case being suitable for;
Fig. 6 schematically shows the example of the set of constraints of set of constraints and combination;And
Fig. 7 illustrates the block diagram of the device for providing test case according to an embodiment of the invention.
Specific embodiment
Some preferred implementations of the disclosure are shown in the accompanying drawings, and these are more fully described below with reference to accompanying drawings Preferred implementation.However, it is possible to realize the disclosure in a variety of manners, which should not be limited by embodiments set forth herein. Conversely, these embodiments are provided so that the disclosure is more thorough and complete, and can be complete by the scope of the present disclosure Convey to those skilled in the art.
Person of ordinary skill in the field knows that the present invention can be implemented as system, method or computer program. Therefore, the disclosure can be implemented as following form, i.e.,:Can be completely hardware, can also be completely software(Including Firmware, resident software, microcode etc.), can also be the form that hardware and software is combined, referred to generally herein as " circuit ", " mould Block " or " system ".Additionally, in certain embodiments, the present invention is also implemented as in one or more computer-readable mediums In computer program form, in the computer-readable medium include computer-readable program code.
The combination in any of one or more computer-readable media can be adopted.Computer-readable medium can be calculated Machine readable signal medium or computer-readable recording medium.Computer-readable recording medium can for example be --- but do not limit In --- the system of electricity, magnetic, optical, electromagnetic, infrared ray or quasiconductor, device or device, or arbitrarily more than combination.Calculate The more specifically example of machine readable storage medium storing program for executing(Non exhaustive list)Including:Electrical connection with one or more wires, just Take formula computer disk, hard disk, random access memory(RAM), read only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In this document, computer-readable recording medium can be it is any comprising or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device and use or in connection.
Computer-readable signal media can include the data signal propagated in a base band or as a carrier wave part, Computer-readable program code is carried wherein.The data signal of this propagation can take various forms, including --- but It is not limited to --- electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be Any computer-readable medium beyond computer-readable recording medium, the computer-readable medium can send, propagate or Transmit for by the use of instruction execution system, device or device or program in connection.
The program code included on computer-readable medium can with any appropriate medium transmission, including --- but do not limit In --- wireless, electric wire, optical cable, RF etc., or above-mentioned any appropriate combination.
Can be write with one or more programming language or its combination for performing the computer that the present invention is operated Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++, Also include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with Fully perform on the user computer, partly perform on the user computer, performing as an independent software kit, portion Part on the user computer is divided to perform on the remote computer or perform on remote computer or server completely. Be related in the situation of remote computer, remote computer can be by the network of any kind --- including LAN (LAN) or Wide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer(For example carried using Internet service Come by Internet connection for business).
Method, device below with reference to the embodiment of the present invention(System)With the flow chart of computer program and/or The block diagram description present invention.It should be appreciated that each square frame in each square frame and flow chart and/or block diagram of flow chart and/or block diagram Combination, can be realized by computer program instructions.These computer program instructions can be supplied to general purpose computer, special The processor of computer or other programmable data processing units, so as to produce a kind of machine, these computer program instructions Performed by computer or other programmable data processing units, advised in generating flowchart and/or the square frame in block diagram The device of fixed function/operation.
These computer program instructions can also be stored in and can cause computer or other programmable data processing units In the computer-readable medium for working in a specific way, so, the instruction being stored in computer-readable medium just produces one Command device (the instruction of function/operation specified in the individual square frame including in flowchart and/or block diagram Means manufacture)(manufacture).
Computer program instructions can also be loaded into computer, other programmable data processing units or miscellaneous equipment On so that series of operation steps is performed on computer, other programmable data processing units or miscellaneous equipment, in terms of producing The process that calculation machine is realized, so that the instruction performed on computer or other programmable devices can provide flowchart And/or the process of function/operation specified in the square frame in block diagram.
Fig. 2 shows the block diagram for being suitable to the exemplary computer system/server 12 for realizing embodiment of the present invention. The computer system/server 12 that Fig. 2 shows is only an example, should not be to the function of the embodiment of the present invention and use range Bring any restriction.
As shown in Fig. 2 computer system/server 12 is showed in the form of universal computing device.Computer system/service The component of device 12 can be including but not limited to:One or more processor or processing unit 16, system storage 28, connection Different system component(Including system storage 28 and processing unit 16)Bus 18.
Bus 18 represents one or more in a few class bus structures, including memory bus or Memory Controller, Peripheral bus, AGP, processor or using various bus structures in any bus-structured local bus.Lift For example, these architectures include but is not limited to industry standard architecture(ISA)Bus, MCA(MAC) Bus, enhancement mode isa bus, VESA(VESA)Local bus and periphery component interconnection(PCI)Bus.
Computer system/server 12 typically comprises various computing systems computer-readable recording medium.These media can be appointed What usable medium that can be accessed by computer system/server 12, including volatibility and non-volatile media, it is moveable and Immovable medium.
System storage 28 can include the computer system readable media of form of volatile memory, such as random access memory Memorizer(RAM)30 and/or cache memory 32.It is removable that computer system/server 12 may further include other Dynamic/immovable, volatile/non-volatile computer system storage medium.Only as an example, storage system 34 can be used for Read and write immovable, non-volatile magnetic media(Fig. 1 do not show, commonly referred to " hard disk drive ").Although not showing in Fig. 2 Going out, can providing for may move non-volatile magnetic disk(Such as " floppy disk ")The disc driver of read-write, and to removable Anonvolatile optical disk(Such as CD-ROM, DVD-ROM or other optical mediums)The CD drive of read-write.In these cases, Each driver can be connected with bus 18 by one or more data media interfaces.Memorizer 28 can include at least one Individual program product, the program product have one group(For example, at least one)Program module, these program modules are configured to perform The function of various embodiments of the present invention.
With one group(At least one)Program/the utility 40 of program module 42, can be stored in such as memorizer 28 In, such program module 42 includes --- but being not limited to --- operating system, one or more application program, other programs Module and routine data, potentially include the realization of network environment in each or certain combination in these examples.Program mould Block 42 generally performs function and/or method in embodiment described in the invention.
Computer system/server 12 can also be with one or more external equipments 14(Such as keyboard, sensing equipment, aobvious Show device 24 etc.)Communication, the equipment that can also enable a user to be interacted with the computer system/server 12 with one or more are led to Letter, and/or any set with enable that the computer system/server 12 communicated with one or more of the other computing device It is standby(Such as network interface card, modem etc.)Communication.This communication can pass through input/output(I/O)Interface 22 is carried out.And And, computer system/server 12 can also be by network adapter 20 and one or more network(Such as LAN (LAN), wide area network(WAN)And/or public network, such as the Internet)Communication.As illustrated, network adapter 20 passes through bus 18 are communicated with other modules of computer system/server 12.It should be understood that although not shown in can be with reference to computer Systems/servers 12 use other hardware and/or software module, including but not limited to:At microcode, device driver, redundancy Reason unit, external disk drive array, RAID system, tape drive and data backup storage system etc..
Each embodiment of the present invention is described below in conjunction with the accompanying drawings.In these embodiments, multiple surveys are inserted in a program Sound out pin(instrument), for detection and the execution state information of output program.In the case where modifying to program, The modification is navigated between insertion two test probes in a program, for example, is surveyed with second after the first test probe Before souning out pin, and obtain execution route of the amended program between two test probes.Thus, from whole program " extraction " has gone out the execution route related to modification.On the other hand, obtain the holding at the first test probe of the program before modification Row result, that is, the program of previous version is in the implementing result at the beginning of above-mentioned execution route.Then, using semiology analysis Mode, considers the set of constraints of execution route with reference to above-mentioned implementing result, it is possible to it is determined that suitable for the test of above-mentioned execution route Use-case.
Referring now to Fig. 3, which illustrates that the program for modification according to an embodiment of the invention provides the side of test case The flow chart of method.As illustrated, the method that test case is provided in the embodiment is comprised the following steps:Step 31, obtains to journey The modification item that the last revision of sequence is modified;The modification item is navigated to insertion multiple tests in a program by step 32 After the first test probe in probe and before the second test probe;Step 33, obtains amended program described first The execution route related to the modification and the corresponding constraint of the execution route between test probe and the second test probe Group;Step 34, obtains the program of utilization original test case execution last revision of the first test probe output Implementing result;And step 35, based on the implementing result and the set of constraints, it is determined that suitable for the test of the execution route Use-case.The executive mode of each step above is described with reference to specific example.
First, in step 31, obtain the modification item that the last revision to program is modified.In one example, one The modification that modification item is carried out corresponding to a line to program code.In another example, a modification item is corresponding to program A brick or the modification that carries out of an execution condition.Using semiology analysis by program process abstract for controlling stream In the case of figure, a modification item can correspond to the modification of to program node or a directed edge.
For the ease of description, it is assumed that by test program last revision be v1.Correspondingly, the program of v1 versions With corresponding test use cases T1, wherein comprising multiple test cases, being respectively suitable for the different execution of the program of v1 versions Path.As it was previously stated, in software development process, developer can constantly submit modification record to(track), so as to program Code is modified.Usually, a modification record can include several modification items.It is assumed that the program in v1 versions passes through to survey After examination, developer have submitted multinomial modification record respectively, thus form the program of v2 versions.
Generally, can be by changing record material storehouse(track knowledge base), or referred to as edition management system Modification record to submitting to is managed.The example of edition management system includes, ClearCase, CVS, Endevor, RTCz etc.. Above-mentioned edition management system can be recorded and manage the information of each modification record.These information include that what modification was recorded carries People is handed over, the submission time of record, the information of each modification item in modification record is changed.The information of modification item can include, repair Send raw position, particular content of modification etc. elsewhere.In one embodiment, can be obtained by above-mentioned various edition management systems The information of modification record, and then the information of acquisition modification item are taken, so as to execution step 31.In another embodiment, in step Rapid 31, the submission that modification can be recorded with Direct Acquisition developer, so as to obtain modification item.In another embodiment, in step Rapid 31, it is also possible to by the code for directly scanning and contrasting the last revision v1 and current version v2 of program, obtain modification item Information.
For modification item acquired as discussed above, in step 32, the modification item is navigated to into insertion in a program many After the first test probe in individual test probe and before the second test probe.For execution step 32, need to first carry out in advance In a program the step of insertion test probe.In software test field, probe is tested in insertion in a program(It is also called and " beats Stake ")So as to the execution state of monitoring program is a kind of conventional method of testing.Usually, test probe and can detect that test is visited Run time behaviour information at pin position, and export correlated results.In one embodiment, insert in the source code of program Enter multiple test probes.In another embodiment, test probe and be inserted in the intermediate code that the source code based on program is generated In, so as to be tracked to the implementation status of test case in the case where source code is not changed.Due to insertion test probe Method is had been well known in the art, and here no longer describes the details such as the code form of test probe, insertion process.Need explanation , in order that the method that the test probe for being inserted is preferably applied for the embodiment of the present invention, it should be noted that test probe Insertion interval and on position.In fact, insert multiple test probes in a program will be whole equivalent to utilization test probe location Program segment of the individual procedure division for different length, so as to realize the sectional monitoring to program and control.Therefore, appropriate test is visited Pin is spaced the program segment corresponding to suitable length.The too little meeting of test probe separation causes the program segment for dividing too short, and accordingly Ground, testing number of probes excessively can also affect the execution efficiency of program.And test the too big journey that can then cause to divide of probe separation Sequence section is oversize, it is difficult to play the purpose of sectional monitoring and control.Therefore, should according to the features such as the length of program itself, branch come It is determined that test probe insertion interval and on position.In one embodiment, as this step of above insertion test probe A part for bright method 31,32 the step of Fig. 3 before perform.In another embodiment, holding the step of insertion test probe Carried out before the row method of the present invention in advance, so as to provide basis for the execution of the method for the present invention.
In a program already inserted into it is multiple test probes on the basis of, in step 32, the modification item that step 31 is obtained Navigate between insertion two test probes in a program.Especially, before being located at modification item in the two test probes Test probe is referred to as the first test probe, and the test probe after modification item is referred to as the second test probe, in other words, After modification item is positioned in the first test probe, before the second test probe.In one embodiment, in step 32, from repairing The position for changing item starts along program code forward trace, and the first test probe for being run into can be determined that above-mentioned first Test probe;Similarly, travel rearwardly from the position of modification item along program code, first for being run into test probe can be with It is confirmed as above-mentioned second test probe.That is, the first test probe and the second test probe are positioned at modification item respectively Before and after, the nearest two test probes of distance modification item;Do not deposit between the first test probe and the second test probe In other test probes.However, this it is not necessary to.In other embodiments, it is also possible to which other two test probes are made It is that the first test probe and second test probe, as long as including above-mentioned modification in the two program segments defined in test probe .
On the basis of the first test probe and the second test probe is oriented, in step 33, amended program is obtained The execution route related to the modification and the execution route between the described first test probe and the second test probe Corresponding set of constraints.In one embodiment, the first specific program tested between probe and the second test probe is obtained first Section, it is then determined that the corresponding execution route of specific program section.As it was previously stated, insertion test probe in a program can will be whole Individual procedure division is some program segments.Correspondingly, the first test probe and the second test probe are defined comprising modification item Specific program section.For the specific program section, it is possible to use the mode of semiology analysis in prior art, the specific program is obtained The corresponding execution route of section.Or, the complete execution route of whole program in another embodiment, can be obtained first, then The execution route between the first test probe and the second test probe is intercepted out from complete execution route.Such as people in the art Member is known, and execution route defines each brick in program(Node in controlling stream graph)Execution sequence and perform condition (The directed edge of connecting node).By the execution condition between combinator block, it is possible to obtain the constraint corresponding to execution route Group.Thus, in step 33, the execution route related to modification item has been extracted from whole program, and has been obtained and is performed road The corresponding set of constraints in footpath.
It is appreciated that amended program may have multiple differences between the first test probe and the second test probe Execution route.Also, as the program segment that the first test probe and the second test probe are limited is related to modification item, therefore, the Corresponding part of at least a portion execution route between one test probe and the second test probe relative to program last revision Exist and change.Fig. 4 schematically shows controlling stream graph and execution route between two test probes.Specifically, the first test is visited , before node A1, the second test probe is after node A9 for pin.Fig. 4 A illustrate that the program of last revision v1 is surveyed first Sound out the controlling stream graph between pin and the second test probe.According to the flow control figure, the program of last revision is visited in the first test There are two execution routes p1 and p2 between pin and the second test probe, wherein p1 is via directed edge E1, E2, E3, E4, E5, E9 Sequence node A1-A2-A3-A4-A5-A6-A9 is performed, p2 performs sequence node via directed edge E1, E2, E3, E4, E6, E7, E8 A1-A2-A3-A4-A5-A7-A8-A9.It is assumed that it is modified, define amended version, the i.e. program of current version v2.Figure 4B illustrates controlling stream graph of the amended program between the first test probe and the second test probe.As illustrated, compared to Previous version v1, version v2 have modified connection A5 and A6 condition, will directed edge E5 be revised as E5 ', with the addition of connection A7 and The directed edge E10 of A6, and node A8 is revised as into A8 '.Thus, amended program is visited in the first test probe and the second test There are between pin three execution route p1 ', p2 ' and p3, wherein path p1 ' is via directed edge E1, E2, E3, E4, E5 ', E9 is performed Sequence node A1-A2-A3-A4-A5-A6-A9, path p2 ' perform node sequence via directed edge E1, E2, E3, E4, E6, E7, E8 Row A1-A2-A3-A4-A5-A7-A8 '-A9, path p3 perform sequence node via directed edge E1, E2, E3, E4, E6, E10, E9 A1-A2-A3-A4-A5-A7-A6-A9。
In three paths more than, path p1 ' is combined via different directed edges compared with the path p1 of last revision Perform identical sequence node.In this regard, can will have modified execution condition relative to former execution route but perform same node point The execution route that the execution route of sequence is referred to as changed.Therefore, the execution route p1 ' of modification is corresponding with original route p1.Path P2 ' performs similar sequence node via the combination of identical directed edge compared with the path p2 of last revision(Only it is by node A8 is revised as A8 ').Due to the set of constraints corresponding to execution route it is only related to the combination of directed edge, therefore, path p2 ' is actual Upper and original route p2 has identical set of constraints.In this sense, the identical path of condition will be performed referred to as identical Execution route.Accordingly, it is believed that there is no material change relative to original route p2 in path p2 '.And path p3 with it is original Any path is compared, and combines via diverse directed edge, performs diverse sequence node, therefore, it is referred to as new The execution route built.
It is appreciated that Fig. 4 only illustrates holding between the first test probe and the second test probe in an illustrative manner Walking along the street footpath.In other examples, between two test probes, there can be more, more complicated execution routes.Also, for showing The purpose of example, Fig. 4 B also show several typical modifications.In other examples, modification item can be related to above modification type A part, or be related to other modification content.
It is as Fig. 4 is illustrated, by the modification of program, multiple between the first test probe and the second test probe Execution route there occurs change relative to last revision.Then, it is adaptable to which original test case of the program of last revision has can The execution route of amended program, that is, the execution route acquired in step 33 can be no longer desirable for.For this purpose, following The step of 34 and 35, based on original test case, it is determined that be suitable for test case.
Specifically, in step 34, obtain the first original test case of utilization for testing probe output and perform last revision The implementing result of program.As previously mentioned, it can be assumed that the program of last revision v1 has passed through test, test used test Set of uses case is T1.Multiple test cases are included in test use cases T1, the different execution of the program of v1 versions are respectively suitable for Path.Due to being inserted with test probe in a program, in using T1, certain test case t is tested and performs v1 versions During program, the test probe for being inserted can export test probe position implementing result operationally.Therefore, in step 34, by reading the first output for testing probe, can obtain and record the original test case concentrated using former test case Implementing result when performing the program of last revision, at the first test probe.The implementing result for being exported can include, program The value of each variable and parameter, state etc. when the position of the first test probe is run to.As the first test probe is located at The beginning of the execution route acquired in step 33, thus can using such implementing result as above-mentioned execution route initial strip Part, and the corresponding set of constraints of execution route itself is combined, determine the test case that execution route is suitable for, that is, execution step 35。
Fig. 5 illustrates the sub-step for determining the test case being suitable for, the i.e. sub-step of above-mentioned steps 35.As shown in figure 5, first First, in step 351, the implementing result obtained using step 34 further limits the set of constraints of step 33 acquisition, so as to form group The set of constraints of conjunction;In step 352, the set of constraints of combinations thereof is solved;Also, in step 353, asked according to step 352 The result of solution, judges whether original test case is adapted for carrying out path.
Specifically, it is assumed that step 33 obtains execution route p, its corresponding set of constraints is C.On the other hand, in step 34 Obtain when the program of last revision v1 is performed using original test case t implementing result R exported by the first test probe.In Be, in above-mentioned steps 351, using implementing result R as set of constraints C initial condition, it is, further being limited with implementing result R Determine set of constraints C, be consequently formed set of constraints C of combination '.Then, in step 352, with set of constraints solution in prior art similarly, Set of constraints C to combining ' solve.Whether the result of solution can be used for judging above-mentioned original test case t suitable for holding Walking along the street footpath p.
Fig. 6 schematically shows the example of the set of constraints of set of constraints and combination.Specifically, the first survey is shown on the left of Fig. 6 Sound out the corresponding set of constraints of certain execution route p between pin and the second test probe.The set of constraints is related to multiple variables, and limits The relation between variable is determined.In these variables, first is tested the variable defined before probe, such as variable a and b claims For global variable, and it is identified with " global ";The variable that new definition after probe is tested by first, such as variable x, y, x, Referred to as local variable, and be identified with " local ".As global variable was defined before the first test probe, When being run to using test case at the first test probe, global variable can be endowed specific state or value.It is assumed that When v1 version programs are run using original test case t, implementing result R of the first test probe output includes a=5, b=6, such as Shown in Fig. 6.Set of constraints of implementing result R with execution route p is combined, it is possible to the combination shown in obtaining on the right side of Fig. 6 Set of constraints.The set of constraints of the combination is the condition group that assignment is carried out to Partial Variable, it is possible to use method of the prior art is entered Row is solved.It is appreciated that for simplicity and clarity, illustrate only in the set of constraints of Fig. 6 and be related to global variable and local The condition of both variables, eliminates only related to local variable local condition's group.The addition of local condition's group have no effect on The solution of the related condition of global variable.Also, Fig. 6 illustrate only a specific examples.In other embodiments, the first test The implementing result of probe output may relate to more global variables.
For the set of constraints of the combination for example shown in Fig. 6, it is possible to use conventional constraint group method for solving is solved, and base Judge whether original test case is adapted for carrying out path in solving result.Specifically, the principle according to semiology analysis, if group Set of constraints C of conjunction ' there is solution, then illustrate, in the case where original test case t is performed, execution route p remains reachable road Footpath, that is to say, that original test case t is adapted for carrying out path p.Therefore, further, in one embodiment, step 353 Judgement include step 354, in the case where the set of constraints of combinations thereof has solution, by original test case be defined as be applied to hold The test case in walking along the street footpath.On the other hand, judge that step 353 may also include step 355, in the situation of the set of constraints without solution of combination Under, determine that above-mentioned original test case is not suitable for execution route.
In one embodiment, it is determined that be suitable for test case the step of 35 also include step 356, based on it is original test use Example, generates the new test case suitable for above-mentioned execution route.It is uncomfortable that the step 356 is typically adapted for original test case In the case of for execution route, therefore, it is shown as in Figure 5 performing after step 355.However, in one embodiment In, it is also possible to the execution step 356 in the case where original test case is adapted for carrying out path, so as to further be execution route More applicable test cases are provided.
Usually, in order to generate applicable new test case, the set of constraints for combining to still be considered.Due to the pact for combining Beam group is the corresponding set of constraints of implementing result and execution route based on test case, be therefore, it can by changing implementing result And/or set of constraints come cause combine set of constraints have solution, so as to produce new test case.Specifically, in one embodiment, The step of generating new test case 356 include, changes related to local variable parameter setting in set of constraints so that combination Set of constraints has solution;And the parameter setting based on modification generates new test case.Referring to shown in Fig. 6 example description with Upper process.As shown in fig. 6, the set of constraints corresponding to execution route p refers at least to global variable a and b, and local variable x, y, X, and define the relation between these variables.On the other hand, the implementing result of test case t defines global variable a=5, b= 6.In one example, certain local variable, such as x are arranged to read from certain external file, or to be received from user defeated Enter.By the parameter setting for changing the local variable, for example, said external file, or modification user input are changed, can be caused The local variable has different values, so as to meet the condition in the set of constraints of combination(For example meet(local)x< (global)b=6), that is, so that the set of constraints of the combination has solution.In the case, by former test case and the parameter changed Setting combines, it is possible to which acquisition is adapted for carrying out the new test case of path p.
In another embodiment, the step of generating new test case 356 include, changes implementing result so that combination Set of constraints have solution;Data-flow analysis forward trace is started with from the first test probe, it is determined that producing the implementing result of modification Test case, as new test case.Example still with reference to shown in Fig. 6 describes the process of the embodiment below. In figure 6, the implementing result of former test case t defines global variable a=5, b=6.It is assumed that the implementing result is caused shown in Fig. 6 Combination set of constraints without solution.Especially, it is assumed that in the case of b=6, the set of constraints of combination is due to condition therein(local) x<(global)B cannot be met and without solution.For this purpose, implementing result can be changed, taking for global variable b is particularly changed Value so that the set of constraints of combination has solution.For example it is assumed that implementing result is revised as a=5, b=10 can cause the set of constraints of combination There is solution.For the implementing result of such modification, it is possible to use the method for data-flow analysis, from the position of the first test probe forward Backtracking, so as to determine in turn, which type of test case can produce modified as described above holding at the first test probe Row result.In one embodiment, the length of forward trace, such as journey of two test probes of forward trace can be preset Sequence section.Additionally, the method for data-flow analysis in the art it is well known that can be used for follow the trail of each variable sampling process, So that it is determined that corresponding test case.The test case of the implementing result of the generation modification so determined can necessarily meet group Condition in the set of constraints of conjunction, therefore can be used as the new test case suitable for above-mentioned execution route.
Although being presented above the specific example of the test case for producing new, the present invention is not limited to specific example institute The method for illustrating.Those skilled in the art can be modified, be combined to method described above in detail, so as to using more kinds of Embodiment is producing new test case.The embodiment of these modifications and combinations should be also included within present inventive concept.
Additionally, for the step shown in Fig. 5, it will be understood that in different embodiments, optionally only can perform wherein A part of step, or part steps are performed a plurality of times.In one embodiment, for specific execution route p, can be with 351-353 the step of each test case that original test case concentrates performs Fig. 5 is respectively directed to, to judge each test respectively Whether use-case is applied to execution route p.In another embodiment, once it is determined that certain original test case is applied to the execution Path p, just no longer judges other test cases that original test case is concentrated;As long as that is, guaranteeing that test case is concentrated Presence is adapted for carrying out original test case of path p.In one embodiment, it is determined that institute in original test case In the case of having test case not to be suitable for execution route p, ability execution step 356.
According to a kind of embodiment, for different execution routes carries out different process.In one embodiment, step The 33 execution route p for obtaining are identical with certain the original path in the program of last revision.In this regard, can directly by suitable for institute The original test case for stating original path is defined as being adapted for carrying out the test case of path p.For example, the execution road shown in Fig. 4 Footpath p2 ' is identical with the original path p2 in last revision.Therefore, it can original test case is concentrated the test for path p2 Use-case is defined as the test case suitable for p2 '.
In one embodiment, the execution route that step 33 is obtained is corresponding with specific original path of last revision The execution route of modification.For example, in the diagram, execution route p1 ' is the execution route of modification corresponding with original path p1.This When, it can be assumed that concentrate in original test case, it is adaptable to specific original path(Such as p1)Specific original test case More likely suitable for the execution route of the modification(Such as p1 ').Therefore, figure is performed first against specific original test case 5 method.In one embodiment, in the case where specific original test case is inapplicable, execution step 356, based on this Specific original test case produces new test case, and no longer judges other original test cases;In another embodiment, In the case where specific original test case is inapplicable, judge what original test case was concentrated the step of further with Fig. 5 Other original test cases.
In one embodiment, the execution route that step 33 is obtained is newly-built execution route, such as the execution road in Fig. 4 Footpath p3.At this point it is possible to the step of utilizing Fig. 5 351-353, judges whether each original test case is applied to this newly-built one by one Execution route.It is determined that all test cases that original test case is concentrated are not suitable for the situation of the newly-built execution route Under, ability execution step 356 generates new test case.
It is appreciated that for the new test case for generating, test case concentration can be added to, so as to test Set of uses case is updated so as to suitable for the program changed.
In one embodiment, the test case for also no longer needing program after modification is concentrated from original test case and is deleted Remove, so as to update test use cases.Specifically, for specific original test case t, original test case t is judged one by one Suitable for which execution route between the first test probe and the second test probe.It is not suitable in original test case t In the case of arbitrary execution route, original test case t is defined as into unwanted test case, by which from test use cases Delete in T, so as to update test use cases T.
Method by more than, the program for modification provide the test case being suitable for.
Based on same inventive concept, the present invention also provides a kind of device for providing test case.Fig. 7 illustrates basis The block diagram of the device of the offer test case of one embodiment of the invention.As illustrated, for providing test for the program of modification The device of use-case is generally designated as 700.Specifically, device 700 includes:Modification item acquiring unit 701, is configured to obtain to journey The modification item that the last revision of sequence is modified;Positioning unit 702, is configured to for the modification item to navigate to insertion in a program Multiple test probes in first test probe after and second test probe before;Path acquiring unit 703, is configured to obtain Take amended program between the described first test probe and the second test probe the execution route related to the modification with And the corresponding set of constraints of the execution route;Implementing result acquiring unit 704, is configured to obtain the first test probe output The original test case of utilization perform the last revision program implementing result;And determining unit 705, it is configured to The implementing result and the set of constraints, it is determined that suitable for the test case of the execution route.
According to one embodiment, device 700 also includes test probe insertion unit(It is not shown), it is configured in described program It is middle to insert multiple test probes.
According to one embodiment, above-mentioned first test probe and the second test probe are before the modification item respectively Afterwards, the nearest test probe of distance modification item.That is, not depositing between the first test probe and the second test probe In other test probes.
According to one embodiment, above-mentioned determining unit 705 includes(It is not shown):Module is formed, is configured to hold using described Row result further limits the set of constraints to form the set of constraints of combination;Module is solved, the constraint to the combination is configured to Group is solved;Judge module, is configured to according to the result for solving, and judges whether original test case is applied to described holding Walking along the street footpath.
According to one embodiment, above-mentioned judge module is configured to, in the case where the set of constraints of combination has solution, by the original There is test case to be defined as the test case suitable for the execution route.
According to one embodiment, above-mentioned judge module is configured to, in the case where the set of constraints of combination is without solution, it is determined that described Original test case is not suitable for the execution route.
In one embodiment, determining unit 705 also includes generation module, is configured to original test case, Generate the new test case suitable for the execution route.
According to one embodiment, above-mentioned generation module is configured to:Change related to local variable ginseng in the set of constraints Number is arranged so that the set of constraints of combination has solution;And, the parameter setting based on modification generates new test case.
According to one embodiment, above-mentioned generation module is configured to:Change the implementing result so that the set of constraints of combination has Solution;Data-flow analysis forward trace is started with from the first test probe, it is determined that the test case of the implementing result of modification is produced, As new test case.
According to one embodiment, above-mentioned execution route is that the specific original path in the program with last revision is corresponding The execution route of modification, above-mentioned original test case are applied to specific original path.
The concrete executive mode of said units and module corresponding to reference to specific example to each step of Fig. 3 and Fig. 5 Description, will not be described here.It is appreciated that the unit in Fig. 7 is divided with function.Although in the figure 7 by this A little units are shown as being included within device 700, but it is not intended that all of unit must physically reside in it is same On platform or it is included in same software module.In one embodiment, device 700 act as independent device or instrument; In another embodiment, the unit of device 700 is can be incorporated in existing instrument or module.
Using the method and apparatus of the embodiment of the present invention, for the program of modification, can extract from whole program and repair Change introductory path, and be based on original test case, determine suitable for changing introductory path, and then suitable for the program changed Test case.Thus, it is to avoid regenerate the path status space that new test case may face for whole program Blast, improves the efficiency for providing test case.
It will be understood by those skilled in the art that the flow chart and block diagram in accompanying drawing shows multiple enforcements of the invention The system of example, the architectural framework in the cards of method and computer program product, function and operation.At this point, flow chart Or each square frame in block diagram can represent a part for module, program segment or a code, the module, program segment or code A part comprising one or more be used for realize regulation logic functions executable instructions.It should also be noted that in some works In realization for replacement, the function of being marked in square frame can also occur with the order different from being marked in accompanying drawing.For example, two Individual continuous square frame can essentially be performed substantially in parallel, and they can also be performed sometimes in the opposite order, and this is according to involved And function depending on.It is also noted that in block diagram and/or each square frame and block diagram and/or flow chart in flow chart The combination of square frame, can be realized with the function of regulation or the special hardware based system of operation is performed, or can be used The combination of specialized hardware and computer instruction is realizing.
It is described above various embodiments of the present invention, described above is exemplary, and non-exclusive, and It is not limited to disclosed each embodiment.In the case of the scope and spirit without departing from illustrated each embodiment, for this skill For the those of ordinary skill in art field, many modifications and changes will be apparent from.The selection of term used herein, purport Best explaining principle, practical application or the technological improvement to the technology in market of each embodiment, or lead this technology Other those of ordinary skill in domain are understood that each embodiment disclosed herein.

Claims (18)

1. a kind of method that program for modification provides test case, including:
Obtain the modification item that the last revision to program is modified;
Survey with second after the modification item to be navigated to the first test probe in insertion multiple test probes in a program Before souning out pin;
Obtain related to the modification execution between the described first test probe and the second test probe of amended program Path and the corresponding set of constraints of the execution route;
Obtain the described first program for testing utilization original test case execution last revision that probe is exported performs knot Really;And
Based on the implementing result and the set of constraints, it is determined that suitable for the test case of the execution route, wherein determining suitable Test case for the execution route includes:
Further limit the set of constraints to form the set of constraints of combination using the implementing result;
The set of constraints of the combination is solved;
According to the result for solving, judge whether original test case is applied to the execution route.
2. method according to claim 1, also includes, multiple test probes are inserted in described program.
3. method according to claim 1, wherein the first test probe and the second test probe are positioned at institute respectively Before and after stating modification item, the nearest test probe of distance modification item.
4. method according to claim 1, wherein the judgement includes there is the situation of solution in the set of constraints of the combination Under, original test case is defined as into the test case suitable for the execution route.
5. method according to claim 1, wherein the judgement includes, in the situation of the set of constraints without solution of the combination Under, determine that original test case is not suitable for the execution route.
6. method according to claim 1 or 5, wherein determine that the test case suitable for the execution route also includes, Based on original test case, the new test case suitable for the execution route is generated.
7. method according to claim 6, wherein the new test case generated suitable for the execution route includes:Repair Change related to local variable parameter setting in the set of constraints so that the set of constraints of combination has solution;And, the ginseng based on modification Number is arranged and generates new test case.
8. method according to claim 6, wherein the new test case generated suitable for the execution route includes:Repair Change the implementing result so that the set of constraints of combination has solution;Data-flow analysis forward trace is started with from the first test probe, It is determined that the test case of the implementing result of modification is produced, as new test case.
9. method according to claim 1, wherein the execution route is specific in the program with the last revision The execution route of the corresponding modification in original path, original test case are applied to specific original path.
10. a kind of program for modification provides the device of test case, including:
Modification item acquiring unit, is configured to obtain the modification item that the last revision to program is modified;
Positioning unit, the first test for being configured to navigate to the modification item in insertion multiple test probes in a program are visited After pin and before the second test probe;
Path acquiring unit, be configured to obtain amended program between the described first test probe and the second test probe with The related execution route of the modification and the corresponding set of constraints of the execution route;
Implementing result acquiring unit, the original test case execution of utilization for being configured to obtain the first test probe output are described The implementing result of the program of last revision;And
Determining unit, is configured to the implementing result and the set of constraints, it is determined that suitable for the test of the execution route Use-case,
Wherein described determining unit includes:
Module is formed, is configured to further limit the set of constraints to form the set of constraints of combination using the implementing result;
Module is solved, is configured to solve the set of constraints of the combination;
Judge module, is configured to according to the result for solving, and judges whether original test case is applied to the execution route.
11. devices according to claim 10, also including test probe insertion unit, are configured to insert in described program Multiple test probes.
12. devices according to claim 10, wherein the first test probe and the second test probe are located at respectively Before and after the modification item, the nearest test probe of distance modification item.
13. devices according to claim 10, wherein the judge module is configured to, have solution in the set of constraints of the combination In the case of, original test case is defined as into the test case suitable for the execution route.
14. devices according to claim 10, wherein the judge module is configured to, the combination set of constraints without solution In the case of, determine that original test case is not suitable for the execution route.
15. devices according to claim 10 or 14, wherein the determining unit also includes generation module, are configured to Original test case, generates the new test case suitable for the execution route.
16. devices according to claim 15, wherein the generation module is configured to:Change in the set of constraints with local The related parameter setting of variable so that the set of constraints of combination has solution;And, the parameter setting based on modification generates new test and uses Example.
17. devices according to claim 15, wherein the generation module is configured to:Change the implementing result so that The set of constraints of combination has solution;Data-flow analysis forward trace is started with from the first test probe, it is determined that producing the execution of modification As a result test case, as new test case.
18. devices according to claim 10, wherein the execution route is the spy in the program with the last revision The execution route of the corresponding modification in fixed original path, original test case are applied to specific original path.
CN201310257810.0A 2013-06-26 2013-06-26 Method and device for providing test case Expired - Fee Related CN104252408B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201310257810.0A CN104252408B (en) 2013-06-26 2013-06-26 Method and device for providing test case
US14/298,239 US9811446B2 (en) 2013-06-26 2014-06-06 Method and apparatus for providing test cases

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310257810.0A CN104252408B (en) 2013-06-26 2013-06-26 Method and device for providing test case

Publications (2)

Publication Number Publication Date
CN104252408A CN104252408A (en) 2014-12-31
CN104252408B true CN104252408B (en) 2017-04-12

Family

ID=52117008

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310257810.0A Expired - Fee Related CN104252408B (en) 2013-06-26 2013-06-26 Method and device for providing test case

Country Status (2)

Country Link
US (1) US9811446B2 (en)
CN (1) CN104252408B (en)

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9367433B2 (en) * 2013-02-13 2016-06-14 International Business Machines Corporation Generating input values for a test dataset from a datastore based on semantic annotations
JP2015133031A (en) * 2014-01-15 2015-07-23 株式会社日立製作所 Program analyzer and program analysis method
US10007594B2 (en) 2015-07-21 2018-06-26 International Business Machines Corporation Proactive cognitive analysis for inferring test case dependencies
US10282283B2 (en) * 2016-01-28 2019-05-07 Accenture Global Solutions Limited Orchestrating and providing a regression test
US20180067729A1 (en) * 2016-09-06 2018-03-08 Jacob Harris Apkon Techniques for modifying execution of a computer program based on user input received through a graphical user interface
US11663110B2 (en) * 2016-10-31 2023-05-30 International Business Machines Corporation Analysis to check web API code usage and specification
US10261893B2 (en) * 2016-12-05 2019-04-16 Salesforce.Com, Inc. Implicit coordination of deployment and regression testing across data centers and system clusters
CN108255699A (en) * 2017-03-27 2018-07-06 平安科技(深圳)有限公司 regression testing method and device
US10430318B1 (en) * 2017-07-11 2019-10-01 Juniper Networks, Inc Systems and methods for efficiently performing regression testing on software updates
US10628286B1 (en) * 2018-10-18 2020-04-21 Denso International America, Inc. Systems and methods for dynamically identifying program control flow and instrumenting source code
CN109511012B (en) * 2018-11-30 2021-06-08 深圳创维数字技术有限公司 Set top box upgrade test method, device, electronic equipment and medium
CN109992507B (en) * 2019-03-22 2022-06-24 北京信息科技大学 Program fuzzy test method and device based on simulation execution
US11205041B2 (en) 2019-08-15 2021-12-21 Anil Kumar Web element rediscovery system and method
US10922216B1 (en) * 2019-10-15 2021-02-16 Oracle International Corporation Intelligent automation test workflow
CN112905443A (en) * 2019-12-04 2021-06-04 阿里巴巴集团控股有限公司 Test case generation method, device and storage medium
CN113094252B (en) * 2019-12-23 2023-09-29 腾讯科技(深圳)有限公司 Test case generation method and device, computer equipment and storage medium
CN111723007B (en) * 2020-05-29 2022-06-14 苏州浪潮智能科技有限公司 Test case merging method, system, equipment and medium
CN112416800B (en) * 2020-12-03 2023-09-15 网易(杭州)网络有限公司 Intelligent contract testing method, device, equipment and storage medium
CN115658551B (en) * 2022-12-26 2023-03-21 海马云(天津)信息技术有限公司 Code testing method, storage medium, electronic device and apparatus
CN117009230B (en) * 2023-07-25 2024-04-16 北京泰策科技有限公司 Accurate test method and system based on code coverage rate evaluation

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831060A (en) * 2012-08-24 2012-12-19 东南大学 Modification influence analysis based regression test case updating method of part software
CN102915271A (en) * 2012-10-31 2013-02-06 北京邮电大学 Method for optimizing unit regression test case set based on control flow diagram
CN103136103A (en) * 2013-03-26 2013-06-05 哈尔滨工业大学 Test case reduction method for error locating demand

Family Cites Families (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5761408A (en) 1996-01-16 1998-06-02 Parasoft Corporation Method and system for generating a computer program test suite using dynamic symbolic execution
US6314558B1 (en) * 1996-08-27 2001-11-06 Compuware Corporation Byte code instrumentation
US6721941B1 (en) * 1996-08-27 2004-04-13 Compuware Corporation Collection of timing and coverage data through a debugging interface
US5966541A (en) * 1997-12-04 1999-10-12 Incert Software Corporation Test protection, and repair through binary-code augmentation
US20020184615A1 (en) * 2001-04-25 2002-12-05 Sumner William Earl System and method for selectively and automatically modifying the source code of a computer program
US7047519B2 (en) * 2001-09-26 2006-05-16 International Business Machines Corporation Dynamic setting of breakpoint count attributes
US20030093716A1 (en) * 2001-11-13 2003-05-15 International Business Machines Corporation Method and apparatus for collecting persistent coverage data across software versions
US7398519B2 (en) * 2001-11-30 2008-07-08 International Business Machines Corporation Inheritance breakpoints for use in debugging object-oriented computer programs
US7484205B2 (en) * 2002-12-12 2009-01-27 Microsoft Corporation Preprocessor-based source code instrumentation
US20040154001A1 (en) * 2003-02-05 2004-08-05 Haghighat Mohammad R. Profile-guided regression testing
US7272826B2 (en) * 2003-05-08 2007-09-18 International Business Machines Corporation Hierarchical breakpoint groups
US20050223361A1 (en) * 2004-04-01 2005-10-06 Belbute John L Software testing based on changes in execution paths
US8209667B2 (en) * 2006-01-11 2012-06-26 International Business Machines Corporation Software verification using hybrid explicit and symbolic model checking
US7873944B2 (en) * 2006-02-22 2011-01-18 International Business Machines Corporation System and method for maintaining and testing a software application
WO2008074529A2 (en) 2006-12-21 2008-06-26 International Business Machines Corporation Method, system and computer program for performing regression tests
US8214807B2 (en) * 2007-01-10 2012-07-03 International Business Machines Corporation Code path tracking
JP2009157456A (en) * 2007-12-25 2009-07-16 Toshiba Corp Program verification device, program verification method and verification program
US8065255B2 (en) * 2008-11-13 2011-11-22 Oracle International Corporation Management of sub-problems in a dynamic constraint satisfaction problem solver
CN102110048B (en) * 2009-12-28 2014-07-09 国际商业机器公司 Regression testing selection method and device for frame-based application program
US20110214106A1 (en) * 2010-02-26 2011-09-01 International Business Machines Corporation Indicating the effect of program modifications on program performance in an integrated development environment
US8479171B2 (en) * 2010-05-24 2013-07-02 Fujitsu Limited Generating test sets using intelligent variable selection and test set compaction
US8943487B2 (en) 2011-01-20 2015-01-27 Fujitsu Limited Optimizing libraries for validating C++ programs using symbolic execution
US20120210298A1 (en) * 2011-02-10 2012-08-16 International Business Machines Corporation Locating changes in source code
US9477577B2 (en) * 2011-07-20 2016-10-25 Freescale Semiconductor, Inc. Method and apparatus for enabling an executed control flow path through computer program code to be determined
CN102750153B (en) 2012-06-29 2015-11-25 南京大学 A kind of regression test case collection construction method based on programing change

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831060A (en) * 2012-08-24 2012-12-19 东南大学 Modification influence analysis based regression test case updating method of part software
CN102915271A (en) * 2012-10-31 2013-02-06 北京邮电大学 Method for optimizing unit regression test case set based on control flow diagram
CN103136103A (en) * 2013-03-26 2013-06-05 哈尔滨工业大学 Test case reduction method for error locating demand

Also Published As

Publication number Publication date
CN104252408A (en) 2014-12-31
US20150007146A1 (en) 2015-01-01
US9811446B2 (en) 2017-11-07

Similar Documents

Publication Publication Date Title
CN104252408B (en) Method and device for providing test case
US9916230B1 (en) White box testing
CN106547678B (en) Method and apparatus for white-box testing
CN103678110B (en) The method and apparatus of amendment relevant information is provided
CN105022691B (en) A kind of increasingly automated method for testing software based on uml diagram
KR101894925B1 (en) Flow analysis instrumentation
JP2005302028A (en) Method and system for probe optimization for instrumenting program
US9594543B2 (en) Activity diagram model-based system behavior simulation method
CN103294594A (en) Test based static analysis misinformation eliminating method
US8276122B2 (en) Method to speed up creation of JUnit test cases
US10990510B2 (en) Associating attribute seeds of regression test cases with breakpoint value-based fingerprints
US20170039121A1 (en) Test self-verification with integrated transparent self-diagnose
CN103744782A (en) Method and device for acquiring program execution sequence
CN103218297B (en) The screening technique and device of test data
CN102968515B (en) For calculating the method and apparatus of the checking coverage rate of integrated circuit model
JP2008204405A (en) Software regression test system, regression test program and regression test method
CN104809067B (en) Towards the method for generating test case and device of equality constraint
CN110399284A (en) A kind of test case writes and executes method and device
Choi et al. Automatic feasible transition path generation from UML state chart diagrams using grouping genetic algorithms
US20180239603A1 (en) Software Development Estimating Based on Functional Areas
US20160155078A1 (en) Method for determining condition of category division of key performance indicator, and computer and computer program therefor
CN115658452A (en) Buried point checking method, buried point checking device, readable storage medium and electronic equipment
KR100990091B1 (en) Method and apparatus for the requirement management
US20130110489A1 (en) Automatic designation of equivalent variavle values
Ahrari et al. PyDDRBG: a Python framework for benchmarking and evaluating static and dynamic multimodal optimization methods

Legal Events

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

Granted publication date: 20170412