Collaborative testing method and collaborative testing device based on block chain

The blockchain-based collaborative testing method addresses data sharing issues by binding test cases and data to specific users, enhancing testing efficiency and accuracy by ensuring each data set is used only once and tracked for integrity.

CN119201703APending Publication Date: 2024-12-27中国邮政储蓄银行股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411244000.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In collaborative testing scenarios, the sharing of test data leads to inefficiencies and incorrect test results due to the inability to accurately match test data with test cases, making it difficult to hold testers accountable and ensuring the quality of the testing process.

Method used

A blockchain-based collaborative testing method that binds test cases and test data to specific user numbers, ensuring each piece of data is used only once and tracked through merkle technology for integrity, using user levels and public keys for authentication and data management.

Benefits of technology

This approach improves data acquisition speed, prevents repeated use of test data, and ensures accurate test results by binding data to specific testers, reducing errors in regression testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201703A_ABST
    Figure CN119201703A_ABST
Patent Text Reader

Abstract

The invention provides a collaborative testing method and device based on a block chain, and the method comprises the steps: carrying out the verification under the condition that a first request signal is received, and determining a user level under the condition that the verification is passed; under the condition that the user level is the first user level, if a second request signaling is received, binding the test cases with second user numbers one by one according to the second request signaling; under the condition that the user level is a second user level, if a third request signaling is received, sending a test case corresponding to a third user number to a user side corresponding to the target user number; if the fourth request signaling is received, binding the first bottoming data with the target user number and sending the first bottoming data to a user side corresponding to the target user number; and if the fifth request signaling is received, storing the test result, the test case and the first hash value to corresponding positions. According to the method, the problem of errors in the regression test process caused by bottom data sharing in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data testing technology, and in particular to a collaborative testing method, a collaborative testing device, a computer-readable storage medium, and a collaborative testing system based on blockchain. Background Art

[0002] In the traditional collaborative testing process, it is difficult to bind test data (including test cases, test case data, and test case result data) with tester information. When a tester tests the system function based on a set of test data, even if the defects in the system are not accurately tested, we cannot accurately hold the tester accountable, which makes it very difficult to supervise the work quality of the tester and greatly reduces the credibility of the test, which may lead to the situation where the project cannot be delivered with guaranteed quality and quantity.

[0003] In collaborative testing scenarios, the sharing of test data often reduces testing efficiency. Test data is often shared in the form of documents, and testers may use each other's data, which increases the cost for testers to find test data. It also makes it impossible to match the test data with the test cases one by one. Subsequent regression testing may result in incorrect test results due to the sharing of test data. Summary of the invention

[0004] The main purpose of this application is to provide a blockchain-based collaborative testing method, a collaborative testing device, a computer-readable storage medium and a collaborative testing system, so as to at least solve the problem in the prior art that the sharing of base data leads to errors in the regression testing process.

[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a collaborative testing method based on blockchain is provided, including: when a first request signaling is received, extracting a user public key, a first user number and a user signature in the first request signaling, and performing verification based on the user public key and the user signature, and determining the user level based on the first user number when the verification passes, the first request signaling is used to initiate a login request to the blockchain platform, and the first user number is the ID number included in the first request signaling; when the user level is the first user level and a second request signaling is received, extracting multiple second user numbers, foundation data and test cases in the second request signaling, and binding the test case to the second user number one by one according to the second request signaling, the second request signaling is used to upload the test case and the foundation data to the blockchain platform, and the second user number is the ID number of the tester; when the user level is the second user level and a third request signaling is received, extracting the user number in the third request signaling to obtain the target user number, and according to the target user number and the second user number Determine a third user number, send the test case corresponding to the third user number to the user end corresponding to the target user number, the third request signaling is used to obtain the test case from the blockchain platform, and the third user number is the second user number consistent with the target user number; when the user level is the second user level and a fourth request signaling is received, extract the target user number and the first identification information in the fourth request signaling, determine the first base data according to the first identification information, bind the first base data and the target user number, and send the first base data to the user end corresponding to the target user number, the fourth request signaling is used to obtain the base data from the blockchain platform, and the first identification information is used to characterize the storage location of the first base data; the test result and the test case in the request signaling, calculate the root hash by merkle technology according to each test case of the blockchain platform, the first base data corresponding to the test case and the test result, obtain the first hash value, and store the test result, the test case and the first hash value in the corresponding position.

[0006] Optionally, the method also includes: when the user level is the first user level and a sixth request signaling is received, determining the first target data based on the first hash value and the second hash value, the first hash value is the root hash stored by the blockchain platform, and the second hash value is the root hash calculated based on the data stored in the blockchain platform, the sixth request signaling is used to instruct the blockchain platform to modify the data scan, and the first target data is the data that has changed between two adjacent scans.

[0007] Optionally, after binding the test cases and the second user numbers one by one according to the second request signaling, the method further includes: determining at least one test scenario according to each of the test cases to obtain multiple target test scenarios; determining at least one second foundation data based on each of the target test scenarios, the second foundation data being the foundation data called by simulating the target test scenario; and binding the second foundation data and the target test scenario based on the association relationship between the second foundation data and the target test scenario.

[0008] Optionally, a third user number is determined based on the target user number and the second user number, and the test case corresponding to the third user number is sent to the user terminal corresponding to the target user number, including: traversing the second user number according to the target user number, and determining the second user number as the third user number when the second user number is consistent with the target user number; and sending the test case bound to the third user number to the user terminal corresponding to the target user number.

[0009] Optionally, after extracting the test results and the test case in the fifth request signaling, the method further includes: determining the test case number based on the test case, generating second identification information based on the test case number and the target user number, the second identification information being used to characterize the uploading user of the test result; adding the second identification information to the test case, the test result and the first base data to complete the binding.

[0010] Optionally, a root hash is calculated by merkle technology according to each test case of the blockchain platform, the first base data corresponding to the test case and the test result to obtain a first hash value, including: performing a hash operation based on the test case, the first base data corresponding to the test case and the test result and performing a cascade operation based on the result of the hash operation to obtain a third hash value; and performing a cascade operation based on any two of the third hash values ​​to obtain the corresponding first hash value.

[0011] Optionally, determining the first target data based on the first hash value and the second hash value includes: when the first hash value and the second hash value are inconsistent, respectively decomposing the first hash value and the second hash value to obtain corresponding fourth hash value and fifth hash value; matching the fourth hash value and the fifth hash value corresponding to the first hash value and the second hash value, and when the fourth hash value is inconsistent, determining the data corresponding to the fourth hash value as the first target data; when the fifth hash value is inconsistent, determining the data corresponding to the fifth hash value as the first target data.

[0012] According to another aspect of the present application, a collaborative testing device based on blockchain is provided, the device comprising: a first processing unit, for extracting a user public key, a first user number and a user signature in the first request signaling when a first request signaling is received, and performing verification based on the user public key and the user signature, and determining a user level based on the first user number when the verification passes, the first request signaling being used to initiate a login request to a blockchain platform, the first user number being an ID number included in the first request signaling; a second processing unit, for extracting a plurality of second user numbers, foundation data and test cases in the second request signaling when the user level is the first user level and a second request signaling is received, and binding the test case to the second user number one by one according to the second request signaling, the second request signaling being used to upload the test case and the foundation data to the blockchain platform, the second user number being the ID number of the tester; a third processing unit, for extracting a user number in the third request signaling to obtain a target user number when the user level is the second user level and a third request signaling is received, determining a third user number based on the target user number and the second user number, and binding the third user number to the target user number; The corresponding test case is sent to the user end corresponding to the target user number, the third request signaling is used to obtain the test case from the blockchain platform, and the third user number is the second user number consistent with the target user number; the fourth processing unit is used to extract the target user number and the first identification information in the fourth request signaling when the user level is the second user level and the fourth request signaling is received, determine the first base data according to the first identification information, bind the first base data and the target user number, and send the first base data to the user end corresponding to the target user number, the fourth request signaling is used to obtain the base data from the blockchain platform, and the first identification information is used to characterize the storage location of the first base data; the fifth processing unit is used to extract the test result and the test case in the fifth request signaling when the user level is the second user level and the fifth request signaling is received, calculate the root hash by merkle technology according to each test case of the blockchain platform, the first base data corresponding to the test case and the test result, obtain the first hash value, and store the test result, the test case and the first hash value in the corresponding position.

[0013] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described.

[0014] According to another aspect of the present application, a collaborative testing system is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include methods for executing any one of the described methods.

[0015] By applying the technical solution of the present application, in the above-mentioned blockchain-based collaborative testing method, first, when a first request signaling is received, the user public key, the first user number and the user signature in the above-mentioned first request signaling are extracted, and verification is performed based on the above-mentioned user public key and the above-mentioned user signature. If the verification is passed, the user level is determined based on the above-mentioned first user number. The above-mentioned first request signaling is used to initiate a login request to the blockchain platform, and the above-mentioned first user number is the ID number included in the above-mentioned first request signaling; then, when the above-mentioned user level is the first user level and a second request signaling is received, a plurality of second user numbers, foundation data and test cases in the above-mentioned second request signaling are extracted, and the above-mentioned test cases are bound to the second user numbers one by one according to the above-mentioned second request signaling. The above-mentioned second request signaling is used to upload the above-mentioned test cases and the above-mentioned foundation data to the above-mentioned blockchain platform, and the above-mentioned second user number is the ID number of the tester; thereafter, when the above-mentioned user level is the second user level and a third request signaling is received, the user number in the above-mentioned third request signaling is extracted to obtain the target user number, the third user number is determined according to the above-mentioned target user number and the above-mentioned second user number, and the above-mentioned test case corresponding to the above-mentioned third user number is bound to the above-mentioned test case. The example is sent to the user end corresponding to the target user number, the third request signaling is used to obtain the test case from the blockchain platform, and the third user number is the second user number consistent with the target user number; thereafter, when the user level is the second user level and the fourth request signaling is received, the target user number and the first identification information in the fourth request signaling are extracted, the first base data is determined according to the first identification information, the first base data and the target user number are bound, and the first base data is sent to the user end corresponding to the target user number, the fourth request signaling is used to obtain the base data from the blockchain platform, and the first identification information is used to characterize the storage location of the first base data; finally, when the user level is the second user level and the fifth request signaling is received, the test result and the test case in the fifth request signaling are extracted, and the root hash is calculated by merkle technology according to each of the test cases on the blockchain platform, the first base data corresponding to the test case and the test result to obtain the first hash value, and the test result, the test case and the first hash value are stored in the corresponding position. The present application provides that when a tester obtains the underlying data for testing, the user number of the tester is bound to the underlying data and the test case is bound to the user number of the tester, ensuring that a piece of underlying data can only be used for one test case and a piece of underlying data is only called by one tester, thereby improving the data acquisition speed of the tester and preventing the same underlying data from being used repeatedly and multiple modifications from affecting the test results. The method solves the problem of errors in the regression test process caused by the sharing of underlying data in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A hardware structure block diagram of a mobile terminal according to a blockchain-based collaborative testing method provided in an embodiment of the present application is shown;

[0017] Figure 2 A flowchart of a blockchain-based collaborative testing method provided according to an embodiment of the present application is shown;

[0018] Figure 3 A schematic diagram of a merkle tree structure provided according to an embodiment of the present application is shown;

[0019] Figure 4 A flowchart of a specific blockchain-based collaborative testing method provided according to an embodiment of the present application is shown;

[0020] Figure 5 A structural block diagram of a blockchain-based collaborative testing device provided according to an embodiment of the present application is shown.

[0021] The above drawings include the following reference numerals:

[0022] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION

[0023] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] As introduced in the background technology, the sharing and use of foundation data in the prior art will lead to a decrease in test efficiency and make it difficult to hold testers accountable. In addition, the reuse of the same test data by different testers will lead to regression testing resulting in erroneous test results due to the sharing of foundation data. In order to solve the problem of errors in the regression testing process caused by the sharing of foundation data in the prior art, the embodiments of the present application provide a collaborative testing method, collaborative testing device, computer-readable storage medium and collaborative testing system based on blockchain.

[0027] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0028] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 1 is a hardware structure diagram of a mobile terminal of a blockchain-based collaborative testing method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0029] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the display method of device information in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0030] In this embodiment, a blockchain-based collaborative testing method running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.

[0031] Figure 2 : is a flowchart of a blockchain-based collaborative testing method according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0032] Step S201, when receiving the first request signaling, extract the user public key, the first user number and the user signature in the first request signaling, and perform verification based on the user public key and the user signature, and determine the user level based on the first user number if the verification passes, the first request signaling is used to initiate a login request to the blockchain platform, and the first user number is the ID number included in the first request signaling;

[0033] Specifically, Figure 3As shown, the above-mentioned blockchain platform of this application verifies the logged-in user. To complete the verification, it is necessary to upload in advance. The user uploads the user number userId (the above-mentioned user number) and personal digital signature Sig (the above-mentioned user signature) through the user public key PubKey. The blockchain stores the above information. When the above-mentioned first request signaling is received (the user initiates a login request), verification is performed based on the user public key and user signature. If the verification is passed, the login is passed, and the ID number of the login request is obtained to query the user level. Different user levels allow different operations to be performed.

[0034] Step S202: when the user level is the first user level and the second request signaling is received, extract multiple second user numbers, base data and test cases in the second request signaling, and bind the test cases to the second user numbers one by one according to the second request signaling. The second request signaling is used to upload the test cases and the base data to the blockchain platform. The second user number is the ID number of the tester.

[0035] Specifically, Figure 3 As shown, when the user level is the above-mentioned first user level (that is, the logged-in user is an administrator user), upon receiving the above-mentioned second request signaling (used to request the upload operation of the base data and test cases), the present application arranges for the administrator to upload the base data in the form of batch upload, and assigns the test cases to the testers, so as to track the testers in case of test errors and solve the problem of chaotic management.

[0036] Step S203, when the user level is the second user level and the third request signaling is received, the user number in the third request signaling is extracted to obtain the target user number, the third user number is determined according to the target user number and the second user number, and the test case corresponding to the third user number is sent to the user terminal corresponding to the target user number, the third request signaling is used to obtain the test case from the blockchain platform, and the third user number is the second user number that is consistent with the target user number;

[0037] Specifically, Figure 3 As shown, when the user level is the second user level mentioned above (that is, the logged-in user is a tester), when the third request signaling (used to request a test case acquisition operation) is received, the test cases assigned in the blockchain are extracted based on the user number according to the third request signaling. It is easy to understand that the test cases include test case numbers and test case descriptions, and the testers can determine the required test scenarios and the test base data corresponding to the scenarios through the test case descriptions.

[0038] Step S204, when the user level is the second user level and the fourth request signaling is received, extract the target user number and the first identification information in the fourth request signaling, determine the first base data according to the first identification information, bind the first base data and the target user number, and send the first base data to the user terminal corresponding to the target user number, the fourth request signaling is used to obtain the base data from the blockchain platform, and the first identification information is used to indicate the storage location of the first base data;

[0039] Specifically, Figure 3 As shown, when the user level is the second user level (that is, the logged-in user is a tester), upon receiving the fourth request signaling (used to request the test foundation data acquisition operation), the test foundation data required for the test scenario corresponding to the test case is captured from the corresponding position, that is, the first foundation data. When the test foundation is acquired, the data state of the test foundation data in the blockchain will change, that is, it will be bound to the user number of the tester, that is, the user cannot update the test foundation data that has been used again, thereby ensuring the integrity of the test foundation data and preventing it from being tampered with for the second time.

[0040] In the specific implementation, the above operation ensures that each test paving data is bound to only one test case, ensuring that subsequent regression tests will not have problems due to the paving data.

[0041] On the other hand, the test base data is only called once, which ensures that in the subsequent testing process, other testers will no longer obtain the test base data that has been used, causing the test case execution to fail.

[0042] Step S205, when the user level is the second user level and the fifth request signaling is received, extract the test results and the test cases in the fifth request signaling, calculate the root hash through the merkle technology according to the test cases of the blockchain platform, the first base data corresponding to the test cases and the test results, obtain the first hash value, and store the test results, the test cases and the first hash value in corresponding positions.

[0043] Specifically, after the test is completed, Figure 3 As shown, when the user level is the second user level (i.e., the logged-in user is a tester), upon receiving the fifth request signaling (used to request the storage operation of the test case memo, test case test results, test case data, and user number), the relevant data after the test is completed will be stored back in the blockchain, thereby ensuring the identification of subsequent tampered data.

[0044] In a specific embodiment, during the storage process, the blockchain platform generates Htoot, i.e., the above-mentioned first hash value, to facilitate the storage and positioning of data.

[0045] In the above embodiment, the hash is obtained by calculating the root hash using the merkle technology. In a specific embodiment, Figure 4 As shown, each test data is hashed to obtain h1, h2, h3 and h4, and then concatenated and merged in pairs, and then hashed to obtain H1 and H2, and then concatenated and merged and hashed to obtain Htoot and stored. Because the hash calculation is efficient and binding, it can uniquely bind all the above test data. Any modification of the test data will cause the modification of the final root hash value. If there is a modification of the test case data, it is possible to quickly understand which test data has been modified through batch scanning. At the same time, because multiple test data are aggregated into a single fixed-size hash value, space saving is guaranteed. Hash calculation can be implemented through cryptographic algorithms such as MD5 and SHA256, and the size of the root hash result is 256 bits. At the same time, because the root hash values ​​of multiple cases are stored, the tamper-proofness of the blockchain platform is further enhanced. If you want to modify the test data, you need to modify the test data and Hroot at the same time, which brings great difficulties to the attacker.

[0046] Through this embodiment, first, when the first request signaling is received, the user public key, the first user number and the user signature in the first request signaling are extracted, and verification is performed based on the user public key and the user signature. When the verification is passed, the user level is determined based on the first user number. The first request signaling is used to initiate a login request to the blockchain platform, and the first user number is the ID number included in the first request signaling; then, when the user level is the first user level and the second request signaling is received, multiple second user numbers, foundation data and test cases in the second request signaling are extracted, and the test cases are bound to the second user numbers one by one according to the second request signaling. The second request signaling is used to upload the test cases and the foundation data to the blockchain platform, and the second user number is the ID number of the tester; thereafter, when the user level is the second user level and the third request signaling is received, the user number in the third request signaling is extracted to obtain the target user number, the third user number is determined according to the target user number and the second user number, and the test case corresponding to the third user number is sent to the target user The user end corresponding to the target user number, the third request signaling is used to obtain the test case from the blockchain platform, and the third user number is the second user number consistent with the target user number; thereafter, when the user level is the second user level and the fourth request signaling is received, the target user number and the first identification information in the fourth request signaling are extracted, the first base data is determined according to the first identification information, the first base data and the target user number are bound, and the first base data is sent to the user end corresponding to the target user number, the fourth request signaling is used to obtain the base data from the blockchain platform, and the first identification information is used to characterize the storage location of the first base data; finally, when the user level is the second user level and the fifth request signaling is received, the test result and the test case in the fifth request signaling are extracted, and the root hash is calculated by merkle technology according to each of the test cases on the blockchain platform, the first base data corresponding to the test case and the test result to obtain the first hash value, and the test result, the test case and the first hash value are stored in the corresponding position. The present application provides that when a tester obtains the underlying data for testing, the user number of the tester is bound to the underlying data and the test case is bound to the user number of the tester, ensuring that a piece of underlying data can only be used for one test case and a piece of underlying data is only called by one tester, thereby improving the data acquisition speed of the tester and preventing the same underlying data from being used repeatedly and multiple modifications from affecting the test results. The method solves the problem of errors in the regression test process caused by the sharing of underlying data in the prior art.

[0047] In order to locate the tampered data, in an optional implementation, the method further includes:

[0048] Step S301, when the above-mentioned user level is the above-mentioned first user level and the sixth request signaling is received, the first target data is determined based on the above-mentioned first hash value and the second hash value, the above-mentioned first hash value is the root hash stored by the above-mentioned blockchain platform, and the above-mentioned second hash value is the root hash calculated according to the data stored in the above-mentioned blockchain platform. The above-mentioned sixth request signaling is used to instruct the above-mentioned blockchain platform to modify the data scan, and the above-mentioned first target data is the data that has changed between two adjacent scans.

[0049] Specifically, Figure 3 As shown, when the user level is the first user level (that is, the logged-in user is an administrator user), upon receiving the sixth request signaling (for requesting a scan operation for village reform data), the batch execution method can be combined with the following steps: Figure 4 The merkle tree technology shown in the figure quickly locates the modified data and improves the efficiency of finding the modified data. The specific operation is that if there is tampered data, a new root hash different from the pre-stored Hroot (the above-mentioned first hash value) will appear, that is, the above-mentioned second hash value. If the first hash value and the second hash value are different, the hash values ​​of non-leaf nodes in the merkle tree are compared layer by layer to determine the modified data in the leaf node.

[0050] In order to facilitate the test personnel to obtain the test preparation data, in an optional implementation manner, after binding the test cases and the second user numbers one by one according to the second request signaling, the method further includes:

[0051] Step S401, determining at least one test scenario according to each of the above test cases to obtain multiple target test scenarios;

[0052] Specifically, when uploading test cases and test data, based on the description of the test cases, multiple test scenarios required by the test plan are determined, such as registration function, login function, search function and other test scenarios, to obtain the above-mentioned target test model.

[0053] Step S402, determining at least one second foundation data based on each of the target test scenarios, wherein the second foundation data is the foundation data called by simulating the target test scenario;

[0054] Specifically, based on each of the above test scenarios, the test foundation data required to complete the above scenario is determined to obtain the above second foundation data.

[0055] Step S403: Binding the second foundation data and the target test scenario based on the association relationship between the second foundation data and the target test scenario.

[0056] Specifically, based on the above correspondence, the test laying data is bound to different target test scenarios, and the subsequent edge testers only need to use the above-mentioned second laying data related to the target test scenario corresponding to the target test case, without the need to filter the test laying data from all the laying data according to the test scenario.

[0057] In order to send the test case to the corresponding tester, in an optional implementation, the step S203 includes:

[0058] Step S2031, traversing the second user number according to the target user number, and determining the second user number as the third user number when the second user number is consistent with the target user number;

[0059] Specifically, after the tester logs in to the above-mentioned blockchain platform, based on the user number of the tester's login account, that is, the above-mentioned target user number, the blockchain platform traverses the pre-stored above-mentioned second user number based on the correspondence between the above-mentioned second user number and the test case established by the administrator.

[0060] Step S2032: Send the test case bound to the third user number to the user terminal corresponding to the target user number.

[0061] Specifically, based on the above-mentioned second user number obtained by querying the blockchain platform, the corresponding pre-bound test case is called and sent to the user end of the tester, and the tester completes the acquisition of the test case, that is, the test case task assigned to the tester.

[0062] In order to facilitate tracing the tester according to the stored data of the test results, in an optional implementation, after extracting the test results and the test cases in the fifth request signaling, the method further includes:

[0063] Step S501, determining a test case number according to the test case, generating second identification information according to the test case number and the target user number, wherein the second identification information is used to identify the user who uploaded the test result;

[0064] Specifically, based on the above operations, it is easy to understand that the above test case has a test case number that uniquely identifies the tester, and the test case is uniquely bound to the tester's user number. Therefore, the test result data can be identified based on the above unique identification. Therefore, the second identification information is generated based on the above target user number and the above test case number. The above second identification information is unique and can be used to characterize the relationship between the tester and the test case and the corresponding test results.

[0065] Step S503: adding the second identification information to the test case, the test result and the first base data to complete the binding.

[0066] Specifically, the second identification information is added to the test case, the test result and the first base data to complete the binding.

[0067] In the above embodiment, the user number of the tester is bound to the test result. In the event of an error in the test result, the tester can be directly held accountable, which simplifies the accountability process for test problems.

[0068] In order to calculate the first hash value, in an optional implementation, the step S205 includes:

[0069] Step S2051, performing a hash operation based on the test case, the first underlying data corresponding to the test case, and the test result, and performing a cascade operation based on the result of the hash operation to obtain a third hash value;

[0070] Specifically, h1=hash(test case||test case data||test case result), where hash() refers to the hash algorithm, and || represents concatenation. Similarly, h2=hash(test case||test case data||test case result). H1=hash(h1||h2), and the third hash value is obtained.

[0071] Step S2052: Perform a cascade operation based on any two of the third hash values ​​to obtain the corresponding first hash value.

[0072] Specifically, another third hash value H2 is calculated in the same manner, and Hroot=hash(H1||H2) is further calculated to obtain the first hash value.

[0073] In order to quickly locate the first target data, in an optional implementation, the step S301 includes:

[0074] Step S3011, when the first Hash value is inconsistent with the second Hash value, respectively decompose the first Hash value and the second Hash value to obtain a corresponding fourth Hash value and a fifth Hash value;

[0075] Specifically, when the calculated Hroot is different from the pre-stored Hroot, a comparison is further performed based on H1 and H2 respectively corresponding to Hroot, that is, the fourth hash value and the fifth hash value.

[0076] Step S3012, matching the fourth hash value and the fifth hash value corresponding to the first hash value and the second hash value, when the fourth hash value is inconsistent, determining the data corresponding to the fourth hash value as the first target data, when the fifth hash value is inconsistent, determining the data corresponding to the fifth hash value as the first target data.

[0077] Specifically, compare the newly calculated H1 and H2 with the originally stored H1 and H2, and in different cases, you do not look for the next layer of modified hash values, and so on to determine the modified data.

[0078] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0079] The embodiment of the present application also provides a blockchain-based collaborative testing device. It should be noted that the blockchain-based collaborative testing device of the embodiment of the present application can be used to execute the blockchain-based collaborative testing method provided by the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0080] The following is an introduction to the blockchain-based collaborative testing device provided in an embodiment of the present application.

[0081] Figure 5 is a structural block diagram of a collaborative testing device based on blockchain according to an embodiment of the present application. Figure 5 As shown, the device comprises:

[0082] The first processing unit 10 is used to extract the user public key, the first user number and the user signature in the first request signaling when receiving the first request signaling, and perform verification based on the user public key and the user signature, and determine the user level based on the first user number when the verification passes, the first request signaling is used to initiate a login request to the blockchain platform, and the first user number is the ID number included in the first request signaling;

[0083] Specifically, Figure 3 As shown, the above-mentioned blockchain platform of this application verifies the logged-in user. To complete the verification, it is necessary to upload in advance. The user uploads the user number userId (the above-mentioned user number) and personal digital signature Sig (the above-mentioned user signature) through the user public key PubKey. The blockchain stores the above information. When the above-mentioned first request signaling is received (the user initiates a login request), verification is performed based on the user public key and user signature. If the verification is passed, the login is passed, and the ID number of the login request is obtained to query the user level. Different user levels allow different operations to be performed.

[0084] The second processing unit 20 is used to extract multiple second user numbers, base data and test cases in the second request signaling when the user level is the first user level and the second request signaling is received, and bind the test cases to the second user numbers one by one according to the second request signaling, wherein the second request signaling is used to upload the test cases and the base data to the blockchain platform, and the second user number is the ID number of the tester;

[0085] Specifically, Figure 3 As shown, when the user level is the above-mentioned first user level (that is, the logged-in user is an administrator user), upon receiving the above-mentioned second request signaling (used to request the upload operation of the base data and test cases), the present application arranges for the administrator to upload the base data in the form of batch upload, and assigns the test cases to the testers, so as to track the testers in case of test errors and solve the problem of chaotic management.

[0086] The third processing unit 30 is used for, when the user level is the second user level and the third request signaling is received, extracting the user number in the third request signaling to obtain the target user number, determining the third user number according to the target user number and the second user number, and sending the test case corresponding to the third user number to the user terminal corresponding to the target user number, wherein the third request signaling is used to obtain the test case from the blockchain platform, and the third user number is the second user number that is consistent with the target user number;

[0087] Specifically, Figure 3As shown, when the user level is the second user level mentioned above (that is, the logged-in user is a tester), when the third request signaling (used to request a test case acquisition operation) is received, the test cases assigned in the blockchain are extracted based on the user number according to the third request signaling. It is easy to understand that the test cases include test case numbers and test case descriptions, and the testers can determine the required test scenarios and the test base data corresponding to the scenarios through the test case descriptions.

[0088] The fourth processing unit 40 is used to extract the target user number and the first identification information in the fourth request signaling when the user level is the second user level and the fourth request signaling is received, determine the first base data according to the first identification information, bind the first base data and the target user number, and send the first base data to the user terminal corresponding to the target user number, the fourth request signaling is used to obtain the base data from the blockchain platform, and the first identification information is used to indicate the storage location of the first base data;

[0089] Specifically, Figure 3 As shown, when the user level is the second user level (that is, the logged-in user is a tester), upon receiving the fourth request signaling (used to request the test foundation data acquisition operation), the test foundation data required for the test scenario corresponding to the test case is captured from the corresponding position, that is, the first foundation data. When the test foundation is acquired, the data state of the test foundation data in the blockchain will change, that is, it will be bound to the user number of the tester, that is, the user cannot update the test foundation data that has been used again, thereby ensuring the integrity of the test foundation data and preventing it from being tampered with for the second time.

[0090] In the specific implementation, the above operation ensures that each test paving data is bound to only one test case, ensuring that subsequent regression tests will not have problems due to the paving data.

[0091] On the other hand, the test base data is only called once, which ensures that in the subsequent testing process, other testers will no longer obtain the test base data that has been used, causing the test case execution to fail.

[0092] The fifth processing unit 50 is used to extract the test results and the test cases in the fifth request signaling when the user level is the second user level and the fifth request signaling is received, calculate the root hash through the merkle technology according to the test cases of the blockchain platform, the first base data corresponding to the test cases and the test results, obtain the first hash value, and store the test results, the test cases and the first hash value in corresponding positions.

[0093] Specifically, after the test is completed, Figure 3 As shown, when the user level is the second user level (i.e., the logged-in user is a tester), upon receiving the fifth request signaling (used to request the storage operation of the test case memo, test case test results, test case data, and user number), the relevant data after the test is completed will be stored back in the blockchain, thereby ensuring the identification of subsequent tampered data.

[0094] In a specific embodiment, during the storage process, the blockchain platform generates Htoot, i.e., the above-mentioned first hash value, to facilitate the storage and positioning of data.

[0095] In the above embodiment, the hash is obtained by calculating the root hash using the merkle technology. In a specific embodiment, Figure 4 As shown, each test data is hashed to obtain h1, h2, h3 and h4, and then concatenated and merged in pairs, and then hashed to obtain H1 and H2, and then concatenated and merged and hashed to obtain Htoot and stored. Because the hash calculation is efficient and binding, it can uniquely bind all the above test data. Any modification of the test data will cause the modification of the final root hash value. If there is a modification of the test case data, it is possible to quickly understand which test data has been modified through batch scanning. At the same time, because multiple test data are aggregated into a single fixed-size hash value, space saving is guaranteed. Hash calculation can be implemented through cryptographic algorithms such as MD5 and SHA256, and the size of the root hash result is 256 bits. At the same time, because the root hash values ​​of multiple cases are stored, the tamper-proofness of the blockchain platform is further enhanced. If you want to modify the test data, you need to modify the test data and Hroot at the same time, which brings great difficulties to the attacker.

[0096] Through this embodiment, the first processing unit, when receiving the first request signaling, extracts the user public key, the first user number and the user signature in the first request signaling, and performs verification based on the user public key and the user signature. If the verification is passed, the user level is determined based on the first user number. The first request signaling is used to initiate a login request to the blockchain platform, and the first user number is the ID number included in the first request signaling; the second processing unit, when the user level is the first user level and the second request signaling is received, extracts multiple second user numbers, foundation data and test cases in the second request signaling, and binds the test case to the second user number one by one according to the second request signaling. The second request signaling is used to upload the test case and the foundation data to the blockchain platform, and the second user number is the ID number of the tester; the third processing unit, when the user level is the second user level and the third request signaling is received, extracts the user number in the third request signaling to obtain the target user number, determines the third user number according to the target user number and the second user number, and sends the test case corresponding to the third user number to the target user The user end corresponding to the account number, the third request signaling is used to obtain the test case from the blockchain platform, and the third user number is the second user number consistent with the target user number; the fourth processing unit extracts the target user number and the first identification information in the fourth request signaling when the user level is the second user level and the fourth request signaling is received, determines the first base data according to the first identification information, binds the first base data and the target user number, and sends the first base data to the user end corresponding to the target user number, the fourth request signaling is used to obtain the base data from the blockchain platform, and the first identification information is used to characterize the storage location of the first base data; the fifth processing unit extracts the test result and the test case in the fifth request signaling when the user level is the second user level and the fifth request signaling is received, calculates the root hash through the merkle technology according to each of the test cases on the blockchain platform, the first base data corresponding to the test case and the test result, obtains the first hash value, and stores the test result, the test case and the first hash value in the corresponding position. The present application provides that when a tester obtains the underlying data for testing, the user number of the tester is bound to the underlying data and the test case is bound to the user number of the tester, ensuring that a piece of underlying data can only be used for one test case and a piece of underlying data is only called by one tester, thereby improving the data acquisition speed of the tester and preventing the same underlying data from being used repeatedly and multiple modifications from affecting the test results. The method solves the problem of errors in the regression test process caused by the sharing of underlying data in the prior art.

[0097] In order to locate the tampered data, in an optional implementation, the above device further includes:

[0098] The sixth processing unit is used to determine the first target data based on the first hash value and the second hash value when the user level is the first user level and the sixth request signaling is received, the first hash value is the root hash stored by the blockchain platform, the second hash value is the root hash calculated based on the data stored in the blockchain platform, the sixth request signaling is used to instruct the blockchain platform to modify the data scan, and the first target data is the data that has changed between two adjacent scans.

[0099] Specifically, Figure 3 As shown, when the user level is the first user level (that is, the logged-in user is an administrator user), upon receiving the sixth request signaling (for requesting a scan operation for village reform data), the batch execution method can be combined with the following steps: Figure 4 The merkle tree technology shown in the figure quickly locates the modified data and improves the efficiency of finding the modified data. The specific operation is that if there is tampered data, a new root hash different from the pre-stored Hroot (the above-mentioned first hash value) will appear, that is, the above-mentioned second hash value. If the first hash value and the second hash value are different, the hash values ​​of non-leaf nodes in the merkle tree are compared layer by layer to determine the modified data in the leaf node.

[0100] In order to facilitate the test personnel to obtain the test bed data, in an optional implementation, the above device also includes:

[0101] A first determining unit is used to determine at least one test scenario according to each of the test cases after binding the test cases to the second user numbers one by one according to the second request signaling, so as to obtain a plurality of target test scenarios;

[0102] Specifically, when uploading test cases and test data, based on the description of the test cases, multiple test scenarios required by the test plan are determined, such as registration function, login function, search function and other test scenarios, to obtain the above-mentioned target test model.

[0103] A second determining unit is used to determine at least one second foundation data based on each of the target test scenarios, where the second foundation data is the foundation data called by simulating the target test scenario;

[0104] Specifically, based on each of the above test scenarios, the test foundation data required to complete the above scenario is determined to obtain the above second foundation data.

[0105] The seventh processing unit is used to bind the second foundation data and the target test scenario based on the association relationship between the second foundation data and the target test scenario.

[0106] Specifically, based on the above correspondence, the test laying data is bound to different target test scenarios, and the subsequent edge testers only need to use the above-mentioned second laying data related to the target test scenario corresponding to the target test case, without the need to filter the test laying data from all the laying data according to the test scenario.

[0107] In order to send the test case to the corresponding tester, in an optional implementation manner, the second determining unit includes:

[0108] A first determining module, configured to traverse the second user number according to the target user number, and determine the second user number as a third user number when the second user number is consistent with the target user number;

[0109] Specifically, after the tester logs in to the above-mentioned blockchain platform, based on the user number of the tester's login account, that is, the above-mentioned target user number, the blockchain platform traverses the pre-stored above-mentioned second user number based on the correspondence between the above-mentioned second user number and the test case established by the administrator.

[0110] The sending module is used to send the test case bound to the third user number to the user terminal corresponding to the target user number.

[0111] Specifically, based on the above-mentioned second user number obtained by querying the blockchain platform, the corresponding pre-bound test case is called and sent to the user end of the tester, and the tester completes the acquisition of the test case, that is, the test case task assigned to the tester.

[0112] In order to facilitate tracing the tester according to the stored data of the test results, in an optional embodiment, the above device also includes:

[0113] A generating unit, configured to, after extracting the test result and the test case in the fifth request signaling, determine a test case number according to the test case, and generate second identification information according to the test case number and the target user number, wherein the second identification information is used to identify the user who uploaded the test result;

[0114] Specifically, based on the above operations, it is easy to understand that the above test case has a test case number that uniquely identifies the tester, and the test case is uniquely bound to the tester's user number. Therefore, the test result data can be identified based on the above unique identification. Therefore, the second identification information is generated based on the above target user number and the above test case number. The above second identification information is unique and can be used to characterize the relationship between the tester and the test case and the corresponding test results.

[0115] The identification unit is used to add the second identification information to the test case, the test result and the first base data to complete the binding.

[0116] Specifically, the second identification information is added to the test case, the test result and the first base data to complete the binding.

[0117] In order to calculate the first hash value, in an optional implementation manner, the fifth processing unit includes:

[0118] A first calculation module is used to perform a hash operation based on the test case, the first underlying data corresponding to the test case, and the test result, and to perform a cascade operation based on the result of the hash operation to obtain a third hash value;

[0119] Specifically, h1=hash(test case||test case data||test case result), where hash() refers to the hash algorithm, and || represents concatenation. Similarly, h2=hash(test case||test case data||test case result). H1=hash(h1||h2), and the third hash value is obtained.

[0120] The second calculation module is used to perform a cascade operation based on any two of the third Hash values ​​to obtain the corresponding first Hash value.

[0121] Specifically, another third hash value H2 is calculated in the same manner, and Hroot=hash(H1||H2) is further calculated to obtain the first hash value.

[0122] In order to quickly locate the first target data, in an optional implementation manner, the sixth processing unit includes:

[0123] A third calculation module, configured to, when the first Hash value is inconsistent with the second Hash value, respectively decompose the first Hash value and the second Hash value to obtain a corresponding fourth Hash value and a fifth Hash value;

[0124] Specifically, when the calculated Hroot is different from the pre-stored Hroot, a comparison is further performed based on H1 and H2 respectively corresponding to Hroot, that is, the fourth hash value and the fifth hash value.

[0125] The second determination module is used to match the fourth hash value and the fifth hash value corresponding to the first hash value and the second hash value, and when the fourth hash value is inconsistent, determine the data corresponding to the fourth hash value as the first target data; when the fifth hash value is inconsistent, determine the data corresponding to the fifth hash value as the first target data.

[0126] Specifically, compare the newly calculated H1 and H2 with the originally stored H1 and H2, and in different cases, you do not look for the next layer of modified hash values, and so on to determine the modified data.

[0127] The above-mentioned blockchain-based collaborative testing device includes a processor and a memory. The above-mentioned first processing unit, second processing unit, third processing unit, fourth processing unit and fifth processing unit are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions. The above-mentioned modules are all located in the same processor; or, the above-mentioned modules are located in different processors in any combination.

[0128] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the accuracy of the test can be improved by adjusting the kernel parameters.

[0129] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0130] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the blockchain-based collaborative testing method.

[0131] Specifically, the blockchain-based collaborative testing method includes:

[0132] Step S201, when receiving the first request signaling, extract the user public key, the first user number and the user signature in the first request signaling, and perform verification based on the user public key and the user signature, and determine the user level based on the first user number if the verification passes, the first request signaling is used to initiate a login request to the blockchain platform, and the first user number is the ID number included in the first request signaling;

[0133] Step S202: when the user level is the first user level and the second request signaling is received, extract multiple second user numbers, base data and test cases in the second request signaling, and bind the test cases to the second user numbers one by one according to the second request signaling. The second request signaling is used to upload the test cases and the base data to the blockchain platform. The second user number is the ID number of the tester.

[0134] Step S203, when the user level is the second user level and the third request signaling is received, the user number in the third request signaling is extracted to obtain the target user number, the third user number is determined according to the target user number and the second user number, and the test case corresponding to the third user number is sent to the user terminal corresponding to the target user number, the third request signaling is used to obtain the test case from the blockchain platform, and the third user number is the second user number that is consistent with the target user number;

[0135] Step S204, when the user level is the second user level and the fourth request signaling is received, extract the target user number and the first identification information in the fourth request signaling, determine the first base data according to the first identification information, bind the first base data and the target user number, and send the first base data to the user terminal corresponding to the target user number, the fourth request signaling is used to obtain the base data from the blockchain platform, and the first identification information is used to indicate the storage location of the first base data;

[0136] Step S205, when the user level is the second user level and the fifth request signaling is received, extract the test results and the test cases in the fifth request signaling, calculate the root hash through the merkle technology according to the test cases of the blockchain platform, the first base data corresponding to the test cases and the test results, obtain the first hash value, and store the test results, the test cases and the first hash value in corresponding positions.

[0137] An embodiment of the present invention provides a processor, which is used to run a program, wherein the blockchain-based collaborative testing method is executed when the program is running.

[0138] Specifically, the blockchain-based collaborative testing method includes:

[0139] Step S201, when receiving the first request signaling, extract the user public key, the first user number and the user signature in the first request signaling, and perform verification based on the user public key and the user signature, and determine the user level based on the first user number if the verification passes, the first request signaling is used to initiate a login request to the blockchain platform, and the first user number is the ID number included in the first request signaling;

[0140] Step S202: when the user level is the first user level and the second request signaling is received, extract multiple second user numbers, base data and test cases in the second request signaling, and bind the test cases to the second user numbers one by one according to the second request signaling. The second request signaling is used to upload the test cases and the base data to the blockchain platform. The second user number is the ID number of the tester.

[0141] Step S203, when the user level is the second user level and the third request signaling is received, the user number in the third request signaling is extracted to obtain the target user number, the third user number is determined according to the target user number and the second user number, and the test case corresponding to the third user number is sent to the user terminal corresponding to the target user number, the third request signaling is used to obtain the test case from the blockchain platform, and the third user number is the second user number that is consistent with the target user number;

[0142] Step S204, when the user level is the second user level and the fourth request signaling is received, extract the target user number and the first identification information in the fourth request signaling, determine the first base data according to the first identification information, bind the first base data and the target user number, and send the first base data to the user terminal corresponding to the target user number, the fourth request signaling is used to obtain the base data from the blockchain platform, and the first identification information is used to indicate the storage location of the first base data;

[0143] Step S205, when the user level is the second user level and the fifth request signaling is received, extract the test results and the test cases in the fifth request signaling, calculate the root hash through the merkle technology according to the test cases of the blockchain platform, the first base data corresponding to the test cases and the test results, obtain the first hash value, and store the test results, the test cases and the first hash value in corresponding positions.

[0144] An embodiment of the present invention provides a collaborative testing system, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, at least the following steps are implemented:

[0145] Step S201, when receiving the first request signaling, extract the user public key, the first user number and the user signature in the first request signaling, and perform verification based on the user public key and the user signature, and determine the user level based on the first user number if the verification passes, the first request signaling is used to initiate a login request to the blockchain platform, and the first user number is the ID number included in the first request signaling;

[0146] Step S202: when the user level is the first user level and the second request signaling is received, extract multiple second user numbers, base data and test cases in the second request signaling, and bind the test cases to the second user numbers one by one according to the second request signaling. The second request signaling is used to upload the test cases and the base data to the blockchain platform. The second user number is the ID number of the tester.

[0147] Step S203, when the user level is the second user level and the third request signaling is received, the user number in the third request signaling is extracted to obtain the target user number, the third user number is determined according to the target user number and the second user number, and the test case corresponding to the third user number is sent to the user terminal corresponding to the target user number, the third request signaling is used to obtain the test case from the blockchain platform, and the third user number is the second user number that is consistent with the target user number;

[0148] Step S204, when the user level is the second user level and the fourth request signaling is received, extract the target user number and the first identification information in the fourth request signaling, determine the first base data according to the first identification information, bind the first base data and the target user number, and send the first base data to the user terminal corresponding to the target user number, the fourth request signaling is used to obtain the base data from the blockchain platform, and the first identification information is used to indicate the storage location of the first base data;

[0149] Step S205, when the user level is the second user level and the fifth request signaling is received, extract the test results and the test cases in the fifth request signaling, calculate the root hash through the merkle technology according to the test cases of the blockchain platform, the first base data corresponding to the test cases and the test results, obtain the first hash value, and store the test results, the test cases and the first hash value in corresponding positions.

[0150] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:

[0151] Step S201, when receiving the first request signaling, extract the user public key, the first user number and the user signature in the first request signaling, and perform verification based on the user public key and the user signature, and determine the user level based on the first user number if the verification passes, the first request signaling is used to initiate a login request to the blockchain platform, and the first user number is the ID number included in the first request signaling;

[0152] Step S202: when the user level is the first user level and the second request signaling is received, extract multiple second user numbers, base data and test cases in the second request signaling, and bind the test cases to the second user numbers one by one according to the second request signaling. The second request signaling is used to upload the test cases and the base data to the blockchain platform. The second user number is the ID number of the tester.

[0153] Step S203, when the user level is the second user level and the third request signaling is received, the user number in the third request signaling is extracted to obtain the target user number, the third user number is determined according to the target user number and the second user number, and the test case corresponding to the third user number is sent to the user terminal corresponding to the target user number, the third request signaling is used to obtain the test case from the blockchain platform, and the third user number is the second user number that is consistent with the target user number;

[0154] Step S204, when the user level is the second user level and the fourth request signaling is received, extract the target user number and the first identification information in the fourth request signaling, determine the first base data according to the first identification information, bind the first base data and the target user number, and send the first base data to the user terminal corresponding to the target user number, the fourth request signaling is used to obtain the base data from the blockchain platform, and the first identification information is used to indicate the storage location of the first base data;

[0155] Step S205, when the user level is the second user level and the fifth request signaling is received, extract the test results and the test cases in the fifth request signaling, calculate the root hash through the merkle technology according to the test cases of the blockchain platform, the first base data corresponding to the test cases and the test results, obtain the first hash value, and store the test results, the test cases and the first hash value in corresponding positions.

[0156] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0157] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0158] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0159] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0160] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0161] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0162] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0163] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0164] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0165] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0166] 1) The blockchain-based collaborative testing method of the present application, first, when a first request signaling is received, the user public key, the first user number and the user signature in the first request signaling are extracted, and verification is performed based on the user public key and the user signature. If the verification is passed, the user level is determined based on the first user number. The first request signaling is used to initiate a login request to the blockchain platform, and the first user number is the ID number included in the first request signaling; then, when the user level is the first user level and a second request signaling is received, multiple second user numbers, base data and test cases in the second request signaling are extracted, and the test cases are bound to the second user numbers one by one according to the second request signaling. The second request signaling is used to upload the test cases and the base data to the blockchain platform, and the second user number is the ID number of the tester; thereafter, when the user level is the second user level and a third request signaling is received, the user number in the third request signaling is extracted to obtain the target user number, the third user number is determined based on the target user number and the second user number, and the test case corresponding to the third user number is sent to The user end corresponding to the above-mentioned target user number, the above-mentioned third request signaling is used to obtain the above-mentioned test case from the above-mentioned blockchain platform, and the above-mentioned third user number is the above-mentioned second user number consistent with the above-mentioned target user number; thereafter, when the above-mentioned user level is the above-mentioned second user level and the fourth request signaling is received, the above-mentioned target user number and the first identification information in the above-mentioned fourth request signaling are extracted, the first base data is determined according to the above-mentioned first identification information, and the above-mentioned first base data and the above-mentioned target user number are bound, and the above-mentioned first base data is sent to the user end corresponding to the above-mentioned target user number, the above-mentioned fourth request signaling is used to obtain the base data from the above-mentioned blockchain platform, and the above-mentioned first identification information is used to characterize the storage location of the above-mentioned first base data; finally, when the above-mentioned user level is the above-mentioned second user level and the fifth request signaling is received, the test result and the above-mentioned test case in the above-mentioned fifth request signaling are extracted, and the root hash is calculated by merkle technology according to each of the above-mentioned test cases on the above-mentioned blockchain platform, the above-mentioned first base data corresponding to the above-mentioned test case, and the above-mentioned test result to obtain the first hash value, and the above-mentioned test result, the above-mentioned test case and the above-mentioned first hash value are stored in the corresponding position. The present application provides that when a tester obtains the underlying data for testing, the user number of the tester is bound to the underlying data and the test case is bound to the user number of the tester, ensuring that a piece of underlying data can only be used for one test case and a piece of underlying data is only called by one tester, thereby improving the data acquisition speed of the tester and preventing the same underlying data from being used repeatedly and multiple modifications from affecting the test results. The method solves the problem of errors in the regression test process caused by the sharing of underlying data in the prior art.

[0167] 2) In the blockchain-based collaborative testing device of the present application, the first processing unit extracts the user public key, the first user number and the user signature in the first request signaling when receiving the first request signaling, and performs verification based on the user public key and the user signature. If the verification is passed, the user level is determined based on the first user number. The first request signaling is used to initiate a login request to the blockchain platform, and the first user number is the ID number included in the first request signaling; the second processing unit extracts multiple second user numbers, foundation data and test cases in the second request signaling when the user level is the first user level and the second request signaling is received, and binds the test case to the second user number one by one according to the second request signaling. The second request signaling is used to upload the test case and the foundation data to the blockchain platform, and the second user number is the ID number of the tester; the third processing unit extracts the user number in the third request signaling to obtain the target user number when the user level is the second user level and the third request signaling is received, determines the third user number according to the target user number and the second user number, and sends the test case corresponding to the third user number to the blockchain platform. The fourth processing unit extracts the target user number and the first identification information in the fourth request signaling when the user level is the second user level and the fourth request signaling is received, determines the first base data according to the first identification information, binds the first base data and the target user number, and sends the first base data to the user end corresponding to the target user number, the fourth request signaling is used to obtain the base data from the blockchain platform, and the first identification information is used to characterize the storage location of the first base data; the fifth processing unit extracts the test result and the test case in the fifth request signaling when the user level is the second user level and the fifth request signaling is received, calculates the root hash according to each of the test cases on the blockchain platform, the first base data corresponding to the test case and the test result by merkle technology, obtains the first hash value, and stores the test result, the test case and the first hash value in the corresponding position. The present application provides that when a tester obtains the underlying data for testing, the user number of the tester is bound to the underlying data and the test case is bound to the user number of the tester, ensuring that a piece of underlying data can only be used for one test case and a piece of underlying data is only called by one tester, thereby improving the data acquisition speed of the tester and preventing the same underlying data from being used repeatedly and multiple modifications from affecting the test results. The method solves the problem of errors in the regression test process caused by the sharing of underlying data in the prior art.

[0168] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A collaborative testing method based on blockchain, characterized in that: include: Upon receiving the first request signaling, extracting the user public key, the first user number and the user signature in the first request signaling, and performing verification based on the user public key and the user signature, and determining the user level based on the first user number if the verification passes, the first request signaling is used to initiate a login request to the blockchain platform, and the first user number is the ID number included in the first request signaling; When the user level is the first user level and a second request signaling is received, extract multiple second user numbers, base data and test cases in the second request signaling, and bind the test cases to the second user numbers one by one according to the second request signaling, the second request signaling is used to upload the test cases and the base data to the blockchain platform, and the second user number is the ID number of the tester; In the case where the user level is the second user level and a third request signaling is received, extracting the user number in the third request signaling to obtain a target user number, determining a third user number according to the target user number and the second user number, and sending the test case corresponding to the third user number to a user terminal corresponding to the target user number, wherein the third request signaling is used to obtain the test case from the blockchain platform, and the third user number is the second user number that is consistent with the target user number; When the user level is the second user level and a fourth request signaling is received, extracting the target user number and the first identification information in the fourth request signaling, determining the first base data according to the first identification information, binding the first base data and the target user number, and sending the first base data to the user terminal corresponding to the target user number, the fourth request signaling is used to obtain the base data from the blockchain platform, and the first identification information is used to represent the storage location of the first base data; When the user level is the second user level and the fifth request signaling is received, the test results and the test cases in the fifth request signaling are extracted, and the root hash is calculated by merkle technology according to the test cases of the blockchain platform, the first underlying data corresponding to the test cases, and the test results to obtain a first hash value, and the test results, the test cases, and the first hash value are stored in corresponding locations.

2. The method according to claim 1, characterized in that The method further comprises: When the user level is the first user level and the sixth request signaling is received, the first target data is determined based on the first hash value and the second hash value, the first hash value is the root hash stored by the blockchain platform, and the second hash value is the root hash calculated based on the data stored in the blockchain platform. The sixth request signaling is used to instruct the blockchain platform to modify the data scan, and the first target data is the data that has changed between two adjacent scans.

3. The method according to claim 1, characterized in that After binding the test case and the second user number one by one according to the second request signaling, the method further includes: Determine at least one test scenario according to each of the test cases to obtain multiple target test scenarios; Determine at least one second foundation data based on each of the target test scenarios, where the second foundation data is the foundation data called by simulating the target test scenario; The second foundation data and the target test scenario are bound based on the association relationship between the second foundation data and the target test scenario.

4. The method according to claim 3, characterized in that Determining a third user number according to the target user number and the second user number, and sending the test case corresponding to the third user number to the user terminal corresponding to the target user number, comprises: Traversing the second user number according to the target user number, and determining the second user number as a third user number when the second user number is consistent with the target user number; The test case bound to the third user number is sent to the user terminal corresponding to the target user number.

5. The method according to claim 3, characterized in that: After extracting the test result and the test case in the fifth request signaling, the method further includes: Determine a test case number according to the test case, and generate second identification information according to the test case number and the target user number, wherein the second identification information is used to identify the user who uploaded the test result; The second identification information is added to the test case, the test result and the first underlying data to complete the binding.

6. The method according to claim 1, characterized in that Calculating a root hash by using the merkle technology according to each of the test cases of the blockchain platform, the first underlying data corresponding to the test case, and the test result to obtain a first hash value includes: Performing a hash operation based on the test case, the first underlying data corresponding to the test case, and the test result, and performing a cascade operation based on the result of the hash operation to obtain a third hash value; A cascade operation is performed based on any two of the third Hash values ​​to obtain the corresponding first Hash value.

7. The method according to claim 2, characterized in that Determining first target data based on the first hash value and the second hash value includes: When the first Hash value is inconsistent with the second Hash value, respectively decomposing the first Hash value and the second Hash value to obtain a corresponding fourth Hash value and a fifth Hash value; Based on matching the fourth hash value and the fifth hash value corresponding to the first hash value and the second hash value, when the fourth hash value is inconsistent, the data corresponding to the fourth hash value is determined as the first target data; when the fifth hash value is inconsistent, the data corresponding to the fifth hash value is determined as the first target data.

8. A collaborative testing device based on blockchain, characterized in that: The device comprises: a first processing unit, configured to extract, upon receiving a first request signaling, a user public key, a first user number, and a user signature in the first request signaling, and perform verification based on the user public key and the user signature, and determine a user level based on the first user number if the verification passes, wherein the first request signaling is used to initiate a login request to a blockchain platform, and the first user number is an ID number included in the first request signaling; a second processing unit, configured to extract a plurality of second user numbers, base data, and test cases in the second request signaling when the user level is the first user level and a second request signaling is received, and to bind the test cases to the second user numbers one by one according to the second request signaling, wherein the second request signaling is used to upload the test cases and the base data to the blockchain platform, and the second user number is an ID number of the tester; A third processing unit is configured to, when the user level is the second user level and a third request signaling is received, extract the user number in the third request signaling to obtain a target user number, determine the third user number according to the target user number and the second user number, and send the test case corresponding to the third user number to the user terminal corresponding to the target user number, wherein the third request signaling is used to obtain the test case from the blockchain platform, and the third user number is the second user number that is consistent with the target user number; a fourth processing unit, configured to extract the target user number and the first identification information in the fourth request signaling when the user level is the second user level and a fourth request signaling is received, determine the first base data according to the first identification information, bind the first base data and the target user number, and send the first base data to a user terminal corresponding to the target user number, wherein the fourth request signaling is used to obtain the base data from the blockchain platform, and the first identification information is used to represent a storage location of the first base data; The fifth processing unit is used to extract the test results and the test cases in the fifth request signaling when the user level is the second user level and the fifth request signaling is received, calculate the root hash by merkle technology according to the test cases of the blockchain platform, the first underlying data corresponding to the test cases, and the test results, to obtain a first hash value, and store the test results, the test cases, and the first hash value in corresponding locations.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.

10. A collaborative testing system, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include methods for executing any one of claims 1 to 7.