CN107451057A - A kind of branch determines method and device - Google Patents
A kind of branch determines method and device Download PDFInfo
- Publication number
- CN107451057A CN107451057A CN201710640877.0A CN201710640877A CN107451057A CN 107451057 A CN107451057 A CN 107451057A CN 201710640877 A CN201710640877 A CN 201710640877A CN 107451057 A CN107451057 A CN 107451057A
- Authority
- CN
- China
- Prior art keywords
- branch
- judgment
- rule
- character string
- condition
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 238000002347 injection Methods 0.000 claims abstract description 30
- 239000007924 injection Substances 0.000 claims abstract description 30
- 230000007613 environmental effect Effects 0.000 claims abstract description 18
- 238000012360 testing method Methods 0.000 abstract description 10
- 238000010586 diagram Methods 0.000 description 8
- FFBHFFJDDLITSX-UHFFFAOYSA-N benzyl N-[2-hydroxy-4-(3-oxomorpholin-4-yl)phenyl]carbamate Chemical compound OC1=C(NC(=O)OCC2=CC=CC=C2)C=CC(=C1)N1CCOCC1=O FFBHFFJDDLITSX-UHFFFAOYSA-N 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000011981 development test Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3676—Test management for coverage 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)
Abstract
The embodiment of the present application provides a kind of branch and determines method and device, by judging whether defined injection switch is in opening;If the injection switch is in opening, it is determined that entering branch's Rule of judgment in the first way, branch's Rule of judgment includes the 3rd definition condition and defines condition with computing second, and the described 3rd, which defines condition, includes original Rule of judgment or the definition condition of computing first;Read second environment variable corresponding to first environment variable corresponding to the first definition condition and the second definition condition respectively from environmental variance file;The implementing result of branch's Rule of judgment is determined based on first environment variable and second environment variable;Implementing result according to branch's Rule of judgment determines whether the mode into branch corresponding with branch's Rule of judgment, has reached on the basis of cost is reduced, effectively improved the purpose of branch's coverage test efficiency.
Description
Technical field
The application is related to field of computer technology, and method and device is determined more particularly to branch.
Background technology
Current more complicated software systems be related to realize when, handle normal processing logic, it is also necessary to have substantial amounts of mistake
Abnormality processing needs to consider by mistake, and the complete coverage test for all branches is to ensure software quality, ensure system stable operation
Important step.In actual development test process, some mistakes must take into consideration and corresponding error handle is added in code
Branch, but many mistakes are difficult to inject in verification process is tested.
In the prior art, generally use injection true fault, modification code are driven piles and realized in a manner of simulated failure
Branch covers, and still, the mode cost of injecting true fault is often higher, modification code is driven piles in a manner of simulated failure
The problem of branch's coverage test efficiency is low often be present.
Therefore it provides a kind of branch determines method and device, with the basis of cost is reduced, effectively realize that branch covers
The efficiency of test is urgent problem to be solved.
The content of the invention
In view of this, the embodiment of the present application provides a kind of branch and determines method and device, with the basis of cost is reduced,
Effectively improve branch's coverage test efficiency.
To achieve these goals, the technical scheme that the embodiment of the present application provides is as follows:
A kind of branch determines method, including:
Judge whether defined injection switch is in opening;
If the injection switch is in opening, it is determined that entering branch's Rule of judgment in the first way, the branch is sentenced
Broken strip part includes the 3rd and defines condition and the definition condition of computing second, and the described 3rd, which defines condition, includes original Rule of judgment or fortune
Calculate first and define condition;
Read first environment variable corresponding to the first definition condition and the second definition respectively from environmental variance file
Second environment variable corresponding to condition;
The implementing result of branch's Rule of judgment is determined based on first environment variable and second environment variable;
Implementing result according to branch's Rule of judgment determines whether to enter corresponding with branch's Rule of judgment point
Branch.
Preferably, if the injection switch is not in opening, this method also includes:
It is determined that enter branch's Rule of judgment in a second manner;
Determine it is default for described first define conditional definition the first character string and be it is described second define conditional definition
The second character string;
Based on first character string and the second character string, determine that the implementing result of branch's Rule of judgment is sentenced to be original
Broken strip part;
Implementing result according to the original Rule of judgment determines whether to enter corresponding with branch's Rule of judgment point
Branch.
Preferably, the first environment variable and second environment variable are character string,
The implementing result that branch's Rule of judgment is determined based on first environment variable and second environment variable, bag
Include:
The first environment variable is made the difference with character string 0, obtains the described first the first numerical value for defining condition;
The second environment variable is made the difference with character string 0, obtains the described second second value for defining condition;
The implementing result of branch's Rule of judgment is determined based on first numerical value and second value.
Preferably, it is described to be based on first character string and the second character string, determine the execution of branch's Rule of judgment
As a result it is original Rule of judgment, including:
First character string is made the difference with character string 0, obtain it is described first define condition the first numerical value, described first
Character string is character string 0;
Second character string is made the difference with character string 0, obtain it is described second define condition second value, described second
Character string is character string 1;
Based on first numerical value and second value, the implementing result for determining branch's Rule of judgment is original judgement bar
Part.
A kind of branch's determining device, including:
Judging unit, for judging whether defined injection switch is in opening;
First method determining unit, if being in opening for the injection switch, divide it is determined that entering in the first way
Branch Rule of judgment, branch's Rule of judgment include the 3rd and define condition and the definition condition of computing second, the 3rd definition article
Part includes original Rule of judgment or computing first defines condition;
Environmental variance reading unit, for being read respectively from environmental variance file corresponding to the first definition condition
Second environment variable corresponding to one environmental variance and the second definition condition;
First implementing result determining unit, for determining that the branch is sentenced based on first environment variable and second environment variable
The implementing result of broken strip part;
First branch's determining unit, for according to the implementing result of branch's Rule of judgment determine whether enter with it is described
Branch corresponding to branch's Rule of judgment.
Preferably, the device also includes:
Second method determining unit, if opening is not in for the injection switch, it is determined that entering in a second manner
Branch's Rule of judgment;
Character string reading unit, for determining default the first character string for the described first definition conditional definition and being institute
State the second character string of the second definition conditional definition;
Second implementing result determining unit, for based on first character string and the second character string, determining the branch
The implementing result of Rule of judgment is original Rule of judgment;
Second branch's determining unit, for according to the implementing result of the original Rule of judgment determine whether enter with it is described
Branch corresponding to branch's Rule of judgment.
Preferably, the first environment variable and second environment variable are character string,
The first implementing result determining unit, including:
First computing unit, for the first environment variable to be made the difference with character string 0, obtain the first definition condition
The first numerical value;
Second computing unit, for the second environment variable to be made the difference with character string 0, obtain the second definition condition
Second value;
First implementing result determination subelement, for determining that the branch judges based on first numerical value and second value
The implementing result of condition.
Preferably, the second implementing result determining unit, including:
3rd computing unit, for first character string to be made the difference with character string 0, obtain described first and define condition
First numerical value, first character string are character string 0;
4th computing unit, for second character string to be made the difference with character string 0, obtain described second and define condition
Second value, second character string are character string 1;
Second implementing result determination subelement, for based on first numerical value and second value, determining that the branch is sentenced
The implementing result of broken strip part is original Rule of judgment.
The embodiment of the present application provides a kind of branch and determines method and device, by judging whether defined injection switch is located
In opening;If the injection switch is in opening, it is determined that entering branch's Rule of judgment, the branch in the first way
Rule of judgment includes the 3rd and defines condition and computing second defining condition, the described 3rd define condition include original Rule of judgment or
Computing first defines condition;Read respectively from environmental variance file first environment variable corresponding to the first definition condition and
Second environment variable corresponding to second definition condition;Determine that the branch judges based on first environment variable and second environment variable
The implementing result of condition;Implementing result according to branch's Rule of judgment determines whether to enter and branch's Rule of judgment pair
The mode for the branch answered, the purpose of branch's coverage test efficiency is reached on the basis of cost is reduced, has effectively improved.
Brief description of the drawings
, below will be to embodiment or existing in order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments described in application, for those of ordinary skill in the art, on the premise of not paying creative work,
Other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is that a kind of branch that the embodiment of the present application provides determines method flow diagram;
Fig. 2 is that another branch that the embodiment of the present application provides determines method flow diagram;
Fig. 3 is that one kind that the embodiment of the present application provides is based on first environment variable and second environment variable determines the branch
The method flow diagram of the implementing result of Rule of judgment;
Fig. 4 is that one kind that the embodiment of the present application provides is based on first character string and the second character string, it is determined that described point
The implementing result of branch Rule of judgment is the method flow diagram of original Rule of judgment;
Fig. 5 is that a kind of branch of the prior art that the embodiment of the present application provides determines false code;
Fig. 6 is that a kind of branch that the embodiment of the present application provides determines false code;
Fig. 7 is a kind of structural representation for branch's determining device that the embodiment of the present application provides.
Embodiment
In order that those skilled in the art more fully understand the technical scheme in the application, it is real below in conjunction with the application
The accompanying drawing in example is applied, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described implementation
Example only some embodiments of the present application, rather than whole embodiments.It is common based on the embodiment in the application, this area
The every other embodiment that technical staff is obtained under the premise of creative work is not made, it should all belong to the application protection
Scope.
Embodiment:
Fig. 1 is that a kind of branch that the embodiment of the present application provides determines method flow diagram.
As shown in figure 1, this method includes:
S101, judge whether defined injection switch is in opening;If the injection switch is in opening,
Then perform step S102;
S102, determination enter branch's Rule of judgment in the first way, and branch's Rule of judgment includes the 3rd and defines condition
Condition is defined with computing second, the described 3rd, which defines condition, includes original Rule of judgment or the definition condition of computing first;
S103, read first environment variable and second corresponding to the first definition condition respectively from environmental variance file
Second environment variable corresponding to definition condition;
S104, the implementing result for determining based on first environment variable and second environment variable branch's Rule of judgment;
S105, the implementing result according to branch's Rule of judgment are determined whether into corresponding with branch's Rule of judgment
Branch.
Fig. 2 is that another branch that the embodiment of the present application provides determines method flow diagram;
As shown in Fig. 2 this method includes:
S201, judge whether defined injection switch is in opening;If the injection switch is in opening,
Perform step S202;If the injection switch is not in opening, step S206 is performed;
S202, determination enter branch's Rule of judgment in the first way, and branch's Rule of judgment includes the 3rd and defines condition
Condition is defined with computing second, the described 3rd, which defines condition, includes original Rule of judgment or the definition condition of computing first;
S203, read first environment variable and second corresponding to the first definition condition respectively from environmental variance file
Second environment variable corresponding to definition condition;
S204, the implementing result for determining based on first environment variable and second environment variable branch's Rule of judgment;
S205, the implementing result according to branch's Rule of judgment are determined whether into corresponding with branch's Rule of judgment
Branch;
S206, determination enter branch's Rule of judgment in a second manner;
S207, determine it is default for described first define conditional definition the first character string and be the second definition condition
Second character string of definition;
S208, based on first character string and the second character string, the implementing result for determining branch's Rule of judgment is
Original Rule of judgment;
S209, the implementing result according to the original Rule of judgment are determined whether into corresponding with branch's Rule of judgment
Branch.
In the embodiment of the present application, it is preferred that the first environment variable and second environment variable are character string.Such as figure
3 one kind for showing the embodiment of the present application offer are based on first environment variable and second environment variable determines that the branch judges bar
The method flow diagram of the implementing result of part.
As shown in figure 3, this method includes:
S301, the first environment variable and character string 0 made the difference, obtain the described first the first numerical value for defining condition;
S302, the second environment variable and character string 0 made the difference, obtain the described second second value for defining condition;
S303, the implementing result for determining based on first numerical value and second value branch's Rule of judgment.
Fig. 4 is that one kind that the embodiment of the present application provides is based on first character string and the second character string, it is determined that described point
The implementing result of branch Rule of judgment is the method flow diagram of original Rule of judgment.
As shown in figure 4, this method includes:
S401, first character string and character string 0 made the difference, obtain the described first the first numerical value for defining condition, institute
It is character string 0 to state the first character string;
S402, second character string and character string 0 made the difference, obtain the described second second value for defining condition, institute
It is character string 1 to state the second character string;
S403, based on first numerical value and second value, the implementing result for determining branch's Rule of judgment is original
Rule of judgment.
A kind of branch for the ease of providing the embodiment of the present application determines the understanding of method, is now said by example
It is bright:
A kind of branch of the prior art for being illustrated in figure 5 the embodiment of the present application offer determines false code.The institute of below figure 5
In the false code shown, if to test process1, otherwise creating conditions makes it meet condition1;To puppet
Code is driven piles, and directly conditiong1 is modified, however, both approaches all have branch's coverage test efficiency
The drawbacks of low, also, creating conditions makes it meet condition1, that cost is high also be present.
A kind of branch for being illustrated in figure 6 the embodiment of the present application offer determines false code.
False code as shown in Figure 6 added (relative to the false code after Fig. 5 adjustment) two it is grand:STUB_GETENV_
OR (x) and STUB_GETENV_ADD (x);And define an injection switch STUB_ON;When STUB_ON is in non-opening state
During state, STUB_GETENV_OR (x) and STUB_GETENV_ADD (x) are respectively 0 and 1, and the Rule of judgment of Liang Ge branches is still suitable
In condition1 and condition2, keep constant;That is, if the condition of first if branch in Fig. 6 is condition1,
The condition of second if branch is condition2.
When STUB_ON, which is in, has turned on state, judged whether to enter respective branch according to the setting of environmental variance.More than
In figure exemplified by the condition of first if branch, ADD and OR in table 1 below correspond to respectively condition1_add and
condition1_or;
(table 1)
Wherein, Y represents that branch can be entered;N represents that branch can not be entered;KEEP is represented according further to original condition
Condition1 carries out judging whether to enter branch.
Specifically, whether false code as shown in Figure 6 enters branch merely with order line control routine;It is assumed that need to puppet
Process1 in code is tested, it is only necessary to following three steps:
1st, ensure that the STUB_ON defined in code is in and have turned on state, if being in non-opening, a line generation need to be increased
Code (#define STUB_ON) is opened;
2nd, exportcondition1_or=1 is performed in order line;Export condition1_add=1;
3rd, operation includes the software of above-mentioned false code, into branch and checks operation result.
Principle is accordingly:Two export command definitions in above-mentioned steps 2 condition1_or and
Two environmental variances of condition1_add, two environmental variances are respectively character string " 1 " and " 1 ";When code is run, pass through
Getenv system functions obtain the pointer for pointing to context variable values character string, get the head of character string to pointer value by *
Character, and acquisition numeral 1 is subtracted each other in and character ' 0 ';In the logic judgment of C language, it is non-zero be it is true, 0 is false;Therefore as shown in Figure 6
The Rule of judgment of first if branch be just changed into if ((condition1 | | 1) &&1), be equivalent to if (1), logical condition into
Vertical, code enters process1 branches.
Whether the embodiment of the present application provides a kind of branch and determines method, by judging defined injection switch in unlatching
State;If the injection switch is in opening, it is determined that entering branch's Rule of judgment in the first way, the branch judges bar
Part includes the 3rd and defines condition and computing second defining condition, and the described 3rd, which defines condition, includes original Rule of judgment or computing the
One defines condition;First environment variable corresponding to the first definition condition and second is read respectively from environmental variance file to determine
Second environment variable corresponding to adopted condition;Branch's Rule of judgment is determined based on first environment variable and second environment variable
Implementing result;Implementing result according to branch's Rule of judgment determines whether to enter corresponding with branch's Rule of judgment point
The mode of branch, the purpose of branch's coverage test efficiency is reached on the basis of cost is reduced, has effectively improved.
Fig. 7 is a kind of structural representation for branch's determining device that the embodiment of the present application provides.
As shown in fig. 7, the device includes:
Judging unit 71, for judging whether defined injection switch is in opening;
First method determining unit 72, if opening is in for the injection switch, it is determined that entering in the first way
Branch's Rule of judgment, branch's Rule of judgment include the 3rd and define condition and the definition condition of computing second, the 3rd definition
Condition includes original Rule of judgment or computing first defines condition;
Environmental variance reading unit 73, for being read respectively from environmental variance file corresponding to the first definition condition
Second environment variable corresponding to first environment variable and the second definition condition;
First implementing result determining unit 74, for determining the branch based on first environment variable and second environment variable
The implementing result of Rule of judgment;
First branch's determining unit 75, for determining whether to enter and institute according to the implementing result of branch's Rule of judgment
State branch corresponding to branch's Rule of judgment.
Further, a kind of branch's determining device that the embodiment of the present application provides also includes:
Second method determining unit, if opening is not in for the injection switch, it is determined that entering in a second manner
Branch's Rule of judgment;
Character string reading unit, for determining default the first character string for the described first definition conditional definition and being institute
State the second character string of the second definition conditional definition;
Second implementing result determining unit, for based on first character string and the second character string, determining the branch
The implementing result of Rule of judgment is original Rule of judgment;
Second branch's determining unit, for according to the implementing result of the original Rule of judgment determine whether enter with it is described
Branch corresponding to branch's Rule of judgment.
Optionally, the first environment variable and second environment variable are character string,
The first implementing result determining unit, including:
First computing unit, for the first environment variable to be made the difference with character string 0, obtain the first definition condition
The first numerical value;
Second computing unit, for the second environment variable to be made the difference with character string 0, obtain the second definition condition
Second value;
First implementing result determination subelement, for determining that the branch judges based on first numerical value and second value
The implementing result of condition.
Optionally, the second implementing result determining unit, including:
3rd computing unit, for first character string to be made the difference with character string 0, obtain described first and define condition
First numerical value, first character string are character string 0;
4th computing unit, for second character string to be made the difference with character string 0, obtain described second and define condition
Second value, second character string are character string 1;
Second implementing result determination subelement, for based on first numerical value and second value, determining that the branch is sentenced
The implementing result of broken strip part is original Rule of judgment.
Whether the embodiment of the present application provides a kind of branch's determining device, by judging defined injection switch in unlatching
State;If the injection switch is in opening, it is determined that entering branch's Rule of judgment in the first way, the branch judges bar
Part includes the 3rd and defines condition and computing second defining condition, and the described 3rd, which defines condition, includes original Rule of judgment or computing the
One defines condition;First environment variable corresponding to the first definition condition and second is read respectively from environmental variance file to determine
Second environment variable corresponding to adopted condition;Branch's Rule of judgment is determined based on first environment variable and second environment variable
Implementing result;Implementing result according to branch's Rule of judgment determines whether to enter corresponding with branch's Rule of judgment point
The mode of branch, the purpose of branch's coverage test efficiency is reached on the basis of cost is reduced, has effectively improved.
Each embodiment is described by the way of progressive in this specification, what each embodiment stressed be and other
The difference of embodiment, between each embodiment identical similar portion mutually referring to.For device disclosed in embodiment
For, because it is corresponded to the method disclosed in Example, so description is fairly simple, related part is said referring to method part
It is bright.
It the above is only the preferred embodiment of the application, make skilled artisans appreciate that or realizing the application.It is right
A variety of modifications of these embodiments will be apparent to one skilled in the art, as defined herein general former
Reason can be realized in other embodiments in the case where not departing from spirit herein or scope.Therefore, the application will not
Be intended to be limited to the embodiments shown herein, and be to fit to it is consistent with principles disclosed herein and features of novelty most
Wide scope.
Claims (8)
1. a kind of branch determines method, it is characterised in that including:
Judge whether defined injection switch is in opening;
If the injection switch is in opening, it is determined that entering branch's Rule of judgment in the first way, the branch judges bar
Part includes the 3rd and defines condition and computing second defining condition, and the described 3rd, which defines condition, includes original Rule of judgment or computing the
One defines condition;
Read first environment variable corresponding to the first definition condition and the second definition condition respectively from environmental variance file
Corresponding second environment variable;
The implementing result of branch's Rule of judgment is determined based on first environment variable and second environment variable;
Implementing result according to branch's Rule of judgment determines whether to enter branch corresponding with branch's Rule of judgment.
2. according to the method for claim 1, it is characterised in that if the injection switch is not in opening, this method
Also include:
It is determined that enter branch's Rule of judgment in a second manner;
Determine default for the described first the first character string for defining conditional definition and be described second to define the of conditional definition
Two character strings;
Based on first character string and the second character string, the implementing result for determining branch's Rule of judgment is original judgement bar
Part;
Implementing result according to the original Rule of judgment determines whether to enter branch corresponding with branch's Rule of judgment.
3. according to the method for claim 1, it is characterised in that the first environment variable and second environment variable are word
Symbol string,
The implementing result that branch's Rule of judgment is determined based on first environment variable and second environment variable, including:
The first environment variable is made the difference with character string 0, obtains the described first the first numerical value for defining condition;
The second environment variable is made the difference with character string 0, obtains the described second second value for defining condition;
The implementing result of branch's Rule of judgment is determined based on first numerical value and second value.
4. according to the method for claim 2, it is characterised in that it is described to be based on first character string and the second character string,
The implementing result for determining branch's Rule of judgment is original Rule of judgment, including:
First character string is made the difference with character string 0, obtains the described first the first numerical value for defining condition, first character
Go here and there as character string 0;
Second character string is made the difference with character string 0, obtains the described second second value for defining condition, second character
Go here and there as character string 1;
Based on first numerical value and second value, the implementing result for determining branch's Rule of judgment is original Rule of judgment.
A kind of 5. branch's determining device, it is characterised in that including:
Judging unit, for judging whether defined injection switch is in opening;
First method determining unit, if opening is in for the injection switch, it is determined that sentencing in the first way into branch
Broken strip part, branch's Rule of judgment include the 3rd and define condition and the definition condition of computing second, and the described 3rd defines condition bag
Include original Rule of judgment or computing the first definition condition;
Environmental variance reading unit, for reading the first ring corresponding to the first definition condition respectively from environmental variance file
Second environment variable corresponding to border variable and the second definition condition;
First implementing result determining unit, for determining that the branch judges bar based on first environment variable and second environment variable
The implementing result of part;
First branch's determining unit, for determining whether to enter and the branch according to the implementing result of branch's Rule of judgment
Branch corresponding to Rule of judgment.
6. device according to claim 5, it is characterised in that the device also includes:
Second method determining unit, if being not in opening for the injection switch, it is determined that entering in a second manner described
Branch's Rule of judgment;
Character string reading unit, it is default for the described first the first character string for defining conditional definition and be described for determining
Two define the second character string of conditional definition;
Second implementing result determining unit, for based on first character string and the second character string, determining that the branch judges
The implementing result of condition is original Rule of judgment;
Second branch's determining unit, for determining whether to enter and the branch according to the implementing result of the original Rule of judgment
Branch corresponding to Rule of judgment.
7. device according to claim 5, it is characterised in that the first environment variable and second environment variable are word
Symbol string,
The first implementing result determining unit, including:
First computing unit, for the first environment variable to be made the difference with character string 0, obtain described first define condition the
One numerical value;
Second computing unit, for the second environment variable to be made the difference with character string 0, obtain described second define condition the
Two numerical value;
First implementing result determination subelement, for determining branch's Rule of judgment based on first numerical value and second value
Implementing result.
8. device according to claim 6, it is characterised in that the second implementing result determining unit, including:
3rd computing unit, for first character string to be made the difference with character string 0, obtain the first of the first definition condition
Numerical value, first character string are character string 0;
4th computing unit, for second character string to be made the difference with character string 0, obtain the second of the second definition condition
Numerical value, second character string are character string 1;
Second implementing result determination subelement, for based on first numerical value and second value, determining that the branch judges bar
The implementing result of part is original Rule of judgment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710640877.0A CN107451057B (en) | 2017-07-31 | 2017-07-31 | Branch determination method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710640877.0A CN107451057B (en) | 2017-07-31 | 2017-07-31 | Branch determination method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107451057A true CN107451057A (en) | 2017-12-08 |
CN107451057B CN107451057B (en) | 2020-11-24 |
Family
ID=60490078
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710640877.0A Active CN107451057B (en) | 2017-07-31 | 2017-07-31 | Branch determination method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107451057B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101334753A (en) * | 2007-06-26 | 2008-12-31 | 中兴通讯股份有限公司 | Unit test method and its device |
CN101436128A (en) * | 2007-11-16 | 2009-05-20 | 北京邮电大学 | Software test case automatic generating method and system |
CN101661543A (en) * | 2008-08-28 | 2010-03-03 | 西门子(中国)有限公司 | Method and device for detecting security flaws of software source codes |
CN103617114A (en) * | 2013-10-23 | 2014-03-05 | 江苏大学 | Third-party component vulnerability test method based on conditions and parameter variations |
CN103914379A (en) * | 2014-03-25 | 2014-07-09 | 北京邮电大学 | Automatic fault injection and fault detecting method and system |
US20150234736A1 (en) * | 2014-02-14 | 2015-08-20 | International Business Machines Corporation | Testing optimized binary modules |
US20160259712A1 (en) * | 2014-03-28 | 2016-09-08 | Oracle International, Corporation | System and method for determination of code coverage for software applications in a network environment |
US20160291970A1 (en) * | 2015-03-31 | 2016-10-06 | Ca, Inc. | Effective Defect Management Across Multiple Code Branches |
-
2017
- 2017-07-31 CN CN201710640877.0A patent/CN107451057B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101334753A (en) * | 2007-06-26 | 2008-12-31 | 中兴通讯股份有限公司 | Unit test method and its device |
CN101436128A (en) * | 2007-11-16 | 2009-05-20 | 北京邮电大学 | Software test case automatic generating method and system |
CN101661543A (en) * | 2008-08-28 | 2010-03-03 | 西门子(中国)有限公司 | Method and device for detecting security flaws of software source codes |
CN103617114A (en) * | 2013-10-23 | 2014-03-05 | 江苏大学 | Third-party component vulnerability test method based on conditions and parameter variations |
US20150234736A1 (en) * | 2014-02-14 | 2015-08-20 | International Business Machines Corporation | Testing optimized binary modules |
CN103914379A (en) * | 2014-03-25 | 2014-07-09 | 北京邮电大学 | Automatic fault injection and fault detecting method and system |
US20160259712A1 (en) * | 2014-03-28 | 2016-09-08 | Oracle International, Corporation | System and method for determination of code coverage for software applications in a network environment |
US20160291970A1 (en) * | 2015-03-31 | 2016-10-06 | Ca, Inc. | Effective Defect Management Across Multiple Code Branches |
Non-Patent Citations (1)
Title |
---|
胡杰 等: "软件错误注入测试技术研究", 《计算机与数字工程》 * |
Also Published As
Publication number | Publication date |
---|---|
CN107451057B (en) | 2020-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Verma et al. | A comparative study of black box testing and white box testing | |
Jacobs et al. | A quick tour of the VeriFast program verifier | |
Hoskote et al. | Coverage estimation for symbolic model checking | |
CN109634600B (en) | Code generation method based on security extension SysML and AADL models | |
CN103530228A (en) | Software testing method based on model | |
Bansal | A Comparative study of software testing techniques | |
Oh et al. | Software safety analysis of function block diagrams using fault trees | |
Grunske et al. | An automated failure mode and effect analysis based on high-level design specification with behavior trees | |
CN110457029A (en) | A kind of Logical Configuration icon configuration method based on SCADE basic algorithm block | |
CN103294596A (en) | Early warning method for contract-type software fault based on program invariants | |
Jee et al. | FBDVerifier: Interactive and visual analysis of counter-example in formal verification of function block diagram | |
CN115827610A (en) | Method and device for detecting effective load | |
CN107451057A (en) | A kind of branch determines method and device | |
CN100390733C (en) | Programme projecting device and method | |
Frey | Analysis of Petri net based control algorithms-basic properties | |
CN103226503A (en) | Integrative automatic detection method for modularization modeling and model detection | |
CN115039083A (en) | Validity verification enabling method for asynchronous algorithm generated during execution of logic connection program | |
Abdulkhaleq et al. | A systematic and semi-automatic safety-based test case generation approach based on systems-theoretic process analysis | |
CN104007966A (en) | Application program interface control information checking method based on development and usage | |
Xu et al. | Model checking UML activity diagrams in FDR | |
Thompson et al. | An integrated development environment for prototyping safety critical systems | |
Shoham et al. | Compositional verification and 3-valued abstractions join forces | |
CN108170607B (en) | Control device and control method of OTP switch | |
Klein et al. | Controller design for an FMS using Signal Interpreted Petri Nets and SFC: Validation of both descriptions via model-checking | |
Bourdonov et al. | Interaction semantics with refusals, divergence, and destruction |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20201104 Address after: 215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd. Address before: 450018 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601 Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |