CN109783363A - A kind of anomalous event analogy method and device and computer equipment - Google Patents
A kind of anomalous event analogy method and device and computer equipment Download PDFInfo
- Publication number
- CN109783363A CN109783363A CN201811536843.8A CN201811536843A CN109783363A CN 109783363 A CN109783363 A CN 109783363A CN 201811536843 A CN201811536843 A CN 201811536843A CN 109783363 A CN109783363 A CN 109783363A
- Authority
- CN
- China
- Prior art keywords
- anomalous event
- interface
- data
- simulated
- specified
- 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.)
- Pending
Links
- 230000002547 anomalous effect Effects 0.000 title claims abstract description 195
- 238000000034 method Methods 0.000 title claims abstract description 58
- 238000012545 processing Methods 0.000 claims abstract description 38
- 230000005856 abnormality Effects 0.000 claims abstract description 29
- 230000005540 biological transmission Effects 0.000 claims abstract description 12
- 238000013507 mapping Methods 0.000 claims description 21
- 230000004044 response Effects 0.000 claims description 16
- 238000004088 simulation Methods 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 6
- 230000000737 periodic effect Effects 0.000 claims description 6
- 230000007257 malfunction Effects 0.000 claims description 4
- 238000012360 testing method Methods 0.000 abstract description 32
- 238000005516 engineering process Methods 0.000 abstract description 12
- 230000000694 effects Effects 0.000 abstract description 6
- 230000002159 abnormal effect Effects 0.000 description 25
- 238000001514 detection method Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000007405 data analysis Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the invention provides a kind of anomalous event analogy method and device and computer equipments.On the one hand, there are the interface IP addresses of two interfaces of call relation by obtaining respectively for the embodiment of the present invention;Determine specified anomalous event to be simulated;It intercepts and obtains target data transmitted by the interface of transmission data in two interfaces;Abnormality processing is executed to target data according to specified anomalous event to be simulated;The interface that data are received into two interfaces sends the target data after executing abnormality processing.It solves technical problem lower to the method efficiency of anomalous event test in the related technology in the prior art and that anomalous event coverage rate is lower, and then has reached the technical effect of the efficiency and coverage rate that improve anomalous event test.
Description
[technical field]
The present invention relates to field of communication technology more particularly to a kind of anomalous event analogy methods and device and computer
Equipment.
[background technique]
In software development phase, need largely to test program, including the test to abnormal conditions.For front end
Test, can be using test coverage in some simple filters (Filter) or Integrated Development Environment (Eclipse)
The progress exception such as plug-in unit test.But the test for rear end, programmer need r/w cell (Junit) to test code, often
Secondary test requires to define some exceptions, and needs to write logic assembly or more more complicated, using simulation (Mock) frame
Execute test, but Mock frame can only small-scale covering it is abnormal, to the abnormal conditions of some complexity can not large area covering,
In addition, there are also the Eclipse of similar this class testing code coverage of coverage rate (Coverage) testing tool to analyze plug-in unit, but this
Kind tool can not simulate the Network Abnormal of some complexity, be only capable of the coverage for combining Junit to check code, abnormal level of coverage is also
The quantity of Junit case need to be relied on.
For lower to the method efficiency of the anomalous event test in the related technology and lower technology of anomalous event coverage rate
Problem, currently no effective solution has been proposed.
[summary of the invention]
In view of this, the embodiment of the invention provides a kind of anomalous event analogy method and device and computer equipment,
At least to solve lower to the method efficiency of the anomalous event test in the related technology and lower technology of anomalous event coverage rate
Problem.
On the one hand, the embodiment of the invention provides a kind of anomalous event analogy methods, comprising: obtains to exist to call respectively and close
The interface IP address of two interfaces of system;Determine specified anomalous event to be simulated;It intercepts and obtains in two interfaces and send data
Interface transmitted by target data;Abnormality processing is executed to target data according to specified anomalous event to be simulated;To two
The interface that data are received in interface sends the target data after executing abnormality processing.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, what determination was specified
Wait simulate abnormal step, comprising: provide the anomalous event of multiple candidates in display interface;Receive the exception to multiple candidates
The selection operation of event obtains specified anomalous event to be simulated, wherein specified anomalous event to be simulated is selection operation choosing
In anomalous event combination.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation obtains deposit respectively
The interface IP address of two interfaces of call relation the step of, comprising: input control is provided in display interface, wherein input
Control is used for input interface address;By input control, the interface IP address of two interfaces of input is received.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation connects to two
After target data after receiving the interface transmission execution abnormality processing of data in mouthful, this method further include: obtain and receive data
Interface feedback data;Store the mapping relations of feedback data and specified anomalous event to be simulated.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation is executing storage
After the step of mapping relations of feedback data and specified anomalous event to be simulated, this method further include: be based on mapping relations
In feedback data, judge receive data interface whether malfunction to the response of specified anomalous event to be simulated;Method is also wrapped
Include: according to stored mapping relations, the number of periodic statistical response error is more than the anomalous event to be simulated of preset threshold, is obtained
To target anomalous event to be simulated.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation waits for mould in target
In the case that quasi- anomalous event is the combination of at least one anomalous event, the step for determining specified anomalous event to be simulated is being executed
Before rapid, this method further include: the anomalous event of multiple candidates is provided in display interface, wherein in the exception of multiple candidates
In event, at least one corresponding anomalous event of target anomalous event to be simulated is in the selected state of default.
A technical solution in above-mentioned technical proposal has the following beneficial effects:
By intercepting the data sent between two interfaces, and it is different to data execution according to specified anomalous event to be simulated
Often processing enables the side for receiving data to receive in data when simulating the state of anomalous event, facilitates use
The operation at family, can be according to the practical a variety of exceptions of digital simulation sent of interface without Mock data without writing test case
Event, to solve lower to the method efficiency of the anomalous event test in the related technology and lower skill of anomalous event coverage rate
Art problem has reached the efficiency for improving anomalous event test and the technical effect for improving anomalous event coverage rate.
On the other hand, the embodiment of the invention provides a kind of anomalous event simulators, comprising: first acquisition unit is used
In obtaining respectively, there are the interface IP addresses of two interfaces of call relation;Determination unit, for determining specified exception to be simulated
Event;Second acquisition unit sends target data transmitted by the interface of data for intercepting and obtaining in two interfaces;It executes
Unit executes abnormality processing to target data for specified anomalous event to be simulated;Transmission unit, for into two interfaces
The interface for receiving data sends the target data after executing abnormality processing.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, determination unit packet
It includes: the first display module, for providing the anomalous event of multiple candidates in display interface;First receiving module, for receiving
To the selection operation of the anomalous event of multiple candidates, specified anomalous event to be simulated is obtained, wherein specified exception to be simulated
Event is the combination for the anomalous event that selection operation is chosen.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, first obtains list
Member includes: the second display module, for providing input control in display interface, wherein input control is for input interface
Location;Second receiving module, for receiving the interface IP address of two interfaces of input by input control.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, the device also wrap
It includes: third acquiring unit, after sending the execution abnormality processing in the interface for receiving data into described two interfaces
After the target data, the data of the interface feedback for receiving data are obtained;Storage unit, for store feedback data with
The mapping relations of the specified anomalous event to be simulated.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, the device also wrap
Include: judging unit, for storage feedback data and anomalous event to be simulated mapping relations after, based in mapping relations
Feedback data, judge receive data interface treat simulation anomalous event response whether malfunction;Statistic unit, for according to
The number of the mapping relations of storage, periodic statistical response error is more than the anomalous event to be simulated of preset threshold, obtains mesh
Mark anomalous event to be simulated.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation waits for mould in target
In the case where the quasi- abnormal combination for waiting simulating exception at least one, the device further include: display unit, in display interface
It is middle that the anomalous event of multiple candidates is provided, wherein in the anomalous event of the multiple candidate, the target waits simulating abnormal thing
At least one corresponding described anomalous event of part is in the selected state of default.
A technical solution in above-mentioned technical proposal has the following beneficial effects:
By intercepting the data sent between two interfaces, and it is different to data execution according to specified anomalous event to be simulated
Often processing enables the side for receiving data to receive in data when simulating the state of anomalous event, facilitates use
The operation at family, can be according to the practical a variety of exceptions of digital simulation sent of interface without Mock data without writing test case
Event, to solve lower to the method efficiency of the anomalous event test in the related technology and lower skill of anomalous event coverage rate
Art problem has reached the efficiency for improving anomalous event test and the technical effect for improving anomalous event coverage rate.
On the other hand, the embodiment of the invention also provides a kind of computer equipments, including memory, processor and storage
In memory and the computer program that can run on a processor, processor are realized above-mentioned any one when executing computer program
The anomalous event analogy method of item.
In another aspect, the storage medium includes the program of storage the embodiment of the invention provides a kind of storage medium,
In, in program operation, equipment where control storage medium executes anomalous event analogy method of the invention.
[Detailed description of the invention]
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached
Figure is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this field
For those of ordinary skill, without any creative labor, it can also be obtained according to these attached drawings other attached
Figure.
Fig. 1 is a kind of flow diagram of optional anomalous event analogy method provided by the embodiment of the present invention;
Fig. 2 is a kind of schematic diagram of optional anomalous event simulator provided by the embodiment of the present invention.
[specific embodiment]
For a better understanding of the technical solution of the present invention, being retouched in detail to the embodiment of the present invention with reference to the accompanying drawing
It states.
It will be appreciated that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Base
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts it is all its
Its embodiment, shall fall within the protection scope of the present invention.
The term used in embodiments of the present invention is only to be not intended to be limiting merely for for the purpose of describing particular embodiments
The present invention.In the embodiment of the present invention and the "an" of singular used in the attached claims, " described " and "the"
It is also intended to including most forms, unless the context clearly indicates other meaning.
It should be appreciated that term "and/or" used herein is only a kind of incidence relation for describing affiliated partner, indicate
There may be three kinds of relationships, for example, A and/or B, can indicate: individualism A, exist simultaneously A and B, individualism B these three
Situation.In addition, character "/" herein, typicallys represent the relationship that forward-backward correlation object is a kind of "or".
It should be noted that although in claims of the present invention, the description and the appended drawings may using term first,
Second, third etc. is used to distinguish similar objects XXX, it should be understood that term first, second, third, etc. is not necessarily used for describing
Specific sequence or precedence are only used to for these similar object XXX being distinguished from each other out.For example, not departing from the present invention
In the case where scope of embodiments, the first XXX can also be referred to as the 2nd XXX, and similarly, the 2nd XXX can also be referred to as first
XXX。
Depending on context, word as used in this " if " can be construed to " ... when " or " when ...
When " or " in response to determination " or " in response to detection ".Similarly, depend on context, phrase " if it is determined that " or " if detection
(condition or event of statement) " can be construed to " when determining " or " in response to determination " or " when the detection (condition of statement
Or event) when " or " in response to detection (condition or event of statement) ".
For the thing lower to the method efficiency of anomalous event test in the related technology and abnormal in the presence of the prior art
The lower technical problem of part coverage rate, the embodiment of the invention provides following resolving ideas: there are call relations for acquisition respectively
The interface IP address of two interfaces;Determine specified anomalous event to be simulated;It intercepts and obtains and send connecing for data in two interfaces
Target data transmitted by mouthful;Abnormality processing is executed to target data according to specified anomalous event to be simulated;To two interfaces
The middle interface for receiving data sends the target data after executing abnormality processing.
Under the guidance of the thinking, this programme embodiment provides following feasible embodiment.
The embodiment of the invention provides a kind of anomalous event analogy methods.
Specifically, referring to FIG. 1, it is a kind of optional anomalous event analogy method provided by the embodiment of the present invention
Flow diagram, as shown in Figure 1, method includes the following steps:
Step 101, there are the interface IP addresses of two interfaces of call relation for acquisition respectively.
Any two that two interfaces can be backstage have the interface of call relation, for example, two interfaces include first
Interface and second interface can be first interface and call second interface, is also possible to second interface and calls first interface.There are tune
With data transmission is able to carry out between two interfaces of relationship, the direction of data transmission can be first interface and send out to second interface
Data are sent, is also possible to second interface to first interface and sends data.
Anomalous event analogy method provided in an embodiment of the present invention needs to obtain the interface IP address of two interfaces, that is, the
The interface IP address of one interface and the interface IP address of second interface.Optionally, the mode of acquisition can be is obtained by display interface
, specifically, step 101 obtains respectively, there are the interface IP addresses of the two of call relation interface to include:
Step 1011, input control is provided in display interface, wherein input control is used for input interface address;
Step 1012, by input control, the interface IP address of two interfaces of input is received.
That is, anomalous event analogy method provided in an embodiment of the present invention can be realized by visual mode.
It should be noted that the executing subject of anomalous event analogy method provided in an embodiment of the present invention can be abnormal thing
Part simulator, the device can be the application for being located locally terminal, or can also be to be located locally in the application of terminal
The functional units such as plug-in unit or Software Development Kit (Software Development Kit, SDK), the embodiment of the present invention is to this
Without being particularly limited to.It is understood that the application can be mounted in the application program (nativeApp) in terminal,
Or can also be a web page program (webApp) of the browser in terminal, the embodiment of the present invention is to this without limiting.
In turn, since anomalous event analogy method provided in an embodiment of the present invention can be realized by visual mode,
Correspondingly, above-mentioned anomalous event simulator can be visually, for example, showing the first input control by display interface
With two input controls of the second input control, it is respectively used to receive the interface IP address of an interface.
Step 102, specified anomalous event to be simulated is determined.
Anomalous event refers to that improper event, anomalous event are simultaneously non-erroneous.There are between two interfaces of call relation
Anomalous event may be any type of anomalous event, for example, lack part data, data delay repeats to send data, number
According to loss etc..
Alternatively, being also likely to be any several types anomalous event there are the anomalous event between two interfaces of call relation
Combination, the data of part have been lacked for example, repeating to send, specifically, being any several in specified anomalous event to be simulated
In the case where the combination of seed type anomalous event, step 102 determines that specified anomalous event to be simulated may include steps of:
Step 1021, the anomalous event of multiple candidates is provided in display interface;
Step 1022, the selection operation to the anomalous event of multiple candidates is received, specified anomalous event to be simulated is obtained,
Wherein, specified anomalous event to be simulated is the combination for the anomalous event that selection operation is chosen.
For example, show the anomalous event of several candidates such as " data delay ", " shortage of data " in the display interface
Filter F ilter, the corresponding choice box of each filter, if to have selected " data delay " and " shortage of data " right by user
The choice box answered, it is determined that specified anomalous event to be simulated is the group of the anomalous event of " data delay " and " shortage of data "
It closes.
Step 103, it intercepts and obtains target data transmitted by the interface of transmission data in two interfaces.
In the feelings that the executing subject of anomalous event analogy method provided in an embodiment of the present invention is anomalous event simulator
Under condition, after the interface IP address for getting two interfaces, anomalous event simulator is equivalent to connection between the two interfaces, appoints
The data that an interface of anticipating issues are required to the processing by anomalous event simulator, and anomalous event simulator, which can intercept, appoints
The data that an interface of anticipating issues, and the data got are executed with the specified corresponding processing of anomalous event to be simulated.
Step 104, abnormal to target data execution abnormality processing wait simulate according to specified.
Sent in getting two interfaces transmitted by the interface of data after target data, need according to it is specified to
It simulates anomalous event and abnormality processing is executed to target data.For example, if specified anomalous event to be simulated is " shortage of data ",
The then partial data in delete target data, if specified anomalous event to be simulated is " data delay ", by target data
The preset time that is delayed is sent, if specified anomalous event to be simulated is the combination of " shortage of data " and " repeating to send data ",
Target data is then deleted into part, and sends preset times for the Data duplication obtained after partial data is deleted.
Step 105, the interface that data are received into two interfaces sends the target data after executing abnormality processing.
After executing abnormality processing to target data to specified anomalous event to be simulated, obtain after executing abnormality processing
Target data, in turn, into two interfaces receive data interface send execute abnormality processing after target data.It needs
Bright, according to the definition of certain anomalous events, the interface for receiving data not will receive data namely loss of data, in turn, to
The step of interface of reception data sends the target data after executing abnormality processing in two interfaces, including connecing to reception data
Mouth sends empty data.
The interface of data is received after receiving the data for meeting anomalous event to be simulated and sending situation, it can be to this different
Normal situation is responded, may the data of feedback response connect executing step 105 to two in this optional situation
After target data after receiving the interface transmission execution abnormality processing of data in mouthful, the interface that can also obtain reception data is anti-
The data of feedback, and store feedback data and wait simulate the mapping relations between anomalous event.
Further alternative, after the mapping relations of storage feedback data and anomalous event to be simulated, this method may be used also
Whether malfunctioned with based on the feedback data in mapping relations, judging that the interface for receiving data treats the response of simulation anomalous event.
It, can be according to stored mapping relations, the number of periodic statistical response error in the case where having the mapping relations of storage
More than the exception to be simulated of preset threshold, obtains target and wait simulating exception.
In turn, the result of periodic statistical can also be utilized, by response error number be more than preset threshold to
Use-case of the anomalous event as the automatic test of default is simulated, that is, providing the abnormal thing of multiple candidates in display interface
When part, in the anomalous event of multiple candidates, target is waited simulating at least one abnormal corresponding anomalous event and is set as defaulting
Selected state.
A kind of specific application scenarios of above-described embodiment are described below as follows:
1, user opens abnormal simulator, shows the display interface of abnormal simulator.Exist between A interface and B interface and adjusts
With relationship: A interface calls B interface, and user passes through the display interface of abnormal simulator, and the specified A of Xiang Yichang simulator input connects
The interface IP address of mouth and the interface IP address of B interface are equivalent between A interface and the call relation of B interface a nested exception
Simulator, abnormal simulator are able to carry out anomalous event analogy method provided in an embodiment of the present invention.
2, user selects specified anomalous event in multiple anomalous events, and user can choose one or more abnormal things
The group of the type of part, the anomalous event of user's selection is combined into specified anomalous event.
3, abnormal simulator intercepts A, the data that B interface is sent after determining specified anomalous event, and according to interception
The digital simulation anomalous event arrived.
4, the information that abnormal simulator further returns to the interface for receiving anomalous event is collected, maintenance data point
Analysis, counted from the dimensions such as " collapse rate ", " abnormality processing error rate ", " disposition ", by artificial, machine learning and/
Or the modes such as big data analysis count the anomalous event for being easily processed error.
Allow system being capable of the self-teaching (initial stage are as follows: artificial periodic statistical system reports an error processing capacity, subsequent available big
The anomalous event for being easily processed error is included in " easy to handle error is abnormal " range by data analysis)
5, according to statistical result, the anomalous event of easy to handle error is integrated to automatic test case, for example, can lead to
The display interface for crossing abnormal simulator shows that easy to handle error is chosen in the recommendation of easy to handle error anomalous event combination, or default
Anomalous event combination.
Above-mentioned exception simulator can intercept specified network data according to the filter F ilter that user specifies, then
It is simulated according to specified anomalous event, so that the interface for receiving data is generated calling corresponding with anomalous event to be simulated abnormal
Event.
It should be noted that terminal involved in the embodiment of the present invention can include but is not limited to personal computer
(Personal Computer, PC), personal digital assistant (Personal Digital Assistant, PDA), wireless handheld
Equipment, tablet computer (Tablet Computer), mobile phone, MP3 player, MP4 player etc..
The anomalous event analogy method of the embodiment of the present invention at least has the advantages that
By intercepting the data sent between two interfaces, and it is different to data execution according to specified anomalous event to be simulated
Often processing enables the side for receiving data to receive in data when simulating the state of anomalous event, facilitates use
The operation at family, can be according to the practical a variety of exceptions of digital simulation sent of interface without Mock data without writing test case
Event, to solve lower to the method efficiency of the anomalous event test in the related technology and lower skill of anomalous event coverage rate
Art problem has reached the efficiency for improving anomalous event test and the technical effect for improving anomalous event coverage rate.
Based on anomalous event analogy method provided by the embodiment of the present invention, the embodiment of the present invention is further provided in realization
State the Installation practice of each step and method in embodiment of the method.It should be noted that 101~step 105 of above-mentioned steps is held
Row main body can be anomalous event simulator.
Referring to FIG. 2, it is a kind of function side of optional anomalous event simulator provided by the embodiment of the present invention
Block figure.As shown in Fig. 2, the device includes: first acquisition unit 10, determination unit 20, second acquisition unit 30, execution unit 40
With transmission unit 50.Wherein, first acquisition unit, for obtaining respectively, there are the interface IP addresses of the two of call relation interface;
Determination unit, for determining specified anomalous event to be simulated;Second acquisition unit is sent out for intercepting and obtaining in two interfaces
Send target data transmitted by the interface of data;Execution unit executes target data for specified anomalous event to be simulated
Abnormality processing;Transmission unit, the interface for receiving data into two interfaces send the target data after executing abnormality processing.
As a kind of optional embodiment of above-described embodiment, determination unit comprises determining that unit includes: the first display
Module, for providing the anomalous event of multiple candidates in display interface;First receiving module, for receiving to multiple candidates'
The selection operation of anomalous event obtains specified anomalous event to be simulated, wherein specified anomalous event to be simulated is selection behaviour
Make the combination for the anomalous event chosen.
As a kind of optional embodiment of above-described embodiment, first acquisition unit includes: the second display module, is used for
Input control is provided in display interface, wherein input control is used for input interface address;Second receiving module, for passing through
Input control receives the interface IP address of two interfaces of input.
As a kind of optional embodiment of above-described embodiment, the device further include: third acquiring unit, for
After the target data after receiving the interface transmission execution abnormality processing of data in described two interfaces, described in acquisition
Receive the data of the interface feedback of data;Storage unit, for storing feedback data and the specified anomalous event to be simulated
Mapping relations.
As a kind of optional embodiment of above-described embodiment, the device further include: judging unit, for anti-in storage
After the mapping relations for presenting data and anomalous event to be simulated, based on the feedback data in mapping relations, judge to receive data
Whether the response that interface treats simulation anomalous event malfunctions;Statistic unit is used for according to the stored mapping relations, periodically
The number of statistics response error is more than the anomalous event to be simulated of preset threshold, obtains target anomalous event to be simulated.
As a kind of optional embodiment of above-described embodiment, target wait simulating it is abnormal at least one wait simulating it is different
In the case where normal combination, the device further include: display unit, for providing the abnormal thing of multiple candidates in display interface
Part, wherein in the anomalous event of the multiple candidate, the target anomalous event to be simulated is corresponding, and described at least one is different
Ordinary affair part is in the selected state of default.
Anomalous event analogy method shown in FIG. 1 is able to carry out by each unit in this present embodiment, the present embodiment is not detailed
The part carefully described can refer to the related description to Fig. 1 corresponding embodiment.
The anomalous event simulator of the embodiment of the present invention at least has the advantages that
By intercepting the data sent between two interfaces, and it is different to data execution according to specified anomalous event to be simulated
Often processing enables the side for receiving data to receive in data when simulating the state of anomalous event, facilitates use
The operation at family, can be according to the practical a variety of exceptions of digital simulation sent of interface without Mock data without writing test case
Event, to solve lower to the method efficiency of the anomalous event test in the related technology and lower skill of anomalous event coverage rate
Art problem has reached the efficiency for improving anomalous event test and the technical effect for improving anomalous event coverage rate.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Those skilled in the art is appreciated that implement the method for the above embodiments and can be
Relevant hardware is instructed to complete by program, the program can store in computer-readable storage medium, meter
Calculation machine is able to carry out anomalous event analogy method provided in an embodiment of the present invention by reading the program in storage medium.
Correspondingly, the storage medium of the embodiment of the present invention includes depositing the embodiment of the invention also provides a kind of storage medium
The program of storage, wherein in program operation, equipment where control storage medium executes following steps: it obtains to exist respectively and call
The interface IP address of two interfaces of relationship;Determine specified anomalous event to be simulated;It intercepts and obtains in two interfaces and send number
According to interface transmitted by target data;Abnormality processing is executed to target data according to specified anomalous event to be simulated;To two
The interface that data are received in a interface sends the target data after executing abnormality processing.
The storage medium of the embodiment of the present invention at least has the advantages that
By intercepting the data sent between two interfaces, and it is different to data execution according to specified anomalous event to be simulated
Often processing enables the side for receiving data to receive in data when simulating the state of anomalous event, facilitates use
The operation at family, can be according to the practical a variety of exceptions of digital simulation sent of interface without Mock data without writing test case
Event, to solve lower to the method efficiency of the anomalous event test in the related technology and lower skill of anomalous event coverage rate
Art problem has reached the efficiency for improving anomalous event test and the technical effect for improving anomalous event coverage rate.
The embodiment of the invention also provides a kind of computer equipment, including memory, processor and it is stored in memory
In and the computer program that can run on a processor, processor mentioned when executing computer program for realizing the embodiment of the present invention
The anomalous event analogy method of confession.
In several embodiments provided by the present invention, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or group
Part can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown
Or the mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, device or unit it is indirect
Coupling or communication connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one
In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer
It is each that device (can be personal computer, server or network equipment etc.) or processor (Processor) execute the present invention
The part steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read-
Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. it is various
It can store the medium of program code.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.
Claims (10)
1. a kind of anomalous event analogy method, which is characterized in that the described method includes:
There are the interface IP addresses of two interfaces of call relation for acquisition respectively;
Determine specified anomalous event to be simulated;
It intercepts and obtains target data transmitted by the interface of transmission data in described two interfaces;
Abnormality processing is executed to the target data according to the specified anomalous event to be simulated;
The interface that data are received into described two interfaces sends the target data after executing the abnormality processing.
2. the method according to claim 1, wherein the step of determination specified anomalous event to be simulated,
Include:
The anomalous event of multiple candidates is provided in display interface;
The selection operation to the anomalous event of the multiple candidate is received, the specified anomalous event to be simulated is obtained, wherein
The specified anomalous event to be simulated is the combination for the anomalous event that the selection operation is chosen.
3. the method according to claim 1, wherein there are two interfaces of call relation for the acquisition respectively
The step of interface IP address, comprising:
Input control is provided in display interface, wherein the input control is used for input interface address;
By the input control, the interface IP address of described two interfaces of input is received.
4. the method according to claim 1, wherein being sent in the interface for receiving data into described two interfaces
After the target data after executing the abnormality processing, the method also includes:
Obtain the data of the interface feedback for receiving data;
Store the mapping relations of feedback data and the specified anomalous event to be simulated.
5. according to the method described in claim 4, it is characterized in that,
After the step of executing the mapping relations of storage feedback data and the specified anomalous event to be simulated, the method
Further include: based on the feedback data in the mapping relations, judge the interface for receiving data to it is described it is specified to
Whether the response of simulation anomalous event malfunctions;
The method also includes: according to the stored mapping relations, the number of periodic statistical response error is more than default threshold
The anomalous event to be simulated of value obtains target anomalous event to be simulated.
6. according to the method described in claim 5, it is characterized in that, being that at least one is different in target anomalous event to be simulated
In the case where the combination of ordinary affair part, before the step of executing the anomalous event to be simulated that the determination is specified, the method is also
Include:
The anomalous event of multiple candidates is provided in display interface, wherein in the anomalous event of the multiple candidate, the mesh
It marks at least one corresponding described anomalous event of anomalous event to be simulated and is in the selected state of default.
7. a kind of anomalous event simulator, which is characterized in that described device includes:
First acquisition unit, for obtaining respectively, there are the interface IP addresses of the two of call relation interface;
Determination unit, for determining specified anomalous event to be simulated;
Second acquisition unit sends target data transmitted by the interface of data for intercepting and obtaining in described two interfaces;
Execution unit executes abnormality processing to the target data for the specified anomalous event to be simulated;
Transmission unit, the interface for receiving data into described two interfaces send the mesh after executing the abnormality processing
Mark data.
8. device according to claim 7, which is characterized in that the determination unit includes:
First display module, for providing the anomalous event of multiple candidates in display interface;
First receiving module, for receiving the selection operation of the anomalous event to the multiple candidate, obtain it is described it is specified to
Simulate anomalous event, wherein the specified anomalous event to be simulated is the combination for the anomalous event that the selection operation is chosen.
9. device according to claim 7, which is characterized in that the first acquisition unit includes:
Second display module, for providing input control in display interface, wherein the input control is for input interface
Location;
Second receiving module, for receiving the interface IP address of described two interfaces of input by the input control.
10. a kind of computer equipment, including memory, processor and storage are in the memory and can be in the processor
The computer program of upper operation, which is characterized in that the processor realized when executing the computer program as claim 1 to
Anomalous event analogy method described in 6 any one.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811536843.8A CN109783363A (en) | 2018-12-14 | 2018-12-14 | A kind of anomalous event analogy method and device and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811536843.8A CN109783363A (en) | 2018-12-14 | 2018-12-14 | A kind of anomalous event analogy method and device and computer equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109783363A true CN109783363A (en) | 2019-05-21 |
Family
ID=66497087
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811536843.8A Pending CN109783363A (en) | 2018-12-14 | 2018-12-14 | A kind of anomalous event analogy method and device and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109783363A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110442501A (en) * | 2019-07-22 | 2019-11-12 | 阿里巴巴集团控股有限公司 | The method, apparatus and electronic equipment of analog service exception |
CN113127345A (en) * | 2021-04-06 | 2021-07-16 | 北京字跳网络技术有限公司 | Application testing method and device, electronic equipment and storage medium |
CN113836013A (en) * | 2021-09-17 | 2021-12-24 | 深圳Tcl新技术有限公司 | Embedded point testing method and device, computer equipment and computer readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130191052A1 (en) * | 2012-01-23 | 2013-07-25 | Steven J. Fernandez | Real-time simulation of power grid disruption |
CN103440457A (en) * | 2013-08-20 | 2013-12-11 | 上海交通大学 | Binary program analytic system based on process simulation |
CN106484592A (en) * | 2016-09-28 | 2017-03-08 | 北京奇虎科技有限公司 | A kind of method for detecting abnormality and device |
CN107659455A (en) * | 2017-10-16 | 2018-02-02 | 武汉斗鱼网络科技有限公司 | A kind of method, storage medium, equipment and the system of iOS ends Mock data |
CN108427631A (en) * | 2017-02-14 | 2018-08-21 | 北京京东尚科信息技术有限公司 | A kind of application test systems, method, electronic equipment and readable storage medium storing program for executing |
-
2018
- 2018-12-14 CN CN201811536843.8A patent/CN109783363A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130191052A1 (en) * | 2012-01-23 | 2013-07-25 | Steven J. Fernandez | Real-time simulation of power grid disruption |
CN103440457A (en) * | 2013-08-20 | 2013-12-11 | 上海交通大学 | Binary program analytic system based on process simulation |
CN106484592A (en) * | 2016-09-28 | 2017-03-08 | 北京奇虎科技有限公司 | A kind of method for detecting abnormality and device |
CN108427631A (en) * | 2017-02-14 | 2018-08-21 | 北京京东尚科信息技术有限公司 | A kind of application test systems, method, electronic equipment and readable storage medium storing program for executing |
CN107659455A (en) * | 2017-10-16 | 2018-02-02 | 武汉斗鱼网络科技有限公司 | A kind of method, storage medium, equipment and the system of iOS ends Mock data |
Non-Patent Citations (1)
Title |
---|
王晶;孙越强;: "嵌入式汇编语言软件单元测试方法", 计算机与现代化, no. 03, 15 March 2008 (2008-03-15) * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110442501A (en) * | 2019-07-22 | 2019-11-12 | 阿里巴巴集团控股有限公司 | The method, apparatus and electronic equipment of analog service exception |
CN110442501B (en) * | 2019-07-22 | 2023-09-26 | 创新先进技术有限公司 | Method and device for simulating business abnormality and electronic equipment |
CN113127345A (en) * | 2021-04-06 | 2021-07-16 | 北京字跳网络技术有限公司 | Application testing method and device, electronic equipment and storage medium |
CN113836013A (en) * | 2021-09-17 | 2021-12-24 | 深圳Tcl新技术有限公司 | Embedded point testing method and device, computer equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104050076B (en) | Application software testing method, apparatus and system on mobile terminal | |
CN106484622B (en) | Test method, apparatus and system | |
CN105426298B (en) | A kind of method for testing software and system based on ADB | |
CN103365701B (en) | Work method of analog card reader and analog communication system | |
CN105450476B (en) | A kind of regression test system and test method | |
CN109302522A (en) | Test method, device and computer system and medium | |
CN109783363A (en) | A kind of anomalous event analogy method and device and computer equipment | |
CN106095673A (en) | Automated testing method based on WEB interface and system | |
CN102244594A (en) | Network emulation in manual and automated testing tools | |
CN108696399A (en) | The test method and device of business service | |
CN101888318A (en) | System and method for testing performance index of communication system | |
CN106648556A (en) | Front end and back end integrated development testing method and device | |
CN109167812A (en) | Evaluation services quality, the method for determining adjustable strategies, server and storage medium | |
CN105579976B (en) | Webpage automated testing method and device | |
CN107632827A (en) | The generation method and device of the installation kit of application | |
CN107302476A (en) | A kind of automated testing method and system for testing asynchronous interactive system | |
CN110442502A (en) | A kind of method, apparatus buried a little, equipment and storage medium | |
CN109815120A (en) | Test method, device, computer equipment and the storage medium of application | |
CN107220169A (en) | A kind of emulating server returns to the method and apparatus for customizing data | |
CN109299011A (en) | A kind of test method and system of application program | |
CN109558328A (en) | A kind of test method of code coverage, system, device and readable storage medium storing program for executing | |
CN112597015A (en) | System test method, device, computer equipment and storage medium | |
CN110308954A (en) | Click event interception method, device and mobile terminal | |
CN107145447A (en) | Detect method, device and the electronic equipment of memory overflow | |
CN108763052A (en) | A kind of method for testing performance and system of virtual reality software memory reclaim mechanism |
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 |