CN110471849B - Block chain resource management test method and system, storage medium and terminal - Google Patents

Block chain resource management test method and system, storage medium and terminal Download PDF

Info

Publication number
CN110471849B
CN110471849B CN201910733429.4A CN201910733429A CN110471849B CN 110471849 B CN110471849 B CN 110471849B CN 201910733429 A CN201910733429 A CN 201910733429A CN 110471849 B CN110471849 B CN 110471849B
Authority
CN
China
Prior art keywords
container
block chain
resource management
adopting
layer
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.)
Active
Application number
CN201910733429.4A
Other languages
Chinese (zh)
Other versions
CN110471849A (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.)
Nanjing University of Posts and Telecommunications
Original Assignee
Nanjing University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University of Posts and Telecommunications filed Critical Nanjing University of Posts and Telecommunications
Priority to CN201910733429.4A priority Critical patent/CN110471849B/en
Publication of CN110471849A publication Critical patent/CN110471849A/en
Application granted granted Critical
Publication of CN110471849B publication Critical patent/CN110471849B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

A method and a system for testing block chain resource management, a storage medium and a terminal are provided, the method comprises the following steps: packaging the block chain system to be tested into a container by adopting a container layer; monitoring the packaged container by adopting a core monitoring layer, and performing transaction test on the packaged container by adopting a corresponding script transaction program; integrating and analyzing the transaction test data by adopting a data integration layer to obtain corresponding test data; and visualizing the test data by adopting a visual interface and outputting and displaying the test data. By the scheme, the unified test of the block chain system can be realized.

Description

Block chain resource management test method and system, storage medium and terminal
Technical Field
The invention belongs to the technical field of computer software testing, and particularly relates to a block chain resource management testing method and system, a storage medium and a terminal.
Background
The block chain technology has been developed rapidly recently, and the market scale is larger at present. Besides a normal payment system, the block chain technology plays a leading important role in numerous academic and industrial fields such as internet of things, cloud computing, medical health and the like. A blockchain, also known as a distributed ledger, is essentially a large database system. The block chain is made up of many chronologically arranged blocks, each of which contains a large number of thousands of authenticated transactions that record transactions or information streams. A directed chain is formed by concatenating the block chain with the hash value pointing ahead. In this way, the blockchain technique can provide a very high-level and value-integrity traceable service for all information streams.
To protect data from external attacks, blockchains employ a distributed computation and storage mechanism, i.e., all participants in a peer-to-peer network keep copies of the blockchain in parallel. Through a negotiation algorithm and protocol, the peer node determines and synchronously updates the local blockchain state. Because the transaction is carried out in a mode of not depending on a certificate issued by a trusted authority, the blockchain system obviously improves the dispersion degree and the safety of the network, but as corresponding cost, a large amount of network resources or hardware overhead is required for the achievement. The resource management capabilities of a blockchain technology solution are key to determining whether a user is using the blockchain technology to address a need.
There are reports that monitor the performance of blockchains under different conditions, but there is no method that can uniformly address the performance platform of blockchain testing.
Disclosure of Invention
The invention solves the technical problem of how to realize the unified test of a block chain system.
In order to achieve the above object, the present invention provides a method for testing blockchain resource management, the method comprising:
packing the block chain system to be tested into a container by adopting a container layer;
monitoring the packaged container by adopting a core monitoring layer, and performing transaction test on the packaged container by adopting a corresponding script transaction program;
integrating and analyzing the transaction test data by adopting a data integration layer to obtain corresponding test data;
and visualizing the test data by adopting a visual interface and outputting and displaying the test data.
Optionally, the packaging the block chain system to be tested into a container by using a container layer includes:
and respectively packaging the complete information of each node in the block chain system to be tested in a corresponding container by adopting a container layer.
Optionally, the performing transaction testing on the packaged container by using a corresponding script transaction program includes:
and calling the API of the block chain system to be tested by adopting a corresponding script transaction program to perform transaction test on the packaged container.
Optionally, the method further comprises:
and calculating to obtain resource management index data of the block chain system to be tested by adopting the visual interface according to the test data, and outputting and displaying the resource management index data.
The embodiment of the invention also provides a block chain resource management test system, which comprises a container layer, a core monitoring layer, a data integration layer and a visual interface which are sequentially coupled;
the container layer is suitable for packaging the block chain system to be tested into a container;
the core monitoring layer is suitable for monitoring the packaged container and performing transaction test on the packaged container by adopting a corresponding script transaction program;
the data integration layer is suitable for integrating and analyzing the transaction test data to obtain corresponding test data;
the visual interface is suitable for visualizing the test data and outputting and displaying the test data.
Optionally, the container layer is adapted to pack complete information of each node in the blockchain system to be tested in a corresponding container.
Optionally, the core monitoring layer is adapted to call an API of the blockchain system to be tested by using a corresponding script transaction program to perform transaction testing on the packaged container.
Optionally, the visual interface is further adapted to calculate resource management index data of the block chain system to be tested according to the test data, and output and display the resource management index data.
The embodiment of the present invention further provides a computer-readable storage medium, on which computer instructions are stored, and when the computer instructions are executed, the method performs any of the steps of the block chain resource management testing method.
The embodiment of the present invention further provides a terminal, which includes a memory and a processor, where the memory stores a computer instruction capable of running on the processor, and the processor executes the steps of any one of the above block chain resource management test methods when running the computer instruction.
Compared with the prior art, the invention has the beneficial effects that:
according to the scheme, the block chain system to be tested is packaged into the container by the container layer, the packaged container is monitored by the core monitoring layer, the packaged container is subjected to transaction test by the corresponding script transaction program, the transaction test data is subjected to integration analysis by the data integration layer to obtain the corresponding test data, and finally, the test data is visualized by the visual interface and output and displayed, so that the unified test of the block chain system can be realized.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a block chain resource management test system according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for testing block chain resource management according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. The directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship between the components, the movement, etc. in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indication is changed accordingly.
As described in the background, there is a lack in the prior art of a method for unified testing of blockchain systems.
According to the technical scheme, the block chain system to be tested is packaged into a container by adopting a container layer, the packaged container is monitored by adopting a core monitoring layer, a transaction test is carried out on the packaged container by adopting a corresponding script transaction program, then a data integration layer is adopted to carry out integration analysis on transaction test data to obtain corresponding test data, and finally, a visual interface is adopted to carry out visualization and output display on the test data, so that unified test of the block chain system can be realized.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
For ease of understanding, the following first describes the block chain resource management test system in the embodiment of the present invention. Referring to fig. 1, a block chain resource management test system according to an embodiment of the present invention may include a container layer 11, a core monitoring layer 12, a data integration layer 13, and a visualization interface 14. Wherein, the container layer 11, the core monitoring layer 12, the data integration layer 13 and the visual interface 14 are coupled in sequence.
The operation principle of the block chain resource management test system in the embodiment of the present invention will be described with reference to fig. 2.
Fig. 2 is a flowchart illustrating a method for testing blockchain resource management according to an embodiment of the invention. Referring to fig. 2, a method for testing block chain resource management may specifically include the following steps:
step S201: and packaging the block chain system to be tested into a container by adopting a container layer.
In the implementation, the blockchain system to be tested is put into a container, the blockchain system to be tested is integrated before testing, namely the blockchain system is containerized, and the complete node information of a single blockchain is stored in a single container, so that a plurality of nodes are stored in a plurality of containers.
The method comprises the steps of initializing different block chain systems, and achieving the purpose of initializing the block chain systems through a preset account. While some blockchain systems support intelligent contracts, the present system does not use them; if intelligent contracts are needed, the system can still perform the deployment and compiling work of the intelligent contracts.
Step S202: and monitoring the packaged container by adopting a core monitoring layer, and performing transaction test on the packaged container by adopting a corresponding script transaction program.
In a specific implementation, the next year monitoring layer is used for testing a blockchain system, wherein the blockchain system comprises a blockchain test script and a blockchain test system developed by the design, and test values and data can be completely returned through the system. Due to the difference of different blockchain systems, correspondingly designed transaction scripts also have difference, namely, the corresponding transaction scripts can be found by the different blockchain systems.
In an embodiment of the present invention, when the core monitoring layer is used to test the blockchain system to be tested, the sent transaction data is far greater than the throughput that can be carried by the blockchain system to be tested, so as to prevent the situation that objective data cannot be completely tested. Considering that there may be packet loss in the transmission transaction in a distributed system, we put the data transmission situation in local transmission. Meanwhile, the test result index formulated by the design surrounds the hardware design, and the data change can be objectively reflected.
Step S203: and integrating and analyzing the transaction test data by adopting a data integration layer to obtain corresponding test data.
In specific implementation, when receiving data sent by the core monitoring layer, the data integration layer may perform integration analysis on the transaction test data by using the data integration layer to obtain corresponding test data, and may export and send the test data in the selected time interval to the visualization interface in a form of a table. The form of the graph can be a pie chart, a broken line chart, a bar chart and the like.
Step S204: and visualizing the test data by adopting a visual interface and outputting and displaying the test data.
In specific implementation, when the visualization interface receives the test data sent by the core monitoring layer, the visualization interface may use a visualization technology to visualize the received data and output and display the data to the user.
Step S205: and calculating to obtain resource management index data of the block chain system to be tested by adopting the visual interface according to the test data, and outputting and displaying the resource management index data.
In specific implementation, when the resource management index data of the to-be-tested blockchain system is obtained through calculation by the visual interface according to the test data, the parameter index related to hardware of the to-be-tested blockchain system can be firstly formulated, formula integration is carried out, the test data measured before is brought into the visual interface after the formula integration is finished, table building comparison is carried out, and finally the data is presented in a table form after calculation, so that comparison of each platform on the aspect of resource utilization rate can be directly seen.
In theory, as long as containerized blockchain systems can be tested, as is well known, blockchain systems are developed based on Linux, and can be used in containers as long as the containerized blockchain systems can be operated on Linux, so that the method is suitable for all blockchain design platforms.
In practical tests, mainstream of Ethereum, party, hyperhedger Fabric, hyperhedger Sawtooth, CITA, IOTA and the like can support a block chain system built by a private chain, and an expected effect is achieved.
According to the block chain performance test system provided by the technical scheme, objective comparison and analysis are carried out on different block chain systems by setting the container, the core monitoring layer, the data integration layer and the visual interface, and the link between the block chain systems and hardware and the corresponding performance indexes of the block chain systems and the hardware can be visually reflected through the design. By the design, developers can be helped to better pay attention to the index relation between the performance of the block chain and hardware.
The block chain system related to the application is wide, and the configuration is relatively simple, and the operation is convenient. Ease of use of block chain testing can be met.
The embodiment of the invention also provides a computer readable storage medium, on which computer instructions are stored, and the computer instructions execute the steps of the block chain resource management testing method when running. For the block chain resource management test method, please refer to the detailed description in the previous section, which is not repeated.
The embodiment of the invention also provides a terminal, which comprises a memory and a processor, wherein the memory is stored with a computer instruction capable of running on the processor, and the processor executes the steps of the block chain resource management test method when running the computer instruction. For the block chain resource management test method, please refer to the detailed description in the previous section, which is not repeated.
By adopting the scheme in the embodiment of the invention, the block chain system to be tested is packaged into the container by adopting the container layer, the packaged container is monitored by adopting the core monitoring layer, the packaged container is subjected to transaction test by adopting the corresponding script transaction program, the transaction test data is integrated and analyzed by adopting the data integration layer to obtain the corresponding test data, and finally, the test data is visualized by adopting the visualization interface and is output and displayed, so that the unified test of the block chain system can be realized.
The foregoing shows and describes the general principles, essential features, and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are merely illustrative of the principles of the invention, but various changes and modifications may be made without departing from the spirit and scope of the invention, the scope of which is defined by the appended claims, the description and the equivalents thereof.

