Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Block chain smart contract test method based on metamorphic test

A technology of smart contracts and transformation testing, applied in software testing/debugging, error detection/correction, instruments, etc., can solve problems such as the inability to determine the correctness of a single test result, and the inability to completely solve the problem of test determination.

Pending Publication Date: 2022-05-17
JIANGSU UNIV
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Although this method cannot determine the correctness of a single test result, that is, it cannot completely solve the problem of test judgment, but when the transformation relationship is not satisfied, it can be determined that there must be a fault in the software under test.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Block chain smart contract test method based on metamorphic test
  • Block chain smart contract test method based on metamorphic test
  • Block chain smart contract test method based on metamorphic test

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0031] In order to be able to understand more clearly the technical content of a metamorphosis testing method (Smart contract-MT) for blockchain smart contract security defects of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and specific implementation cases. It should be pointed out that , the described examples are intended to facilitate the understanding of the present invention without any limitation requirements.

[0032] The flow chart of a metamorphosis testing method (Smartcontract-MT) oriented to blockchain smart contract security defects given by the present invention is as follows: figure 1 As shown, the first step is to obtain the codes of the functions and parameters called in the smart contract; the second step is to analyze the necessary attributes between the parameters in the smart contract according to the obtained functions and the corresponding parameters in the smart contract; the...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a block chain smart contract test method based on a metamorphic test, and belongs to the field of software engineering. Comprising the following steps: step 1, analyzing a called function and a code of a parameter thereof based on a smart contract; 2, analyzing necessary attributes among the intelligent contract parameters according to the called function and the corresponding parameters; step 3, determining a metamorphic relationship (MRs) according to a relationship between input and output in the necessary attributes, wherein the metamorphic relationship comprises an input metamorphic relationship and an output metamorphic relationship; and step 4, generating an original test case by using a random test method, generating a subsequent test case according to input relationship, respectively running the two groups of test cases in the smart contract, and verifying the correctness of the result by judging whether the output result meets the corresponding output relationship. According to the method, the oracle problem in the smart contract test is relieved while the security defect of the smart contract is tested, and the effectiveness and advantages of the method are verified by performing a test experiment on the existing smart contract vulnerability.

Description

technical field [0001] The invention belongs to the technical field of metamorphosis testing in software testing, and relates to a metamorphosis testing method for blockchain smart contract security defects Background technique [0002] Ethereum smart contracts (autonomous programs that run on the blockchain) often control financial and intellectual property transactions. Due to the vital role they play, smart contracts require a complete, comprehensive and effective testing methodology. In software testing, an ideal test oracle can give a definite judgment on whether the test result is correct or not. However, this ideal test decision is usually not easy to obtain, or the cost of obtaining it is far beyond the value of the software itself. This problem is called the test oracle problem. At present, the test judgment problem has become the bottleneck restricting the development of software testing technology. Metamorphic testing determines whether the test cases are execu...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F11/36G06F21/57
CPCG06F11/3688G06F11/3692G06F11/3684G06F11/366G06F21/577G06F2221/033
Inventor 陈锦富王震鑫蔡赛华冯乔伟施登洲陈宇豪许容天王栋杰
Owner JIANGSU UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Eureka Blog
Learn More
PatSnap group products