CN108874663A - Black box fault filling method and system and medium apparatus - Google Patents

Black box fault filling method and system and medium apparatus Download PDF

Info

Publication number
CN108874663A
CN108874663A CN201810510380.1A CN201810510380A CN108874663A CN 108874663 A CN108874663 A CN 108874663A CN 201810510380 A CN201810510380 A CN 201810510380A CN 108874663 A CN108874663 A CN 108874663A
Authority
CN
China
Prior art keywords
measured
fault
platform
service
black box
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
Application number
CN201810510380.1A
Other languages
Chinese (zh)
Inventor
聂长海
尹震
张文茜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University
Original Assignee
Nanjing University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University filed Critical Nanjing University
Priority to CN201810510380.1A priority Critical patent/CN108874663A/en
Publication of CN108874663A publication Critical patent/CN108874663A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Abstract

The invention discloses a kind of black box fault filling method and system and medium apparatus.Its method for implanting includes the following steps:It tracks platform service to be measured and calls path;According to calling service coordinates measurement or improve corresponding service system assumption diagram;Fault scenes set to be measured is inferred according to service architecture figure recurrence;Direct fault location is carried out according to fault scenes set, an effective fault scenes are had found if it can destroy platform to be measured;Otherwise it once finding that certain fault scenes cannot be destroyed to platform to be measured, then returns and continues tracking to all calling paths.It efficiently can carry out fault-tolerance assessment to large-scale computer platform, and what can not be omitted finds all effective fault scenes set.

Description

Black box fault filling method and system and medium apparatus
Technical field
The present invention relates to computer testing field, be it is a kind of can be applied to System Error-tolerance Property assessment based on calling service The black box fault filling method and system and medium apparatus in path.
Technical background
Direct fault location test (Fault Insertion Test, FIT) is a kind of the effective of assessment system reliability and has Technology.The principle of this method be exactly by specific direct fault location to platform to be measured (Software Under Testing, SUT in), and the response condition of the platform is monitored, so that whether the behavior observing it and occurring when in face of such failure accords with It closes and is expected.
But the total incipient fault space of a platform be often it is very huge, exhaustion explore be it is unpractical, because This direct fault location needs effective search strategy.
Existing common FIT method is broadly divided into three classes, and one kind is random device, i.e., random exploration incipient fault is empty Between;It is another kind of, it is to be explored under the guidance of domain expert;Last one kind is to utilize pattern checking.
But these three methods have the shortcomings that each.
Random device tends not to be accurately positioned to failure, and be easy in some invalid failures waste test at This;The search of domain expert's guidance, can not scale then too dependent on manpower;Model checking approach needs to analyze semanteme, is difficult Automation, higher cost.
Summary of the invention
To solve problems of the prior art, therefore direct fault location needs a kind of new method, can be efficient right Large-scale computer platform carries out fault-tolerance assessment, and what can not be omitted finds all effective fault scenes set.
The present invention adopts the following technical scheme that:
A kind of black box fault filling method, includes the following steps:
It tracks platform service to be measured and calls path;
According to calling service coordinates measurement or improve corresponding service system assumption diagram;
Fault scenes set to be measured is inferred according to service architecture figure recurrence;
Direct fault location is carried out according to fault scenes set, an effective failure is had found if it can destroy platform to be measured Scene;Otherwise it once finding that certain fault scenes cannot be destroyed to platform to be measured, then returns and continues tracking to all calling roads Diameter.
As an improvement the tracking calling service path, includes the following steps:
Platform to be measured tracks calling service path, and the JSON format that the service path tracked is packaged into result is passed Give service architecture figure.
As an improvement described generate or improve corresponding service system assumption diagram, include the following steps:
According to calling service path, the calling service chain of JSON format is parsed, extraction path information, by will be corresponding Service node is mapped, and the interior business system assumption diagram of examining system is generated or improve.
As an improvement the recurrence infers fault scenes set to be measured, include the following steps:
On the basis of service architecture figure, recall from bottom to top since destination node, recursive calculation, passes through conjunction It takes and extracts and infer fault scenes set to be measured, and the JSON format for being packaged into result is passed back.
As an improvement the direct fault location and test failure scene, include the following steps:
Successively carry out direct fault location according to the fault scenes collection to be measured got, if some fault scenes can destroy to Platform is surveyed, illustrates to have found an effective fault scenes, is the fault-tolerance bottleneck of platform to be measured;If instead cannot destroy Platform to be measured illustrates that platform to be measured has new calling service path to obtain correct result at this time, then returns track the road at this time Diameter, and so on, until the interior business for exploring platform whole to be measured, which calls architecture or reaches preset condition, to stop Only.
As an improvement described generate or improve service architecture figure, it further include the following steps:
According to the instant node in platform service node to be measured, i.e. redundant node, weight is extracted from the call chain after merging It wants information to form simplified call chain, judges instant node deposit instant node table therein.
As an improvement the recurrence infers fault scenes set to be measured, it further include following steps:
Reduction sequence is carried out to the fault scenes set of generation, removes the fault scenes of those repeated and redundants;
As an improvement the sequence includes the following steps:
On the basis of instant node table, priority arrangement is carried out to fault scenes by the method for equivalence class partition, is obtained Most reasonable fault scenes set to be measured out.
Purpose to realize the present invention also provides a kind of black box fault injection system, including above-mentioned black box fault filling method In hardware and software.
Purpose to realize the present invention also provides a kind of black box direct fault location hardware system, including tracing module, generates mould Block, recurrence module, injection module, wherein:
The tracing module tracks calling service path for platform to be measured;
The generation module, for according to calling service coordinates measurement or improving corresponding service system assumption diagram;
The recurrence module, for inferring fault scenes set to be measured according to service architecture figure recurrence;
The injection module carries out direct fault location according to fault scenes set, has found if it can destroy platform to be measured One effective fault scenes;Otherwise it once finding that certain fault scenes cannot be destroyed to platform to be measured, then returns and continues tracking extremely All calling paths.
Purpose to realize the present invention also more provides a kind of medium and equipment, including Jie in the black box injected system Computer software programs in the black box method for implanting of matter and storage in the medium.
The equipment includes central processing unit, and be connected the medium with the central processing;
The central processing unit calls the computer software programs from the medium, completes the black box injection.
Compared with prior art, the invention has the advantages that:
The present invention is a kind of efficient black box fault filling method and system and medium apparatus, can effectively, it is efficient right Platform to be measured carries out direct fault location test, assesses its fault-tolerance.It does not need the source code for obtaining platform to be measured, but utilizes The calling service path that platform to be measured tracks, from result, abduction goes out potential fault scenes collection, then will be potential Fault scenes inject in platform to be measured and verified, once find that some fault scenes cannot destroy platform to be measured, it is to be measured flat Platform is still correctly run, and will be tracked new substitution service and be called path, is at this moment again transmitted to new service path to be measured flat The operation flow of platform regenerates potential fault scenes, and so on, until the interior business process of platform to be measured is complete Portion, which explores, to be come, and is a kind of efficient black box fault filling method.
Higher fault coverage can be reached with less test case compared with random device, with searching for expert's guidance Rope does not need to obtain the source code for analyzing platform to be measured compared with pattern checking compared to can be adapted for more massive system, can It is automated with scale, application scenarios are more extensive.
The present invention can be adaptive the service architecture for exploring platform to be measured, the platform not high enough to fault-tolerance, The present invention can rapidly find out the effective fault scenes that can destroy the platform;For fault-tolerance sufficiently high platform, this hair It is bright, it can provide and the theory of the fault-tolerance of the platform is guaranteed.
Detailed description of the invention
Fig. 1 is the flow chart of the embodiment of the present invention 1;
Fig. 2 (a)~(m) is 2 schematic diagram of the embodiment of the present invention;
Fig. 3 (a)~(e) is 3 schematic diagram of the embodiment of the present invention;
Fig. 4 (a)~(e) is the specific embodiment schematic diagram of step 300 in Fig. 1.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with 1~4 pair of this hair of attached drawing The black box fault filling method of bright embodiment and the specific embodiment of system are illustrated.It should be appreciated that described herein Specific embodiment is only used to explain the present invention, is not intended to limit the present invention.
Present platform to be measured, although such as cloud platform it is complicated, each micro services node is can be tracked It arrives, after the completion of each task, one or more calling service path chain can be tracked.Therefore this method is using to be measured flat The calling service path that platform itself tracks is defined as general JSON (JavaScript Object as input Notation) interface format.So method for implanting is just independent with specific platform bottom code to be measured, applied field Scape also becomes more extensively.This method is namely based on such calling service path and analyzes platform to be measured, designs latent Fault scenes collection.
Calling service path when platform to be measured operates normally is got first, it is further processed.Because With the relationship between the calling service chain tracked in primary operation being " indispensable ", but homogeneous operation does not track It is the relationship of " being substituted for each other " between calling service chain, this method must be able to both differences between differentiated service call chain Relationship, therefore this method devises corresponding service architecture figure for calling service chain model.
The calling service map paths tracked at service architecture figure after, this method can from bottom to top, from Root node starts upward recursive traversal, infers the failure combine scenes that can cut off all correct service paths, that is, generate to The incipient fault scene of injection.
These potential fault scenes are not necessarily exactly genuine effective fault scenes, because it is current not can guarantee algorithm The operation flow structure got is exactly complete platform service flowage structure to be measured, if there are also other redundant traffic paths It also needs to verify, therefore this method is the process constantly recycled, first be reflected according to the calling path of platform to be measured tracked It penetrates as service architecture figure, recurrence infers potential failure combine scenes, then these incipient fault scenes is injected to be measured It is verified in platform, is effective failure combine scenes if it can destroy platform to be measured, otherwise cannot destroyed, can tracked new Service path is returned to tracing process and continues to improve the service architecture figure of platform to be measured, then infers new failure again Scene, and so on.Complete business architecture until exploring platform to be measured finds all effective fault scenes or reaches Until the preset stopping condition of tester.
Embodiment 1
The black box fault filling method of the embodiment of the present invention, as shown in Figure 1, including the following steps:
Step S100 tracks platform service to be measured and calls path.
The calling service path of platform to be measured is tracked, the call chain for then tracking platform to be measured is with JSON format biography Service architecture figure is given, business system obtains JSON call chain, pre-processed, and extract calling chain information therein.
Step S200, according to calling service path, i.e., pretreated call chain generates or improves corresponding service system Structure chart.
As a kind of more preferably embodiment, in order to which the information preferably provided using call chain carries out platform to be measured More efficient test is also added into instant node mechanism in the embodiment of the present invention, i.e., in view of platform to be measured (such as cloud platform) is permitted More service nodes have instant node (redundant node), and the embodiment of the present invention can be extracted important from the call chain after merging Information forms simplified call chain, judges instant node deposit instant node table therein, is used for subsequent sorting consistence.
Step S300 infers fault scenes set to be measured according to service architecture figure recurrence;
New service architecture figure is transmitted to core recursive function and carries out recursive calculation, generates the potential of platform to be measured Fault scenes complete or collected works.But this is the incipient fault scene set for the most original that algorithm generates, there is also some repetitions are superfluous for the inside Remaining fault scenes, and sequence is not optimized, it needs to be further processed.
As a kind of more preferably embodiment, reduction sequence is carried out to the fault scenes set of generation.
Reduction sequence includes but is not limited to the fault scenes for removing those repeated and redundants.
More preferably, sequence be then on the basis of instant node table, by the method for equivalence class partition to fault scenes into The arrangement of row major grade obtains most reasonable fault scenes set to be measured.
Step S400 carries out direct fault location according to fault scenes set, has found one if it can destroy platform to be measured Effective fault scenes;Otherwise it once finding that certain fault scenes cannot be destroyed to platform to be measured, then returns and continues to track to all Call path.
So far, the embodiment of the present invention generates the fault scenes set to be measured by Optimal scheduling.It can be according to tester The specific requirement of member is selected and (is returned to tester as selected preceding 3 fault scenes to be measured every time) and carries out direct fault location Test.
Embodiment 2
If the interior business architecture of platform to be measured is as shown in Figure 2.The English name of the first row is different service Name, digital representation host ip below.Wherein, service rmslave, cannal and nstack has 3 instant nodes (main respectively Machine) it can substitute mutually.
If platform to be measured has following rule when selecting service:For each service, if next this host of service and Have on other hosts, then this chiller priority, otherwise small preferential of host ip.
The embodiment of the present invention supports most typical fault type in two kinds of distributed platforms at present:Node collapses failure (Crash) and information loses failure (Omit).
Node collapses failure refers to that a service node collapses, and is that the permanent fault of one kind in a short time (is considered It may restart or be repaired after service node collapse after a period of time);And information lose failure refer to two service nodes it Between information lost, be a kind of temporary fault.
At the beginning, it is not known that the internal structure of platform to be measured carries out direct fault location test to the platform using this method.
It is transmitted to fault filling method firstly, tracking platform to be measured and obtaining the 1st article of call chain, as shown in table 1 below.
Table 1:
Serial number cad rm_master rmslave cannal nstack
1 12 13 1 1 1
Upper one has been surveyed failure as sky.This method can obtain the preliminary architecture of platform to be measured after call chain input Such as Fig. 2 (a).
The embodiment of the present invention generates fault scenes set according to platform service architecture reasoning, chooses first 3 and returns such as Shown in the following table 2.
Table 2:
Serial number Fault scenes Status
1 Omit(12.cad,13.rm_master) NOTRUN
2 Crash(12.cad) NOTRUN
3 Omit(13.rm_master,1.rmslave) NOTRUN
1 fault scenes Omit (12.cad, 13.rm_master) is injected into platform such as Fig. 2 (b) to be measured in sequence.
Platform to be measured can not obtain correct result at this time, illustrate that Omit (12.cad, 13.rm_master) is one effective Fault scenes.Test result return is continued to track, continues to choose the 3 fault scenes return that do not survey as shown in table 3 below.
Table 3:
Serial number Fault scenes Status
1 Crash(12.cad) NOTRUN
2 Omit(13.rm_master,1.rmslave) NOTRUN
3 Crash(13.rm_master) NOTRUN
Tester continues to test next fault scenes Crash (12.cad) such as Fig. 2 (c).
Platform to be measured can not obtain correct result at this time, illustrate that Crash (12.cad) is also an effective failure field Scape.Test result is returned, continuing to choose preceding 3 fault scenes for not surveying, to return to tester as shown in table 4 below.
Table 4:
Serial number Fault scenes Status
1 Omit(13.rm_master,1.rmslave) NOTRUN
2 Crash(13.rm_master) NOTRUN
3 Omit(1.rmslave,1.cannal) NOTRUN
Continue to test next fault scenes Omit (13.rm_master, 1.rmslave) such as Fig. 2 (d).
Discovery can not destroy platform to be measured after injection, can still obtain correct result.Platform to be measured tracks newly at this time The 2nd article of call chain it is as shown in table 5 below.
Table 5:
Serial number cad rm_master rmslave cannal nstack
1 12 13 2 2 2
The embodiment of the present invention obtains architecture such as Fig. 2 (e) of platform to be measured after call chain input.
The embodiment of the present invention generates the merging of fault scenes collection and optimizes to it, and chooses first 3 to return to tester as follows Shown in table 6:
Table 6:
The 1st article of fault scenes Crash (13.rm_master) is injected into platform such as Fig. 2 (f) to be measured in sequence.
Platform to be measured can not obtain correct result at this time, illustrate that Crash (13.rm_master) is an effective failure Scene.Test result is returned, continues to choose the preceding 3 fault scenes return that do not survey as shown in table 7 below.
Table 7:
Continue to test next fault scenes Crash (1.rmslave) &Crash (2.rmslave) such as Fig. 2 (g).
Discovery can not destroy platform to be measured after injection, can still obtain correct result.Platform to be measured tracks newly at this time The 3rd article of call chain it is as shown in table 8 below.
Table 8:
Serial number cad rm_master rmslave cannal nstack
1 12 13 3 3 3
The embodiment of the present invention obtains architecture such as Fig. 2 (h) of platform to be measured after call chain input.
The embodiment of the present invention generates the merging of fault scenes collection according to new service architecture figure and optimizes to it, chooses preceding 3 Item returns as shown in table 9 below:
Table 9:
In sequence by the 1st article of fault scenes Crash (1.rmslave) &Crash (2.rmslave) &Crash (3.rmslave) injects platform such as Fig. 2 (i) to be measured.
Platform to be measured can not obtain correct result at this time, illustrate Crash (1.rmslave) & Crash (2.rmslave) & Crash (3.rmslave) is an effective fault scenes.Test result is returned, continues to choose preceding 3 failures that do not survey Scene returns as shown in the following table 10.
Table 10:
Continue to test next fault scenes Crash (1.cannal) & Crash (2.cannal) &Crash (3.cannal) such as Fig. 2 (j).
Platform to be measured can not obtain correct result at this time, illustrate Crash (1.cannal) & Crash (2.cannal) & Crash (3.cannal) is an effective fault scenes.Test result is returned, continues to choose the preceding 3 failure fields that do not survey Scape returns to tester's such as the following table 11.
Table 11:
Continue to test next fault scenes Crash (1.nstack) & Crash (2.nstack) &Crash (3.nstack) such as Fig. 2 (k).
Platform to be measured can not obtain correct result at this time, illustrate Crash (1.nstack) & Crash (2.nstack) & Crash (3.nstack) is an effective fault scenes.Test result is returned, continues to choose the preceding 3 failure fields that do not survey Scape returns as shown in table 12 below.
Table 12:
Continue to test next fault scenes Omit (13.rm_master, 1.rmslave) &Crash (2.nstack) & Crash (3.nstack) such as Fig. 2 (l).
Discovery can not destroy platform to be measured after injection, can still obtain correct result.Platform to be measured tracks newly at this time The 4th article of call chain such as the following table 13.
Table 13:
Architecture such as Fig. 2 (n) of platform to be measured is obtained after call chain input.
The embodiment of the present invention generates fault scenes collection and merges to its Optimal scheduling, and chooses first 3 and return to such as the following table 14:
Table 14:
Injection test is carried out further according to the fault scenes to be measured got, and so on, until meeting test request or end Only (such as continuous 20 fault scenes can destroy platform to be measured to condition, and illustrating that platform interior to be measured calls structure pole to have can Completely can be explored) until.
It can also be seen that test pilot process such as the following table 15.
Table 15:
The experimental results showed that the embodiment of the present invention has only just explored all service sections of platform to be measured with 3 call chains Point, and 6 effective fault scenes are had found in the present embodiment.
Embodiment 3:
In the present embodiment, consider on the basis of embodiment 2, if a kind of more complicated platform to be measured, each service node There is redundant instance node, the service architecture of the platform to be measured is as shown in Figure 3.The service path of the platform to be measured shares 5 A service, cad, rm_master, rmslave, cannal and nstack.Each service has 5 hosts that can be replaced mutually, If cad service has this 5 examples of host 1,4,7,10 and 13, if the cad service on host 1 there is failure can not be normal It works, the cad service on host 4 can substitute it and work on.Wherein respectively there are three services on host 3,6,9,12,15 Rmslave, cannal and nstack.Equally setting platform to be measured has following rule when selecting service:For each service, under If had on this host of service and other hosts, this chiller priority, otherwise small preferential of host ip.
The complete business architecture for not knowing platform to be measured at the beginning carries out the platform using the embodiment of the present invention Direct fault location test.
Firstly, the 1st article of call chain that platform to be measured tracks is transmitted to the embodiment of the present invention, as shown in table 16 below.
Table 16:
Serial number cad rm_master rmslave cannal nstack
1 1 2 3 3 3
Upper one has been surveyed failure as sky.Preliminary architecture such as Fig. 3 (a) of platform to be measured is obtained after call chain input.
It generates the merging of fault scenes collection to optimize it, and chooses first 3 and return to such as the following table 17.
Table 17:
Serial number Fault scenes Status
1 Crash(1.cad) NOTRUN
2 Omit(1.cad,2.rm_master) NOTRUN
3 Crash(2.rm_master) NOTRUN
The 1st article of fault scenes Crash (1.cad) is injected into platform such as Fig. 3 (b) to be measured in sequence.
Discovery can not destroy platform to be measured after injection, can still obtain correct result.Platform to be measured tracks newly at this time The 2nd article of call chain such as the following table 18.
Table 18:
Serial number cad rm_master rmslave cannal nstack
2 4 2 3 3 3
It is Crash (1.cad), SUCCESS that upper one, which has been surveyed failure,.The body of platform to be measured is obtained after call chain input Architecture such as Fig. 3 (c).
The embodiment of the present invention generates the merging of fault scenes collection and optimizes to it, and chooses first 3 and return to such as the following table 19.
Table 19:
Serial number Fault scenes Status
1 Crash(2.rm_master) NOTRUN
2 Omit(2.rm_master,3.rmslave) NOTRUN
3 Crash(3.rmslave) NOTRUN
The 1st article of fault scenes Crash (2.rm_master) is injected into platform such as Fig. 3 (d) to be measured in sequence.
As embodiment one, this method continues to generate fault scenes to be measured according to new architecture, after Optimal scheduling It selects 3 and returns to tester and carry out injection test, and so on.Until the 25th article of call chain is incoming, obtained platform body Architecture such as Fig. 3 (e).
The result shows that Optimal scheduling algorithm has only just explored all service nodes of platform to be measured with 13 call chains, And 5 effective fault scenes are had found in the present embodiment.
Embodiment 4
In the present embodiment, after getting the calling service chain tracked every time and extracting information, it is translated into System assumption diagram and the detailed process for inferring fault scenes set to be measured on this basis.If what is got at this time is to be measured flat Shown in platform architectural schematic such as Fig. 4 (a).
The true platform architecture figure such as Fig. 4 (b) to be measured accordingly safeguarded.This is the tree turned around, is saved by two kinds Point (normal node and rule R node) and side (connection normal node and regular node) composition.Wherein each R node is connected to Two father nodes and a child node, expression only when meeting the condition of two child nodes, can just obtain its father node.When When an at least paths can smoothly go to successfully (success) node, show that platform to be measured smoothly completes business Task.
Track a new calling service chain such as the following table 20 again at this time.
Table 20:
Serial number cad rm_master Rmslave cannal Nstack
1 12 13 2 2 2
The embodiment of the present invention gets call chain, and extracts information such as the following table 21:
Table 21:
Each record in information is mapped as 4 points by this method, and is added in existing system assumption diagram.Such as patrol The 13.rm_master-2.rmslave for collecting the time 2 can be mapped as four points in Fig. 4 (c).
For each record of new calling service chain, such 4 points are all mapped as, existing system is added In structure chart.If having this node in system assumption diagram, its child node and father node are merged;If also Without this node, just added as new node.After the corresponding node of the new calling service chain is all added, maintenance Platform service system assumption diagram such as Fig. 4 (d) to be measured shown in.
Corresponding architectural schematic such as Fig. 4 (e).
Each embodiment of the present invention gets new call chain, all can be according to such process to original business system Structure chart expand perfect.After obtaining newest platform service system assumption diagram to be measured, the solution stage is initially entered, is passed through Recursive function inversely derives the fault scenes collection that can destroy platform final result to be measured from the bottom up.
Recursive function C (node n) is the node in an incoming service architecture figure, its meeting in the embodiment of the present invention According to the type of the node, the fault scenes set that can destroy the node is returned.Root node success is transmitted to recursive function C (success), it is contemplated that root node success (is denoted as there are two father node R altogether in platform service system assumption diagram to be measured R1 and R2), indicate two paths that can achieve final correct result, it is desirable to root node success is destroyed, it just must be by this Two paths all destroy, therefore recursive function can return to C (R1) ∧ C (R2).Then, C (R1) is considered there are two R1 nodes Father node " 2.nstack is ready " and " 2.nstack-Final_goal ", the two father nodes be it is indispensable, lack appoint What one be not able to satisfy R1, therefore only need destroy wherein any one can, therefore C (R1) return the result is that C (2.nstack is ready) ∨ C (2.nstack-Final_gool), and so on.Once it was found that section of the recurrence to expression connectivity Point then returns to specific failure shaped like 1.cannal-1.nstack:Crash(1.cannal)∨Omit(1.cannal- 1.nstack)∨Crash(1.nstack).Since root node success, recursive function C () can traverse whole from the bottom up System assumption diagram is opened, backward inference goes out to destroy the fault scenes collection of platform to be measured.In the present embodiment, recursive function C (success) finally obtained fault scenes set is as shown in table 22 below.
Table 22:
Embodiment implements purpose to realize the present invention, and the embodiment of the present invention also provides a kind of black box fault injection system, wraps Include the hardware and software in above-mentioned black box fault filling method.
Purpose to realize the present invention also provides a kind of black box direct fault location hardware system, as shown in figure 5, including tracking mould Block 10, generation module 20, recurrence module 30, injection module 40, wherein:
The tracing module 10 tracks calling service path for platform to be measured;
The generation module 20, for according to calling service coordinates measurement or improving corresponding service system assumption diagram;
The recurrence module 30, for inferring fault scenes set to be measured according to service architecture figure recurrence;
The injection module 40 carries out direct fault location according to fault scenes set, finds if it can destroy platform to be measured One effective fault scenes;Otherwise it once finding that certain fault scenes cannot be destroyed to platform to be measured, then returns and continues to track To all calling paths.
Purpose to realize the present invention also more provides a kind of medium and equipment, including Jie in the black box injected system Computer software programs in the black box method for implanting of matter and storage in the medium.
The equipment includes central processing unit, and be connected the medium with the central processing;
The central processing unit calls the computer software programs from the medium, completes the black box injection.
Those of ordinary skill in the art should further appreciate that, retouch in conjunction with the embodiments described herein Each exemplary unit and algorithm steps stated, can be realized with electronic hardware, computer software, or a combination of the two, be The interchangeability for clearly demonstrating hardware and software, generally describes according to function respectively show in the above description The composition and step of example.These functions are implemented in hardware or software actually, the specific application depending on technical solution And design constraint.Those of ordinary skill in the art can to each specific application come using distinct methods to realize The function of description, but such implementation should not be considered as beyond the scope of the present invention.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can hold rail with hardware, processor The combination of the software module or the two in road is implemented.Software module can be placed in random access memory (RAM), memory, read-only Memory (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or skill In any other form of storage medium well known in art field.
The embodiment of the present invention is a kind of efficient black box fault filling method and system and medium apparatus, can effectively, it is high Effect carries out direct fault location test to platform to be measured, assesses its fault-tolerance.It does not need the source code for obtaining platform to be measured, and It is the calling service path tracked using platform to be measured, from result, abduction goes out potential fault scenes collection, then Potential fault scenes are injected in platform to be measured and are verified, once find that some fault scenes cannot destroy platform to be measured, Platform to be measured is still correctly run, and will be tracked new substitution service and be called path, at this moment again be transmitted to new service path The operation flow of platform to be measured regenerates potential fault scenes, and so on, until by the interior business of platform to be measured Process, which is all explored, to be come, and is a kind of efficient black box fault filling method.
Higher fault coverage can be reached with less test case compared with random device, with searching for expert's guidance Rope does not need to obtain the source code for analyzing platform to be measured compared with pattern checking compared to can be adapted for more massive system, can It is automated with scale, application scenarios are more extensive.
The embodiment of the present invention can be adaptive the service architecture for exploring platform to be measured, it is not high enough to fault-tolerance Platform, the embodiment of the present invention can rapidly find out the effective fault scenes that can destroy the platform;It is enough for fault-tolerance High platform, the embodiment of the present invention, which can then provide, guarantees the theory of the fault-tolerance of the platform.
Although the embodiments of the present invention have been disclosed as above, but it is not limited in the fortune in specification and embodiments With it can be fully applied to various fields suitable for the present invention, for those skilled in the art, can be easily Realize other modification, therefore without departing from the general concept defined in the claims and the equivalent scope, the present invention is simultaneously unlimited In specific details and legend shown and described herein.

Claims (12)

1. a kind of black box fault filling method, which is characterized in that include the following steps:
Platform to be measured tracks calling service path;
According to calling service coordinates measurement or improve corresponding service system assumption diagram;
Fault scenes set to be measured is inferred according to service architecture figure recurrence;
Direct fault location is carried out according to fault scenes set, an effective fault scenes are had found if it can destroy platform to be measured; Otherwise it once finding that certain fault scenes cannot be destroyed to platform to be measured, then returns and continues tracking to all calling paths.
2. black box fault filling method according to claim 1, which is characterized in that the tracking calling service path, packet Include following steps:
Platform to be measured tracks calling service path, and the JSON format that the service path tracked is packaged into result is transmitted to business System assumption diagram.
3. black box fault filling method according to claim 2, which is characterized in that corresponding service body is improved in the generation Tying composition, includes the following steps:
According to calling service path, the calling service chain of JSON format, extraction path information, by saving corresponding service are parsed Point is mapped, and the interior business system assumption diagram of examining system is generated or improve.
4. black box fault filling method according to claim 3, which is characterized in that the recurrence infers failure field to be measured Scape set, includes the following steps:
On the basis of service architecture figure, recall from bottom to top since destination node, recursive calculation passes through conjunction and analysis It takes and infers fault scenes set to be measured, and the JSON format for being packaged into result is passed back.
5. black box fault filling method according to claim 4, which is characterized in that the direct fault location and test failure field Scape includes the following steps:
Direct fault location is successively carried out according to the fault scenes collection to be measured got, if some fault scenes can destroy to be measured put down Platform illustrates to have found an effective fault scenes, is the fault-tolerance bottleneck of platform to be measured;If instead cannot destroy to be measured flat Platform illustrates that platform to be measured has new calling service path to obtain correct result at this time, then returns track the path at this time, with such It pushes away, until the interior business for exploring platform whole to be measured, which calls architecture or reaches preset condition, to be stopped.
6. black box fault filling method according to any one of claims 1 to 5, which is characterized in that the generation or complete Kind service architecture figure, further includes the following steps:
According to the instant node in platform service node to be measured, i.e. redundant node, important letter is extracted from the call chain after merging Breath forms simplified call chain, judges instant node deposit instant node table therein.
7. black box fault filling method according to claim 6, which is characterized in that the recurrence infers failure field to be measured Scape set further includes following steps:
Reduction sequence is carried out to the fault scenes set of generation, removes the fault scenes of those repeated and redundants.
8. black box fault filling method according to claim 7, which is characterized in that the sequence includes the following steps:
On the basis of instant node table, priority arrangement is carried out to fault scenes by the method for equivalence class partition, is obtained most Reasonable fault scenes set to be measured.
9. a kind of black box fault injection system, which is characterized in that including the described in any item black box failure notes of claim 1 to 8 Enter the hardware and software in method.
10. a kind of black box direct fault location hardware system, which is characterized in that including tracing module, generation module, recurrence module, note Enter module, wherein:
The tracing module tracks calling service path for platform to be measured;
The generation module, for according to calling service coordinates measurement or improving corresponding service system assumption diagram;
The recurrence module, for inferring fault scenes set to be measured according to service architecture figure recurrence;
The injection module carries out direct fault location according to fault scenes set, has found one if it can destroy platform to be measured Effective fault scenes;Otherwise it once finding that certain fault scenes cannot be destroyed to platform to be measured, then returns and continues to track to all Call path.
11. a kind of medium, which is characterized in that including the medium in black box injected system as claimed in claim 9 and be stored in Jie The computer software programs in black box method for implanting in matter.
12. a kind of equipment, including central processing unit, which is characterized in that further include that the right being connected with the central processing is wanted Medium described in asking 11;
The central processing unit calls the computer software programs from the medium, completes the black box injection.
CN201810510380.1A 2018-05-24 2018-05-24 Black box fault filling method and system and medium apparatus Pending CN108874663A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810510380.1A CN108874663A (en) 2018-05-24 2018-05-24 Black box fault filling method and system and medium apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810510380.1A CN108874663A (en) 2018-05-24 2018-05-24 Black box fault filling method and system and medium apparatus

Publications (1)

Publication Number Publication Date
CN108874663A true CN108874663A (en) 2018-11-23

Family

ID=64334070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810510380.1A Pending CN108874663A (en) 2018-05-24 2018-05-24 Black box fault filling method and system and medium apparatus

Country Status (1)

Country Link
CN (1) CN108874663A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984397A (en) * 2018-06-26 2018-12-11 南京大学 Black box fault filling method and system and medium apparatus
CN110262972A (en) * 2019-06-17 2019-09-20 中国科学院软件研究所 A kind of failure testing tool and method towards micro services application
CN111382023A (en) * 2018-12-27 2020-07-07 中国移动通信集团贵州有限公司 Code fault positioning method, device, equipment and storage medium
CN111831532A (en) * 2019-04-15 2020-10-27 富士通株式会社 Method for constructing test scene and information processing equipment
CN113515449A (en) * 2021-05-19 2021-10-19 中国工商银行股份有限公司 Chaos test method, system, electronic equipment and storage medium
CN115794639A (en) * 2022-12-05 2023-03-14 北京领雁科技股份有限公司 Visual test and visual simulation test system and method based on process

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102262580A (en) * 2010-05-24 2011-11-30 南京航空航天大学 Improved software static test method and tool based on symbolic execution
CN102760098A (en) * 2012-06-13 2012-10-31 北京航空航天大学 Processor fault injection method oriented to BIT software test and simulator thereof
CN103164328A (en) * 2011-12-12 2013-06-19 中国移动通信集团陕西有限公司 Method and device and system for regression testing of service function
CN105915513A (en) * 2016-04-12 2016-08-31 内蒙古大学 Method and device for searching malicious service provider of combined service in cloud system
CN107018042A (en) * 2017-04-13 2017-08-04 广东神马搜索科技有限公司 Method for tracing and tracing system for online service system
US9830255B2 (en) * 2015-12-03 2017-11-28 Wipro Limited System and method for optimizing test suite comprising plurality of test cases
CN107678960A (en) * 2017-09-26 2018-02-09 国网冀北电力有限公司电力科学研究院 Intelligent electric energy meter software Black-box Testing system and method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102262580A (en) * 2010-05-24 2011-11-30 南京航空航天大学 Improved software static test method and tool based on symbolic execution
CN103164328A (en) * 2011-12-12 2013-06-19 中国移动通信集团陕西有限公司 Method and device and system for regression testing of service function
CN102760098A (en) * 2012-06-13 2012-10-31 北京航空航天大学 Processor fault injection method oriented to BIT software test and simulator thereof
US9830255B2 (en) * 2015-12-03 2017-11-28 Wipro Limited System and method for optimizing test suite comprising plurality of test cases
CN105915513A (en) * 2016-04-12 2016-08-31 内蒙古大学 Method and device for searching malicious service provider of combined service in cloud system
CN107018042A (en) * 2017-04-13 2017-08-04 广东神马搜索科技有限公司 Method for tracing and tracing system for online service system
CN107678960A (en) * 2017-09-26 2018-02-09 国网冀北电力有限公司电力科学研究院 Intelligent electric energy meter software Black-box Testing system and method

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
MANUJA, SEEMA1等: "Unknown input modeling and robust fault diagnosis using black box observers", 《JOURNAL OF PROCESS CONTROL》 *
宋力立等: "姿轨控软件黑盒测试方法研究", 《电脑知识与技术》 *
王欣明: "事务监控器可扩展性关键技术研究与实现", 《中国优秀硕士论文全文数据库》 *
聂长海等: "一种基于组合测试的软件故障诊断方法", 《东南大学学报(自然科学版)》 *
高虎等: "基于软件仿真技术的外源性故障注入方法研究", 《计算机测量与控制》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984397A (en) * 2018-06-26 2018-12-11 南京大学 Black box fault filling method and system and medium apparatus
CN108984397B (en) * 2018-06-26 2021-02-23 南京大学 Black box fault injection method and system and medium equipment
CN111382023A (en) * 2018-12-27 2020-07-07 中国移动通信集团贵州有限公司 Code fault positioning method, device, equipment and storage medium
CN111382023B (en) * 2018-12-27 2023-04-28 中国移动通信集团贵州有限公司 Code fault positioning method, device, equipment and storage medium
CN111831532A (en) * 2019-04-15 2020-10-27 富士通株式会社 Method for constructing test scene and information processing equipment
CN110262972A (en) * 2019-06-17 2019-09-20 中国科学院软件研究所 A kind of failure testing tool and method towards micro services application
CN110262972B (en) * 2019-06-17 2020-12-08 中国科学院软件研究所 Failure testing tool and method for micro-service application
CN113515449A (en) * 2021-05-19 2021-10-19 中国工商银行股份有限公司 Chaos test method, system, electronic equipment and storage medium
CN115794639A (en) * 2022-12-05 2023-03-14 北京领雁科技股份有限公司 Visual test and visual simulation test system and method based on process
CN115794639B (en) * 2022-12-05 2023-09-26 北京领雁科技股份有限公司 Visual test based on flow and visual simulation test system and method

Similar Documents

Publication Publication Date Title
CN108874663A (en) Black box fault filling method and system and medium apparatus
CN111459799B (en) Software defect detection model establishing and detecting method and system based on Github
CN106649464A (en) Method of building Chinese address tree and device
CN110019519A (en) Data processing method, device, storage medium and electronic device
CN108415846A (en) A kind of method and apparatus generating minimal automation test use cases
CN103713933A (en) Method, device and system for converging hotspot functions and variables in computer programs
CN113535399A (en) NFV resource scheduling method, device and system
CN110197072A (en) The method of excavation and system of software security flaw, storage medium and computer equipment
CN106682507A (en) Virus library acquiring method and device, equipment, server and system
CN114492258A (en) Random constraint and coverage group synchronization method
CN112882899B (en) Log abnormality detection method and device
CN105468531A (en) Vulnerability mining method and device and electronic equipment
CN109582575A (en) Game test method and device
CN104572787A (en) Method and device for recognizing pseudo original website
CN116679606B (en) Delta-Debugging-based fault positioning method for train operation control system
CN113297584A (en) Vulnerability detection method, device, equipment and storage medium
CN105843809A (en) Data processing method and device
CN104104659B (en) Communication fingerprint extraction method and device
CN113282495B (en) Java software fault positioning method based on track monitoring
KR102643598B1 (en) Method and apparatus for analyzing pattern-based interaction failures in systems-of-systems
CN111190768B (en) Database execution error recovery method, database access method and device
CN107391372A (en) A kind of data mart modeling function test method and system
CN108984397B (en) Black box fault injection method and system and medium equipment
CN112540928A (en) Test case layout method and device based on to-be-tested line intersection information
CN103106217A (en) Handling method and device for message information

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20181123

RJ01 Rejection of invention patent application after publication