CN109508295A - Block chain common recognition test of heuristics method, apparatus, computing device and storage medium - Google Patents

Block chain common recognition test of heuristics method, apparatus, computing device and storage medium Download PDF

Info

Publication number
CN109508295A
CN109508295A CN201811354300.4A CN201811354300A CN109508295A CN 109508295 A CN109508295 A CN 109508295A CN 201811354300 A CN201811354300 A CN 201811354300A CN 109508295 A CN109508295 A CN 109508295A
Authority
CN
China
Prior art keywords
case
test
node
block chain
common recognition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811354300.4A
Other languages
Chinese (zh)
Other versions
CN109508295B (en
Inventor
李贲
余兴华
殷舒
刘胜
陈正
徐加明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Union Mobile Pay Co Ltd
Original Assignee
Union Mobile Pay Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Union Mobile Pay Co Ltd filed Critical Union Mobile Pay Co Ltd
Priority to CN201811354300.4A priority Critical patent/CN109508295B/en
Publication of CN109508295A publication Critical patent/CN109508295A/en
Application granted granted Critical
Publication of CN109508295B publication Critical patent/CN109508295B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

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

Abstract

This application discloses a kind of block chain common recognition test of heuristics method, apparatus, computing device and storage mediums, it is related to block chain field, to the common recognition algorithm fault-tolerant ability for solving the problem of to judge the block chain by the code for modifying block chain host node or participation common recognition node.In this method, by configuring preposition node for block chain node, so that generating test use cases in preposition node, without modifying to block chain link point, make test simpler, it is easier to operate, it can also be ensured that not have to worry whether code is corrected one's mistakes after service is online.In addition, which invasive is small, learning cost is low, can be adapted for the different types of block chain common recognition test of heuristics of different blocks chain.

Description

Block chain common recognition test of heuristics method, apparatus, computing device and storage medium
Technical field
The present invention relates to block chain field more particularly to a kind of block chain common recognition test of heuristics method, apparatus, computing device And storage medium.
Background technique
Block chain common recognition algorithm is that associated nodes is allowed to connect the feelings for working, and failing in certain member nodes Under condition, work remains to be normally carried out.This fault-tolerant ability is the main advantage of block chain, and has built-in redundancy surplus standby to make With.For test block chain common recognition algorithm fault-tolerant ability, it is common practice that modification node carries out the test of error injection method, such as Fig. 1 Shown, receiving client and sending the node of common recognition request message is host node, i.e., node four is block chain host node, one He of node Node two is the node for participating in common recognition, modifies block chain host node or participates in the code of common recognition node, to judge the block chain Common recognition algorithm fault-tolerant ability.However tested by error injection method, need to modify the code logic in node and to each Node is customized exploitation, due to customized development, will lead to that rate of code reuse is low, and development cost is big, in addition, modification code logic If node programmer forget closed node code-bar switch, be easy test code on-line and cause online failure, or bring on line Unknown risk, so that maintenance cost is high.
Summary of the invention
The embodiment of the present application provides method, apparatus, computing device and the storage medium of a kind of block chain common recognition test of heuristics, By configuring preposition node for block chain node, so that test use cases are generated in preposition node, without to block chain node It modifies, makes test simpler, it is easier to operate, it can also be ensured that do not have to worry whether code is corrected one's mistakes after service is online. In addition, which invasive is small, learning cost is low, can be adapted for the different types of block chain common recognition algorithm of different blocks chain Test.
In a first aspect, the embodiment of the present application provides a kind of method of block chain common recognition test of heuristics, this method comprises:
The common recognition request that the block chain node of the preposition node connection is sent by preset key reception of preposition node;
Common recognition request is parsed, request use-case is obtained;
According to the relationship between test use cases and request use-case, the obtained corresponding test case of request use-case is determined Collection;
The test use cases are sent to corresponding preposition node, so that the corresponding preposition node is by test use cases transparent transmission Give the block chain node of the corresponding preposition node connection;
Receive each corresponding preposition node return executes report;
Execution report is saved in the report list of itself, and is synchronized to other preposition nodes.
Second aspect, the embodiment of the present application provide a kind of device of block chain common recognition test of heuristics, which includes:
First receiving module, what the block chain node for the preposition node connection by preset key reception was sent is total to Know request;
Parsing module obtains request use-case for parsing to common recognition request;
Determining module, for determining obtained request use-case pair according to the relationship between test use cases and request use-case The test use cases answered;
Sending module, for the test use cases to be sent to corresponding preposition node, so that the corresponding preposition node will Test use cases pass through the block chain node of preposition node connection corresponding to this;
Second receiving module executes report for receive that each corresponding preposition node returns;
Synchronization module for execution report to be saved in the report list of itself, and is synchronized to other preposition sections Point.
The third aspect, another embodiment of the application additionally provide a kind of computing device, including at least one processor;With And;
The memory being connect at least one described processor communication;Wherein, the memory be stored with can by it is described extremely The instruction that a few processor executes, described instruction are executed by least one described processor, so that at least one described processing The method that device is able to carry out a kind of block chain common recognition test of heuristics provided by the embodiments of the present application.
Fourth aspect, another embodiment of the application additionally provide a kind of computer storage medium, wherein the computer is deposited Storage media is stored with computer executable instructions, and the computer executable instructions are for making computer execute the embodiment of the present application One of block chain common recognition test of heuristics method.
Other features and advantage will illustrate in the following description, also, partly become from specification It obtains it is clear that being understood and implementing the application.The purpose of the application and other advantages can be by written explanations Specifically noted structure is achieved and obtained in book, claims and attached drawing.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present application, constitutes part of this application, this Shen Illustrative embodiments and their description please are not constituted an undue limitation on the present application for explaining the application.In the accompanying drawings:
Fig. 1 is the error injection method schematic diagram of the block chain common recognition test of heuristics in background technique;
Fig. 2 is the preposition node schematic diagram of block chain common recognition test of heuristics in the embodiment of the present application;
Fig. 3 is the flow diagram of block chain common recognition test of heuristics method in the embodiment of the present application;
Fig. 4 is the structural schematic diagram of block chain common recognition test of heuristics in the embodiment of the present application;
Fig. 5 is the structural schematic diagram according to the computing device of the application embodiment.
Specific embodiment
To solve the above-mentioned problems, a kind of block chain common recognition test of heuristics method is provided in the embodiment of the present application.In order to more Good understanding technical solution provided by the embodiments of the present application does the basic principle of the program once briefly describe here:
As shown in Fig. 2, node one receives the common recognition request that client is sent, i.e. node one is host node, node two and section Point three is the node for participating in common recognition.A preposition node is configured before node one, node two and node three, when node one is sent altogether When knowing request to node two and node three, the common recognition that preposition node receives the transmission of node one is requested and is parsed to it, and Request use-case after parsing is handled, test use cases are obtained.Test use cases are sent to by the preposition node of node one The preposition node of node two and node three, and the node two of the preposition node of collector node two and node three transmission and node three are right Report is executed in test use cases.
Block chain common recognition test of heuristics method is done into one from one of them preposition node side below by specific embodiment Walk explanation.Fig. 3 is the flow diagram of block chain common recognition test of heuristics method, comprising the following steps:
Step 301: the block chain node transmission of the preposition node connection by preset key reception of preposition node is total to Know request.
Step 302: common recognition request being parsed, request use-case is obtained.
Wherein, client when including but is not limited to the concrete operations of request in obtained request use-case, request by parsing Additional timestamp, request sign to request comprising message content, eap-message digest, client, the number of host node distribution, To request be ranked up serial number, host node signature, participate in common recognition node serial number, participate in common recognition node signature, record common recognition disappear Breath, prepares the information such as state, acknowledgement state at pre-preparation state.Wherein, common recognition request is sent to the main section of block chain by client Point, and preposition node is sent to by block chain host node.
Step 303: according to the relationship between test use cases and request use-case, determining the obtained corresponding survey of request use-case Try set of uses case.
Step 304: the test use cases being sent to corresponding preposition node, so that the corresponding preposition node uses test Example collection passes through the block chain node of preposition node connection corresponding to this.
Wherein, corresponding preposition node is the preposition node connecting with the block chain node for participating in common recognition.For example, such as Fig. 2 institute Show, the preposition node connected to node two and node three is corresponding preposition node.
Step 305: receive each corresponding preposition node return executes report.
Step 306: execution report being saved in the report list of itself, and is synchronized to other preposition nodes.
The fault-tolerant ability of block chain common recognition algorithm is tested in this way, generating test use cases by preposition node, nothing It need to modify to block chain link point, make test simpler, it is easier to operate, it can also be ensured that not have to worry generation after service is online Whether code is corrected one's mistakes.In addition, which invasive is small, learning cost is low, can be adapted for the different types of of different blocks chain Block chain common recognition test of heuristics.
In the embodiment of the present application, request use-case is generated as test use cases, specific implementable for step A1-A3:
Step A1: being changed the data parameters in obtained request use-case by genetic algorithm, generates test case Collection one.
Wherein, the test use cases generated by genetic algorithm, what is only changed is the data parameters requested in use-case.
Step A2: the use-case type in obtained request use-case and use-case rule base is combined matching, generates test Set of uses case two;Wherein, the use-case type in use-case rule base includes being not limited to: environment error rule use-case, common recognition algorithm message Regular use-case, common recognition algorithm role rule use-case, common recognition state rule use-case.
Step A3: using the union of test use cases one and test use cases two as test use cases.
Wherein, environment error rule use-case includes being not limited to: CPU (central processing unit) mistake (such as: cpu busy percentage height, CPU load average (average load) is busy), EMS memory error (such as: memory source high), IO (input and output) mistake (such as: Disk read-write mistake), thread lock, network error etc..
Common recognition algorithm message rule use-case includes being not limited to: message-replay, message are distorted, arbitrary node errored response, are appointed Meaning node sends different message requests, honeysuckle transaction, message random ordering etc..
Common recognition algorithm role rule use-case includes being not limited to: host node, the node for participating in common recognition are not involved in common recognition node three Kind role.
Common recognition state rule use-case includes being not limited to: pre-preparation (pre-prepare) prepares (prepare) and confirms (commit)。
Therefore, test case of the test use cases of combinations matches in addition to only changing data parameters in request use-case, is also wrapped Include the test case for changing request use-case requirement.When according to use-case rule base combinations matches test use cases, according to convention Then by environment, message, role and the state requested in use-case, any one is changed the use-case type in library, obtains test and uses Example.For example, the request data can be revised as acknowledgement state if the status information in request use-case is pre-preparation state, obtained To test case, and the implementing result of the test case is collected, to confirm the fault-tolerant ability of block chain common recognition algorithm.
It should be noted that environment error rule use-case can be tested together with other use-case types.Such as: if request Status information in data is pre-preparation state, and environment is normal environment, which can be revised as to acknowledgement state, and It is executed in the environment of EMS memory error (such as: memory source is high), and collects the implementing result of test case.
In this way, request use-case and use-case type are combined matching, automatically deriving test use cases can make to allow test It is simpler, it is easier to operate.
In one embodiment, the test case of generation can be both data parameters by genetic algorithm to request use-case It is changed, changes the requirement of request use-case further through use-case rule base combinations matches.
In one embodiment, the test case rule in use-case rule base can increase or delete, and come into force in real time.This Sample, realizing use-case rule base can be with the increase test case of dynamic realtime, and is convenient for operation.
In order to allow the test use cases generated more fully to cover all situations, propose in the embodiment of the present application A kind of method is used to generate test use cases, specific implementable are as follows: by Pairwise algorithm to obtained request use-case and use Use-case type in example rule base is combined, and generates test use cases two.
In this way, the test case generated can be enable to cover various abnormal conditions comprehensively by the method, it can be more preferable The fault-tolerance of ground checking system.
In addition to the method for above-mentioned generation test use cases, can also be generated by other methods.In one embodiment, Use-case will be requested to be combined with regular use-case library by the crossover operator in genetic algorithm and match generation test use cases.It needs Illustrate, request use-case is combined with regular use-case library and matches generation test use cases including but not limited to above two Method.
It is above-mentioned corresponding to participate in common recognition block chain to how generating test use cases and how to be sent to test use cases Node is described in detail.Below to by test use cases be sent to other preposition nodes and preposition node receive it is each its The respective block chain common recognition node that its preposition node is sent carries out further for the operation of the execution report of test use cases Explanation.
If preposition node receives the common recognition request of block chain node transmission containing signature, test use cases are sent to Other preposition nodes, so that test use cases are passed through the block chain node connecting with the preposition node by other preposition nodes Before, it needs to sign to the test use cases of generation again, it is specific implementable are as follows: if the common recognition request received is containing label Name, then signed again using preset key pair test use cases.
In this way, whether correct by verifying signature, it is ensured that execute the safety of report.
It in one embodiment, can also if the common recognition request that preposition node receives the transmission of block chain node is not signed By use-case rule base, to generate the test case containing signature when generating test use cases.In this way, the area can be verified The fault-tolerant ability of block chain common recognition algorithm.
In the embodiment of the present application, the reception test needed when the execution report that each other preposition nodes return one by one is received The test report of test case in set of uses case.It is specific implementable to be for the corresponding block chain node of each corresponding preposition node Step B1-B2:
Step B1: receiving the test report of the test case of block chain node return, and the test report is the block Every executed sends after a test case when chain node test case that implementation of test cases is concentrated one by one.
Step B2: the union of the test report for each test case that the test case that the block chain node is returned is concentrated is made Report is executed for the block chain node.
Wherein, execute be reported as result that every test case executes and the result compared with expected results whether phase Together.
In this way, other block chain nodes are every to have executed a test case, it is returned to a test result, area can be improved The working efficiency of block chain node.
In the embodiment of the present application, report will be executed to be saved in preposition node, convenient for checking, meanwhile, by the execution Report is synchronized to other preposition nodes.In this way, the execution report of each node is saved in report list, can be reported in order to check Content is accused, meanwhile, report will be executed and be synchronized to other preposition nodes, any one preposition node can be checked, can find and hold The full content of row report.
Based on identical inventive concept, the embodiment of the present application also provides a kind of device of block chain common recognition test of heuristics.Such as Shown in Fig. 4, which includes:
First receiving module 401, the block chain node for the preposition node connection by preset key reception are sent Common recognition request;
Parsing module 402 obtains request use-case for parsing to common recognition request;
Determining module 403, for determining obtained request use-case according to the relationship between test use cases and request use-case Corresponding test use cases;
Sending module 404, for the test use cases to be sent to corresponding preposition node, so that the corresponding preposition node Test use cases are passed through to the block chain node of preposition node connection corresponding to this;
Second receiving module 405 executes report for receive that each corresponding preposition node returns;
Synchronization module 406, for execution report to be saved in the report list of itself, and it is preposition to be synchronized to other Node.
Further, determining module 403 includes:
First generation unit, it is raw for being changed by genetic algorithm to the data parameters in obtained request use-case At test use cases one;
Second generation unit, the use-case type in request use-case and use-case rule base for will obtain are combined Match, generates test use cases two;Wherein, the use-case type in use-case rule base includes being not limited to: environment error rule use-case is total to Know algorithm message rule use-case, common recognition algorithm role rule use-case, common recognition state rule use-case;
First combining unit, for using the union of test use cases one and test use cases two as test use cases.
Further, the second generation unit includes:
Subelement is generated, for passing through Pairwise algorithm to the use-case class in obtained request use-case and use-case rule base Type is combined, and generates test use cases two.
Further, described device further include:
Further, the test use cases are sent to corresponding preposition node by sending module 404, so that this is corresponding preposition Before test use cases are passed through the block chain node connecting with the preposition node by node, described device further include:
Signature unit, if the common recognition request for receiving uses preset key pair test use cases containing signature Again it signs.
Further, the second receiving module 405 includes:
Receiving unit receives block chain node return for being directed to the corresponding block chain node of each accordingly preposition node Test case test result, the test result be the block chain node one by one implementation of test cases concentrate test case When every executed send after a test case;
Second combining unit, the test knot for each test case that the test case for returning to the block chain node is concentrated Implementing result of the union of fruit as the block chain node.
After the block chain for describing the application illustrative embodiments knows together test of heuristics method and device, connect down Come, introduces the computing device of the another exemplary embodiment according to the application.
Person of ordinary skill in the field it is understood that the various aspects of the application can be implemented as system, method or Program product.Therefore, the various aspects of the application can be with specific implementation is as follows, it may be assumed that complete hardware embodiment, complete The embodiment combined in terms of full Software Implementation (including firmware, microcode etc.) or hardware and software, can unite here Referred to as circuit, " module " or " system ".
In some possible embodiments, according to an embodiment of the present application, computing device can include at least at least one A processor and at least one processor.Wherein, memory is stored with program code, when program code is executed by processor When, so that processor executes knowing together according to the block chain of the various illustrative embodiments of the application for this specification foregoing description and calculates Step 301-306 in method test method.
The computing device 50 of this embodiment according to the application is described referring to Fig. 5.The calculating dress that Fig. 5 is shown Setting 50 is only an example, should not function to the embodiment of the present application and use scope bring any restrictions.The computing device Such as can be mobile phone, tablet computer etc..
As shown in figure 5, computing device 50 is showed in the form of general-purpose calculating appts.The component of computing device 50 may include But it is not limited to: at least one above-mentioned processor 51, above-mentioned at least one processor 52, (including the storage of the different system components of connection Device 52 and processor 51) bus 53.
Bus 53 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller, Peripheral bus, processor or the local bus using any bus structures in a variety of bus structures.
Memory 52 may include the readable medium of form of volatile memory, such as random access memory (RAM) 521 And/or cache memory 522, it can further include read-only memory (ROM) 523.
Memory 52 can also include program/utility 525 with one group of (at least one) program module 524, this The program module 524 of sample includes but is not limited to: operating system, one or more application program, other program modules and journey It may include the realization of network environment in ordinal number evidence, each of these examples or certain combination.
Computing device 50 can also be communicated with one or more external equipments 54 (such as sensing equipment etc.), can also be with one Or it is multiple enable a user to the equipment interacted with computing device 50 communication, and/or with enable the computing device 50 and one Or any equipment (such as router, modem etc.) communication that a number of other computing devices are communicated.This communication It can be carried out by input/output (I/O) interface 55.Also, computing device 50 can also pass through network adapter 56 and one Or multiple networks (such as local area network (LAN), wide area network (WAN) and/or public network, such as internet) communication.As schemed Show, network adapter 56 is communicated by bus 53 with other modules for computing device 50.It will be appreciated that though not showing in figure Out, other hardware and/or software module can be used in conjunction with computing device 50, including but not limited to: microcode, device drives Device, redundant processor, external disk drive array, RAID system, tape drive and data backup storage system etc..
In some possible embodiments, the various aspects of block chain provided by the present application common recognition test of heuristics method are also It can be implemented as a kind of form of program product comprising program code, when program product is run on a computing device, journey The area according to the various illustrative embodiments of the application that sequence code is used to that computer equipment to be made to execute this specification foregoing description Step in block chain common recognition test of heuristics method, executes step 301-306 as shown in Figure 3.
Program product can be using any combination of one or more readable mediums.Readable medium can be readable signal Jie Matter or readable storage medium storing program for executing.Readable storage medium storing program for executing for example may be-but not limited to-electricity, magnetic, optical, electromagnetic, infrared The system of line or semiconductor, device or device, or any above combination.The more specific example of readable storage medium storing program for executing is (non- The list of exhaustion) include: electrical connection with one or more conducting wires, portable disc, hard disk, random access memory (RAM), Read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, the read-only storage of portable compact disc Device (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
The block chain common recognition test of heuristics of the application embodiment can use portable compact disc read only memory (CD-ROM) it and including program code, and can run on the computing device.However, the program product of the application is without being limited thereto, In this document, readable storage medium storing program for executing can be any tangible medium for including or store program, which can be commanded and hold Row system, device or device use or in connection.
Readable signal medium may include in a base band or as the data-signal that carrier wave a part is propagated, wherein carrying Readable program code.The data-signal of this propagation can take various forms, including --- but being not limited to --- electromagnetism letter Number, optical signal or above-mentioned any appropriate combination.Readable signal medium can also be other than readable storage medium storing program for executing it is any can Read medium, the readable medium can send, propagate or transmit for by instruction execution system, device or device use or Program in connection.
The program code for including on readable medium can transmit with any suitable medium, including --- but being not limited to --- Wirelessly, wired, optical cable, RF etc. or above-mentioned any appropriate combination.
Can with any combination of one or more programming languages come write for execute the application operation program Code, programming language include object oriented program language-Java, C++ etc., further include conventional process Formula programming language-such as " C " language or similar programming language.Program code can be calculated fully in user It executes on device, partly execute on a user device, executing, as an independent software package partially in user's computing device Upper part executes on remote computing device or executes on remote computing device or server completely.It is being related to remotely counting In the situation for calculating device, remote computing device can pass through the network of any kind --- including local area network (LAN) or wide area network (WAN)-it is connected to user's computing device, or, it may be connected to external computing device (such as provided using Internet service Quotient is connected by internet).
It should be noted that although being referred to several unit or sub-units of device in the above detailed description, this stroke It point is only exemplary not enforceable.In fact, according to presently filed embodiment, it is above-described two or more The feature and function of unit can embody in a unit.Conversely, the feature and function of an above-described unit can It is to be embodied by multiple units with further division.
In addition, although in the accompanying drawings sequentially to describe the operation of the application method, this does not require that or implies These operations must be sequentially executed according to this, or have to carry out operation shown in whole and be just able to achieve desired result.It is attached Add ground or it is alternatively possible to omit certain steps, multiple steps are merged into a step and are executed, and/or by a step point Solution is execution of multiple steps.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with side In the computer-readable memory of formula work, so that it includes instruction dress that instruction stored in the computer readable memory, which generates, The manufacture set, the command device are realized in one box of one or more flows of the flowchart and/or block diagram or multiple The function of being specified in box.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment of the application has been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications can be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the application range.
Obviously, those skilled in the art can carry out various modification and variations without departing from the essence of the application to the application Mind and range.In this way, if these modifications and variations of the application belong to the range of the claim of this application and its equivalent technologies Within, then the application is also intended to include these modifications and variations.

Claims (10)

  1. A kind of test of heuristics method 1. block chain is known together, which is characterized in that each block chain node is configured with preposition node, described Method includes:
    The common recognition request that the block chain node of the preposition node connection is sent by preset key reception of preposition node;
    Common recognition request is parsed, request use-case is obtained;
    According to the relationship between test use cases and request use-case, the obtained corresponding test use cases of request use-case are determined;
    The test use cases are sent to corresponding preposition node so that the corresponding preposition node by test use cases pass through with The block chain node of the corresponding preposition node connection;
    Receive each corresponding preposition node return executes report;
    Execution report is saved in the report list of itself, and is synchronized to corresponding preposition node.
  2. 2. the method as described in claim 1, which is characterized in that the pass according between test use cases and request use-case System determines the obtained corresponding test use cases of request use-case, specifically includes:
    The data parameters in obtained request use-case are changed by genetic algorithm, generate test use cases one;
    Use-case type in obtained request use-case and use-case rule base is combined matching, generates test use cases two;Its In, the use-case type in use-case rule base includes: environment error rule use-case, common recognition algorithm message rule use-case, common recognition algorithm Role's rule use-case, common recognition state rule use-case;
    Using the union of test use cases one and test use cases two as test use cases.
  3. 3. method according to claim 2, which is characterized in that the use in the request use-case and use-case rule base that will be obtained Example type is combined matching, generates test use cases two, specifically includes:
    The use-case type in obtained request use-case and use-case rule base is combined by Pairwise algorithm, generates test Set of uses case two.
  4. 4. the method as described in claim 1, which is characterized in that described that the test use cases are sent to corresponding preposition section Point, so that before test use cases are passed through the block chain node connecting with the preposition node by the corresponding preposition node, it is described Method further include:
    If the common recognition request received is signed containing signature using preset key pair test use cases again.
  5. 5. the method as described in claim 1, which is characterized in that each other preposition nodes of reception returned executes report, It specifically includes:
    For the corresponding block chain node of each corresponding preposition node, execute:
    The test report of the test case of block chain node return is received, the test report is that the block chain node is held one by one Every executed sends after a test case when test case that row test case is concentrated;
    The union of the test report for each test case that the test case that the block chain node is returned is concentrated is as the block chain Node executes report.
  6. The test of heuristics device 6. a kind of block chain is known together, which is characterized in that described device includes:
    First receiving module, the common recognition that the block chain node for the preposition node connection by preset key reception is sent are asked It asks;
    Parsing module obtains request use-case for parsing to common recognition request;
    Determining module, for determining that obtained request use-case is corresponding according to the relationship between test use cases and request use-case Test use cases;
    Sending module, for the test use cases to be sent to corresponding preposition node, so that the corresponding preposition node will be tested Set of uses case passes through the block chain node connecting with the preposition node;
    Second receiving module executes report for receive that each corresponding preposition node returns;
    Synchronization module for execution report to be saved in the report list of itself, and is synchronized to other preposition nodes.
  7. 7. device as claimed in claim 6, which is characterized in that the determining module includes:
    First generation unit is generated and is surveyed for being changed by genetic algorithm to the data parameters in obtained request use-case Try set of uses case one;
    Second generation unit, the use-case type in request use-case and use-case rule base for will obtain are combined matching, raw At test use cases two;Wherein, the use-case type in use-case rule base includes: environment error rule use-case, common recognition algorithm message Regular use-case, common recognition algorithm role rule use-case, common recognition state rule use-case;
    First combining unit, for using the union of test use cases one and test use cases two as test use cases.
  8. 8. device as claimed in claim 6, which is characterized in that second receiving module includes:
    Receiving unit receives the survey of block chain node return for being directed to the corresponding block chain node of each accordingly preposition node The test result of example on probation, the test result are every when being the block chain node test case that implementation of test cases is concentrated one by one It has executed and has sent after a test case;
    Second combining unit, the test result for each test case that the test case for returning to the block chain node is concentrated Implementing result of the union as the block chain node.
  9. 9. a kind of terminal readable medium, is stored with terminal executable instruction, which is characterized in that the computer Terminal executable instruction is used to execute the method as described in any claim in claim 1-6.
  10. 10. a kind of computing device characterized by comprising
    At least one processor;And the memory being connect at least one described processor communication;Wherein, the memory is deposited The instruction that can be executed by least one described processor is contained, described instruction is executed by least one described processor, so that institute It states at least one processor and is able to carry out method as described in any claim in claim 1-6.
CN201811354300.4A 2018-11-14 2018-11-14 Block chain consensus algorithm testing method and device, calculating device and storage medium Active CN109508295B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811354300.4A CN109508295B (en) 2018-11-14 2018-11-14 Block chain consensus algorithm testing method and device, calculating device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811354300.4A CN109508295B (en) 2018-11-14 2018-11-14 Block chain consensus algorithm testing method and device, calculating device and storage medium

Publications (2)

Publication Number Publication Date
CN109508295A true CN109508295A (en) 2019-03-22
CN109508295B CN109508295B (en) 2021-11-09

Family

ID=65748475

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811354300.4A Active CN109508295B (en) 2018-11-14 2018-11-14 Block chain consensus algorithm testing method and device, calculating device and storage medium

Country Status (1)

Country Link
CN (1) CN109508295B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110047004A (en) * 2019-04-23 2019-07-23 重庆金窝窝网络科技有限公司 Block chain accounting nodes selection method and device
CN110519277A (en) * 2019-08-29 2019-11-29 上海威尔立杰网络科技发展有限公司 A method of contract is executed based on single-point and realizes the other systems of control
CN110868337A (en) * 2019-11-15 2020-03-06 腾讯科技(深圳)有限公司 Fault-tolerant consensus mechanism testing method and device, storage medium and computer equipment
CN111782502A (en) * 2019-12-13 2020-10-16 北京沃东天骏信息技术有限公司 Automatic testing method and device
CN113760691A (en) * 2020-06-10 2021-12-07 北京沃东天骏信息技术有限公司 Continuous integration test method, device and storage medium
CN114416522A (en) * 2021-12-13 2022-04-29 杭州趣链科技有限公司 Block chain system test method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8473913B2 (en) * 2006-01-11 2013-06-25 Hitachi Data Systems Corporation Method of and system for dynamic automated test case generation and execution
CN106598824A (en) * 2016-11-25 2017-04-26 深圳前海微众银行股份有限公司 Performance analysis method and device for block chain
CN107943691A (en) * 2017-11-17 2018-04-20 深圳圣马歌科技有限公司 A kind of method and device for the functional test page for automatically generating intelligent contract
CN108241968A (en) * 2017-03-26 2018-07-03 杭州复杂美科技有限公司 The method that front end processor participates in block chain common recognition
CN108647967A (en) * 2018-05-10 2018-10-12 北京京东尚科信息技术有限公司 Select the method, apparatus and common recognition node of block chain common recognition mechanism

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8473913B2 (en) * 2006-01-11 2013-06-25 Hitachi Data Systems Corporation Method of and system for dynamic automated test case generation and execution
CN106598824A (en) * 2016-11-25 2017-04-26 深圳前海微众银行股份有限公司 Performance analysis method and device for block chain
CN108241968A (en) * 2017-03-26 2018-07-03 杭州复杂美科技有限公司 The method that front end processor participates in block chain common recognition
CN107943691A (en) * 2017-11-17 2018-04-20 深圳圣马歌科技有限公司 A kind of method and device for the functional test page for automatically generating intelligent contract
CN108647967A (en) * 2018-05-10 2018-10-12 北京京东尚科信息技术有限公司 Select the method, apparatus and common recognition node of block chain common recognition mechanism

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
C站训练营学员C站训练营学员C站训练营营: "区块链的共识机制", 《HTTPS://BLOG.CSDN.NET/CPONGO3/ARTICLE/DETAILS/89032069》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110047004A (en) * 2019-04-23 2019-07-23 重庆金窝窝网络科技有限公司 Block chain accounting nodes selection method and device
CN110047004B (en) * 2019-04-23 2023-04-18 重庆金窝窝网络科技有限公司 Block chain accounting node selection method and device
CN110519277A (en) * 2019-08-29 2019-11-29 上海威尔立杰网络科技发展有限公司 A method of contract is executed based on single-point and realizes the other systems of control
CN110519277B (en) * 2019-08-29 2020-08-21 上海威尔立杰网络科技发展有限公司 Method for realizing control of other systems based on single-point execution contract
CN110868337A (en) * 2019-11-15 2020-03-06 腾讯科技(深圳)有限公司 Fault-tolerant consensus mechanism testing method and device, storage medium and computer equipment
CN110868337B (en) * 2019-11-15 2021-05-07 腾讯科技(深圳)有限公司 Fault-tolerant consensus mechanism testing method and device, storage medium and computer equipment
CN111782502A (en) * 2019-12-13 2020-10-16 北京沃东天骏信息技术有限公司 Automatic testing method and device
CN113760691A (en) * 2020-06-10 2021-12-07 北京沃东天骏信息技术有限公司 Continuous integration test method, device and storage medium
CN114416522A (en) * 2021-12-13 2022-04-29 杭州趣链科技有限公司 Block chain system test method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN109508295B (en) 2021-11-09

Similar Documents

Publication Publication Date Title
CN109508295A (en) Block chain common recognition test of heuristics method, apparatus, computing device and storage medium
CN107395353B (en) block chain consensus method and device
KR102575120B1 (en) Computer-implemented systems and methods for linking a blockchain to a set of digital twins
CN109542781A (en) Block chain common recognition test of heuristics method, apparatus, computing device and storage medium
CN109361740A (en) A kind of block generation method, device, equipment and the medium of block chain
CN105027108B (en) Example host is configured
CN109697118A (en) Streaming computing task management method, device, electronic equipment and storage medium
US10129373B2 (en) Recovery of a network infrastructure to facilitate business continuity
CN108959678B (en) Method and apparatus for testing the design of satellite wiring harnesses and signal processing units
CN104598341A (en) Approach and system for determining a location of failure between interconnects/controller
CN110046166B (en) Timing task scheduling method and device based on block chain
CN113505520A (en) Method, device and system for supporting heterogeneous federated learning
US20230267035A1 (en) System and methods for application failover automation
CN110187831A (en) The block data storage system and method for block chain alliance chain
CN112035350B (en) Test method and device for block chain system and computer equipment
CN109325744A (en) Payment processing method, device, medium and electronic equipment
JPWO2016121085A1 (en) System management apparatus and system management method
CN117112288B (en) Disk array verification method and device, storage medium and electronic equipment
CN110134585A (en) System Test Plan generation method and terminal device
CN114095343A (en) Disaster recovery method, device, equipment and storage medium based on double-active system
CN111694598A (en) Software version package management method, device, equipment and medium
CN105637500A (en) Testing a web service using inherited test attributes
CN117118986B (en) Block chain-based fault tolerance verification method, device, equipment and medium
WO2016001772A1 (en) Synchronizing operations between regions when a network connection fails
Andrusiak et al. A reliability-aware framework for service-based software development

Legal Events

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