CN107818051A - Test case jump analysis method and device and server - Google Patents

Test case jump analysis method and device and server Download PDF

Info

Publication number
CN107818051A
CN107818051A CN201711203093.8A CN201711203093A CN107818051A CN 107818051 A CN107818051 A CN 107818051A CN 201711203093 A CN201711203093 A CN 201711203093A CN 107818051 A CN107818051 A CN 107818051A
Authority
CN
China
Prior art keywords
test
test case
parameter
value
operation result
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
CN201711203093.8A
Other languages
Chinese (zh)
Other versions
CN107818051B (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 Electric Vehicle Co Ltd
Original Assignee
Beijing Electric Vehicle Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Electric Vehicle Co Ltd filed Critical Beijing Electric Vehicle Co Ltd
Priority to CN201711203093.8A priority Critical patent/CN107818051B/en
Publication of CN107818051A publication Critical patent/CN107818051A/en
Application granted granted Critical
Publication of CN107818051B publication Critical patent/CN107818051B/en
Active 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/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Tests Of Electronic Circuits (AREA)

Abstract

The invention provides a jump analysis method, a device and a server of a test case, wherein the jump analysis method of the test case comprises the following steps: determining a test parameter form of a first test case to be detected, wherein the first test case is used for jumping the first state to the second state when being executed, and the test parameter form comprises a plurality of test parameters and values of corresponding test parameters; according to the test parameter form, sequentially carrying out logical operation on the plurality of second test cases to obtain an operation result; the second test case is used for jumping the first state to a third state when being executed; and determining the expected jump result of the first state according to the operation result. According to the jump analysis method, the jump analysis device and the server of the test case, the test case under a plurality of state points is subjected to logic operation, and the expected result of the state point is quickly and accurately obtained according to the logic operation result, so that the labor amount of workers is reduced, the working efficiency is improved, and meanwhile, the accuracy of judgment of the expected result is ensured.

Description

The branch instruction analysis method, apparatus and server of a kind of test case
Technical field
The present invention relates to software testing technology field, the branch instruction analysis method, apparatus of more particularly to a kind of test case and Server.
Background technology
With growing stronger day by day for software industry, test software is also evolving, and the importance of software test is unquestionable, but Because development teams are flowings, developer is also influenceed by mood etc., to ensure the stabilization of software testing quality, it is necessary to Use test case.
But in actually test case is write, there are multiple state point inputs for redirecting branch to make some jump at any one Transfer after moving invalid condition, its expected results, which is likely to be, is maintained at current state, it is also possible to migrates to other states. Judgement for the expected results often relies on manpower, and when the state is when redirecting branch and having more, the analysis process can add It is long, impact analysis efficiency, similar expected results may be caused to analyze and frequently occurred in the test of some controller.Therefore such as What fast and accurately solves such situation, and the automation for realizing the process is a great problem for being badly in need of solving.
The content of the invention
Technical problems to be solved of the embodiment of the present invention are to provide the branch instruction analysis method, apparatus and clothes of a kind of test case Business device, to realize in test case is write, it is pre- can fast and accurately to obtain redirecting for a state point with multiple-limb Phase result, the amount of labour of staff is reduced, improve operating efficiency.
In order to solve the above technical problems, the embodiments of the invention provide a kind of branch instruction analysis method of test case, including:
The test parameter list of the first test case to be detected is determined, wherein being used to make the when the first test case performs One state transition to the second state, test parameter list include the value of multiple test parameters and corresponding test parameter;
According to test parameter list, logical operation is carried out to multiple second test cases successively, obtains operation result, wherein It is used to first state is jumped to the third state when second test case performs;
According to operation result, determine first state redirects expected results.
Specifically, it is determined that the first test case to be detected test parameter list the step of in:
The value of included multiple test parameters is used to make for the first test case in identified test parameter list First state uses other numerical value outside numerical value when jumping to the second state.
Preferably, in identified test parameter list, the value of each test parameter is fixed value.
Preferably, according to test parameter list, logical operation is carried out to multiple second test cases successively, obtains computing knot The step of fruit, includes:
If the second test parameter in the second test case and first in the test parameter list of the first test case is surveyed Examination parameter is identical, then the value of the second test parameter is the value of the first test parameter;
If any test of test parameter list in the second test parameter and the first test case in the second test case Parameter differs, then determines the second test according to the parameter type for presetting the corresponding test parameter in the second test case The value of parameter;
According to the value of every one second test parameter in the second test case, logical operation is carried out to the second test case, Obtain operation result.
Specifically, the second survey is determined according to the parameter type for presetting the corresponding test parameter in the second test case The step of value for trying parameter, includes:
If the parameter type for presetting the corresponding test parameter of the second test parameter in the second test case is constant Type, it is determined that the value of the second test parameter is predetermined fixed value;
If the parameter type for presetting the corresponding test parameter of the second test parameter in the second test case is closed loop Type, it is determined that the value of the second test parameter includes the second number beyond the first numerical value and preset range within preset range Value.
Further, if presetting the parameter class of the corresponding test parameter of the second test parameter in the second test case When type is closed-loop type, according to the value of every one second test parameter in the second test case, the second test case is patrolled The step of collecting computing includes:
When taking the value of the second test parameter to be the first numerical value, the first operation result of the second test case is obtained;
When taking the value of the second test parameter to be second value, the second operation result of the second test case is obtained;
First operation result and the second operation result are compared, obtain the operation result of the second test case.
Specifically, the first operation result and the second operation result are compared, obtain the computing of the second test case As a result the step of, includes:
When the first operation result is identical with the second operation result, then the operation result for taking the second test case is the first fortune Calculate result;
When the first operation result and the second operation result difference, then by the value of the second test parameter of closed-loop type more Third value is changed to, and logical operation is carried out to the second test case, obtains operation result.
Alternatively, third value is the fixed value within the preset range of the second test case or beyond preset range.
Preferably, when when the first operation result and the second operation result difference, then the second test of closed-loop type is joined Several values is changed to third value, and carries out logical operation to the second test case, after the step of obtaining operation result, also Including:
In the test parameter list of the first test case, add closed-loop type the second test parameter parameter type with And third value.
Specifically, according to operation result, including the step of redirecting expected results for first state is determined:
When the operation result of multiple second test cases is fictitious time, it is determined that first state redirects expected results as original State;
When it is true that the operation result of multiple second test cases, which only has one, it is determined that first state redirects expected knot Fruit is that operation result is the corresponding third state after genuine second test case performs;
When the operation result of multiple second test cases have it is multiple be true when, then according to priority judge explanation determine first The expected results that redirect of state are that operation result is in genuine second test case, and the second test case of the first priority performs The corresponding third state afterwards.
Embodiments of the invention additionally provide a kind of branch instruction analysis device of test case, including:
First determining module, for determining the test parameter list of the first test case to be detected, wherein the first test It is used to make first state jump to the second state when use-case performs, test parameter list includes multiple test parameters and corresponding The value of test parameter;
Processing module, for according to test parameter list, carrying out logical operation to multiple second test cases successively, obtaining Operation result, wherein being used to make first state jump to the third state when the second test case performs;
Second determining module, for according to operation result, determine first state to redirect expected results.
Specifically, processing module includes:
First value submodule, if for the second test parameter in the second test case and the test of the first test case The first test parameter in parameter form is identical, then the value of the second test parameter is the value of the first test parameter;
Second value submodule, if for the second test parameter in the second test case with being tested in the first test case Any test parameter of parameter form differs, then the ginseng according to the corresponding test parameter preset in the second test case Several classes of types determine the value of the second test parameter;
First processing submodule, for the value according to every one second test parameter in the second test case, is surveyed to second Example on probation carries out logical operation, obtains operation result.
Further, the second value submodule includes:
First value unit, if the corresponding test parameter for presetting the second test parameter in the second test case Parameter type be constant type, it is determined that the value of the second test parameter is predetermined fixed value;
Second value unit, if the corresponding test parameter for presetting the second test parameter in the second test case Parameter type be closed-loop type, it is determined that the value of the second test parameter includes the first numerical value within preset range and default Second value beyond scope.
Specifically, the first processing submodule includes:
First processing units, for when taking the value of the second test parameter to be the first numerical value, obtaining the second test case First operation result;
Second processing unit, for when taking the value of the second test parameter to be second value, obtaining the second test case Second operation result;
3rd processing unit, for the first operation result and the second operation result to be compared, obtain the second test The operation result of use-case.
Specifically, the 3rd processing unit includes:
First processing subelement, for when the first operation result is identical with the second operation result, then taking the second test to use The operation result of example is the first operation result;
Second processing subelement, for when the first operation result and the second operation result difference, then by closed-loop type The value of second test parameter is changed to third value, and carries out logical operation to the second test case, obtains operation result.
Preferably, the 3rd processing unit also includes:
First function subelement, in the test parameter list of the first test case, adding the second of closed-loop type The parameter type and third value of test parameter.
Preferably, the second determining module includes:
First determination sub-module, for being fictitious time when the operation result of multiple second test cases, it is determined that the first shape The expected results that redirect of state are original state;
Second determination sub-module, for when it is true that the operation result of multiple second test cases, which only has one, it is determined that The expected results that redirect of first state are that operation result is the corresponding third state after genuine second test case performs;
3rd determination sub-module, for when the operation result of multiple second test cases have it is multiple be true when, then according to excellent First level judges that explanation determines that the expected results that redirect of first state for operation result are that first is preferential in genuine second test case The corresponding third state after second test case of level performs.
Embodiments of the invention additionally provide a kind of computer-readable recording medium, are stored on computer-readable recording medium There is computer program, the branch instruction analysis method of test case as described above is realized when computer program is executed by processor.
Embodiments of the invention additionally provide a kind of server, including processor, memory and storage are on a memory simultaneously The computer program that can be run on a processor, the jump of test case as described above is realized during computing device computer program Turn analysis method.
Compared with prior art, the branch instruction analysis method, apparatus and clothes of a kind of test case provided in an embodiment of the present invention Business device, at least has the advantages that:
The present invention is by determining that the parameter of a next test case of state point with multiple-limb is entered to other test cases Row logical operation, the logic operation result of other test cases is obtained, and be fast and accurately somebody's turn to do according to logic operation result The expected results of state point, in the process, reduce the amount of labour of staff, improve operating efficiency, meanwhile, avoid Staff reduces the accuracy judged expected results because of the influence of mood or other extraneous factors.
Brief description of the drawings
Fig. 1 is one of branch instruction analysis method flow schematic diagram of test case of the present invention;
Fig. 2 is the two of the branch instruction analysis method flow schematic diagram of the test case of the present invention;
Fig. 3 is the three of the branch instruction analysis method flow schematic diagram of the test case of the present invention;
Fig. 4 is the four of the branch instruction analysis method flow schematic diagram of the test case of the present invention;
Fig. 5 is the five of the branch instruction analysis method flow schematic diagram of the test case of the present invention;
Fig. 6 is the six of the branch instruction analysis method flow schematic diagram of the test case of the present invention;
Fig. 7 is one of branch instruction analysis apparatus structure schematic diagram of test case of the present invention;
Fig. 8 is the two of the branch instruction analysis apparatus structure schematic diagram of the test case of the present invention;
Fig. 9 is the three of the branch instruction analysis apparatus structure schematic diagram of the test case of the present invention;
Figure 10 is the four of the branch instruction analysis apparatus structure schematic diagram of the test case of the present invention;
Figure 11 is the five of the branch instruction analysis apparatus structure schematic diagram of the test case of the present invention;
Figure 12 is the six of the branch instruction analysis apparatus structure schematic diagram of the test case of the present invention.
Embodiment
To make the technical problem to be solved in the present invention, technical scheme and advantage clearer, below in conjunction with accompanying drawing and tool Body embodiment is described in detail.In the following description, there is provided such as specific configuration and the specific detail of component are only In order to help comprehensive understanding embodiments of the invention.Therefore, it will be apparent to those skilled in the art that can be to reality described herein Example is applied to make various changes and modifications without departing from scope and spirit of the present invention.In addition, for clarity and brevity, eliminate pair The description of known function and construction.
In various embodiments of the present invention, it should be appreciated that the size of the sequence number of following each processes is not meant to perform suitable The priority of sequence, the execution sequence of each process should be determined with its function and internal logic, without the implementation of the reply embodiment of the present invention Process forms any restriction.
It should be understood that the terms "and/or", only a kind of incidence relation for describing affiliated partner, expression can deposit In three kinds of relations, for example, A and/or B, can be represented:Individualism A, while A and B be present, these three situations of individualism B. In addition, character "/" herein, it is a kind of relation of "or" to typically represent forward-backward correlation object.
In embodiment provided herein, it should be appreciated that " B " corresponding with A represents that B is associated with A, can be with according to A Determine B.It is also to be understood that determine that B is not meant to determine B only according to A according to A, can also be according to A and/or other information Determine B.
Referring to Fig. 1, a preferred embodiment of the present invention provides a kind of branch instruction analysis method of test case, including:
Step 1001, the test parameter list of the first test case to be detected is determined, wherein the first test case performs When be used for first state is jumped to the second state, test parameter list includes multiple test parameters and corresponding test parameter Value;
Step 1002, according to test parameter list, logical operation is carried out to multiple second test cases successively, obtains computing As a result, wherein being used to make first state jump to the third state when the second test case performs;
Step 1003, according to operation result, determine first state redirects expected results.
In the present invention, by determining the parameter of next first test case of a state point, and then according to first test The parameter of use-case carries out logical operation to multiple second test cases successively, i.e., to other tests in addition to the first test case Use-case carries out logical operation successively, obtains operation result;According to the situation of the operation result of multiple second test cases according to one Fixed judging rules judge and determine the expected results of the state point.In the process, it is only necessary to which staff's input first is surveyed The parameter of example on probation, you can automatic running obtains the expected results of state point, reduces the amount of labour of staff, avoids work Making personnel reduces the accuracy judged expected results because of the influence of mood or other extraneous factors, makes the expected knot of state point The determination of fruit is i.e. quick and accurate.
Specifically, it is determined that the first test case to be detected test parameter list the step of in:
The value of included multiple test parameters is used to make for the first test case in identified test parameter list First state uses other numerical value outside numerical value when jumping to the second state.
In the present invention, the value of multiple test parameters included in identified test parameter list is the first test Use-case is used to make first state use other numerical value outside numerical value when jumping to the second state, i.e. the first test case uses should During parameter in test parameter list, it is impossible to first state is jumped to the second state, be easy to determine when first state can not jump In the case of going to the second state, the expection of first state redirects result.
Preferably, in identified test parameter list, the value of each test parameter is fixed value.By each test The value of parameter takes fixed value, can reduce staff when being determined test parameter work shared time and Error rate, while cause remaining second test case in addition to the first test case carrying out logic according to test parameter list During computing, the numerical value of test parameter in the second test case can more rapid, be accurately determined, improves operating efficiency.
Referring to Fig. 2, it is preferable that according to test parameter list, carry out logical operation to multiple second test cases successively, obtain The step of obtaining operation result includes:
Step 2001, if the second test parameter in the second test case and in the test parameter list of the first test case The first test parameter it is identical, then the value of the second test parameter be the first test parameter value;
Step 2002, if test parameter list in the second test parameter and the first test case in the second test case Any test parameter differs, then the parameter type according to the corresponding test parameter preset in the second test case determines The value of second test parameter;
Step 2003, the value according to every one second test parameter in the second test case, the second test case is carried out Logical operation, obtain operation result.
When any second test parameter in the second test case carries out value, if the second test parameter is with being determined Test parameter list in the first test parameter it is identical when, then value be the first test parameter value, make sampling process Become simple, especially when test parameter has polytype;If the second test parameter and identified test parameter list In any first test parameter when differing, then the ginseng according to the corresponding test parameter preset in the second test case Several classes of types determine the value of the second test parameter, make the value of every one second test parameter all representative, ensure computing knot The accuracy of fruit and the accuracy that state point expected results are judged, wherein relative in the second test case set in advance Answer test parameter parameter type and value without departing from importing test environment information scope.
Referring to Fig. 3, specifically, the parameter type according to the corresponding test parameter preset in the second test case is true The step of value of fixed second test parameter, includes:
Step 3001, if presetting the parameter class of the corresponding test parameter of the second test parameter in the second test case Type is constant type, it is determined that the value of the second test parameter is predetermined fixed value;
Step 3002, if presetting the parameter class of the corresponding test parameter of the second test parameter in the second test case Type is closed-loop type, it is determined that the value of the second test parameter is included beyond the first numerical value and preset range within preset range Second value.
In the present invention, the value of the second test parameter of constant type is predetermined fixed value, ensures the accurate of its value Property;The value of second test parameter of closed-loop type is included within the span of second test parameter and in the second test The second value beyond the first numerical value and preset range within the preset range of use-case, make the second test parameter of closed-loop type Standard more representative when carrying out logical operation, ensureing the accuracy of operation result and state point expected results are judged True property.
Referring to Fig. 4, further, if presetting the corresponding test parameter of the second test parameter in the second test case Parameter type when being closed-loop type, according to the value of every one second test parameter in the second test case, the second test is used The step of example progress logical operation, includes:
Step 4001, when taking the value of the second test parameter to be the first numerical value, the first computing of the second test case is obtained As a result;
Step 4002, when taking the value of the second test parameter to be second value, the second computing of the second test case is obtained As a result;
Step 4003, the first operation result and the second operation result are compared, obtain the fortune of the second test case Calculate result.
In the present invention, the second test parameter is taken respectively and logical operation, and root is carried out when the first numerical value and second value The operation result obtained according to it determines the final operation result of second test case, makes the operation result of the second test case more It is representative.
Referring to Fig. 5, specifically, the first operation result and the second operation result are compared, obtain the second test use The step of operation result of example, includes:
Step 5001, when the first operation result is identical with the second operation result, then the computing knot of the second test case is taken Fruit is the first operation result;
Step 5002, when the first operation result and the second operation result difference, then the second test of closed-loop type is joined Several values is changed to third value, and carries out logical operation to the second test case, obtains operation result.
In the present invention, when the first operation result with the second operation result phase simultaneously as the first operation result and second Operation result is identical, no matter choosing the operation result of the first operation result or the second operation result as the second test case The judgement of the finally expected results to state point is not influenceed;When the first operation result and the second operation result differ, in order to The operation result of the second test case determined is obtained, it is necessary to limit the value of the second test parameter of the closed-loop type It is fixed, i.e., the value of the second test parameter is changed to third value, to ensure finally to judge the expected results of state point Be smoothed out.
Alternatively, third value is the fixed value within the preset range of the second test case or beyond preset range.
Third value is a fixed value, is easy to the logical operation of the second test case;Third value is used positioned at the second test Within the preset range of example or beyond preset range, make third value more representative.
Preferably, when when the first operation result and the second operation result difference, then the second test of closed-loop type is joined Several values is changed to third value, and carries out logical operation to the second test case, after the step of obtaining operation result, also Including:
In the test parameter list of the first test case, add closed-loop type the second test parameter parameter type with And third value.
In the present invention, the value of the second test parameter of a closed-loop type is the first numerical value in one second test case During with second value, its operation result is different, then the value of the second test parameter of closed-loop type is changed into third value, and In the test parameter list of the first test case, the parameter type and the 3rd number of the second test parameter of closed-loop type are added Value so that after second test case carry out logical operation remaining second test case, if when carrying out computing in the presence of Second test parameter of the closed-loop type, then the second test parameter phase of the closed-loop type is directly chosen from test parameter list Corresponding third value, avoid and multiple computing is carried out to determine second survey to the second test parameter of the closed-loop type again The operation result of sequence is tried, improves operating efficiency.
Referring to Fig. 6, specifically, according to operation result, including the step of redirecting expected results for first state is determined:
Step 6001, when the operation result of multiple second test cases is fictitious time, it is determined that redirecting for first state is pre- Phase result is original state;
Step 6002, when it is true that the operation result of multiple second test cases, which only has one, it is determined that first state It is that operation result is the corresponding third state after genuine second test case performs to redirect expected results;
Step 6003, when the operation result of multiple second test cases have it is multiple be true when, then according to priority judge say The expected results that redirect for clearly determining first state are that operation result is in genuine second test case, and the second of the first priority surveys The corresponding third state after example on probation performs.
In the present invention, i.e., should under test case list when the operation result of multiple second test cases is fictitious time State point can not keep it in original state by performing any second test case redirecting come completion status;
When it is true that the operation result of multiple second test cases, which only has one, i.e., the state point under test case list Can be by performing one second test case redirecting come completion status, so it is true that the expected results of the state point, which are operation result, The second test case perform after the corresponding third state;
When the operation result of multiple second test cases have it is multiple be true when, i.e., the state point energy under test case list Different states is jumped to by performing multiple second test cases, now needs to judge to say according to the priority pre-set It is bright, it is that genuine second test case is ranked up to multiple operation results, the second test case for choosing the first priority performs Expected results of the third state afterwards as the state point;
If the operation result of the second test case have it is multiple be true when, can't detect the priority that pre-sets and judge to say It is bright, then show demand condition deficiency, the expected results of the state point can not be determined.
By judging the operation result of multiple second test cases, the expection of the state point can be clear that As a result, reduce the amount of labour that staff carries out manual analysis, improve operating efficiency, while also requirement documents are examined Look into, judge demand deficiency or design defect.
Referring to Fig. 7, another preferred embodiments of the invention additionally provide a kind of branch instruction analysis device of test case, bag Include:
First determining module, for determining the test parameter list of the first test case to be detected, wherein the first test It is used to make first state jump to the second state when use-case performs, test parameter list includes multiple test parameters and corresponding The value of test parameter;
Processing module, for according to test parameter list, carrying out logical operation to multiple second test cases successively, obtaining Operation result, wherein being used to make first state jump to the third state when the second test case performs;
Second determining module, for according to operation result, determine first state to redirect expected results.
Referring to Fig. 8, specifically, processing module includes:
First value submodule, if for the second test parameter in the second test case and the test of the first test case The first test parameter in parameter form is identical, then the value of the second test parameter is the value of the first test parameter;
Second value submodule, if for the second test parameter in the second test case with being tested in the first test case Any test parameter of parameter form differs, then the ginseng according to the corresponding test parameter preset in the second test case Several classes of types determine the value of the second test parameter;
First processing submodule, for the value according to every one second test parameter in the second test case, is surveyed to second Example on probation carries out logical operation, obtains operation result.
Referring to Fig. 9, further, the second value submodule includes:
First value unit, if the corresponding test parameter for presetting the second test parameter in the second test case Parameter type be constant type, it is determined that the value of the second test parameter is predetermined fixed value;
Second value unit, if the corresponding test parameter for presetting the second test parameter in the second test case Parameter type be closed-loop type, it is determined that the value of the second test parameter includes the first numerical value within preset range and default Second value beyond scope.
Referring to Figure 10, specifically, the first processing submodule includes:
First processing units, for when taking the value of the second test parameter to be the first numerical value, obtaining the second test case First operation result;
Second processing unit, for when taking the value of the second test parameter to be second value, obtaining the second test case Second operation result;
3rd processing unit, for the first operation result and the second operation result to be compared, obtain the second test The operation result of use-case.
Referring to Figure 11, specifically, the 3rd processing unit includes:
First processing subelement, for when the first operation result is identical with the second operation result, then taking the second test to use The operation result of example is the first operation result;
Second processing subelement, for when the first operation result and the second operation result difference, then by closed-loop type The value of second test parameter is changed to third value, and carries out logical operation to the second test case, obtains operation result.
Preferably, the 3rd processing unit also includes:First function subelement, for the test parameter in the first test case In list, the parameter type and third value of the second test parameter of closed-loop type are added.
Referring to Figure 12, it is preferable that the second determining module includes:
First determination sub-module, for being fictitious time when the operation result of multiple second test cases, it is determined that the first shape The expected results that redirect of state are original state;
Second determination sub-module, for when it is true that the operation result of multiple second test cases, which only has one, it is determined that The expected results that redirect of first state are that operation result is the corresponding third state after genuine second test case performs;
3rd determination sub-module, for when the operation result of multiple second test cases have it is multiple be true when, then according to excellent First level judges that explanation determines that the expected results that redirect of first state for operation result are that first is preferential in genuine second test case The corresponding third state after second test case of level performs.
The branch instruction analysis device embodiment of the test case of the present invention is real with the branch instruction analysis method of above-mentioned test case Apply that example is corresponding, the realization rate in the above-mentioned branch instruction analysis embodiment of the method for test case is applied to the survey In the branch instruction analysis device embodiment of example on probation.
One embodiment of the invention additionally provides a kind of computer-readable recording medium, is deposited on computer-readable recording medium Computer program is contained, the branch instruction analysis method of test case as described above is realized when computer program is executed by processor.
Another embodiment of the present invention additionally provides a kind of server, including processor, memory and is stored in memory Computer program that is upper and can running on a processor, test case as described above is realized during computing device computer program Branch instruction analysis method.
Generally speaking, the present invention is by determining that the parameter of a next test case of state point with multiple-limb is surveyed to other Example on probation carries out logical operation, obtains the logic operation result of other test cases, and quick, accurate according to logic operation result Obtain the expected results of the state point, in the process, reduce the amount of labour of staff, improve operating efficiency, together When, avoiding staff reduces the accuracy judged expected results because of the influence of mood or other extraneous factors.
It should also be noted that, herein, such as first and second or the like relational terms are used merely to one Entity or operation make a distinction with another entity or operation, and not necessarily require or imply between these entities or operation Any this actual relation or order be present.Moreover, term " comprising ", "comprising" or its any other variant are intended to contain Lid nonexcludability includes.
Described above is the preferred embodiment of the present invention, it is noted that for those skilled in the art For, on the premise of principle of the present invention is not departed from, some improvements and modifications can also be made, these improvements and modifications It should be regarded as protection scope of the present invention.

Claims (19)

1. a kind of branch instruction analysis method of test case, it is characterised in that including:
The test parameter list of the first test case to be detected is determined, wherein being used to make the when first test case performs One state transition to the second state, the test parameter list include taking for multiple test parameters and corresponding test parameter Value;
According to the test parameter list, logical operation is carried out to multiple second test cases successively, obtains operation result, wherein It is used to the first state is jumped to the third state when second test case performs;
According to the operation result, determine the first state redirects expected results.
2. the branch instruction analysis method of test case according to claim 1, it is characterised in that described to determine to be detected the In the step of test parameter list of one test case:
The value of included multiple test parameters is used for first test case in the identified test parameter list Other numerical value outside numerical value are used when the first state is jumped to second state.
3. the branch instruction analysis method of test case according to claim 2, it is characterised in that the identified test ginseng In number list, the value of each test parameter is fixed value.
4. the branch instruction analysis method of test case according to claim 2, it is characterised in that described to be joined according to the test The step of counting list, carrying out logical operation to multiple second test cases successively, obtain operation result includes:
If the second test parameter in second test case with the test parameter list of first test case The first test parameter it is identical, then the value of second test parameter be first test parameter value;
If the second test parameter in second test case and test parameter list described in first test case Any test parameter differs, then the parameter type according to the corresponding test parameter preset in second test case Determine the value of second test parameter;
According to the value of each second test parameter in second test case, second test case is patrolled Computing is collected, obtains operation result.
5. the branch instruction analysis method of test case according to claim 4, it is characterised in that the foundation presets institute State the step of the parameter type of the corresponding test parameter in the second test case determines the value of second test parameter and wrap Include:
If the parameter type for presetting the corresponding test parameter of the second test parameter described in second test case is Constant type, it is determined that the value of second test parameter is predetermined fixed value;
If the parameter type for presetting the corresponding test parameter of the second test parameter described in second test case is Closed-loop type, it is determined that the value of second test parameter is included beyond the first numerical value and preset range within preset range Second value.
6. the branch instruction analysis method of test case according to claim 5, it is characterised in that if presetting described second When the parameter type of the corresponding test parameter of second test parameter described in test case is closed-loop type, described in the foundation The value of each second test parameter in second test case, to second test case carry out logical operation the step of Including:
When taking the value of second test parameter to be first numerical value, the first computing knot of second test case is obtained Fruit;
When taking the value of second test parameter to be the second value, the second computing knot of second test case is obtained Fruit;
First operation result and second operation result are compared, obtain the computing of second test case As a result.
7. the branch instruction analysis method of test case according to claim 6, it is characterised in that described to first computing As a result the step of and second operation result is compared, obtains the operation result of second test case includes:
When first operation result is identical with second operation result, then the operation result of second test case is taken For the first operation result;
When first operation result and the second operation result difference, then by second test of the closed-loop type The value of parameter is changed to third value, and carries out logical operation to second test case, obtains operation result.
8. the branch instruction analysis method of test case according to claim 7, it is characterised in that the third value is described A fixed value within the preset range of second test case or beyond preset range.
9. the branch instruction analysis method of test case according to claim 8, it is characterised in that described when the described first fortune When calculating result with the second operation result difference, then the value of second test parameter of the closed-loop type is changed to Third value, and logical operation is carried out to second test case, after the step of obtaining operation result, in addition to:
In the test parameter list of first test case, second test parameter of the closed-loop type is added Parameter type and the third value.
10. the branch instruction analysis method of test case according to claim 2, it is characterised in that described according to the computing As a result, including the step of redirecting expected results for the first state is determined:
When the operation result of multiple second test cases is fictitious time, it is determined that the first state redirects expected results as original State;
When it is true that the operation result of multiple second test cases, which only has one, it is determined that the first state redirects expected knot Fruit is that operation result is the corresponding third state after genuine second test case performs;
When the operation result of multiple second test cases have it is multiple be true when, then according to priority judge explanation determine described first The expected results that redirect of state are that operation result is second test of the first priority in genuine second test case The corresponding third state after use-case performs.
A kind of 11. branch instruction analysis device of test case, it is characterised in that including:
First determining module, for determining the test parameter list of the first test case to be detected, wherein first test It is used to make first state jump to the second state when use-case performs, the test parameter list includes multiple test parameters and phase The value of corresponding test parameter;
Processing module, for according to the test parameter list, carrying out logical operation to multiple second test cases successively, obtaining Operation result, wherein being used to make the first state jump to the third state when second test case performs;
Second determining module, for according to the operation result, determine the first state to redirect expected results.
12. the branch instruction analysis device of test case according to claim 11, it is characterised in that the processing module bag Include:
First value submodule, if for the second test parameter in second test case and first test case The first test parameter in the test parameter list is identical, then the value of second test parameter is that the described first test is joined Several values;
Second value submodule, if in the second test parameter in second test case and first test case Any test parameter of the test parameter list differs, then corresponding in second test case according to presetting The parameter type of test parameter determines the value of second test parameter;
First processing submodule, for the value according to each second test parameter in second test case, to institute State the second test case and carry out logical operation, obtain operation result.
13. the branch instruction analysis device of test case according to claim 12, it is characterised in that the second value submodule Block includes:
First value unit, if the corresponding test for presetting the second test parameter described in second test case The parameter type of parameter is constant type, it is determined that the value of second test parameter is predetermined fixed value;
Second value unit, if the corresponding test for presetting the second test parameter described in second test case The parameter type of parameter is closed-loop type, it is determined that the value of second test parameter includes the first number within preset range Second value beyond value and preset range.
14. the branch instruction analysis device of test case according to claim 13, it is characterised in that the first processing submodule Block includes:
First processing units, surveyed for when taking the value of second test parameter to be first numerical value, obtaining described second First operation result of example on probation;
Second processing unit, surveyed for when taking the value of second test parameter to be the second value, obtaining described second Second operation result of example on probation;
3rd processing unit, for first operation result and second operation result to be compared, obtain described The operation result of second test case.
15. the branch instruction analysis device of test case according to claim 14, it is characterised in that the 3rd processing unit Including:
First processing subelement, for when first operation result is identical with second operation result, then taking described the The operation result of two test cases is the first operation result;
Second processing subelement, for when first operation result is with the second operation result difference, then being closed described The value of second test parameter of style type is changed to third value, and carries out logic fortune to second test case Calculate, obtain operation result.
16. the branch instruction analysis device of test case according to claim 15, it is characterised in that the 3rd processing unit Also include:
First function subelement, in the test parameter list of first test case, adding the closed loop class The parameter type and the third value of second test parameter of type.
17. the branch instruction analysis device of test case according to claim 11, it is characterised in that second determining module Including:
First determination sub-module, for being fictitious time when the operation result of multiple second test cases, it is determined that first shape The expected results that redirect of state are original state;
Second determination sub-module, for when it is true that the operation result of multiple second test cases, which only has one, it is determined that described The expected results that redirect of first state are that operation result is corresponding 3rd shape after genuine second test case performs State;
3rd determination sub-module, for when the operation result of multiple second test cases have it is multiple be true when, then according to priority Judge that explanation determines that the expected results that redirect of the first state for operation result are in genuine second test case first The corresponding third state after second test case of priority performs.
18. a kind of computer-readable recording medium, it is characterised in that be stored with computer on the computer-readable recording medium Program, the test case as any one of claim 1 to 10 is realized when the computer program is executed by processor Branch instruction analysis method.
19. a kind of server, it is characterised in that including processor, memory and be stored on the memory and can be described The computer program run on processor, realized described in the computing device during computer program as in claim 1 to 10 The branch instruction analysis method of test case described in any one.
CN201711203093.8A 2017-11-27 2017-11-27 Test case jump analysis method and device and server Active CN107818051B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711203093.8A CN107818051B (en) 2017-11-27 2017-11-27 Test case jump analysis method and device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711203093.8A CN107818051B (en) 2017-11-27 2017-11-27 Test case jump analysis method and device and server

Publications (2)

Publication Number Publication Date
CN107818051A true CN107818051A (en) 2018-03-20
CN107818051B CN107818051B (en) 2020-07-03

Family

ID=61610209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711203093.8A Active CN107818051B (en) 2017-11-27 2017-11-27 Test case jump analysis method and device and server

Country Status (1)

Country Link
CN (1) CN107818051B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113138914A (en) * 2020-01-19 2021-07-20 腾讯科技(深圳)有限公司 Resource interaction system testing method and device, storage medium and computer equipment
CN113407435A (en) * 2020-03-17 2021-09-17 北京新能源汽车股份有限公司 Test case generation method and device and control equipment
CN113495546A (en) * 2020-03-20 2021-10-12 北京新能源汽车股份有限公司 Method, controller and test bench for realizing automatic test of test cases

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101902470A (en) * 2010-07-14 2010-12-01 南京大学 Form feature-based Web security vulnerability dynamic testing method
JP2016009344A (en) * 2014-06-25 2016-01-18 富士通株式会社 Test case generation program, test case generation method, and test case generation device
CN106445814A (en) * 2016-09-05 2017-02-22 北京新能源汽车股份有限公司 Test case detection method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101902470A (en) * 2010-07-14 2010-12-01 南京大学 Form feature-based Web security vulnerability dynamic testing method
JP2016009344A (en) * 2014-06-25 2016-01-18 富士通株式会社 Test case generation program, test case generation method, and test case generation device
CN106445814A (en) * 2016-09-05 2017-02-22 北京新能源汽车股份有限公司 Test case detection method and device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113138914A (en) * 2020-01-19 2021-07-20 腾讯科技(深圳)有限公司 Resource interaction system testing method and device, storage medium and computer equipment
CN113138914B (en) * 2020-01-19 2024-04-26 腾讯科技(深圳)有限公司 Resource interaction system testing method and device, storage medium and computer equipment
CN113407435A (en) * 2020-03-17 2021-09-17 北京新能源汽车股份有限公司 Test case generation method and device and control equipment
CN113407435B (en) * 2020-03-17 2024-06-07 北京新能源汽车股份有限公司 Test case generation method, device and control equipment
CN113495546A (en) * 2020-03-20 2021-10-12 北京新能源汽车股份有限公司 Method, controller and test bench for realizing automatic test of test cases
CN113495546B (en) * 2020-03-20 2022-11-15 北京新能源汽车股份有限公司 Method, controller and test bench for realizing automatic test of test cases

Also Published As

Publication number Publication date
CN107818051B (en) 2020-07-03

Similar Documents

Publication Publication Date Title
US20080281548A1 (en) Method and System for Automatic Defect Detection of Articles in Visual Inspection Machines
CN107818051A (en) Test case jump analysis method and device and server
CN107783901A (en) Method for generating test case, device, computer equipment and storage medium
Chen et al. Understanding metric-based detectable smells in Python software: A comparative study
Pascarella et al. Re-evaluating method-level bug prediction
US7636871B1 (en) Method for comparing customer and test load data with comparative functional coverage hole analysis
KR20010013719A (en) Low cost, easy to use automatic test system software
Winkler et al. Optimizing for recall in automatic requirements classification: An empirical study
KR100621753B1 (en) Knowledge preparation support apparatus and display method
CN106294174B (en) The various dimensions measure and device of testing adequacy
JP2021176070A (en) Image inspection apparatus, image inspection method, and program
CN108710571A (en) A kind of method and apparatus generating automatic test code
CN107223257A (en) Method of testing, test server and system
CN108363660A (en) A kind of method of generating test program and device
Nilson et al. Do internal software quality tools measure validated metrics?
AU2021101715A4 (en) A transfer learning based model for fatigue crack initiation sites detection
CN116819288B (en) Diagnostic test method and system for circuit experiment board
CN107943635A (en) A kind of test method of storage device, device and medium
Chamoli et al. Analysing software metrics for accurate dynamic defect prediction models
CN108763092A (en) A kind of aacode defect detection method and device based on cross validation
CN109858632A (en) A kind of method and device of threshold value
JP2010282441A (en) Apparatus for calculating inter-module dependent strength, method and program for measuring inter-module dependent strength
CN105204997B (en) software defect detection method and device
Chaudron et al. Automated prioritization of metrics-based design flaws in UML class diagrams
CN114638096A (en) Method, device and equipment for displaying logic among program variables and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant