CN110221956A - Method and apparatus for generating the test case of block chain intelligence contract - Google Patents

Method and apparatus for generating the test case of block chain intelligence contract Download PDF

Info

Publication number
CN110221956A
CN110221956A CN201810174965.0A CN201810174965A CN110221956A CN 110221956 A CN110221956 A CN 110221956A CN 201810174965 A CN201810174965 A CN 201810174965A CN 110221956 A CN110221956 A CN 110221956A
Authority
CN
China
Prior art keywords
function
type
parameter
data
contract
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
CN201810174965.0A
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to CN201810174965.0A priority Critical patent/CN110221956A/en
Publication of CN110221956A publication Critical patent/CN110221956A/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

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)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a kind of methods and apparatus for generating the test case of block chain intelligence contract.This method includes retrieving public intelligent contract similar with specific intelligence contract, as similar public intelligent contract;It extracts and transaction data in the relevant one or more transaction of each similar public intelligence contract, with predefined type;Test data is obtained from transaction data based on specific intelligence contract;And the test case of specific intelligence contract is generated according to test data.

Description

Method and apparatus for generating the test case of block chain intelligence contract
Technical field
The present invention relates to a kind of methods and apparatus for generating the test case of block chain intelligence contract.
Background technique
Recently, the relevant technology of block chain has obtained the extensive concern of people.Previously, the execution of tradition application is all to rely on In the authoritative institution of a centralization;After the appearance of block chain technology, using can be held in a manner of a decentralization Row, without central authority.Block chain provides a kind of network architecture for not needing to trust, and the network user can not have Transaction is executed under the premise of having trust.The mode of this decentralization depends on the application of 3 kinds of technologies: that is, cipher mode stores Data;Point-to-point network;The intelligent contract that Site autonomy is relied on.
Intelligent contract is the script that can be performed automatically in block chain network.Once intelligent contract is deployed on network, Its internal public function can be called by other contracts.But the update of intelligent contract is relatively difficult, because they It is stored in the block of decentralization, is difficult to be modified.So ensuring that the correct of intelligent contract preferably before publication Property.
The common and important mode for ensuring program in machine code quality is that test case is appropriately carried out.However, compiling by hand It is extremely difficult to write test case, and very time-consuming.Test data is also difficult to copy, and especially true for Solidity language, Solidity language is the most common programming language for writing ether mill intelligence contract.The input data of its function may be 20 The account address of a byte, it has not been convenient to artificial to copy.On the other hand, the intelligent contract based on Solidity language exists very much Safety issue, when constructing test case, it is necessary to consider these safeties.
Summary of the invention
It has been given below about brief overview of the invention, in order to provide about the basic of certain aspects of the invention Understand.It should be appreciated that the general introduction be not about exhaustive general introduction of the invention, it be not intended to determine key of the invention or Pith, nor is it intended to limit the scope of the present invention.Its purpose only provides certain concepts in simplified form, with this Place mat as following specific embodiment part.
In view of posed problems above, the invention proposes a kind of for generating the test case of block chain intelligence contract Method, comprising: retrieval public intelligent contract similar with specific intelligence contract, as similar public intelligent contract;It extracts and every Transaction data in the relevant one or more transaction of a similar public intelligent contract, with predefined type;Based on specific Intelligent contract obtains test data from transaction data;And the test use of specific intelligence contract is generated according to test data Example.
Another aspect provides a kind of equipment for generating the test case of block chain intelligence contract, packets It includes: retrieval device, for retrieving public intelligent contract similar with specific intelligence contract, as similar public intelligent contract;It mentions Take device, for extract it is in one or more transaction relevant to each similar public intelligent contract, there is predefined type Transaction data;Acquisition device, for obtaining test data from the transaction data based on the specific intelligence contract;With And generating means, for generating the test case of the specific intelligence contract according to the test data.
In accordance with a further aspect of the present invention, a kind of computer readable storage medium is additionally provided, it is described computer-readable to deposit Storage media is stored with can be executed the program operated below by processor operation: retrieval is similar with specific intelligence contract public Intelligent contract, as similar public intelligent contract;It extracts and the relevant one or more friendships of each similar public intelligence contract Transaction data in easily, with predefined type;Test is obtained from the transaction data based on the specific intelligence contract Data;And the test case of the specific intelligence contract is generated according to the test data.
In accordance with a further aspect of the present invention, a kind of program is additionally provided.Described program includes the executable instruction of machine, when When executing described instruction in information processing system, described instruction executes the information processing system on according to the present invention State method.
Method and apparatus according to the invention can automatically generate the test case containing truthful data.
By the detailed description below in conjunction with attached drawing to highly preferred embodiment of the present invention, these and other of the invention is excellent Point will be apparent from
Detailed description of the invention
The embodiments of the present invention are read with reference to the drawings, other features and advantages of the present invention will be better understood, Attached drawing described here is intended merely to the purpose schematically illustrated to embodiments of the present invention, and not all possible reality It applies, and is not intended to be limited to the scope of the present invention.In the accompanying drawings:
Fig. 1 shows the method for the test case for generating block chain intelligence contract of embodiment according to the present invention Flow chart.
Fig. 2 shows a kind of flow charts of exemplary process of the similar public intelligent contract of retrieval.
Fig. 3 shows the schematic diagram of the record about public intelligent contract stored in storage.
Fig. 4 shows the schematic diagram of the processing of the cryptographic Hash of computational intelligence contract.
Fig. 5 shows the schematic figure for extracting the processing of transaction data.
Fig. 6 shows the flow chart for retrieving another exemplary process of similar public intelligent contract.
Fig. 7 shows the flow chart for obtaining a kind of exemplary process of test data.
Fig. 8 shows the flow chart for obtaining another exemplary process of test data.
Fig. 9 shows the equipment of the test case for generating block chain intelligence contract of embodiment according to the present invention Structural block diagram.
Figure 10 shows a kind of schematic diagram of exemplary configuration of retrieval device.
Figure 11 shows the schematic diagram of another exemplary configuration of retrieval device.
Figure 12 shows the schematic block diagram for implementing the computer of the method and apparatus of embodiment according to the present invention.
Specific embodiment
Embodiments of the present invention are described in detail referring now to attached drawing.It should be noted that being described below only exemplary , and it is not intended to limit the present invention.In addition, in the following description, will use the same reference numerals to represent in different attached drawings The same or similar component.Different characteristic in different embodiments described below can be bonded to each other, to form this hair Other embodiments in bright range.
Fig. 1 shows the method for the test case for generating block chain intelligence contract of embodiment according to the present invention Flow chart.As shown in Figure 1, the method 100 of embodiment includes step S110 to S140 according to the present invention.In searching step S110 In, public intelligent contract similar with specific intelligence contract is retrieved, as similar public intelligent contract.Herein, specific intelligence is closed It is approximately new intelligent contract to be released.Then, it in extraction step S120, extracts related to each similar public intelligent contract One or more transaction in, transaction data with predefined type.Then, in obtaining step S130, based on specific Intelligent contract obtains test data from transaction data.Then, in generation step S140, spy is generated according to test data The test case of fixed intelligence contract.
In the following, the treatment process of each step of method 100 is described in detail with reference to the attached drawings.
Fig. 2 shows a kind of flow charts of exemplary process of searching step S110.As shown in Fig. 2, retrieval process S110a Including step S111a to step S112a.In step S111a, repository, each of the repository memory block chain are constructed The record of public intelligence contract.As shown in figure 3, record includes the cryptographic Hash of public intelligent contract and related to public intelligent contract , only with predefined type transaction data one or more transaction.Specifically, construction repository includes: calculation block The cryptographic Hash of the public intelligent contract of each of chain, and store in storage;And extracted from block chain it is each transaction with So that it is extracted transaction only include predefined type transaction data, and by it is extracted transaction with it is relevant it is public intelligence contract Cryptographic Hash be stored in association in repository.
Here, block chain can be, for example, ether mill block chain.Existing ether mill platform such as Etherscan and Relevant block information is checked in Etherchain, support in a browser.Developer issues intelligent contract on these platforms, The source code of intelligent contract is uploaded to platform simultaneously.The intelligent relevant block of contract and its internal Transaction Information can be all synchronized to On the two platforms.User can traverse the intelligent contract on platform one by one, handle and parse the source code of intelligent contract, Jin Erti Take out relevant transaction data.
The source code of intelligent contract is one section of Solidity script.From the angle of scripted code, can only compare line by line Two intelligent contracts judge its similarity, this is extremely difficult and heavy.If the format or parameter of code are slightly different, Then the similarity of two contracts will be poor far.In order to quickly judge the similarity of two contracts, Hash side is employed herein Method, and cryptographic Hash is constructed using the operation code (opcode) of intelligent contract.
Fig. 4 shows the schematic diagram of the processing of the cryptographic Hash of computational intelligence contract.In Fig. 4, the operation code of intelligent contract One section of compiled code being shown as in such as ether mill virtual machine (EVM).In the cryptographic Hash for calculating each public intelligent contract When, as shown in figure 4, obtaining the operation code of public intelligent contract first.Then, the address information in operation code is removed.Address letter Breath represents the deviation post or memory information of variable in memory, is not related to the substantive content of intelligent contract, it is therefore desirable to arrange Influence except address information to the similarity system design between intelligent contract.In the virtual machine of ether mill, address information usually with " 0x " takes the lead, and the result after the address information taken the lead divided by " 0x " is shown in Fig. 4.
Then, the operation code after removal address information is divided into several pieces.For example, can use such as " STOP ", Keywords such as " RETURN ", " SELDDESTRUCT ", " SUICIDE ", " JUMPDEST " and " INVALID ", operation code is divided At several blocks, but keyword is not limited to word exemplified as above, and those skilled in the art can use according to actual needs Other keywords.It is shown in Fig. 4 and utilizes keyword " JUMPDEST " and " RETURN " divided three obtained operation code block.
Then, each piece of the cryptographic Hash with equal length is calculated.It can use the Hash such as existing SHA, MD5 Algorithm calculates each piece of cryptographic Hash.
Finally, each piece of the cryptographic Hash of adding up, to obtain the cryptographic Hash of public intelligent contract.It referring to fig. 4, can will be each The cryptographic Hash of a block carries out step-by-step and adds up, to obtain each value.Specifically, if some accumulative of each cryptographic Hash With greater than 0, then the value of this is set as 1;If some accumulative and being less than or equal to 0, the value of this is set as 0.
Fig. 5 shows the schematic diagram for extracting the processing of transaction data.As shown in figure 5, each contract has several associations Historical trading, and it is each transaction have a unique Hash Round Robin data partition.By this unique address information, we can be with Check the details of transaction.The data of predefined type are parsed and extracted to each transaction.Herein, we extract with The transaction data of lower 6 seed types:
From: the account address traded;
To: the destination address traded;
Value: the transaction data transmitted in transaction is defaulted as 0;
GasUsed: when the transaction executes, used gas quantity;
GasPrice: gas price when transaction;
Data/input data: the binary code of Transaction Information.In most cases, it be to the function of calling with And the encryption information of correlated inputs parameter.Can by construction one decoder come from
The numerical information of each parameter is extracted in " data/input data ", and herein by decoded information Format setting are as follows: { function name, (parameter type ...), (parameter value ...) }, referring to Fig. 3.
However, extracted data type is not limited to 6 seed types exemplified as above, those skilled in the art can be according to reality Border application is to extract other kinds of data.
By operating above, the repository including record shown in Fig. 3 has been constructed.
It is then, each in cryptographic Hash and repository based on specific intelligence contract in step S112a with continued reference to Fig. 2 The similarity of a cryptographic Hash retrieves the record of similar public intelligent contract similar to specific intelligence contract from repository.It is special The cryptographic Hash of fixed intelligence contract is calculated referring to the above Hash value calculating method.Here, if the Hash of specific intelligence contract Value and repository in some cryptographic Hash between similarity be greater than predetermined threshold, then it is assumed that specific intelligence contract with correspond to should The public intelligent contract of some cryptographic Hash is similar.
Specifically, the similarity between two cryptographic Hash can be by carrying out step-by-step XOR operation simultaneously to two cryptographic Hash And the number for counting " 1 " in XOR operation result calculates.For example, if the cryptographic Hash of specific intelligence contract be " 011001 " simultaneously And the cryptographic Hash of some public intelligent contract is " 101011 ", then specific intelligence contract some public intelligent contract to this is similar Spend in S=(011001xor 101011) 1 number=3.
In the case of executing exemplary retrieval processing, the step S120 in Fig. 1 is extracted from repository to be retrieved Record in transaction data.In addition, extremely large number similar public intelligent contract may be retrieved by the above retrieval process Record.It in this case, can be according to the number of the transaction in each record retrieved come to this in order to simplify processing A little records carry out descending sort, and N number of record that selected and sorted is forward is (that is, the top n note that the number of transaction for being included is most Record);Then in the step s 120, transaction data is extracted from selected top n record.
Building repository is described above and retrieves the embodiment of the record of similar public intelligent contract in storage. However, building repository it is not necessary to, it is described below another kind embodiment in, directly retrieved in block chain similar Public intelligence contract is without constructing repository.Fig. 6 shows the flow chart of another exemplary process of searching step S110. As shown in fig. 6, another kind exemplary retrieval processing S110b includes step S111b to step S112b.In step S111b, Each public intelligent cryptographic Hash of contract and the cryptographic Hash of specific intelligence contract in calculation block chain.In step S112b, base Similarity between the cryptographic Hash of specific intelligence contract and the cryptographic Hash of each public intelligent contract is retrieved from block chain Similar public intelligent contract similar to specific intelligence contract.Here, if the cryptographic Hash of specific intelligence contract is public with some Similarity between the cryptographic Hash of intelligent contract is greater than predetermined threshold, then it is assumed that specific intelligence contract and some the public intelligence are closed It is about similar.
In the case of another kind exemplary retrieval processing, in the step S120 of Fig. 1, extracted from block chain and every Transaction data in the relevant one or more transaction of a similar public intelligent contract, with predefined type.About predetermined The transaction data of type is referring to the description above with respect to Fig. 5.In addition, retrieving pole when handling by the another kind exemplary retrieval It, can be each similar public according to what is retrieved in order to simplify processing in the case of its a large amount of similar public intelligent contract The number of transaction in intelligent contract to carry out descending sort to these similar public intelligent contracts, and selected and sorted is forward N number of similar public intelligent contract (that is, the number of transaction for being included most the similar public intelligent contract of top n);Then in step In rapid S120, the transaction data of predefined type is extracted from the similar public intelligent contract of selected top n.
It, in step s 130, can be in the function based on specific intelligence contract after extracting transaction data with reference to Fig. 1 Parameter type and/or function name obtain test data from transaction data.
It specifically, can be in the function based on specific intelligence contract as a kind of exemplary process of obtaining step S130 Parameter type and function name obtain test data from transaction data.S130a is handled in the exemplary acquisition of the one kind In, firstly, extracting the public function in transaction data, obtain function list;Then, in the function based on specific intelligence contract The type and function name of parameter are being compared between each function in each function and function list in specific intelligence contract Compared with to obtain test data.Fig. 7 shows the concrete operations process of the exemplary process.Here, by the function in function list It is considered as first function and the function in specific intelligence contract is considered as second function.As shown in fig. 7, in specific intelligence contract Each second function execute following operation:
In step S710, from the class of the parameters in the type and second function for filtering out parameter in function list Type distinguishes consistent first function.
If filtering out first function in step S710, in step S720, from the type and second function of parameter In the types of parameters distinguish the function name of further screening function name and second function in consistent first function Claim consistent first function.
If filtering out first function in step S720, in step S730, by the parameters with second function Type and the value of the function name parameter in consistent first function respectively be set as test data.
If not filtering out function in step S710, Embedded process S750 to S790 is executed to traverse the second letter Parameters in number execute the parameter in second function compared between the parameter of each first function.
Specifically, firstly, setting 1 for variable i in step S740.
Then, in step S750, type and second are filtered out from the parameter of each first function in function list The consistent parameter of type of i-th of parameter in function.
If filtering out parameter in step S750, in step S730, by the type and the second letter in function list The value of the consistent parameter of type of i-th of parameter in number is set as test data.
If not filtering out parameter in step S750, in step S760, judge i-th of parameter type whether For array.
If it is judged that the type of i-th of parameter is array (for example, array type unit32 []), then in step S790 In, from the type (example for filtering out the element in type and i-th of parameter in the parameters of each function of function list Such as, unit32) combination settings of the value of the parameter filtered out are test number by consistent parameter and in step S730 According to.
If judging that the type of i-th of parameter is not array in step S760, pass variable i in step S770 Increase 1, and judge whether i is less than or equal to n in step S780, wherein n indicates the quantity of whole parameters in second function.Such as Fruit judges that i is less than or equal to n, then processing returns to step S750, continues to carry out above-mentioned place to the other parameters in second function Reason.If judging that i is greater than n in step S780, end processing.
If not filtering out consistent first letter of function name in function name and second function in step S720 Number, then in step S711, the function name based on second function and the similarity between the function name of first function, to ginseng Consistent first function is ranked up the type of parameters in several types and second function respectively;It is higher to choose similarity Preceding m first function, m be more than or equal to 1.And in step S730, set the value of the parameter in the m first function to Test data.
In the following, introducing another exemplary process of obtaining step S130.
On the platform of ether mill, even if intelligent contract is correct, it is also difficult to guarantee that the intelligence contract is not attacked by other people It hits.Language feature based on Solidity, there are the relevant risk problems of some safeties for intelligent contract.This paper presents coverings Following several risk environments of these safety issues:
It is some to have currency transitional function, it uses " addr.send "/" addr.transfer (x) "/ Functions such as " addr.call.value (x) ".For this class function, it would be desirable to ensure that currency transfer is in a secure mode It carries out.
Some functions for having access control, it uses such as " selfdestruct (x) "/" suicide (x) "/ The function that " tx.origin " etc. must be executed with authorization.In this case, before executing these functions, it is necessary to really Set the tone user address be exactly intelligent contract owner address.
Parameter type is the function of " uint_x " (x is arbitrary value), such as " uint "/" uint8 "/" uint16 "/ " uint32 "/" uint256 " etc..At this time, it may be necessary to ensure the problem of these functions are not in overflow or underflow.
In order to improve the performance that intelligent contract fights these above-mentioned risks, can be obtained from transaction data and these risks Relevant test data constructs test case.Specifically, in this case, the another kind as the obtaining step S130 of Fig. 1 Exemplary process can obtain test data based on the function name of the function in specific intelligence contract from transaction data. As shown in figure 8, the exemplary acquisition processing S130b of the another kind includes: when specific intelligence contract includes one or more currency When transfer function, the non-zero data that type is " value " are extracted from transaction data in step S131b, as test data, Wherein currency transfer function includes function " addr.send ", " addr.transfer (x) " or " addr.call.value (x)";When specific intelligence contract includes one or more access control functions, mentioned from transaction data in step S132b Taking type is the data of " from " and " to ", and as test data, wherein access control function includes function " selfdestruct (x) ", " suicide (x) " or " tx.origin ";And when specific intelligence contract includes one or more When a function with parameter type unit_x (x is arbitrary integer), type is extracted from transaction data in step S133b is The data of " unit_x ", as test data.
One of the above exemplary acquisition processing 130a and another exemplary acquisitions handle 130b can be used in combination or It uses individually.
In addition, needing to give " gas " (fuel) when calling the function of ether mill intelligence contract to meet function It is correct to execute.If " gas " amount is insufficient, all operations which is related to can all retract.In order to solve this problem, Ke Yicong The test data about " gas limit " (fuel minimum value) is extracted in transaction data;Then in the implementation procedure of test case In, the test data is set by " gas limit ", and check whether function call can be normally carried out.
In the following, illustrating the test for obtaining " gas limit " by taking three kinds of risky functions mentioned above as an example The processing of data.Firstly, calculating one or more currency transfer functions, one or more included by specific intelligence contract The function name and friendship of access control function or each function in one or more functions with parameter type unit_x The similarity of the function name of each function in easy data.Then, for one or more currency transfer functions, one or Each function in more access control functions or one or more functions with parameter type unit_x, from number of deals According to the higher preceding j function of the similarity of middle Selection of Function title, j is more than or equal to 1.Then, it is obtained from selected function Type is the data of " gasUsed ".Then, based on acquired data, to calculate maximum value, minimum value and average value, as The test data of " gas limit ".Later, during executing test cases, by " gas limit " be set as maximum value, Minimum value or average value are to check whether function call is normal.
The processing of the test data of acquisition " gas limit " is illustrated by taking three kinds of risky functions as an example above.At this In the case of kind, according to the test data of extracted three types and it is based on maximum value calculated, minimum value or average value To generate test case.In addition, the acquisition processing of the test data of above " gas limit " is also applied for other functions, and It can be tested according to being generated for the extracted test data of other functions and maximum value calculated, minimum value or average value Use-case.In other words, the processing for obtaining the test data of " gas limit " can handle 130a with the above-mentioned exemplary acquisition of one kind And/or another exemplary acquisition processing 130b is used in combination.
For generating the processing of test case, it has been well known to those skilled in the art, has been not described in detail herein.
The survey for being used to generate block chain intelligence contract of embodiment according to the present invention is described above with reference to Fig. 1 to Fig. 8 The method of example on probation.The block chain that is used to generate that embodiment according to the present invention is described below with reference to Fig. 9 to Figure 11 intelligently closes The equipment of test case about.
Fig. 9 shows the equipment of the test case for generating block chain intelligence contract of embodiment according to the present invention 900 structural block diagram.As shown in figure 9, equipment 900 includes retrieval device 910, extraction element 920, acquisition device 930 and generates Device 940.Retrieval device 910 is configured to retrieve public intelligent contract similar with specific intelligence contract, as similar public Intelligent contract.Extraction element 920 is configured to extract and the relevant one or more transaction of each similar public intelligence contract In, transaction data with predefined type.Acquisition device 930 is configured to based on specific intelligence contract come from transaction data Obtain test data.Generating means 940 are configured to generate the test case of specific intelligence contract according to test data.
Figure 10 shows a kind of structure chart of exemplary configuration of retrieval device.As shown in Figure 10, device 910a packet is retrieved Include structural member 911 and searching part 912.For constructing repository, which is stored in block chain structural member 911 The record of each public intelligent contract, the record include public intelligent contract cryptographic Hash and it is relevant to public intelligent contract, Only one or more transaction of the transaction data with predefined type.Structural member 911 includes computing unit, is configured to count The cryptographic Hash of the public intelligent contract of each of block chain is calculated, and is stored in storage;And extraction unit, be configured to from Each transaction is extracted in block chain so that extracted transaction only includes the transaction data of predefined type, and by extracted friendship Easily it is stored in association in repository to the cryptographic Hash of relevant public intelligent contract.
In addition, searching part 912 is configured to each Hash in the cryptographic Hash and repository based on specific intelligence contract The similarity of value retrieves the record of similar public intelligent contract from repository.
In the case of retrieving device 910 has configuration as shown in Figure 10, extraction element 920 extracts friendship from repository Easy data.
Figure 11 shows the structure chart of another exemplary configuration of retrieval device.As shown in figure 11, device 910b is retrieved Including calculating unit 911b and searching part 912b.Calculating unit 911b is configured to each public intelligence in calculation block chain The cryptographic Hash of contract and the cryptographic Hash of specific intelligence contract.Searching part 912b is configured to the Hash based on specific intelligence contract Similarity between value and the cryptographic Hash of each public intelligent contract retrieves similar public intelligent contract from block chain.
Retrieve device 910 have configuration as shown in figure 11 in the case of, extraction element 920 is extracted from block chain and Transaction data in the relevant one or more transaction of each similar public intelligent contract, with predefined type.
In a kind of embodiment according to the present invention, acquisition device 930 is configured to extract public in transaction data Function obtains function list;And the type and function name of the parameter in the function based on specific intelligence contract are in specific intelligence It is compared between each function in each function and function list in energy contract, to obtain test data.
In another embodiment according to the present invention, acquisition device 930 is configured to: when specific intelligence contract includes When one or more currency transfer functions, the non-zero data that type is " value " are extracted from transaction data, as test number According to wherein currency transfer function includes function " addr.send ", " addr.transfer (x) " or " addr.call.value (x)";When specific intelligence contract includes one or more access control functions, extracting type from transaction data is The data of " from " and " to ", as test data, wherein the access control function includes function " selfdestruct (x) ", " suicide (x) " or " tx.origin ";And when specific intelligence contract includes one or more with parameter type When the function of unit_x (x is arbitrary integer), the data that type is " unit_x " are extracted from transaction data, as test number According to.
The equipment of the test case for generating block chain intelligence contract is simply described above with reference to Fig. 9 to Figure 11 Construction and operation.The detailed operation of component and unit about the equipment and its inside may refer to above with respect to for generation area The description of the method for the test case of block chain intelligence contract.Here, being not described in detail.
In addition, here it is still necessary to, it is noted that in above system each building block can by software, firmware, hardware or The mode of a combination thereof is configured.It configures workable specific means or mode is well known to those skilled in the art, herein not It repeats again.In the case where being realized by software or firmware, from storage medium or network to the calculating with specialized hardware structure Machine (such as general purpose computer 1200 shown in Figure 12) installation constitutes the program of the software, which is being equipped with various programs When, it is able to carry out various functions etc..
Figure 12, which is shown, can be used for implementing the schematic block diagram with the computer of system according to the method for the embodiment of the present invention.
In Figure 12, central processing unit (CPU) 1201 according to the program stored in read-only memory (ROM) 1202 or from The program that storage section 1208 is loaded into random access memory (RAM) 1203 executes various processing.In RAM 1203, root is gone back The data required when CPU 1201 executes various processing etc. are stored according to needs.CPU 1201, ROM 1202 and RAM 1203 It is connected to each other via bus 1204.Input/output interface 1205 is also connected to bus 1204.
Components described below is connected to input/output interface 1205: importation 1206 (including keyboard, mouse etc.), output Part 1207 (including display, such as cathode-ray tube (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.), storage unit Divide 1208 (including hard disks etc.), communications portion 1209 (including network interface card such as LAN card, modem etc.).Communication unit 1209 are divided to execute communication process via network such as internet.As needed, driver 1210 can be connected to input/output and connect Mouth 1205.Detachable media 1211 such as disk, CD, magneto-optic disk, semiconductor memory etc. can according to need mounted On driver 1210, so that the computer program read out is mounted to as needed in storage section 1208.
It is such as removable from network such as internet or storage medium in the case where series of processes above-mentioned by software realization Unload the program that the installation of medium 1211 constitutes software.
It will be understood by those of skill in the art that this storage medium is not limited to wherein be stored with journey shown in Figure 12 Sequence is separately distributed with equipment to provide a user the detachable media 1211 of program.The example packet of detachable media 1211 Containing disk (include floppy disk (registered trademark)), CD (including compact disc read-only memory (CD-ROM) and digital versatile disc (DVD)), Magneto-optic disk (including mini-disk (MD) (registered trademark)) and semiconductor memory.Alternatively, storage medium can be ROM 1202, deposit The hard disk etc. for including in part 1208 is stored up, wherein computer program stored, and is distributed to user together with the equipment comprising them.
The present invention also proposes a kind of program product of instruction code for being stored with machine-readable.Described instruction code is by machine When device reads and executes, method that above-mentioned embodiment according to the present invention can be performed.
Correspondingly, it is also wrapped for carrying the storage medium of the program product of the above-mentioned instruction code for being stored with machine-readable It includes within the scope of the invention.The storage medium includes but is not limited to floppy disk, CD, magneto-optic disk, storage card, memory stick etc. Deng.
It should be noted that method of the invention be not limited to specifications described in time sequencing execute, can also be by According to other order of order, concurrently or independently it executes.Therefore, the execution sequence of method described in this specification is not right Technical scope of the invention is construed as limiting.
It is above for a better understanding of the present invention, to be only exemplary to the description of each embodiment of the present invention, And it is not intended to limit the invention.It should be noted that in the above description, describing and/or showing for a kind of embodiment Feature can be used in one or more other embodiments in a manner of same or similar, in other embodiment Feature is combined, or the feature in substitution other embodiment.It will be understood by those skilled in the art that of the invention not departing from In the case where inventive concept, for the variations and modifications that embodiment described above carries out, belong to of the invention In range.
To sum up, in an embodiment according to the present invention, the present invention provides following technical solutions.
A kind of method for generating the test case of block chain intelligence contract of scheme 1., comprising:
Public intelligent contract similar with specific intelligence contract is retrieved, as similar public intelligent contract;
It extracts and friendship in the relevant one or more transaction of each similar public intelligence contract, with predefined type Easy data;
Test data is obtained from the transaction data based on the specific intelligence contract;And
The test case of the specific intelligence contract is generated according to the test data.
2. the method for claim 1 of scheme, wherein the class of the parameter in the function based on the specific intelligence contract Type and/or function name obtain test data from the transaction data.
3. the method for claim 2 of scheme, wherein obtaining test data includes:
The public function in the transaction data is extracted, function list is obtained;
The type and function name of parameter in function based on the specific intelligence contract are in the specific intelligence contract In each function and the function list in be compared between each function, to obtain the test data.
4. the method for claim 3 of scheme, wherein by the function in the function list be considered as first function and Function in the specific intelligence contract is considered as second function, the parameter in the function based on the specific intelligence contract Type and function name in each function and the function list in the specific intelligence contract between each function into Row is relatively to obtain the test data, comprising:
Following operation successively is executed to each second function:
Distinguish from the type of the parameters in the type and second function for filtering out parameter in the function list consistent First function;
Distinguish in consistent first function from the type of the parameters in the type and second function of parameter and further sieves Select the consistent first function of function name of function name Yu the second function;And
The type of parameters with second function and function name are distinguished to the value of the parameter in consistent first function It is set as the test data.
5. the method for claim 4 of scheme, wherein when do not filtered out from the function list type of parameter with When the type of parameters in second function distinguishes consistent first function, each of second function parameter is traversed To execute following operation:
From filtering out type and the phase in the second function in the parameter of each first function in the function list Answer the consistent parameter of the type of parameter;
The survey is set by the value of the consistent parameter of type of type and the relevant parameter in the function list Try data;
When the consistent ginseng of type for not filtering out type Yu the relevant parameter in the parameters from the function list When number, judge whether the type of the relevant parameter is array, if the type of the relevant parameter is array, from the letter Type is filtered out in the parameters of each function of ordered series of numbers table and the type of an element in the relevant parameter is consistent Parameter and be test by the combination settings of the value of the consistent parameter of type of an element in type and the relevant parameter Data;And if the type of the relevant parameter is not array, terminate the judgement.
6. the method for claim 5 of scheme, wherein when the parameters in the type and second function from parameter Type does not filter out the function name consistent first in function name and the second function in consistent first function respectively When function,
Function name based on the second function and the similarity between the function name of the first function, to parameter Type and second function in the types of parameters consistent first function is ranked up respectively;
The higher preceding m first function of similarity is chosen, m is more than or equal to 1;And
The test data is set by the value of the parameter in the m first function.
7. the method for claim 2 of scheme, wherein obtaining test data includes:
When the specific intelligence contract includes one or more currency transfer functions, extracted from the transaction data Type is the non-zero data of " value ", as test data, wherein the currency transfer function includes function " addr.send ", " addr.transfer (x) " or " addr.call.value (x) ";
When the specific intelligence contract includes one or more access control functions, extracted from the transaction data Type is the data of " from " and " to ", as test data, wherein the access control function includes function " selfdestruct (x) ", " suicide (x) " or " tx.origin ";And
When the specific intelligence contract includes one or more letters with parameter type unit_x (x is arbitrary integer) When number, the data that type is " unit_x " are extracted from the transaction data, as test data.
8. the method for claim 7 of scheme, wherein obtain test data further include:
Calculate one or more currency transfer function included by the specific intelligence contract, one or more The title and institute of multiple access control functions or each function in one or more function with parameter unit_x State the similarity of the title of each function in transaction data;
For one or more currency transfer function, one or more access control function or described one Each function in a or more function with parameter unit_x, from the transaction data choose similarity it is higher before J function, j are more than or equal to 1;
The data that type is " gasUsed " are obtained from selected function;
Maximum value, minimum value and average value are calculated based on acquired data, as test data.
9. the method for claim 1 of scheme, wherein the retrieval includes:
Repository is constructed, the repository is stored with the record of each public intelligent contract in the block chain, described Cryptographic Hash and transaction data to public intelligent contract relevant, that only there is predefined type of the record including public intelligent contract One or more transaction, wherein the construction includes:
The cryptographic Hash of the public intelligent contract of each of described block chain is calculated, and is stored in storage;And
Each transaction data traded so that extracted transaction only includes predefined type is extracted from the block chain, And extracted transaction is stored in association in the repository to the cryptographic Hash of relevant public intelligent contract;And
The similarity of each cryptographic Hash in cryptographic Hash based on the specific intelligence contract and the repository, from described The record of the similar public intelligent contract is retrieved in repository,
Wherein, it is extracted from the repository and the relevant transaction data of the similar public intelligence contract.
10. the method for claim 1 of scheme, wherein the retrieval includes:
Calculate each public intelligent cryptographic Hash of contract and the cryptographic Hash of the specific intelligence contract in the block chain; And
Similarity between cryptographic Hash based on the specific intelligence contract and the cryptographic Hash of each public intelligent contract come The similar public intelligent contract is retrieved from the block chain.
The method according to scheme 9 or 10 of scheme 11., wherein the cryptographic Hash for calculating each public intelligent contract includes:
Obtain the operation code of the public intelligent contract;
Remove the address information in the operation code;
The operation code after the address information will be removed and be divided into several pieces;
Calculate each piece of cryptographic Hash;And
Add up each piece of cryptographic Hash, to obtain the cryptographic Hash of the public intelligent contract.
12. the method for claim 11 of scheme, wherein according to the keyword in the operation code come by the operation Code is divided into several pieces.
13. the method for claim 1 of scheme, wherein the predefined type include: " from ", " to ", " value ", " gasUsed ", " gasPrice " and " data " or " input data ".
A kind of equipment for generating the test case of block chain intelligence contract of scheme 14., comprising:
Device is retrieved, is configured to retrieve public intelligent contract similar with specific intelligence contract, as similar public intelligence It can contract;
Extraction element, be configured to extract in the relevant one or more transaction of each similar public intelligence contract , transaction data with predefined type;
Acquisition device is configured to obtain test data from the transaction data based on the specific intelligence contract; And
Generating means are configured to generate the test case of the specific intelligence contract according to the test data.
The equipment according to scheme 14 of scheme 15., wherein the acquisition device is configured to based on the specific intelligence The type of parameter in the function of contract and/or function name obtain test data from the transaction data.
The equipment according to scheme 15 of scheme 16., wherein the acquisition device is configured to:
The public function in the transaction data is extracted, function list is obtained;
The type and function name of parameter in function based on the specific intelligence contract are in the specific intelligence contract In each function and the function list in be compared to obtain the test data between each function.
The equipment according to scheme 15 of scheme 17., wherein the acquisition device is configured to:
When the specific intelligence contract includes one or more currency transfer functions, extracted from the transaction data Type is the non-zero data of " value ", as test data, wherein the currency transfer function includes function " addr.send ", " addr.transfer (x) " or " addr.call.value (x) ";
When the specific intelligence contract includes one or more access control functions, extracted from the transaction data Type is the data of " from " and " to ", as test data, wherein the access control function includes function " selfdestruct (x) ", " suicide (x) " or " tx.origin ";And
When the specific intelligence contract includes one or more letters with parameter type unit_x (x is arbitrary integer) When number, the data that type is " unit_x " are extracted from the transaction data, as test data.
The equipment according to scheme 17 of scheme 18., wherein the acquisition device is configured to:
Calculate one or more currency transfer function included by the specific intelligence contract, one or more The title and institute of multiple access control functions or each function in one or more function with parameter unit_x State the similarity of the title of each function in transaction data;
For one or more currency transfer function, one or more access control function or described one Each function in a or more function with parameter unit_x, from the transaction data choose similarity it is higher before J function, j are more than or equal to 1;
The data that type is " gasUsed " are obtained from selected function;And
Maximum value, minimum value and average value are calculated based on acquired data, as test data.
The equipment according to scheme 14 of scheme 19., wherein the retrieval device includes:
Structural member, is configured to construct repository, and the repository is stored with each public intelligence in the block chain Can contract record, the record include public intelligent contract cryptographic Hash and it is relevant to public intelligent contract, only have it is pre- One or more transaction of the transaction data of type are determined, wherein the structural member includes:
Computing unit, is configured to calculate the cryptographic Hash of the public intelligent contract of each of described block chain, and is stored in In repository;And
Extraction unit is configured to extract each transaction from the block chain so that extracted transaction is only comprising pre- Determine the transaction data of type, and extracted transaction is stored in association with institute to the cryptographic Hash of relevant public intelligent contract It states in repository;And
Searching part, each Hash being configured in the cryptographic Hash based on the specific intelligence contract and the repository The similarity of value retrieves the record of the similar public intelligent contract from the repository,
Wherein, the extraction element extracts number of deals relevant to the similar public intelligent contract from the repository According to.
A kind of computer readable storage medium of scheme 20., the computer-readable recording medium storage has can be by handling Device runs to execute the program operated below:
Public intelligent contract similar with specific intelligence contract is retrieved, as similar public intelligent contract;
It extracts and friendship in the relevant one or more transaction of each similar public intelligence contract, with predefined type Easy data;
Test data is obtained from the transaction data based on the specific intelligence contract;And
The test case of the specific intelligence contract is generated according to the test data.

Claims (10)

1. a kind of method for generating the test case of block chain intelligence contract, comprising:
Public intelligent contract similar with specific intelligence contract is retrieved, as similar public intelligent contract;
It extracts and number of deals in the relevant one or more transaction of each similar public intelligence contract, with predefined type According to;
Test data is obtained from the transaction data based on the specific intelligence contract;And
The test case of the specific intelligence contract is generated according to the test data.
2. according to the method described in claim 1, wherein, the type of the parameter in the function based on the specific intelligence contract And/or function name from the transaction data obtains test data.
3. according to the method described in claim 2, wherein, obtaining test data includes:
The public function in the transaction data is extracted, function list is obtained;
The type and function name of parameter in function based on the specific intelligence contract are in the specific intelligence contract It is compared in each function and the function list between each function to obtain the test data.
4. according to the method described in claim 3, wherein, the function in the function list is considered as first function and by institute It states the function in specific intelligence contract and is considered as second function, the class of the parameter in the function based on the specific intelligence contract Type and function name are being compared between each function in each function and the function list in the specific intelligence contract Compared with to obtain the test data, comprising:
Following operation successively is executed to each second function:
From the type of the parameters in the type and second function for filtering out parameter in function list difference consistent the One function;
Further screening in consistent first function is distinguished from the type of the parameters in the type and second function of parameter The consistent first function of function name of function name and the second function;And
The type of parameters with second function and function name are distinguished to the value setting of the parameter in consistent first function For the test data.
5. according to the method described in claim 4, wherein, when the type and second for not filtering out parameter from the function list When the type of parameters in function distinguishes consistent first function, each of second function parameter is traversed to hold The following operation of row:
From filtering out type and the corresponding ginseng in the second function in the parameter of each first function in the function list The consistent parameter of several types;
The test number is set by the value of the consistent parameter of type of type and the relevant parameter in the function list According to;
When the consistent parameter of the type for not filtering out type and the relevant parameter in the parameters from the function list, Whether the type for judging the relevant parameter is array, if the type of the relevant parameter is array, from the function row The consistent parameter of type of an element in type and the relevant parameter is filtered out in the parameters of each function of table It and is test data by the combination settings of the value of the consistent parameter of type of an element in type and the relevant parameter; And if the type of the relevant parameter is not array, terminate the judgement.
6. according to the method described in claim 5, wherein, when the type of the parameters in the type and second function from parameter The consistent first function of function name in function name and the second function is not filtered out in consistent first function respectively When,
Function name based on the second function and the similarity between the function name of the first function, to the class of parameter Consistent first function is ranked up the type of type and the parameters in second function respectively;
The higher preceding m first function of similarity is chosen, m is more than or equal to 1;And
The test data is set by the value of the parameter in the m first function.
7. according to the method described in claim 2, wherein, obtaining test data includes:
When the specific intelligence contract includes one or more currency transfer functions, type is extracted from the transaction data For the non-zero data of " value ", as test data, wherein the currency transfer function include function " addr.send ", " addr.transfer (x) " or " addr.call.value (x) ";
When the specific intelligence contract includes one or more access control functions, type is extracted from the transaction data For the data of " from " and " to ", as test data, wherein the access control function includes function " selfdestruct (x) ", " suicide (x) " or " tx.origin ";And
When the specific intelligence contract includes one or more functions with parameter type unit_x (x is arbitrary integer) When, the data that type is " unit_x " are extracted from the transaction data, as test data.
8. according to the method described in claim 7, wherein, obtaining test data further include:
Calculate one or more currency transfer function, one or more included by the specific intelligence contract The title and the friendship of access control function or each function in one or more function with parameter unit_x The similarity of the title of each function in easy data;
For one or more currency transfer function, one or more access control function or it is one or Each function in more functions with parameter unit_x chooses the higher preceding j of similarity from the transaction data Function, j are more than or equal to 1;
The data that type is " gasUsed " are obtained from selected function;And
Maximum value, minimum value and average value are calculated based on acquired data, as test data.
9. according to the method described in claim 1, wherein, the retrieval includes:
Repository is constructed, the repository is stored with the record of each public intelligent contract in the block chain, the record One of cryptographic Hash and transaction data relevant to public intelligent contract, that only there is predefined type including public intelligent contract Or more transaction, wherein it is described construction include:
The cryptographic Hash of the public intelligent contract of each of described block chain is calculated, and is stored in storage;And
Each transaction data traded so that extracted transaction only includes predefined type is extracted from the block chain, and will Extracted transaction is stored in association in the repository to the cryptographic Hash of relevant public intelligent contract;And
The similarity of each cryptographic Hash in cryptographic Hash and the repository based on the specific intelligence contract, from the storage The record of the similar public intelligent contract is retrieved in library,
Wherein, it is extracted from the repository and the relevant transaction data of the similar public intelligence contract.
10. a kind of equipment for generating the test case of block chain intelligence contract, comprising:
Device is retrieved, is configured to retrieve public intelligent contract similar with specific intelligence contract, is closed as similar public intelligence About;
Extraction element, be configured to extract it is in one or more transaction relevant with each similar public intelligent contract, have There is the transaction data of predefined type;
Acquisition device is configured to obtain test data from the transaction data based on the specific intelligence contract;And
Generating means, for generating the test case of the specific intelligence contract according to the test data.
CN201810174965.0A 2018-03-02 2018-03-02 Method and apparatus for generating the test case of block chain intelligence contract Pending CN110221956A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810174965.0A CN110221956A (en) 2018-03-02 2018-03-02 Method and apparatus for generating the test case of block chain intelligence contract

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810174965.0A CN110221956A (en) 2018-03-02 2018-03-02 Method and apparatus for generating the test case of block chain intelligence contract

Publications (1)

Publication Number Publication Date
CN110221956A true CN110221956A (en) 2019-09-10

Family

ID=67822139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810174965.0A Pending CN110221956A (en) 2018-03-02 2018-03-02 Method and apparatus for generating the test case of block chain intelligence contract

Country Status (1)

Country Link
CN (1) CN110221956A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110602133A (en) * 2019-09-20 2019-12-20 腾讯科技(深圳)有限公司 Intelligent contract processing method, block chain management device and storage medium
CN111444090A (en) * 2020-03-24 2020-07-24 腾讯科技(深圳)有限公司 Contract testing method and device in block chain, electronic equipment and storage medium
CN111897742A (en) * 2020-09-30 2020-11-06 支付宝(杭州)信息技术有限公司 Method and device for generating intelligent contract test case
CN113052699A (en) * 2019-09-21 2021-06-29 腾讯科技(深圳)有限公司 Contract data processing method, related device and medium
CN113515442A (en) * 2021-03-26 2021-10-19 南京航空航天大学 Intelligent contract test seed recommendation method based on function signature similarity calculation
CN116303097A (en) * 2023-05-16 2023-06-23 中国工商银行股份有限公司 Fuzzy test method, device, equipment, medium and program product for intelligent contract

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8276123B1 (en) * 2008-07-22 2012-09-25 Juniper Networks, Inc. Adaptive regression test selection within testing environments
JP2012221312A (en) * 2011-04-11 2012-11-12 Nippon Telegr & Teleph Corp <Ntt> Test data generation device and method
US20120304157A1 (en) * 2011-05-23 2012-11-29 International Business Machines Corporation Method for testing operation of software
CN102981947A (en) * 2011-09-07 2013-03-20 阿里巴巴集团控股有限公司 Data preparation method in test and system provided with the same
CN103631720A (en) * 2013-12-20 2014-03-12 百度在线网络技术(北京)有限公司 Method and device for generating test case
JP2014056307A (en) * 2012-09-11 2014-03-27 Nippon Telegr & Teleph Corp <Ntt> Device, method and program for generating data for test having plural reference access in test path
CN104714881A (en) * 2013-12-15 2015-06-17 广州凯乐软件技术有限公司 Table-driven unit test system and method
US20150324274A1 (en) * 2014-05-09 2015-11-12 Wipro Limited System and method for creating universal test script for testing variants of software application
US9514037B1 (en) * 2015-12-16 2016-12-06 International Business Machines Corporation Test program scheduling based on analysis of test data sets
US20170192882A1 (en) * 2016-01-06 2017-07-06 Hcl Technologies Limited Method and system for automatically generating a plurality of test cases for an it enabled application
CN107038242A (en) * 2017-04-24 2017-08-11 杭州趣链科技有限公司 It is a kind of towards the global intelligent contract business datum analytic method of block chain
CN107329888A (en) * 2017-05-31 2017-11-07 深圳前海微众银行股份有限公司 Intelligent contract command code coverage rate computational methods and system
US20170352027A1 (en) * 2016-06-07 2017-12-07 Cornell University Authenticated data feed for blockchains
US20170353309A1 (en) * 2016-06-06 2017-12-07 Microsoft Technology Licensing, Llc Cryptographic applications for a blockchain system
US20180052763A1 (en) * 2016-08-18 2018-02-22 International Business Machines Corporation Test case reduction in application binary interface (abi) compatibility testing

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8276123B1 (en) * 2008-07-22 2012-09-25 Juniper Networks, Inc. Adaptive regression test selection within testing environments
JP2012221312A (en) * 2011-04-11 2012-11-12 Nippon Telegr & Teleph Corp <Ntt> Test data generation device and method
US20120304157A1 (en) * 2011-05-23 2012-11-29 International Business Machines Corporation Method for testing operation of software
CN102981947A (en) * 2011-09-07 2013-03-20 阿里巴巴集团控股有限公司 Data preparation method in test and system provided with the same
JP2014056307A (en) * 2012-09-11 2014-03-27 Nippon Telegr & Teleph Corp <Ntt> Device, method and program for generating data for test having plural reference access in test path
CN104714881A (en) * 2013-12-15 2015-06-17 广州凯乐软件技术有限公司 Table-driven unit test system and method
CN103631720A (en) * 2013-12-20 2014-03-12 百度在线网络技术(北京)有限公司 Method and device for generating test case
US20150324274A1 (en) * 2014-05-09 2015-11-12 Wipro Limited System and method for creating universal test script for testing variants of software application
US9514037B1 (en) * 2015-12-16 2016-12-06 International Business Machines Corporation Test program scheduling based on analysis of test data sets
US20170192882A1 (en) * 2016-01-06 2017-07-06 Hcl Technologies Limited Method and system for automatically generating a plurality of test cases for an it enabled application
US20170353309A1 (en) * 2016-06-06 2017-12-07 Microsoft Technology Licensing, Llc Cryptographic applications for a blockchain system
US20170352027A1 (en) * 2016-06-07 2017-12-07 Cornell University Authenticated data feed for blockchains
US20180052763A1 (en) * 2016-08-18 2018-02-22 International Business Machines Corporation Test case reduction in application binary interface (abi) compatibility testing
CN107038242A (en) * 2017-04-24 2017-08-11 杭州趣链科技有限公司 It is a kind of towards the global intelligent contract business datum analytic method of block chain
CN107329888A (en) * 2017-05-31 2017-11-07 深圳前海微众银行股份有限公司 Intelligent contract command code coverage rate computational methods and system

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110602133A (en) * 2019-09-20 2019-12-20 腾讯科技(深圳)有限公司 Intelligent contract processing method, block chain management device and storage medium
CN113052699A (en) * 2019-09-21 2021-06-29 腾讯科技(深圳)有限公司 Contract data processing method, related device and medium
CN113052699B (en) * 2019-09-21 2022-09-13 腾讯科技(深圳)有限公司 Contract data processing method, related device and medium
CN111444090A (en) * 2020-03-24 2020-07-24 腾讯科技(深圳)有限公司 Contract testing method and device in block chain, electronic equipment and storage medium
CN111444090B (en) * 2020-03-24 2024-04-26 腾讯科技(深圳)有限公司 Contract testing method and device in blockchain, electronic equipment and storage medium
CN111897742A (en) * 2020-09-30 2020-11-06 支付宝(杭州)信息技术有限公司 Method and device for generating intelligent contract test case
US11204860B2 (en) 2020-09-30 2021-12-21 Alipay (Hangzhou) Information Technology Co., Ltd. Methods and apparatuses for generating smart contract test case
CN113515442A (en) * 2021-03-26 2021-10-19 南京航空航天大学 Intelligent contract test seed recommendation method based on function signature similarity calculation
CN116303097A (en) * 2023-05-16 2023-06-23 中国工商银行股份有限公司 Fuzzy test method, device, equipment, medium and program product for intelligent contract
CN116303097B (en) * 2023-05-16 2023-08-22 中国工商银行股份有限公司 Fuzzy test method, device, equipment, medium and program product for intelligent contract

Similar Documents

Publication Publication Date Title
CN110221956A (en) Method and apparatus for generating the test case of block chain intelligence contract
JP7266638B2 (en) DATA TRANSFER CONTROL METHOD AND SYSTEM BASED ON INTEGRATED BLOCKCHAIN
Butterfield et al. A dictionary of computer science
US11900363B2 (en) Computer-implemented system and method for determining the state of a machine executable contract implemented using a blockchain
US20070282741A1 (en) Order system payment routing
JP2008262601A (en) Distributed risk assessment system and method for assessing financial fraud risk
CN106295361B (en) A kind of financial data safety management processing system
US20050219076A1 (en) Information management system
CN108304726A (en) Data desensitization method and device
CN112925954A (en) Method and apparatus for querying data in a graph database
CN113282623A (en) Data processing method and device
US8229903B2 (en) Suggesting data interpretations and patterns for updating policy documents
WO2018001120A1 (en) Method and device facilitating expansion of primary payment instruments
CN114579637A (en) Efficient retrieval method for block chain of power grid service system
US11068236B2 (en) Identification of users across multiple platforms
Yang et al. Improvement and Optimization of Vulnerability Detection Methods for Ethernet Smart Contracts
Zhang et al. A blockchain based secure e-commerce transaction system
Zhang et al. Decentralized data transaction method and platform based on Ethereum+ IPFS
US20230054316A1 (en) Retrieval of unstructured data in dpp information access
CN116012151A (en) Decentralizing data transaction method and system based on Ethernet and IPFS
Aimar Extraction, indexing and analysis of Ethereum smart contracts data
Kumar et al. Requirement Pattern Extraction using Cluster Based Framework–RAPID
CN115357869A (en) Software activation method and device based on multipath configuration
CN116431910A (en) Biological feature utilization method, equipment and storage medium based on authoring terminal
CN117556453A (en) In-field processing method and system for data elements based on original data without domain

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190910