CN107818051B - 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
CN107818051B
CN107818051B CN201711203093.8A CN201711203093A CN107818051B CN 107818051 B CN107818051 B CN 107818051B CN 201711203093 A CN201711203093 A CN 201711203093A CN 107818051 B CN107818051 B CN 107818051B
Authority
CN
China
Prior art keywords
test
parameter
value
test case
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.)
Active
Application number
CN201711203093.8A
Other languages
Chinese (zh)
Other versions
CN107818051A (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

Images

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

Test case jump analysis method and device and server
Technical Field
The invention relates to the technical field of software testing, in particular to a jump analysis method and device of a test case and a server.
Background
With the increasing development of the software industry, test software is continuously developed, the importance of software testing is undoubted, but as development teams are mobile, developers are also influenced by emotions and the like, and test cases are needed to ensure the stability of software testing quality.
However, in the actual writing of test cases, after a condition that one jump transition is not established is input at any state point having a plurality of jump branches, the expected result may be that the current state is maintained or that the jump transition to another state is possible. The judgment of the expected result usually depends on manpower, when the number of jump branches of the state is more, the analysis process is lengthened, the analysis efficiency is affected, and similar expected result analysis may frequently occur in the test of a certain controller. Therefore, how to solve such situations quickly and accurately is a great problem to be solved urgently by realizing automation of the process.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a method, an apparatus, and a server for analyzing a jump of a test case, so as to achieve that, in compiling the test case, a jump expected result of a state point with multiple branches can be obtained quickly and accurately, reduce the labor amount of workers, and improve the work efficiency.
In order to solve the above technical problem, an embodiment of the present invention provides a method for analyzing a jump of a test case, including:
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 a plurality of second test cases to obtain an operation result, wherein the second test cases are used for jumping the first state to the third state when being executed;
and determining the expected jump result of the first state according to the operation result.
Specifically, in the step of determining the test parameter form of the first test case to be detected:
and the values of the plurality of test parameters included in the determined test parameter form are other values except the value adopted when the first test case is used for jumping the first state to the second state.
Preferably, in the determined test parameter table, the value of each test parameter is a fixed value.
Preferably, the step of sequentially performing logical operations on the plurality of second test cases according to the test parameter form to obtain an operation result includes:
if the second test parameter in the second test case is the same as the first test parameter in the test parameter list of the first test case, the value of the second test parameter is the value of the first test parameter;
if the second test parameter in the second test case is different from any test parameter in the test parameter list in the first test case, determining the value of the second test parameter according to the preset parameter type of the corresponding test parameter in the second test case;
and performing logical operation on the second test case according to the value of each second test parameter in the second test case to obtain an operation result.
Specifically, the step of determining the value of the second test parameter according to the parameter type of the corresponding test parameter in the preset second test case includes:
if the parameter type of the corresponding test parameter of the second test parameter in the second test case is preset to be a constant type, determining the value of the second test parameter to be a preset fixed value;
and if the parameter type of the corresponding test parameter of the second test parameter in the second test case is preset to be a closed-loop type, determining that the value of the second test parameter comprises a first value within a preset range and a second value outside the preset range.
Further, if the parameter type of the corresponding test parameter of the second test parameter in the second test case is preset to be a closed-loop type, the step of performing the logic operation on the second test case according to the value of each second test parameter in the second test case includes:
when the value of the second test parameter is taken as a first value, a first operation result of the second test case is obtained;
when the value of the second test parameter is taken as a second numerical value, a second operation result of the second test case is obtained;
and comparing the first operation result with the second operation result to obtain an operation result of the second test case.
Specifically, the step of comparing the first operation result with the second operation result to obtain the operation result of the second test case includes:
when the first operation result is the same as the second operation result, taking the operation result of the second test case as the first operation result;
and when the first operation result is different from the second operation result, changing the value of the second test parameter of the closed-loop type into a third value, and performing logic operation on the second test case to obtain an operation result.
Optionally, the third value is a fixed value within the preset range or outside the preset range of the second test case.
Preferably, after the step of changing the value of the second test parameter of the closed-loop type to a third value and performing a logic operation on the second test case to obtain the operation result when the first operation result is different from the second operation result, the method further includes:
and adding the parameter type and the third numerical value of the second test parameter of the closed-loop type in the test parameter form of the first test case.
Specifically, the step of determining the expected result of the jump of the first state according to the operation result comprises:
when the operation results of the plurality of second test cases are all false, determining that the expected skip result of the first state is the original state;
when only one of the operation results of the plurality of second test cases is true, determining that the jump expected result of the first state is a corresponding third state after the second test case with the true operation result is executed;
and when a plurality of operation results of the second test cases are true, determining that the jump expected result of the first state is a corresponding third state after the second test case of the first priority is executed in the second test cases of which the operation results are true according to the priority judgment description.
The embodiment of the present invention further provides a device for analyzing a test case jump, including:
the first determining module is used for 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;
the processing module is used for sequentially carrying out logical operation on a plurality of second test cases according to the test parameter form to obtain an operation result, wherein the first state is jumped to a third state when the second test cases are executed;
and the second determining module is used for determining the expected skip result of the first state according to the operation result.
Specifically, the processing module includes:
the first value sub-module is used for taking the value of the second test parameter as the value of the first test parameter if the second test parameter in the second test case is the same as the first test parameter in the test parameter list of the first test case;
the second value-taking submodule is used for determining the value of the second test parameter according to the parameter type of the corresponding test parameter in the preset second test case if the second test parameter in the second test case is different from any test parameter in the test parameter list in the first test case;
and the first processing submodule is used for carrying out logic operation on the second test case according to the value of each second test parameter in the second test case to obtain an operation result.
Further, the second value sub-module includes:
the first value taking unit is used for determining the value of the second test parameter as a preset fixed value if the parameter type of the corresponding test parameter of the second test parameter in the second test case is preset as a constant type;
and the second value taking unit is used for determining that the value of the second test parameter comprises a first value within the preset range and a second value outside the preset range if the parameter type of the corresponding test parameter of the second test parameter in the preset second test case is a closed-loop type.
Specifically, the first processing submodule includes:
the first processing unit is used for obtaining a first operation result of the second test case when the value of the second test parameter is taken as a first numerical value;
the second processing unit is used for obtaining a second operation result of the second test case when the value of the second test parameter is taken as a second numerical value;
and the third processing unit is used for comparing the first operation result with the second operation result to obtain an operation result of the second test case.
Specifically, the third processing unit includes:
the first processing subunit is used for taking the operation result of the second test case as the first operation result when the first operation result is the same as the second operation result;
and the second processing subunit is used for changing the value of the second test parameter of the closed-loop type into a third numerical value when the first operation result is different from the second operation result, and performing logical operation on the second test case to obtain an operation result.
Preferably, the third processing unit further comprises:
and the first functional subunit is used for adding the parameter type and the third numerical value of the second test parameter of the closed-loop type in the test parameter form of the first test case.
Preferably, the second determining module includes:
the first determining submodule is used for determining that the expected skip result of the first state is the original state when the operation results of the second test cases are all false;
the second determining submodule is used for determining that the jump expected result of the first state is a corresponding third state after the second test case with the true operation result is executed when only one of the operation results of the plurality of second test cases is true;
and the third determining submodule is used for determining that the expected skip result of the first state is a corresponding third state after the second test case of the first priority is executed in the second test cases of which the operation results are true according to the priority judgment description when a plurality of operation results of the second test cases are true.
The embodiment of the invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the jump analysis method for the test case is implemented.
The embodiment of the invention also provides a server, which comprises a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein the processor implements the jump analysis method of the test case as described above when executing the computer program.
Compared with the prior art, the jump analysis method, the device and the server for the test case provided by the embodiment of the invention at least have the following beneficial effects:
according to the method, the parameters of the next test case of the multi-branch state point are determined to carry out logical operation on other test cases to obtain the logical operation results of other test cases, and the expected result of the state point is quickly and accurately obtained according to the logical operation results.
Drawings
FIG. 1 is a schematic flow chart of a jump analysis method for a test case according to the present invention;
FIG. 2 is a second flowchart of the jump analysis method for test cases according to the present invention;
FIG. 3 is a third schematic flow chart of a test case jump analysis method according to the present invention;
FIG. 4 is a fourth flowchart illustrating a jump analysis method for test cases according to the present invention;
FIG. 5 is a fifth flowchart illustrating a jump analysis method for test cases according to the present invention;
FIG. 6 is a sixth flowchart illustrating a jump analysis method for test cases according to the present invention;
FIG. 7 is a schematic structural diagram of a jump analysis apparatus for test cases according to the present invention;
FIG. 8 is a second schematic structural diagram of a jump analysis apparatus for test cases according to the present invention;
FIG. 9 is a third schematic structural diagram of a jump analysis apparatus for test cases according to the present invention;
FIG. 10 is a fourth schematic diagram of the jump analysis apparatus for test cases according to the present invention;
FIG. 11 is a fifth schematic view of the jump analysis apparatus for test cases according to the present invention;
FIG. 12 is a sixth schematic structural view of a jump analysis apparatus for test cases according to the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments. In the following description, specific details such as specific configurations and components are provided only to help the full understanding of the embodiments of the present invention. Thus, it will be apparent to those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the invention. In addition, descriptions of well-known functions and constructions are omitted for clarity and conciseness.
In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
It should be understood that the term "and/or" herein is merely one type of association relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
In the embodiments provided herein, it should be understood that "B corresponding to a" means that B is associated with a from which B can be determined. It should also be understood that determining B from a does not mean determining B from a alone, but may be determined from a and/or other information.
Referring to fig. 1, a preferred embodiment of the present invention provides a jump analysis method for a test case, including:
1001, determining a test parameter form of a first test case to be detected, wherein the first test case is used for jumping a first state to a second state when being executed, and the test parameter form comprises a plurality of test parameters and values of corresponding test parameters;
step 1002, sequentially performing logical operation on a plurality of second test cases according to the test parameter form to obtain an operation result, wherein the first state is jumped to a third state when the second test cases are executed;
and 1003, determining a jump expected result of the first state according to the operation result.
In the invention, the parameters of a first test case under a state point are determined, and then logical operation is sequentially carried out on a plurality of second test cases according to the parameters of the first test case, namely, the logical operation is sequentially carried out on other test cases except the first test case, so that an operation result is obtained; and judging and determining the expected result of the state point according to the conditions of the operation results of the plurality of second test cases and a certain judgment rule. In the process, the expected result of the state point can be obtained by automatically running only by inputting the parameters of the first test case by the staff, so that the labor amount of the staff is reduced, the reduction of the judgment accuracy of the expected result due to the influence of the emotion or other external factors by the staff is avoided, and the expected result of the state point is determined quickly and accurately.
Specifically, in the step of determining the test parameter form of the first test case to be detected:
and the values of the plurality of test parameters included in the determined test parameter form are other values except the value adopted when the first test case is used for jumping the first state to the second state.
In the invention, the values of the plurality of test parameters included in the determined test parameter list are other values than the values adopted by the first test case when the first state is jumped to the second state, that is, when the first test case adopts the parameters in the test parameter list, the first state cannot be jumped to the second state, so that the expected jump result of the first state can be conveniently determined under the condition that the first state cannot jump to the second state.
Preferably, in the determined test parameter table, the value of each test parameter is a fixed value. The value of each test parameter is fixed, so that the time and error rate of workers in determining the test parameters can be reduced, and meanwhile, when other second test cases except the first test case carry out logic operation according to the test parameter form, the value of the test parameters in the second test case can be determined more quickly and accurately, and the working efficiency is improved.
Referring to fig. 2, preferably, the step of sequentially performing logical operations on the plurality of second test cases according to the test parameter table to obtain an operation result includes:
step 2001, if the second test parameter in the second test case is the same as the first test parameter in the test parameter list of the first test case, the value of the second test parameter is the value of the first test parameter;
step 2002, if a second test parameter in the second test case is different from any test parameter in the test parameter list in the first test case, determining a value of the second test parameter according to a preset parameter type of a corresponding test parameter in the second test case;
and step 2003, performing logical operation on the second test case according to the value of each second test parameter in the second test case to obtain an operation result.
When the value of any second test parameter in the second test case is taken, if the second test parameter is the same as the first test parameter in the determined test parameter list, the value is taken as the value of the first test parameter, so that the value taking process is simple, and particularly when the test parameters are various; and if the second test parameter is different from any first test parameter in the determined test parameter list, determining the value of the second test parameter according to the parameter type of the corresponding test parameter in the preset second test case, so that the value of each second test parameter is representative, and the accuracy of the operation result and the accuracy of judgment of the expected result of the state point are ensured, wherein the parameter type and the value of the corresponding test parameter in the preset second test case are not beyond the range of the imported test environment information.
Referring to fig. 3, specifically, the step of determining the value of the second test parameter according to the parameter type of the corresponding test parameter in the preset second test case includes:
step 3001, if the parameter type of the corresponding test parameter of the second test parameter in the second test case is preset as a constant type, determining that the value of the second test parameter is a preset fixed value;
step 3002, if the parameter type of the corresponding test parameter of the second test parameter in the second test case is preset to be a closed-loop type, determining that the value of the second test parameter includes a first value within the preset range and a second value outside the preset range.
In the invention, the value of the second test parameter of the constant type is a preset fixed value, so that the accuracy of the value is ensured; the value of the second test parameter of the closed-loop type comprises a first value within the value range of the second test parameter and within the preset range of the second test case and a second value outside the preset range, so that the second test parameter of the closed-loop type is more representative in logic operation, and the accuracy of the operation result and the accuracy of judgment of the expected result of the state point are ensured.
Referring to fig. 4, further, if the parameter type of the corresponding test parameter of the second test parameter in the second test case is preset to be a closed-loop type, the step of performing the logic operation on the second test case according to the value of each second test parameter in the second test case includes:
step 4001, obtaining a first operation result of the second test case when the value of the second test parameter is the first value;
step 4002, obtaining a second operation result of the second test case when the value of the second test parameter is taken as a second numerical value;
step 4003, comparing the first operation result and the second operation result to obtain an operation result of the second test case.
In the invention, the logical operation is carried out when the first numerical value and the second numerical value are taken for the second test parameter respectively, and the final operation result of the second test case is determined according to the obtained operation result, so that the operation result of the second test case is more representative.
Referring to fig. 5, specifically, the step of comparing the first operation result and the second operation result to obtain the operation result of the second test case includes:
step 5001, when the first operation result is the same as the second operation result, taking the operation result of the second test case as the first operation result;
step 5002, when the first operation result is different from the second operation result, changing the value of the second test parameter of the closed-loop type to a third value, and performing a logic operation on the second test case to obtain an operation result.
In the invention, when the first operation result is the same as the second operation result, namely, whether the first operation result or the second operation result is selected as the operation result of the second test case does not influence the judgment of the expected result of the state point; when the first operation result is different from the second operation result, in order to obtain the operation result of the determined second test case, the value of the second test parameter of the closed-loop type needs to be limited, that is, the value of the second test parameter is changed into a third value, so as to ensure that the expected result of the state point is successfully judged finally.
Optionally, the third value is a fixed value within the preset range or outside the preset range of the second test case.
The third value is a fixed value, so that the logic operation of the second test case is facilitated; the third value is within the preset range or outside the preset range of the second test case, so that the third value is more representative.
Preferably, after the step of changing the value of the second test parameter of the closed-loop type to a third value and performing a logic operation on the second test case to obtain the operation result when the first operation result is different from the second operation result, the method further includes:
and adding the parameter type and the third numerical value of the second test parameter of the closed-loop type in the test parameter form of the first test case.
In the invention, when the value of a second test parameter of a closed-loop type in a second test case is a first value and a second value, and the operation result is different, the value of the second test parameter of the closed-loop type is changed into a third value, and the parameter type and the third value of the second test parameter of the closed-loop type are added in the test parameter list of the first test case, so that the rest second test cases which are logically operated after the second test case are subjected to, if the second test parameter of the closed-loop type exists during operation, the third value corresponding to the second test parameter of the closed-loop type is directly selected from the test parameter list, thereby avoiding the operation result of the second test sequence determined by carrying out multiple operations on the second test parameter of the closed-loop type again, and improving the working efficiency.
Referring to fig. 6, in particular, the step of determining the expected result of the jump of the first state according to the operation result includes:
step 6001, when the operation results of the plurality of second test cases are all false, determining that the expected skip result of the first state is the original state;
step 6002, when only one of the operation results of the plurality of second test cases is true, determining that the expected skip result of the first state is a third state corresponding to the second test case after the execution of the second test case of which the operation result is true;
and 6003, when a plurality of operation results of the second test cases are true, determining that the expected skip result of the first state is a third state corresponding to the executed second test case of the first priority in the second test cases of which the operation results are true according to the priority judgment description.
In the invention, when the operation results of a plurality of second test cases are all false, namely the state point can not complete the state jump by executing any second test case under the test case list, so that the state point is kept in the original state;
when only one of the operation results of the second test cases is true, namely the state point can complete the state jump by executing a second test case under the test case list, so that the expected result of the state point is a third state corresponding to the second test case with the true operation result after the second test case is executed;
when a plurality of operation results of the second test cases are true, namely the state point can jump to different states by executing the second test cases under the test case list, the second test cases with true operation results are sequenced according to a preset priority judgment description, and a third state after the second test case with the first priority is executed is selected as an expected result of the state point;
if the operation results of the second test case are multiple true, the preset priority judgment description cannot be detected, the requirement condition is insufficient, and the expected result of the state point cannot be determined.
By judging the operation results of the second test cases, the expected results of the state points can be clearly known, the labor amount of workers for manual analysis is reduced, the working efficiency is improved, meanwhile, the requirement documents are checked, and the requirement is judged to be insufficient or defective.
Referring to fig. 7, still another preferred embodiment of the present invention further provides a jump analysis apparatus for a test case, including:
the first determining module is used for 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;
the processing module is used for sequentially carrying out logical operation on a plurality of second test cases according to the test parameter form to obtain an operation result, wherein the first state is jumped to a third state when the second test cases are executed;
and the second determining module is used for determining the expected skip result of the first state according to the operation result.
Referring to fig. 8, in particular, the processing module includes:
the first value sub-module is used for taking the value of the second test parameter as the value of the first test parameter if the second test parameter in the second test case is the same as the first test parameter in the test parameter list of the first test case;
the second value-taking submodule is used for determining the value of the second test parameter according to the parameter type of the corresponding test parameter in the preset second test case if the second test parameter in the second test case is different from any test parameter in the test parameter list in the first test case;
and the first processing submodule is used for carrying out logic operation on the second test case according to the value of each second test parameter in the second test case to obtain an operation result.
Referring to fig. 9, further, the second value sub-module includes:
the first value taking unit is used for determining the value of the second test parameter as a preset fixed value if the parameter type of the corresponding test parameter of the second test parameter in the second test case is preset as a constant type;
and the second value taking unit is used for determining that the value of the second test parameter comprises a first value within the preset range and a second value outside the preset range if the parameter type of the corresponding test parameter of the second test parameter in the preset second test case is a closed-loop type.
Referring to fig. 10, in particular, the first processing submodule includes:
the first processing unit is used for obtaining a first operation result of the second test case when the value of the second test parameter is taken as a first numerical value;
the second processing unit is used for obtaining a second operation result of the second test case when the value of the second test parameter is taken as a second numerical value;
and the third processing unit is used for comparing the first operation result with the second operation result to obtain an operation result of the second test case.
Referring to fig. 11, specifically, the third processing unit includes:
the first processing subunit is used for taking the operation result of the second test case as the first operation result when the first operation result is the same as the second operation result;
and the second processing subunit is used for changing the value of the second test parameter of the closed-loop type into a third numerical value when the first operation result is different from the second operation result, and performing logical operation on the second test case to obtain an operation result.
Preferably, the third processing unit further comprises: and the first functional subunit is used for adding the parameter type and the third numerical value of the second test parameter of the closed-loop type in the test parameter form of the first test case.
Referring to fig. 12, preferably, the second determining module includes:
the first determining submodule is used for determining that the expected skip result of the first state is the original state when the operation results of the second test cases are all false;
the second determining submodule is used for determining that the jump expected result of the first state is a corresponding third state after the second test case with the true operation result is executed when only one of the operation results of the plurality of second test cases is true;
and the third determining submodule is used for determining that the expected skip result of the first state is a corresponding third state after the second test case of the first priority is executed in the second test cases of which the operation results are true according to the priority judgment description when a plurality of operation results of the second test cases are true.
The embodiment of the test case jump analysis device corresponds to the embodiment of the test case jump analysis method, and the implementation means in the embodiment of the test case jump analysis method are all suitable for the embodiment of the test case jump analysis device.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the jump analysis method for the test case is implemented as described above.
Still another embodiment of the present invention further provides a server, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the jump analysis method for test cases as described above is implemented.
In summary, the invention performs logic operation on other test cases by determining the parameter of the next test case of a multi-branch state point to obtain the logic operation result of other test cases, and quickly and accurately obtains the expected result of the state point according to the logic operation result.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (16)

1. A jump analysis method for a test case is characterized by comprising 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 software from a first state to a second state when being executed, the test parameter form comprises a plurality of test parameters and values of the corresponding test parameters, and the values of the plurality of test parameters are other values than the values adopted when the first test case is used for jumping the first state to the second state;
according to the test parameter form, sequentially carrying out logical operation on a plurality of second test cases to obtain an operation result, wherein the second test cases are used for jumping the software from the first state to a third state when being executed;
determining a jump expected result of the first state according to the operation result;
the step of determining the expected result of the jump of the first state according to the operation result comprises:
when the operation results of the plurality of second test cases are all false, determining that the expected skip result of the first state is the original state;
when only one of the operation results of the plurality of second test cases is true, determining that the expected skip result of the first state is the third state corresponding to the second test case after the execution of the second test case of which the operation result is true;
and when a plurality of operation results of the second test cases are true, determining that the expected skip result of the first state is the third state corresponding to the second test case with the first priority after the second test case with the first priority is executed in the second test cases with the true operation results according to the priority judgment description.
2. The jump analysis method for test cases according to claim 1, wherein the value of each test parameter in the determined test parameter table is a fixed value.
3. The jump analysis method for test cases according to claim 1, wherein the step of sequentially performing logical operations on a plurality of second test cases according to the test parameter form to obtain an operation result comprises:
if a second test parameter in the second test case is the same as a first test parameter in the test parameter list of the first test case, the value of the second test parameter is the value of the first test parameter;
if a second test parameter in the second test case is different from any test parameter in the test parameter list in the first test case, determining the value of the second test parameter according to the preset parameter type of the corresponding test parameter in the second test case;
and carrying out logic operation on the second test case according to the value of each second test parameter in the second test case to obtain an operation result.
4. The jump analysis method for test cases according to claim 3, wherein the step of determining the value of the second test parameter according to the preset parameter type of the corresponding test parameter in the second test case comprises:
if the parameter type of the corresponding test parameter of the second test parameter in the second test case is preset to be a constant type, determining the value of the second test parameter to be a preset fixed value;
and if the parameter type of the corresponding test parameter of the second test parameter in the second test case is preset to be a closed-loop type, determining that the value of the second test parameter comprises a first value within a preset range and a second value outside the preset range.
5. The jump analysis method for test cases according to claim 4, wherein if the parameter type of the corresponding test parameter of the second test parameter in the second test case is preset to be a closed-loop type, the step of performing the logic operation on the second test case according to the value of each second test parameter in the second test case comprises:
when the value of the second test parameter is taken as the first numerical value, a first operation result of the second test case is obtained;
when the value of the second test parameter is taken as the second numerical value, a second operation result of the second test case is obtained;
and comparing the first operation result with the second operation result to obtain an operation result of the second test case.
6. The jump analysis method for test cases according to claim 5, wherein the step of comparing the first operation result with the second operation result to obtain the operation result of the second test case comprises:
when the first operation result is the same as the second operation result, taking the operation result of the second test case as a first operation result;
and when the first operation result is different from the second operation result, changing the value of the second test parameter of the closed-loop type into a third numerical value, and performing logic operation on the second test case to obtain an operation result.
7. The jump analysis method for test cases according to claim 6, wherein the third value is a fixed value within or outside a preset range of the second test case.
8. The jump analysis method for test cases according to claim 7, wherein after the step of changing the value of the second test parameter of the closed-loop type to a third value and performing a logical operation on the second test case to obtain an operation result when the first operation result is different from the second operation result, the jump analysis method further comprises:
and adding the parameter type and the third numerical value of the second test parameter of the closed-loop type into the test parameter form of the first test case.
9. A jump analysis device for a test case is characterized by comprising:
the software testing system comprises a first determining module, a second determining module and a control module, wherein the first determining module is used for determining a testing parameter form of a first testing case to be detected, the first testing case is used for enabling software to jump from a first state to a second state when being executed, the testing parameter form comprises a plurality of testing parameters and values of the corresponding testing parameters, and the values of the testing parameters are other values than the values adopted when the first testing case is used for enabling the first state to jump to the second state;
the processing module is used for sequentially carrying out logical operation on a plurality of second test cases according to the test parameter form to obtain an operation result, wherein the second test cases are used for enabling the software to jump from the first state to a third state when being executed;
the second determining module is used for determining a jump expected result of the first state according to the operation result;
the second determining module includes:
the first determining submodule is used for determining that the expected skip result of the first state is the original state when the operation results of the second test cases are all false;
the second determining submodule is used for determining that the jump expected result of the first state is the corresponding third state after the second test case with the true operation result is executed when only one of the operation results of the plurality of second test cases is true;
and the third determining submodule is used for determining that the expected skip result of the first state is the third state corresponding to the second test case with the first priority after the second test case with the first priority is executed in the second test cases with the true operation result according to the priority judgment description when the operation results of the second test cases are multiple true.
10. The apparatus for jump analysis of test cases according to claim 9, wherein the processing module comprises:
a first value sub-module, configured to determine that a value of a second test parameter in the second test case is the same as a value of a first test parameter in the test parameter list of the first test case;
a second value sub-module, configured to determine, if a second test parameter in the second test case is different from any test parameter in the test parameter table in the first test case, a value of the second test parameter according to a preset parameter type of a corresponding test parameter in the second test case;
and the first processing submodule is used for carrying out logical operation on the second test case according to the value of each second test parameter in the second test case to obtain an operation result.
11. The apparatus for jump analysis of a test case according to claim 10, wherein the second value sub-module comprises:
a first value taking unit, configured to determine that a value of the second test parameter is a preset fixed value if a parameter type of a corresponding test parameter of the second test parameter in the second test case is a constant type;
and the second value taking unit is used for determining that the value of the second test parameter comprises a first value within a preset range and a second value outside the preset range if the parameter type of the corresponding test parameter of the second test parameter in the second test case is preset to be a closed-loop type.
12. The apparatus for jump analysis of test cases according to claim 11, wherein the first processing submodule comprises:
the first processing unit is used for obtaining a first operation result of the second test case when the value of the second test parameter is the first numerical value;
the second processing unit is used for obtaining a second operation result of the second test case when the value of the second test parameter is the second numerical value;
and the third processing unit is used for comparing the first operation result with the second operation result to obtain the operation result of the second test case.
13. The jump analysis device for test cases according to claim 12, wherein the third processing unit includes:
the first processing subunit is configured to, when the first operation result is the same as the second operation result, take the operation result of the second test case as a first operation result;
and the second processing subunit is configured to, when the first operation result is different from the second operation result, change the value of the second test parameter of the closed-loop type to a third value, and perform logical operation on the second test case to obtain an operation result.
14. The jump analysis device for test cases according to claim 13, wherein the third processing unit further comprises:
a first functional subunit, configured to add the parameter type of the second test parameter of the closed-loop type and the third numerical value to the test parameter table of the first test case.
15. A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the jump analysis method for test cases according to any one of claims 1 to 8.
16. A server, comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, wherein the processor implements the jump analysis method for test cases according to any one of claims 1 to 8 when executing the computer program.
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 CN107818051A (en) 2018-03-20
CN107818051B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113138914B (en) * 2020-01-19 2024-04-26 腾讯科技(深圳)有限公司 Resource interaction system testing method and device, storage medium and computer equipment
CN113407435B (en) * 2020-03-17 2024-06-07 北京新能源汽车股份有限公司 Test case generation method, device and control equipment
CN113495546B (en) * 2020-03-20 2022-11-15 北京新能源汽车股份有限公司 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 apparatus

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 apparatus

Also Published As

Publication number Publication date
CN107818051A (en) 2018-03-20

Similar Documents

Publication Publication Date Title
CN107818051B (en) Test case jump analysis method and device and server
US9582620B1 (en) Method and system for automated refined exclusion of entities from a metric driven verification analysis score
US11620111B2 (en) Providing services for assisting programming
CN105446874A (en) Method and device for detecting resource configuration file
JP2021108148A (en) Method for processing data, data processor, electronic apparatus, computer readable storage medium, and computer program
CN107291600B (en) Log recording method and device
JP2008015940A (en) Software development device and software development method
CN110673842A (en) Visual programming method and system, storage medium and equipment
CN115576828A (en) Test case generation method, device, equipment and storage medium
CN111736951A (en) Simulation method for automatic driving, computer device, and storage medium
CN104461864A (en) Java source code defect detecting method and system based on Eclipse plugin
CN105740111A (en) Performance detection method and device
US8689196B2 (en) Display of data from parallel programming contexts
CN111581101A (en) Software model testing method, device, equipment and medium
CN105912467A (en) Performance test method and device
US20150082278A1 (en) Clone detection method and clone function commonalizing method
JP2009134360A (en) Model inspection system, model inspection method, and model inspection program
JP5615245B2 (en) Bug countermeasure priority display system
CN111177014B (en) Software automatic test method, system and storage medium
JPH0625991B2 (en) Process planning support device
CN114138669A (en) Software automatic testing method based on function level selection symbolized mixed execution
CN104239199A (en) Virtual robot generation method, automatic test method and related device
JP6723483B2 (en) Test case generation device, test case generation method, and test case generation program
CN108153963B (en) Method for checking connector connection layer number in PCB design
CN111008140A (en) Cross-platform UI (user interface) automatic testing method and device

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