WO2020062639A1 - 区块链引入测试方法、装置、设备及计算机可读存储介质 - Google Patents

区块链引入测试方法、装置、设备及计算机可读存储介质 Download PDF

Info

Publication number
WO2020062639A1
WO2020062639A1 PCT/CN2018/122717 CN2018122717W WO2020062639A1 WO 2020062639 A1 WO2020062639 A1 WO 2020062639A1 CN 2018122717 W CN2018122717 W CN 2018122717W WO 2020062639 A1 WO2020062639 A1 WO 2020062639A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
test
blockchain
result information
target
Prior art date
Application number
PCT/CN2018/122717
Other languages
English (en)
French (fr)
Inventor
金慧智
Original Assignee
深圳壹账通智能科技有限公司
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 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2020062639A1 publication Critical patent/WO2020062639A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods

Definitions

  • the present application relates to the technical field of blockchain, and in particular, to a method, device, device, and computer-readable storage medium for introducing a blockchain.
  • Blockchain technology is to use block chain data structure to verify and store data, use distributed node consensus algorithm to generate and update data, use cryptography to ensure the security of data transmission and access, and use intelligence composed of automated script code.
  • a new distributed infrastructure and computing method that uses contracts to program and manipulate data. Because blockchain technology has the characteristics of decentralization, immutability, and privacy protection, it is widely used in various fields.
  • the main purpose of this application is to provide a method, a device, a device, and a computer-readable storage medium for testing the introduction of a blockchain.
  • the purpose is to quickly and accurately determine whether a business server can introduce a blockchain technology and reduce time and labor costs.
  • the present application provides a method for testing the introduction of a blockchain, which includes the following steps:
  • the blockchain introduction test device includes:
  • An interface determining module is configured to, when receiving the input interface test data, access a tag group according to the interface in the interface test data to determine a target common interface and a target block link port;
  • An interface test module configured to test the target common interface and the target block link port respectively according to an interface test case in the interface test data
  • a report generating module is configured to generate a blockchain introduction report according to the first test result information of the target common interface and the second test result information of the target block link port, and display the blockchain introduction report.
  • the present application also provides a blockchain introduction test device, where the blockchain introduction test device includes a processor, a memory, and a processor stored on the memory and executable by the processor.
  • Blockchain introduction test readable instructions wherein when the blockchain introduction test readable instructions are executed by the processor, the steps of the blockchain introduction test method described above are implemented.
  • the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores a blockchain-readable test-readable instruction, wherein the blockchain-introduced test-readable instruction is When the processor executes, it implements the steps of the introduction method of the blockchain as described above.
  • This application provides a method, a device, a device, and a computer-readable storage medium for introducing a blockchain.
  • the application accesses a tag group according to the interface in the interface test data to determine a target common interface and The target block link port, and according to the interface test cases in the interface test data, test the target common interface and the target block link port respectively, and then according to the first test result information of the target common interface and the target block link port number Second, the test result information is used to generate a blockchain introduction report and display the blockchain introduction report.
  • developers only need to enter the interface test data to implement the automatic stress test corresponding to the blockchain link port and the ordinary interface.
  • the test result information of each interface is automatically compared at the same time to obtain a blockchain introduction report. Developers can quickly and accurately determine whether the business server can introduce blockchain technology through the blockchain introduction report, effectively reducing time and labor costs.
  • FIG. 1 is a schematic diagram of a hardware structure of a blockchain-introduced test device according to embodiments of the present application
  • FIG. 2 is a schematic flowchart of a first embodiment of a method for introducing a blockchain test in this application;
  • FIG. 3 is a schematic flowchart of a second embodiment of a method for introducing a blockchain test in this application;
  • FIG. 4 is a schematic diagram of the functional modules of the first embodiment of the blockchain introduction test device of the present application.
  • the blockchain introduction test method involved in the embodiment of the present application is mainly applied to a blockchain introduction test device.
  • the blockchain introduction test device may be a PC (personal computer personal). computer), portable computers, mobile terminals and other devices with display and processing functions.
  • FIG. 1 is a schematic diagram of a hardware structure of a blockchain introduction test device involved in a solution of an embodiment of the present application.
  • the blockchain introduction test device may include a processor 1001 (for example, a central processor Central Processing Unit, CPU), communication bus 1002, user interface 1003, network interface 1004, and memory 1005.
  • the communication bus 1002 is used to implement connection and communication between these components.
  • the user interface 1003 may include a display and an input unit such as a keyboard.
  • the network interface 1004 may optionally include a standard wired interface and a wireless interface.
  • the memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory, the memory 1005 may optionally be a storage device independent of the foregoing processor 1001.
  • the hardware structure shown in FIG. 1 does not constitute a limitation on the present application, and may include more or fewer components than shown in the figure, or combine some components, or arrange different components.
  • the memory 1005 as a computer-readable storage medium in FIG. 1 may include an operating system, a network communication module, and a blockchain-introduced test-readable instruction.
  • the network communication module is mainly used to connect to the server and perform data communication with the server; and the processor 1001 can call the blockchain stored in the memory 1005 to introduce test-readable instructions, and execute the blocks provided by the embodiments of this application. Chain introduction test method.
  • the embodiment of the present application provides a method for testing the introduction of a blockchain.
  • FIG. 2 is a schematic flowchart of a first embodiment of a method for introducing a blockchain test in this application.
  • the blockchain introduction test method is implemented by a blockchain introduction test device.
  • the blockchain introduction test device may be a terminal device such as a PC, a handheld computer, and a tablet computer, and may be selected as the device shown in FIG. 1
  • the blockchain introduction test method includes the following steps:
  • Step S101 when receiving the input interface test data, determine the target common interface and the target block link port according to the interface access tag group in the interface test data;
  • Step S102 Test the target common interface and the target block link port respectively according to the interface test cases in the interface test data;
  • Step S103 Generate a blockchain introduction report according to the first test result information of the target common interface and the second test result information of the target block link port, and display the blockchain introduction report.
  • Step S101 when receiving the input interface test data, determine the target common interface and the target block link port according to the interface access tag group in the interface test data;
  • an interface for inputting interface test data is displayed.
  • the input interface for interface test data displays a test interface option, a thread number input box, a request number input box, Test number input box and test case number input box, etc.
  • Testers can input interface test data based on the input interface of the test data of the interface, that is, test interface labels, threads, requests, tests, and test cases.
  • the interface test data includes, but is not limited to, an interface access tag group, an interface test case, and a number of tests.
  • the interface access tag group is composed of a tag corresponding to a target common interface and a tag corresponding to a target block link port. However, it is not limited to the number of threads and requests.
  • the performance indicators tested include, but are not limited to, average response time, throughput, and request error rate.
  • This blockchain interface is used by developers to modify common interfaces and introduce blockchain technology in the server. In order to prevent unpredictable problems for production, the subsequent block link ports need to be tested on the modified application interface, that is, the block link ports, to determine whether the blockchain technology can be introduced.
  • the target access interface tag group is determined according to the interface in the interface test data to determine the target common interface and the target block link port. Specifically, the interface access tag group is read from the interface test data, and the first test interface tag containing the first preset field and the second test interface containing the second preset field are read from the interface access tag group. Label, then determine the interface corresponding to the first test interface label as the target common interface, and determine the interface corresponding to the second test interface label as the target block link port.
  • the first preset field and the second preset field can be set by those skilled in the art based on the actual situation, which is not specifically limited in this embodiment.
  • the first preset field is "general ", The second preset field is” blockchain ".
  • the interface for inputting the test data of the interface also displays a test start time input box, and the tester can set the test start time. After the tester sets the test start time, when the input of the interface test data is completed, the interface test data is marked. Timed test tags.
  • the interface test data When receiving the input interface test data, first determine whether the interface test data carries a timing test tag. If the interface test data carries a timing test tag, when the timing time point in the interface test data is reached, According to the interface access label group in the interface test data, determine the target common interface and the target block link port. If the interface test data does not carry the timing test label, then directly access the label group according to the interface in the interface test data to determine Target common interface and target block link port.
  • Step S102 Test the target common interface and the target block link port respectively according to the interface test cases in the interface test data;
  • the device tests the target common interface and the target block link port according to the interface test cases in the interface test data, that is, reads from the interface test data. Take each interface test case and execute each interface test case to test the target common interface and the target block link port.
  • the device reads each interface test case from the interface test data, selects one interface test case in turn according to the execution order of each interface test case, and then generates a corresponding number of access requests according to the selected interface test case, and passes the
  • the target common interface and the target block link port transmit each access request to the service server, and receive the interface access results of each access request returned by the service server, including the common interface access result and the block link port access result, including But not limited to the response time and request status of each access request;
  • the performance indicators under the interface test cases are calculated according to the access results of the block link port, and the performance indexes of the target block link port under the selected interface test case are calculated, including but not limited to the average response time, request error rate, and throughput. Quantity, specifically adding the response time of each request and dividing by the number of requests to obtain the average response time, and counting the number of requests with an error status of the request, and dividing by the number of requests to obtain the request error rate;
  • the performance indicators of the target common interface under each interface test case are collected to obtain the first test result information
  • the performance indicators of the target block link port under each interface test case are collected to obtain the second test result information.
  • the first test result information includes, but is not limited to, the first average response time, the first throughput, and the first request error rate under each test case of the target common interface.
  • the second test result information includes, but is not limited to, the target block link. The second average response time, the second throughput, and the second request error rate under each test case of the port.
  • Step S103 Generate a blockchain introduction report according to the first test result information of the target common interface and the second test result information of the target block link port, and display the blockchain introduction report.
  • the device generates a blockchain introduction report based on the first test result information of the target common interface and the second test result information of the target block link port, and displays the blockchain introduction report.
  • each performance index in the first test result information is correspondingly compared with each performance index in the second test result information to obtain a first comparison result of each performance index, that is, the first average response time and the second average Compare the response time to get the average response time comparison result, compare the first throughput with the second throughput, get the throughput comparison result, compare the first request error rate with the second request error rate, and get the request error rate Compare the results; then compare each performance indicator in the second test result information with its corresponding preset threshold to obtain a second comparison result for each performance indicator, that is, compare the second average response time with the preset average response time Comparing the second throughput with the preset throughput, and comparing the second request error rate with the preset request error rate; and finally generating a blockchain introduction report based on the first comparison result and the second comparison result, that is, Create a
  • the result of the blockchain introduction judgment can also be obtained according to the second comparison result, that is, if the second average response time is higher than the preset average response time, and the second throughput is higher than the preset throughput, and the second request error If the rate is lower than the preset request error rate, it can be determined that the block chain introduction decision result can be introduced; if at least one of the performance index results is abnormal (the second average response time is higher than the preset average response time, If the second throughput is not in the preset throughput interval or the second request error rate is higher than the preset request error rate), it can be determined that the result of the blockchain introduction decision cannot be introduced.
  • the interface test data also includes service labels.
  • the interface test data After the result information and the second test result information of the target block link port, read the service tag from the interface test data, and query the mapping table between the pre-stored service tag and each performance index threshold, that is, the service tag and average Mapping table of response time threshold, throughput threshold, and request error rate threshold to obtain thresholds corresponding to each performance index, that is, average response time threshold, throughput threshold, and request error rate threshold, and then determine whether the second average response time is Is lower than the average response time threshold, determines whether the second throughput is higher than the throughput threshold, and determines whether the second request error rate is lower than the request error rate threshold.
  • the target access interface tag group is determined according to the interface test data
  • the target common interface and the target block link port are determined, and according to the interface test case in the interface test data, Test the target common interface and target block link port respectively, and then generate a blockchain introduction report based on the first test result information of the target common interface and the second test result information of the target block link port, and display the blockchain Introduction report.
  • the blockchain introduction test method is also include:
  • Step S104 Read each interface test case from the interface test data, and determine whether historical historical test result information of the target common interface under each interface test case is stored in the database;
  • the device reads each interface test case from the interface test data, and determines whether the database stores historical test result information of the target common interface under each interface test case.
  • the use case identification code of each interface test case is obtained, and the first test interface tag containing the first preset field, that is, the tag of the target common interface is read from the interface test data, and then the tag marked with The test result information of the first test interface tag, and determine whether the test result information is associated with the use case identifier of each interface test case. If the test result information is associated with the use case identifier of each interface test case, determine the database The historical test result information of the target common interface under each interface test case is stored.
  • the use case identification code is used to uniquely identify the interface test case.
  • Step S105 if the historical test result information of the target common interface under each interface test case is stored in the database, test the target block link port according to each interface test case;
  • the historical test result information of the target common interface under each interface test case is stored in the database, only the target block link port needs to be tested, that is, the target block link port is tested according to each interface test case. Further, if at least one interface test case use case identifier exists in each interface test case and the test result information is not associated, it is determined that no historical test result information of the target common interface under each interface test case is stored in the database. , You can read some historical test result information from the test result information, that is, read the test result information associated with the use case identification code, and then determine the interface test case to be executed, that is, the use case identification code is not associated with the test result information. Interface test case, and test the target common interface according to the interface test case to be executed.
  • Step S106 Generate a blockchain introduction report based on the historical test result information and the test result information of the target block link port, and display the blockchain introduction report.
  • the device generates a blockchain introduction report based on the historical test result information and the test result information of the target block link interface, and displays the blockchain introduction report, that is, the performance indicators and target areas in the historical test result information.
  • the performance indicators in the test result information of the block link port are compared to obtain a first comparison result, and then each performance indicator in the second test result information is compared with its corresponding preset threshold to obtain the first performance index of each performance indicator.
  • this application verifies whether the related historical test result information is stored in the database. If the related historical test result information is stored, only the test target block link port needs to be improved to improve the test. effectiveness.
  • the embodiment of the present application also provides a blockchain introduction test device.
  • FIG. 4 is a schematic diagram of the functional modules of the first embodiment of the blockchain introduction test device of the present application.
  • the blockchain introduction test device of this application is a virtual device, which is stored in the memory 1005 of the blockchain introduction test device shown in FIG. 1 and is used to implement all the functions of the blockchain introduction test readable instruction; when an input interface is received
  • the target common interface and the target block link port are determined according to the interface access tag group in the interface test data; according to the interface test case in the interface test data, the target common interface and the target are respectively identified.
  • Test the target block link port ; generate a blockchain introduction report based on the first test result information of the target common interface and the second test result information of the target block link port, and display the blockchain introduction report.
  • the block chain introduction test device includes:
  • the interface determining module 101 is configured to, when receiving the input interface test data, access a tag group according to the interface in the interface test data to determine a target common interface and a target block link port;
  • the interface test module 102 is configured to test the target common interface and the target block link port respectively according to an interface test case in the interface test data;
  • a report generation module 103 is configured to generate a blockchain introduction report based on the first test result information of the target common interface and the second test result information of the target block link port, and display the blockchain introduction report .
  • the interface determining module 101 is further configured to:
  • interface test module 102 is further configured to:
  • the performance indicators of the target common interface under each interface test case are summarized to obtain first test result information, and the performance indicators of the target block link port under each interface test case are collected to obtain second test result information.
  • the report generating module 103 is further configured to:
  • the blockchain introduction test device further includes:
  • a test result determining module configured to read each interface test case from the interface test data, and determine whether the database stores historical test result information of the target common interface under each interface test case;
  • the interface test module 102 is further configured to: if the historical test result information of the target common interface under the interface test cases is stored in the database, link the target block to the target block according to the interface test cases. carry out testing;
  • the report generating module 103 is further configured to generate a blockchain introduction report according to the historical test result information and the test result information of the target block link port, and display the blockchain introduction report.
  • test result determination module is further configured to:
  • test result information is associated with the use case identification code of each interface test case, it is determined that historical test result information of the target common interface under each interface test case is stored in the database.
  • the blockchain introduction test device further includes:
  • a label determination module configured to determine whether a timing test label is carried in the interface test data when the input interface test data is received
  • the interface determining module 101 is further configured to: if the interface test data carries a timing test tag, when the timing time point in the interface test data is reached, access the tag group according to the interface in the interface test data , Determine the target common interface and the target block link port;
  • the interface determining module 101 is further configured to, if the interface test data does not carry a timing test tag, access the tag group according to the interface in the interface test data to determine a target common interface and a target block link port.
  • each module in the above-mentioned blockchain introduction test device corresponds to the steps in the above-mentioned embodiment of the blockchain introduction test method, and the functions and implementation processes thereof will not be repeated here.
  • an embodiment of the present application further provides a computer-readable storage medium.
  • the computer-readable storage medium of the present application stores a block-chain introduction test readable instruction, wherein when the block-chain introduction test readable instruction is executed by a processor, the steps of the above-mentioned method of block chain introduction test are implemented.
  • the computer-readable storage medium may be a non-volatile readable storage medium.
  • the method implemented when the readable instruction of the blockchain introduction test is executed refer to various embodiments of the blockchain introduction test method of this application. I will not repeat them here.
  • the methods in the above embodiments can be implemented by means of software plus a necessary universal hardware platform, and of course, also by hardware, but in many cases the former is better.
  • Implementation Based on such an understanding, the technical solution of this application that is essentially or contributes to the existing technology can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium (such as ROM / RAM) as described above. , Magnetic disk, optical disc), including a number of instructions to enable a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the embodiments of this application.

Landscapes

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

Abstract

一种区块链引入测试方法、测试装置、设备及计算机可读存储介质,所述方法包括:当接收到输入的接口测试数据时,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口(S101);依据所述接口测试数据中的接口测试用例,分别对所述目标普通接口和所述目标区块链接口进行测试(S102);依据所述目标普通接口的第一测试结果信息和所述目标区块链接口的第二测试结果信息,生成区块链引入报告,并显示所述区块链引入报告(S103)。所述方法能够快速准确的确定业务服务器是否可以引入区块链技术,降低时间和人力成本。

Description

区块链引入测试方法、装置、设备及计算机可读存储介质
本申请要求于2018年9月27日提交中国专利局、申请号为201811135647.X、发明名称为“区块链引入测试方法、装置、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及区块链的技术领域,尤其涉及一种区块链引入测试方法、装置、设备及计算机可读存储介质。
背景技术
区块链技术是利用块链式数据结构来验证与存储数据、利用分布式节点共识算法来生成和更新数据、利用密码学的方式保证数据传输和访问的安全、利用由自动化脚本代码组成的智能合约来编程和操作数据的一种全新的分布式基础架构与计算方式。由于区块链技术具有去中心化、不可篡改性和隐私保护性等特点,因此被广泛应用于各个领域。
不同业务场景对业务服务器的平均响应时间、吞吐量和请求异常比例等具有不同的要求,在业务服务器中引入区块链技术,虽然可以提高安全性,但存在影响业务服务器性能的情况,如平均响应时间变长、吞吐量降低或请求异常比例增高等,在不确定是否影响业务服务器性能的情况下引入区块链技术,容易给生产带来不可预知的问题,目前,主要通过开发人员对业务需求进行分析,确定是否可以引入区块链技术,然而开发人员无法基于业务需求快速准确的确定业务服务器是否可以引入区块链技术,且需要耗费较多的时间和人力。
因此,如何快速准确的确定业务服务器是否可以引入区块链技术,降低时间和人力成本是目前亟待解决的问题。
发明内容
本申请的主要目的在于提供一种区块链引入测试方法、装置、设备及计算机可读存储介质,旨在如何快速准确的确定业务服务器是否可以引入区块链技术,降低时间和人力成本。
为实现上述目的,本申请提供一种区块链引入测试方法,所述区块链引入测试方法包括以下步骤:
当接收到输入的接口测试数据时,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口;
依据所述接口测试数据中的接口测试用例,分别对所述目标普通接口和所述目标区块链接口进行测试;
依据所述目标普通接口的第一测试结果信息和所述目标区块链接口的第二测试结果信息,生成区块链引入报告,并显示所述区块链引入报告。
此外,为实现上述目的,本申请还提供一种区块链引入测试装置,所述区块链引入测试装置包括:
接口确定模块,用于当接收到输入的接口测试数据时,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口;
接口测试模块,用于依据所述接口测试数据中的接口测试用例,分别对所述目标普通接口和所述目标区块链接口进行测试;
报告生成模块,用于依据所述目标普通接口的第一测试结果信息和所述目标区块链接口的第二测试结果信息,生成区块链引入报告,并显示所述区块链引入报告。
此外,为实现上述目的,本申请还提供一种区块链引入测试设备,所述区块链引入测试设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的区块链引入测试可读指令,其中所述区块链引入测试可读指令被所述处理器执行时,实现如上述的区块链引入测试方法的步骤。
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有区块链引入测试可读指令,其中所述区块链引入测试可读指令被处理器执行时,实现如上述的区块链引入测试方法的步骤。
本申请提供一种区块链引入测试方法、装置、设备及计算机可读存储介质,本申请当接收到输入的接口测试数据时,依据接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口,并依据接口测试数据中的接口测试用例,分别对目标普通接口和目标区块链接口进行测试,然后依据目标普通接口的第一测试结果信息和目标区块链接口的第二测试结果信息,生成区块链引入报告,并显示区块链引入报告,通过上述方案,开发人员只需要输入接口测试数据即可实现对应区块链接口和普通接口的自动压力测试,得到两个接口的测试结果信息,同时自动比较,得到区块链引入报告,开发人员通过区块链引入报告可以快速准确的确定业务服务器是否可以引入区块链技术,有效的降低时间和人力成本。
附图说明
图1为本申请各实施例涉及的区块链引入测试设备的硬件结构示意图;
图2为本申请区块链引入测试方法第一实施例的流程示意图;
图3为本申请区块链引入测试方法第二实施例的流程示意图;
图4为本申请区块链引入测试装置第一实施例的功能模块示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例涉及的区块链引入测试方法主要应用于区块链引入测试设备,该区块链引入测试设备可以是PC(个人计算机personal computer)、便携计算机、移动终端等具有显示和处理功能的设备。
参照图1,图1为本申请实施例方案中涉及的区块链引入测试设备的硬件结构示意图。本申请实施例中,区块链引入测试设备可以包括处理器1001(例如中央处理器Central Processing Unit、CPU),通信总线1002,用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信;用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard);网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口);存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器,存储器1005可选的还可以是独立于前述处理器1001的存储装置。本领域技术人员可以理解,图1中示出的硬件结构并不构成对本申请的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
继续参照图1,图1中作为一种计算机可读存储介质的存储器1005可以包括操作系统、网络通信模块以及区块链引入测试可读指令。在图1中,网络通信模块主要用于连接服务器,与服务器进行数据通信;而处理器1001可以调用存储器1005中存储的区块链引入测试可读指令,并执行本申请实施例提供的区块链引入测试方法。
本申请实施例提供了一种区块链引入测试方法。
参照图2,图2为本申请区块链引入测试方法第一实施例的流程示意图。
本实施例中,该区块链引入测试方法由区块链引入测试设备实现,该区块链引入测试设备可以是PC、掌上电脑和平板电脑等终端设备,可选为图1所示的设备,所述区块链引入测试方法包括以下步骤:
步骤S101,当接收到输入的接口测试数据时,依据接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口;
步骤S102,依据接口测试数据中的接口测试用例,分别对目标普通接口和目标区块链接口进行测试;
步骤S103,依据目标普通接口的第一测试结果信息和目标区块链接口的第二测试结果信息,生成区块链引入报告,并显示区块链引入报告。
在服务器中引入区块链技术,虽然可以提高安全性,但存在影响服务器性能的情况,如平均响应时间变长、吞吐量降低以或请求异常比例增高等,在不确定是否影响业务服务器性能的情况下引入区块链技术,容易给生产带来不可预知的问题,目前,主要通过开发人员对业务需求进行分析,确定是否可以引入区块链技术,然而开发人员无法基于业务需求快速准确的确定业务服务器是否可以引入区块链技术,且需要耗费较多的时间和人力。考虑到上述问题,本实施例中提出一种区块链引入测试方法,以下详细介绍区块链引入测试方法的具体步骤:
步骤S101,当接收到输入的接口测试数据时,依据接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口;
本实施例中,当接收到测试人员的接口测试数据的输入指令时,显示接口测试数据的输入界面,该接口测试数据的输入界面显示有测试接口选项、线程数输入框、请求数输入框、测试次数输入框和测试用例个数输入框等,测试人员可基于该接口测试数据的输入界面输入接口测试数据,即测试接口标签、线程数、请求数、测试次数和测试用例个数等。其中,该接口测试数据包括但不限于接口访问标签组、接口测试用例和测试次数,且接口访问标签组由目标普通接口对应的标签以及目标区块链接口对应的标签组成,该接口测试用例包括但不限于线程数和请求数,测试的性能指标包括但不限于平均响应时间、吞吐量和请求错误率;该区块链接口为开发人员对普通接口进行改造,在服务器中引入区块链技术之后的区块链接口,为了防止给生产带来不可预知的问题,需要对改造的应用接口,即区块链接口进行测试,确定是否可以引入区块链技术。
本实施例中,当接收到测试人员输入的接口测试数据时,依据该接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口。具体地,从该接口测试数据中读取接口访问标签组,并从该接口访问标签组中读取含有第一预设字段的第一测试接口标签和含有第二预设字段的第二测试接口标签,然后将第一测试接口标签对应的接口确定为目标普通接口,并将第二测试接口标签对应的接口确定为目标区块链接口。需要说明的是,上述第一预设字段和第二预设字段可由本领域技术人员基于实际情况进行设置,本实施例对此不作具体限定,可选的,该第一预设字段为“普通”,第二预设字段为“区块链”。
进一步地,接口测试数据的输入界面还显示有测试开始时间点输入框,测试人员可设置测试开始时间,当测试人员设置测试开始时间之后,在完成接口测试数据的输入时,给接口测试数据打上定时测试标签。当接收到输入的接口测试数据时,先确定该接口测试数据中是否携带有定时测试标签,如果该接口测试数据中携带有定时测试标签,则在达到该接口测试数据中的定时时间点时,依据该接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口,如果接口测试数据中未携带有定时测试标签,则直接依据该接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口。
步骤S102,依据接口测试数据中的接口测试用例,分别对目标普通接口和目标区块链接口进行测试;
本实施例中,设备在确定目标普通接口和目标区块链接口之后,依据接口测试数据中的接口测试用例,分别对目标普通接口和目标区块链接口进行测试,即从接口测试数据中读取各接口测试用例,并执行各接口测试用例,以测试目标普通接口和目标区块链接口。
具体地,设备从接口测试数据中读取各接口测试用例,并按照各接口测试用例的执行顺序,依次选择一接口测试用例,然后依据选择的接口测试用例生成对应数量的访问请求,并分别通过该目标普通接口和该目标区块链接口,将各访问请求传输至业务服务器,且接收该业务服务器返回的各访问请求的接口访问结果,包括普通接口访问结果和区块链接口访问结果,包括但不限于各访问请求的响应时间和请求状态;
再然后依据业务服务器返回的各访问请求的接口访问结果,计算目标普通接口和目标区块链接口在选择的接口测试用例下的各性能指标,即依据普通接口访问结果,计算目标普通接口在选择的接口测试用例下的各性能指标,依据依据区块链接口访问结果,计算目标区块链接口在选择的接口测试用例下的各性能指标,包括但不限于平均响应时间、请求错误率和吞吐量,具体为将各请求的响应时间相加,并除以请求数,从而得到平均响应时间,以及统计请求状态为错误状态的请求个数,并除以请求数,从而得到请求错误率;
最后汇总目标普通接口在各接口测试用例下的各性能指标,获取第一测试结果信息,以及汇总目标区块链接口在各接口测试用例下的各性能指标,获取第二测试结果信息。其中,第一测试结果信息包括但不限于目标普通接口的各测试用例下的第一平均响应时间、第一吞吐量和第一请求错误率,第二测试结果信息包括但不限于目标区块链接口的各测试用例下的第二平均响应时间、第二吞吐量和第二请求错误率。
步骤S103,依据目标普通接口的第一测试结果信息和目标区块链接口的第二测试结果信息,生成区块链引入报告,并显示区块链引入报告。
本实施例中,设备依据目标普通接口的第一测试结果信息和目标区块链接口的第二测试结果信息,生成区块链引入报告,并显示区块链引入报告。具体地,将第一测试结果信息中的各性能指标与第二测试结果信息中的各性能指标进行对应比较,以获取各性能指标的第一比较结果,即将第一平均响应时间与第二平均响应时间进行比较,得到平均响应时间比较结果、将第一吞吐量与第二吞吐量进行比较,得到吞吐量比较结果、将第一请求错误率与第二请求错误率进行比较,得到请求错误率比较结果;然后将第二测试结果信息中的各性能指标与各自对应的预设阈值进行比较,以获取各性能指标的第二比较结果,即将第二平均响应时间与预设平均响应时间进行比较、将第二吞吐量与预设吞吐量进行比较、以及将第二请求错误率与预设请求错误率进行比较;最后依据第一比较结果和第二比较结果,生成区块链引入报告,即新建空白报告,并将第一比较结果和第二比较结果填充至新建空白报告的对应位置,以生成区块链引入报告。
进一步地,还可以依据第二比较结果得到区块链引入判决结果,即如果第二平均响应时间高于预设平均响应时间、且第二吞吐量高于预设吞吐量、以及第二请求错误率低于预设请求错误率,则可以确定区块链引入判决结果为可以引入;如果各性能指标结果中存在至少一个性能指标结果出现异常(第二平均响应时间高于预设平均响应时间、第二吞吐量不位于预设吞吐量区间或者第二请求错误率高于预设请求错误率),则可以确定区块链引入判决结果为不可以引入。
需要说明的是,上述预设平均响应时间、预设吞吐量和预设请求错误率由具体业务场景决定,具体实施中,该接口测试数据还包括业务标签,在得到目标普通接口的第一测试结果信息和目标区块链接口的第二测试结果信息之后,从该接口测试数据中读取业务标签,并查询预存的业务标签与各性能指标门限值的映射关系表,即业务标签与平均响应时间阈值、吞吐量阈值和请求错误率阈值的映射关系表,获取各性能指标对应的门限值,即平均响应时间阈值、吞吐量阈值和请求错误率阈值,然后确定第二平均响应时间是否低于该平均响应时间阈值、确定第二吞吐量是否高于该吞吐量阈值、以及确定第二请求错误率是否低于该请求错误率阈值。
本实施例中,本申请当接收到输入的接口测试数据时,依据接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口,并依据接口测试数据中的接口测试用例,分别对目标普通接口和目标区块链接口进行测试,然后依据目标普通接口的第一测试结果信息和目标区块链接口的第二测试结果信息,生成区块链引入报告,并显示区块链引入报告,通过上述方案,开发人员只需要输入接口测试数据即可实现对应区块链接口和普通接口的自动压力测试,得到两个接口的测试结果信息,同时自动比较,得到区块链引入报告,开发人员通过区块链引入报告可以快速准确的确定业务服务器是否可以引入区块链技术,有效的降低时间和人力成本。
进一步地,参照图3,基于上述第一实施例,提出了本申请区块链引入测试方法的第二实施例,与前述实施例的区别在于,步骤S101之后,该区块链引入测试方法还包括:
步骤S104,从接口测试数据中读取各接口测试用例,并确定数据库中是否存储有目标普通接口在各接口测试用例下的历史测试结果信息;
本实施例中,设备从接口测试数据中读取各接口测试用例,并确定数据库中是否存储有目标普通接口在各接口测试用例下的历史测试结果信息。具体地,获取各接口测试用例的用例识别码,并从该接口测试数据中读取含有第一预设字段的第一测试接口标签,即目标普通接口的标签,然后从数据库中读取标记有该第一测试接口标签的测试结果信息,并确定该测试结果信息是否均与各接口测试用例的用例识别码关联,如果测试结果信息均与各接口测试用例的用例识别码关联,则确定数据库中存储有目标普通接口在各接口测试用例下的历史测试结果信息。其中,该用例识别码用于唯一识别接口测试用例。
步骤S105,若数据库中存储有目标普通接口在所述各接口测试用例下的历史测试结果信息,则依据各接口测试用例对目标区块链接口进行测试;
本实施例中,如果数据库中存储有目标普通接口在各接口测试用例下的历史测试结果信息,则只需测试目标区块链接口,即依据各接口测试用例对目标区块链接口进行测试。进一步地,如果各接口测试用例中至少存在一接口测试用例的用例识别码与该测试结果信息不关联,则确定数据库中未存储有目标普通接口在各接口测试用例下的历史测试结果信息,此时,可从该测试结果信息中读取部分历史测试结果信息,即读取与用例识别码关联的测试结果信息,然后确定待执行的接口测试用例,即用例识别码与测试结果信息不关联的接口测试用例,并依据待执行的接口测试用例对目标普通接口进行测试。
步骤S106,依据历史测试结果信息和目标区块链接口的测试结果信息,生成区块链引入报告,并显示区块链引入报告。
本实施例中,设备依据历史测试结果信息和目标区块链接口的测试结果信息,生成区块链引入报告,并显示区块链引入报告,即将历史测试结果信息中的各性能指标与目标区块链接口的测试结果信息中的各性能指标进行比较,得到第一比较结果,然后将第二测试结果信息中的各性能指标与各自对应的预设阈值进行比较,以获取各性能指标的第二比较结果,最后依据第一比较结果和第二比较结果,生成区块链引入报告,并显示区块链引入报告。
本实施例中,本申请在确定目标普通接口之后,验证数据库中是否存储有相关的历史测试结果信息,若存储有相关的历史测试结果信息,则仅需要对测试目标区块链接口,提高测试效率。
此外,本申请实施例还提供一种区块链引入测试装置。
参照图4,图4为本申请区块链引入测试装置第一实施例的功能模块示意图。
本申请区块链引入测试装置为虚拟装置,存储于图1所示区块链引入测试设备的存储器1005中,用于实现区块链引入测试可读指令的所有功能;当接收到输入的接口测试数据时,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口;依据所述接口测试数据中的接口测试用例,分别对所述目标普通接口和所述目标区块链接口进行测试;依据所述目标普通接口的第一测试结果信息和所述目标区块链接口的第二测试结果信息,生成区块链引入报告,并显示所述区块链引入报告。
具体的,本实施例中,所述区块链引入测试装置包括:
接口确定模块101,用于当接收到输入的接口测试数据时,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口;
接口测试模块102,用于依据所述接口测试数据中的接口测试用例,分别对所述目标普通接口和所述目标区块链接口进行测试;
报告生成模块103,用于依据所述目标普通接口的第一测试结果信息和所述目标区块链接口的第二测试结果信息,生成区块链引入报告,并显示所述区块链引入报告。
进一步地,所述接口确定模块101还用于:
从所述接口测试数据中读取接口访问标签组,并从所述接口访问标签组中读取含有第一预设字段的第一测试接口标签和含有第二预设字段的第二测试接口标签;
将所述第一测试接口标签对应的接口确定为目标普通接口,并将所述第二测试接口标签对应的接口确定为目标区块链接口。
进一步地,所述接口测试模块102还用于:
从所述接口测试数据中读取各接口测试用例,并按照各接口测试用例的执行顺序,依次选择一接口测试用例;
依据选择的接口测试用例生成对应数量的访问请求,并分别通过所述目标普通接口和所述目标区块链接口,将各访问请求传输至业务服务器;
依据所述业务服务器返回的各访问请求的接口访问结果,计算所述目标普通接口和所述目标区块链接口在选择的接口测试用例下的各性能指标;
汇总所述目标普通接口在各接口测试用例下的各性能指标,获取第一测试结果信息,汇总所述目标区块链接口在各接口测试用例下的各性能指标,获取第二测试结果信息。
进一步地,所述报告生成模块103还用于:
将所述第一测试结果信息中的各性能指标与所述第二测试结果信息中的各性能指标进行对应比较,以获取各性能指标的第一比较结果;
将所述第二测试结果信息中的各性能指标与各自对应的预设阈值进行比较,以获取各性能指标的第二比较结果;
依据所述第一比较结果和所述第二比较结果,生成区块链引入报告。
进一步地,所述区块链引入测试装置还包括:
测试结果确定模块,用于从所述接口测试数据中读取各接口测试用例,并确定数据库中是否存储有所述目标普通接口在所述各接口测试用例下的历史测试结果信息;
所述接口测试模块102,还用于若数据库中存储有所述目标普通接口在所述各接口测试用例下的历史测试结果信息,则依据所述各接口测试用例对所述目标区块链接口进行测试;
所述报告生成模块103,还用于依据所述历史测试结果信息和所述目标区块链接口的测试结果信息,生成区块链引入报告,并显示所述区块链引入报告。
进一步地,所述测试结果确定模块还用于:
获取各接口测试用例的用例识别码,并从所述接口测试数据中读取含有第一预设字段的第一测试接口标签;
从数据库中读取标记有所述第一测试接口标签的测试结果信息,并确定所述测试结果信息是否均与所述各接口测试用例的用例识别码关联;
若所述测试结果信息均与所述各接口测试用例的用例识别码关联,则确定数据库中存储有所述目标普通接口在所述各接口测试用例下的历史测试结果信息。
进一步地,所述区块链引入测试装置还包括:
标签确定模块,用于当接收到输入的接口测试数据时,确定所述接口测试数据中是否携带有定时测试标签;
所述接口确定模块101,还用于若所述接口测试数据中携带有定时测试标签,则在达到所述接口测试数据中的定时时间点时,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口;
所述接口确定模块101,还用于若所述接口测试数据中未携带有定时测试标签,则依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口。
其中,上述区块链引入测试装置中各个模块的功能实现与上述区块链引入测试方法实施例中各步骤相对应,其功能和实现过程在此处不再一一赘述。
此外,本申请实施例还提供一种计算机可读存储介质。
本申请计算机可读存储介质上存储有区块链引入测试可读指令,其中所述区块链引入测试可读指令被处理器执行时,实现如上述的区块链引入测试方法的步骤。
其中,该计算机可读存储介质可以为非易失性可读存储介质,区块链引入测试可读指令被执行时所实现的方法可参照本申请区块链引入测试方法的各个实施例,此处不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种区块链引入测试方法,其特征在于,所述区块链引入测试方法包括以下步骤:
    当接收到输入的接口测试数据时,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口;
    依据所述接口测试数据中的接口测试用例,分别对所述目标普通接口和所述目标区块链接口进行测试;
    依据所述目标普通接口的第一测试结果信息和所述目标区块链接口的第二测试结果信息,生成区块链引入报告,并显示所述区块链引入报告。
  2. 如权利要求1所述的区块链引入测试方法,其特征在于,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口的步骤包括:
    从所述接口测试数据中读取接口访问标签组,并从所述接口访问标签组中读取含有第一预设字段的第一测试接口标签和含有第二预设字段的第二测试接口标签;
    将所述第一测试接口标签对应的接口确定为目标普通接口,并将所述第二测试接口标签对应的接口确定为目标区块链接口。
  3. 如权利要求1所述的区块链引入测试方法,其特征在于,依据所述接口测试数据中的接口测试用例,分别对所述目标普通接口和所述目标区块链接口进行测试的步骤包括:
    从所述接口测试数据中读取各接口测试用例,并按照各接口测试用例的执行顺序,依次选择一接口测试用例;
    依据选择的接口测试用例生成对应数量的访问请求,并分别通过所述目标普通接口和所述目标区块链接口,将各访问请求传输至业务服务器;
    依据所述业务服务器返回的各访问请求的接口访问结果,计算所述目标普通接口和所述目标区块链接口在选择的接口测试用例下的各性能指标;
    汇总所述目标普通接口在各接口测试用例下的各性能指标,获取第一测试结果信息,汇总所述目标区块链接口在各接口测试用例下的各性能指标,获取第二测试结果信息。
  4. 如权利要求1所述的区块链引入测试方法,其特征在于,依据所述目标普通接口的第一测试结果信息和所述目标区块链接口的第二测试结果信息,生成区块链引入报告的步骤包括:
    将所述第一测试结果信息中的各性能指标与所述第二测试结果信息中的各性能指标进行对应比较,以获取各性能指标的第一比较结果;
    将所述第二测试结果信息中的各性能指标与各自对应的预设阈值进行比较,以获取各性能指标的第二比较结果;
    依据所述第一比较结果和所述第二比较结果,生成区块链引入报告。
  5. 如权利要求1所述的区块链引入测试方法,其特征在于,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口的步骤之后,还包括:
    从所述接口测试数据中读取各接口测试用例,并确定数据库中是否存储有所述目标普通接口在所述各接口测试用例下的历史测试结果信息;
    若数据库中存储有所述目标普通接口在所述各接口测试用例下的历史测试结果信息,则依据所述各接口测试用例对所述目标区块链接口进行测试;
    依据所述历史测试结果信息和所述目标区块链接口的测试结果信息,生成区块链引入报告,并显示所述区块链引入报告。
  6. 如权利要求5所述的区块链引入测试方法,其特征在于,所述确定数据库中是否存储有所述目标普通接口在所述各接口测试用例下的历史测试结果信息的步骤包括:
    获取各接口测试用例的用例识别码,并从所述接口测试数据中读取含有第一预设字段的第一测试接口标签;
    从数据库中读取标记有所述第一测试接口标签的测试结果信息,并确定所述测试结果信息是否均与所述各接口测试用例的用例识别码关联;
    若所述测试结果信息均与所述各接口测试用例的用例识别码关联,则确定数据库中存储有所述目标普通接口在所述各接口测试用例下的历史测试结果信息。
  7. 如权利要求1所述的区块链引入测试方法,其特征在于,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口的步骤之前,还包括:
    当接收到输入的接口测试数据时,确定所述接口测试数据中是否携带有定时测试标签;
    若所述接口测试数据中携带有定时测试标签,则在达到所述接口测试数据中的定时时间点时,执行步骤:依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口;
    若所述接口测试数据中未携带有定时测试标签,则执行步骤:依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口。
  8. 一种区块链引入测试装置,其特征在于,所述区块链引入测试装置包括:
    接口确定模块,用于当接收到输入的接口测试数据时,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口;
    接口测试模块,用于依据所述接口测试数据中的接口测试用例,分别对所述目标普通接口和所述目标区块链接口进行测试;
    报告生成模块,用于依据所述目标普通接口的第一测试结果信息和所述目标区块链接口的第二测试结果信息,生成区块链引入报告,并显示所述区块链引入报告。
  9. 一种区块链引入测试设备,其特征在于,所述区块链引入测试设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的区块链引入测试可读指令,其中所述区块链引入测试可读指令被所述处理器执行时,实现以下步骤:
    当接收到输入的接口测试数据时,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口;
    依据所述接口测试数据中的接口测试用例,分别对所述目标普通接口和所述目标区块链接口进行测试;
    依据所述目标普通接口的第一测试结果信息和所述目标区块链接口的第二测试结果信息,生成区块链引入报告,并显示所述区块链引入报告。
  10. 如权利要求9所述的区块链引入测试设备,其特征在于,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口的步骤包括:
    从所述接口测试数据中读取接口访问标签组,并从所述接口访问标签组中读取含有第一预设字段的第一测试接口标签和含有第二预设字段的第二测试接口标签;
    将所述第一测试接口标签对应的接口确定为目标普通接口,并将所述第二测试接口标签对应的接口确定为目标区块链接口。
  11. 如权利要求9所述的区块链引入测试设备,其特征在于,依据所述接口测试数据中的接口测试用例,分别对所述目标普通接口和所述目标区块链接口进行测试的步骤包括:
    从所述接口测试数据中读取各接口测试用例,并按照各接口测试用例的执行顺序,依次选择一接口测试用例;
    依据选择的接口测试用例生成对应数量的访问请求,并分别通过所述目标普通接口和所述目标区块链接口,将各访问请求传输至业务服务器;
    依据所述业务服务器返回的各访问请求的接口访问结果,计算所述目标普通接口和所述目标区块链接口在选择的接口测试用例下的各性能指标;
    汇总所述目标普通接口在各接口测试用例下的各性能指标,获取第一测试结果信息,汇总所述目标区块链接口在各接口测试用例下的各性能指标,获取第二测试结果信息。
  12. 如权利要求9所述的区块链引入测试设备,其特征在于,依据所述目标普通接口的第一测试结果信息和所述目标区块链接口的第二测试结果信息,生成区块链引入报告的步骤包括:
    将所述第一测试结果信息中的各性能指标与所述第二测试结果信息中的各性能指标进行对应比较,以获取各性能指标的第一比较结果;
    将所述第二测试结果信息中的各性能指标与各自对应的预设阈值进行比较,以获取各性能指标的第二比较结果;
    依据所述第一比较结果和所述第二比较结果,生成区块链引入报告。
  13. 如权利要求9所述的区块链引入测试设备,其特征在于,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口的步骤之后,还包括:
    从所述接口测试数据中读取各接口测试用例,并确定数据库中是否存储有所述目标普通接口在所述各接口测试用例下的历史测试结果信息;
    若数据库中存储有所述目标普通接口在所述各接口测试用例下的历史测试结果信息,则依据所述各接口测试用例对所述目标区块链接口进行测试;
    依据所述历史测试结果信息和所述目标区块链接口的测试结果信息,生成区块链引入报告,并显示所述区块链引入报告。
  14. 如权利要求13所述的区块链引入测试设备,其特征在于,所述确定数据库中是否存储有所述目标普通接口在所述各接口测试用例下的历史测试结果信息的步骤包括:
    获取各接口测试用例的用例识别码,并从所述接口测试数据中读取含有第一预设字段的第一测试接口标签;
    从数据库中读取标记有所述第一测试接口标签的测试结果信息,并确定所述测试结果信息是否均与所述各接口测试用例的用例识别码关联;
    若所述测试结果信息均与所述各接口测试用例的用例识别码关联,则确定数据库中存储有所述目标普通接口在所述各接口测试用例下的历史测试结果信息。
  15. 如权利要求9所述的区块链引入测试设备,其特征在于,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口的步骤之前,还包括:
    当接收到输入的接口测试数据时,确定所述接口测试数据中是否携带有定时测试标签;
    若所述接口测试数据中携带有定时测试标签,则在达到所述接口测试数据中的定时时间点时,执行步骤:依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口;
    若所述接口测试数据中未携带有定时测试标签,则执行步骤:依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口。
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有区块链引入测试可读指令,其中所述区块链引入测试可读指令被处理器执行时,实现以下步骤:
    当接收到输入的接口测试数据时,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口;
    依据所述接口测试数据中的接口测试用例,分别对所述目标普通接口和所述目标区块链接口进行测试;
    依据所述目标普通接口的第一测试结果信息和所述目标区块链接口的第二测试结果信息,生成区块链引入报告,并显示所述区块链引入报告。
  17. 如权利要求16所述的计算机可读存储介质,其特征在于,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口的步骤包括:
    从所述接口测试数据中读取接口访问标签组,并从所述接口访问标签组中读取含有第一预设字段的第一测试接口标签和含有第二预设字段的第二测试接口标签;
    将所述第一测试接口标签对应的接口确定为目标普通接口,并将所述第二测试接口标签对应的接口确定为目标区块链接口。
  18. 如权利要求16所述的计算机可读存储介质,其特征在于,依据所述接口测试数据中的接口测试用例,分别对所述目标普通接口和所述目标区块链接口进行测试的步骤包括:
    从所述接口测试数据中读取各接口测试用例,并按照各接口测试用例的执行顺序,依次选择一接口测试用例;
    依据选择的接口测试用例生成对应数量的访问请求,并分别通过所述目标普通接口和所述目标区块链接口,将各访问请求传输至业务服务器;
    依据所述业务服务器返回的各访问请求的接口访问结果,计算所述目标普通接口和所述目标区块链接口在选择的接口测试用例下的各性能指标;
    汇总所述目标普通接口在各接口测试用例下的各性能指标,获取第一测试结果信息,汇总所述目标区块链接口在各接口测试用例下的各性能指标,获取第二测试结果信息。
  19. 如权利要求16所述的计算机可读存储介质,其特征在于,依据所述目标普通接口的第一测试结果信息和所述目标区块链接口的第二测试结果信息,生成区块链引入报告的步骤包括:
    将所述第一测试结果信息中的各性能指标与所述第二测试结果信息中的各性能指标进行对应比较,以获取各性能指标的第一比较结果;
    将所述第二测试结果信息中的各性能指标与各自对应的预设阈值进行比较,以获取各性能指标的第二比较结果;
    依据所述第一比较结果和所述第二比较结果,生成区块链引入报告。
  20. 如权利要求16所述的计算机可读存储介质,其特征在于,依据所述接口测试数据中的接口访问标签组,确定目标普通接口和目标区块链接口的步骤之后,还包括:
    从所述接口测试数据中读取各接口测试用例,并确定数据库中是否存储有所述目标普通接口在所述各接口测试用例下的历史测试结果信息;
    若数据库中存储有所述目标普通接口在所述各接口测试用例下的历史测试结果信息,则依据所述各接口测试用例对所述目标区块链接口进行测试;
    依据所述历史测试结果信息和所述目标区块链接口的测试结果信息,生成区块链引入报告,并显示所述区块链引入报告。
PCT/CN2018/122717 2018-09-27 2018-12-21 区块链引入测试方法、装置、设备及计算机可读存储介质 WO2020062639A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811135647.XA CN109408304A (zh) 2018-09-27 2018-09-27 区块链引入测试方法、装置、设备及可读存储介质
CN201811135647.X 2018-09-27

Publications (1)

Publication Number Publication Date
WO2020062639A1 true WO2020062639A1 (zh) 2020-04-02

Family

ID=65465384

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/122717 WO2020062639A1 (zh) 2018-09-27 2018-12-21 区块链引入测试方法、装置、设备及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN109408304A (zh)
WO (1) WO2020062639A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110046091B (zh) * 2019-03-12 2023-10-20 创新先进技术有限公司 一种自动测试方法和装置
CN110162470B (zh) * 2019-04-28 2023-08-18 创新先进技术有限公司 一种区块链的测试方法和装置
CN111367813B (zh) * 2020-03-17 2024-04-02 深圳市卡牛科技有限公司 决策引擎自动化测试方法、装置、服务器及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070168735A1 (en) * 2005-11-04 2007-07-19 Hon Hai Precision Industry Co., Ltd. System and method for automatic testing
CN106598824A (zh) * 2016-11-25 2017-04-26 深圳前海微众银行股份有限公司 区块链的性能分析方法及装置
CN106991040A (zh) * 2016-07-20 2017-07-28 平安科技(深圳)有限公司 数据接口测试方法和装置
CN107592238A (zh) * 2017-08-07 2018-01-16 千寻位置网络有限公司 接口的自动测试方法及系统、服务终端、存储器

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8819492B2 (en) * 2011-11-03 2014-08-26 Tata Consultancy Services Limited System and method for testing and analyses of the computer applications
CN104516809B (zh) * 2013-09-26 2018-01-05 方正宽带网络服务股份有限公司 一种自动化测试系统及方法
US10832247B2 (en) * 2016-09-15 2020-11-10 American Express Travel Related Services Company, Inc. Systems and methods for blockchain based payment networks
US10002069B2 (en) * 2016-09-23 2018-06-19 International Business Machines Corporation Automated testing of application program interface
US9934138B1 (en) * 2016-12-07 2018-04-03 International Business Machines Corporation Application testing on a blockchain
CN108170590B (zh) * 2017-12-12 2021-08-24 北京大学深圳研究生院 一种区块链系统的测试系统和方法
CN108304307B (zh) * 2018-01-24 2022-03-04 深圳圣马歌科技有限公司 一种区块链上智能合约的性能检测方法
CN108509337A (zh) * 2018-03-15 2018-09-07 链家网(北京)科技有限公司 基于接口调用的动态测试方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070168735A1 (en) * 2005-11-04 2007-07-19 Hon Hai Precision Industry Co., Ltd. System and method for automatic testing
CN106991040A (zh) * 2016-07-20 2017-07-28 平安科技(深圳)有限公司 数据接口测试方法和装置
CN106598824A (zh) * 2016-11-25 2017-04-26 深圳前海微众银行股份有限公司 区块链的性能分析方法及装置
CN107592238A (zh) * 2017-08-07 2018-01-16 千寻位置网络有限公司 接口的自动测试方法及系统、服务终端、存储器

Also Published As

Publication number Publication date
CN109408304A (zh) 2019-03-01

Similar Documents

Publication Publication Date Title
WO2020015064A1 (zh) 系统故障处理方法、装置、设备及存储介质
WO2020062639A1 (zh) 区块链引入测试方法、装置、设备及计算机可读存储介质
WO2016085180A1 (en) Method of managing cookie information for target advertisement and application for managing cookie information
WO2020119115A1 (zh) 数据审核方法、装置、设备及存储介质
WO2020015067A1 (zh) 数据采集方法、装置、设备及存储介质
WO2021092973A1 (zh) 敏感信息处理方法、设备及可读存储介质
WO2020253112A1 (zh) 测试策略的获取方法、装置、终端及可读存储介质
WO2020224250A1 (zh) 智能合约的触发方法、装置、设备及存储介质
WO2020087981A1 (zh) 风控审核模型生成方法、装置、设备及可读存储介质
WO2020119369A1 (zh) 智能it运维故障定位方法、装置、设备及可读存储介质
WO2011065660A4 (ko) 계산 시뮬레이션 모사 시스템 및 그 방법
WO2020224251A1 (zh) 区块链事务的处理方法、装置、设备及存储介质
WO2020233089A1 (zh) 测试用例生成方法、装置、终端及计算机可读存储介质
WO2020062661A1 (zh) 合同数据一致性的核实方法、装置、设备及存储介质
WO2021040283A1 (ko) 무선 ap 접속 정보에 기초하여 근태 관리를 수행할 수 있는 근태 관리 시스템 서버 및 그 동작 방법
WO2019137052A1 (zh) 网络运维的方法及装置
WO2015088067A1 (ko) 소프트웨어 품질 요소 추출 모듈과 방법 및 소프트웨어 품질 요소 추출 방법을 실행하기 위한 프로그램을 기록한 컴퓨터로 판독가능한 기록매체
WO2013125866A1 (ko) 컴퓨터 시스템 및 시그니처검증서버
WO2013069886A1 (en) Facilities control system and operating method of the same
WO2021133076A1 (ko) 인공지능 학습데이터 생성을 위한 크라우드소싱 기반 프로젝트의 작업단가 관리 방법 및 장치
CN111125066B (zh) 检测数据库审计设备功能的方法及装置
WO2020143296A1 (zh) 数据采集方法、装置、设备及计算机可读存储介质
WO2022145572A1 (ko) 예상 결과값을 토대로 정보를 제공하는 방법 및 이를 이용한 연산 장치
WO2019112380A1 (ko) 스마트 팩토리 레이아웃 효율성 평가 방법 및 시스템
WO2020062655A1 (zh) 爬虫识别方法、装置、设备及非易失性可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18935807

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 08.07.2021 DATED DD/MM/YYYY)

122 Ep: pct application non-entry in european phase

Ref document number: 18935807

Country of ref document: EP

Kind code of ref document: A1