Claims (10)

1. A method for testing resource management of a block chain, comprising:
packaging the block chain system to be tested into a container by adopting a container layer;
monitoring the packaged container by adopting a core monitoring layer, and performing transaction test on the packaged container by adopting a corresponding script transaction program;
adopting a data integration layer to carry out integration analysis on the transaction test data to obtain corresponding test data;
and visualizing the test data by adopting a visual interface and outputting and displaying the test data.
2. The method for blockchain resource management testing according to claim 1, wherein said using a container layer to package the blockchain system to be tested into a container comprises:
and respectively packaging the complete information of each node in the block chain system to be tested in a corresponding container by adopting a container layer.
3. The method for testing blockchain resource management according to claim 1, wherein said performing transaction testing on said packaged containers using corresponding script transaction programs includes:
and calling the API of the blockchain system to be tested by adopting a corresponding script transaction program to perform transaction test on the packaged container.
4. The method for testing block chain resource management according to any of claims 1 to 3, further comprising:
and calculating to obtain resource management index data of the block chain system to be tested according to the test data by adopting the visual interface, and outputting and displaying the resource management index data.
5. A block chain resource management test system is characterized by comprising a container layer, a core monitoring layer, a data integration layer and a visual interface which are sequentially coupled;
the container layer is suitable for packaging the block chain system to be tested into a container;
the core monitoring layer is suitable for monitoring the packaged container and performing transaction test on the packaged container by adopting a corresponding script transaction program;
the data integration layer is suitable for integrating and analyzing the transaction test data to obtain corresponding test data;
the visual interface is suitable for visualizing the test data and outputting and displaying the test data.
6. The system according to claim 5, wherein the container layer is adapted to pack complete information of each node in the blockchain system to be tested in a corresponding container.
7. The blockchain resource management test system of claim 5, wherein the core monitoring layer is adapted to use a corresponding script transaction program to call an API of the blockchain system to be tested to perform transaction testing on the packaged container.
8. The system according to any one of claims 5 to 7, wherein the visual interface is further adapted to calculate resource management index data of the blockchain system to be tested according to the test data, and output and display the resource management index data.
9. A computer readable storage medium having stored thereon computer instructions, wherein the computer instructions when executed perform the steps of the blockchain resource management test method of any one of claims 1 to 4.
10. A terminal comprising a memory and a processor, the memory having stored thereon computer instructions capable of being executed on the processor, the processor executing the computer instructions to perform the steps of the blockchain asset management testing method of any one of claims 1 to 4.
CN201910733429.4A 2019-08-09 2019-08-09 Block chain resource management test method and system, storage medium and terminal Active CN110471849B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910733429.4A CN110471849B (en) 2019-08-09 2019-08-09 Block chain resource management test method and system, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910733429.4A CN110471849B (en) 2019-08-09 2019-08-09 Block chain resource management test method and system, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN110471849A CN110471849A (en) 2019-11-19
CN110471849B true CN110471849B (en) 2022-10-14

Family

ID=68511612

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910733429.4A Active CN110471849B (en) 2019-08-09 2019-08-09 Block chain resource management test method and system, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN110471849B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111552728B (en) * 2020-04-24 2021-11-30 深圳点链科技有限公司 Data processing method, system, terminal and storage medium of block chain

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019072288A2 (en) * 2018-11-30 2019-04-18 Alibaba Group Holding Limited Testing platform for blockchain networks
CN109783364A (en) * 2018-12-14 2019-05-21 深圳先进技术研究院 A kind of block chain Performance Test System and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019072288A2 (en) * 2018-11-30 2019-04-18 Alibaba Group Holding Limited Testing platform for blockchain networks
CN109783364A (en) * 2018-12-14 2019-05-21 深圳先进技术研究院 A kind of block chain Performance Test System and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
区块链安全测试方案研究;付凯 等;《信息通信技术与政策》;20181231(第12期);第63-67页 *

Also Published As

Publication number Publication date
CN110471849A (en) 2019-11-19

Similar Documents

Publication Publication Date Title
KR102606945B1 (en) Computer-implemented systems and methods for combining blockchain technology and digital twins
CN106470133B (en) System pressure testing method and device
US10764034B2 (en) Method and system for facilitating data transfer between blockchains
US9201758B2 (en) System and method for display of software quality
Baresi et al. Event-based multi-level service monitoring
CN108933713A (en) The method, apparatus and service server of sandbox debugging are realized based on shadow link
US20210390029A1 (en) Method and apparatus for testing stress based on cloud service
US10423408B2 (en) Identifying and isolating library code in software applications
CN110213164A (en) A kind of method and device of the identification network key disseminator based on topology information fusion
CN110166276A (en) A kind of localization method, device, terminal device and the medium of frame synchronization exception
CN109815119A (en) A kind of test method and device of APP link channel
CN108052444A (en) A kind of method and apparatus of performance test for mobile application
CN110471849B (en) Block chain resource management test method and system, storage medium and terminal
EP3808099A1 (en) Real time telemetry monitoring tool
Park et al. A closeness centrality analysis algorithm for workflow-supported social networks
CN112035350A (en) Test method and device for block chain system and computer equipment
Amiri et al. Modeling and empirical validation of reliability and performance trade-offs of dynamic routing in service-and cloud-based architectures
Ristov et al. SimLess: simulate serverless workflows and their twins and siblings in federated FaaS
CN108874675A (en) A kind of fuzzing method for generating test case based on field classification
TW201629768A (en) Infrastructure rule generation
Krichen et al. A resource-aware model-based framework for load testing of ws-bpel compositions
ChauPattnaik et al. Component based reliability prediction
CN110489090A (en) A kind of applied software development method and system based on application model
US20150120921A1 (en) Techniques for workload toxic mapping
Antonescu et al. Modeling and simulation of concurrent workload processing in cloud-distributed enterprise information systems

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