Data testing method, device, equipment and medium based on scenario-based message queue

Through the data testing method based on the scenario-based message queue, using mirror copy traffic data for testing, the problems of high cost, low efficiency and low accuracy in the prior art test data acquisition are solved, and efficient and accurate test results are achieved.

CN114020635BActive Publication Date: 2024-11-05SHENZHEN PING AN INTEGRATED FINANCIAL SERVICES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111354625.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-16
Publication Date
2024-11-05
Estimated Expiration
2041-11-16

AI Technical Summary

Technical Problem

In the prior art, a large amount of test data is required to be manually constructed during testing, resulting in high cost, low efficiency, low accuracy of test results, incomplete coverage of business scenarios, and insufficient message data.

Method used

Using a data testing method based on a scenario-based message queue, by obtaining multi-scene testing instructions, obtaining the scene information to be tested and the target message queue, using mirror copy traffic data for traffic replay, and testing the test objects under production and release versions. The test results are stored in the Hive database and the differences are compared.

Benefits of technology

It improves the efficiency and accuracy of the acquisition of test data, ensures sufficient data volume and is real historical business data, and improves the efficiency and accuracy of the test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114020635B_ABST
    Figure CN114020635B_ABST
Patent Text Reader

Abstract

The present invention relates to functional testing, and provides a data testing method, device, equipment and medium based on a scenario-based message queue. First, based on each scenario to be tested, mirror copy traffic data is obtained from a message queue server cluster to form a mirror copy traffic data set. Then, each mirror copy traffic data set is tested under the production version and the version to be released respectively through traffic replay to test the object to be tested, and the first test result set and the second test result set corresponding to each scenario to be tested are obtained and stored in a Hive database. Finally, the first test result set and the second test result set in the Hive database are compared for difference to obtain the corresponding difference comparison result and then sent to a receiving terminal. The mirror data of the real traffic data is used to participate in the test of the object to be tested under the production version and the version to be released respectively. The test data acquisition efficiency is high, the data volume is sufficient and all are real historical business data, and the test efficiency and test accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of functional testing technology for cloud testing, and in particular to a data testing method, device, computer equipment and storage medium based on a scenario-based message queue. Background Art

[0002] At present, when testing a test object (such as an application), it is generally necessary to manually construct a large amount of test data, which has the disadvantages of incomplete coverage of input business scenarios and insufficient simulation of message data. This results in the method of testing based on manually constructed test data, which not only has high test data acquisition costs and low test efficiency, but also low test result accuracy. Summary of the invention

[0003] The embodiments of the present invention provide a data testing method, apparatus, computer equipment and storage medium based on a scenario-based message queue, aiming to solve the problem in the prior art that when testing a test object, a large amount of test data generally needs to be manually constructed, which not only has high test data acquisition costs and low test efficiency, but also has low accuracy of test results due to incomplete coverage of the constructed test data business scenarios and insufficient simulation of the message data.

[0004] In a first aspect, an embodiment of the present invention provides a data testing method based on a scenario-based message queue, which includes:

[0005] In response to a message queue multi-scenario test instruction, acquiring to-be-tested scenario information corresponding to the message queue multi-scenario test instruction;

[0006] Acquire the scenarios to be tested included in the scenario information to be tested, and the target message queue corresponding to each scenario to be tested;

[0007] According to the target message queue corresponding to each scenario to be tested and the mirror copy traffic data of each target message queue, a mirror copy traffic data set corresponding to each scenario to be tested is obtained;

[0008] Performing tests on the test objects under the production version by replaying the mirror copy traffic data sets corresponding to each test scenario, obtaining first test result sets corresponding to each test scenario, and storing the first test result sets in the Hive database;

[0009] Replaying the mirror copy traffic data sets corresponding to each scenario to be tested to test the test object under the version to be released, obtaining a second test result set corresponding to each scenario to be tested, and storing the second test result set in a Hive database; and

[0010] The first test result set and the second test result set in the Hive database are compared for differences to obtain corresponding difference comparison results, and the difference comparison results are sent to a receiving terminal.

[0011] In a second aspect, an embodiment of the present invention provides a data testing device based on a scenario-based message queue, comprising:

[0012] A test scenario information acquisition unit, configured to obtain, in response to a message queue multi-scenario test instruction, information of a scenario to be tested corresponding to the message queue multi-scenario test instruction;

[0013] A target message queue acquisition unit, used to acquire the scenarios to be tested included in the scenario information to be tested, and a target message queue corresponding to each scenario to be tested;

[0014] A mirror data set acquisition unit, used to acquire a mirror copy traffic data set corresponding to each to-be-tested scenario according to a target message queue corresponding to each to-be-tested scenario and mirror copy traffic data of each target message queue;

[0015] A first test result set acquisition unit is used to perform a test on the test object under the production version by replaying the mirror copy traffic data set corresponding to each scenario to be tested, to obtain a first test result set corresponding to each scenario to be tested, and to store the first test result set in a Hive database;

[0016] A second test result set acquisition unit is used to perform a test on the to-be-tested object under the to-be-tested version by replaying the mirror copy traffic data set corresponding to each to-be-tested scenario through traffic, to obtain a second test result set corresponding to each to-be-tested scenario, and store the second test result set in a Hive database; and

[0017] The test result comparison unit is used to compare the first test result set and the second test result set in the Hive database to obtain corresponding difference comparison results, and send the difference comparison results to a receiving terminal.

[0018] In the third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the data testing method based on the scenario-based message queue described in the first aspect is implemented.

[0019] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the data testing method based on the scenario-based message queue described in the first aspect above.

[0020] The embodiment of the present invention provides a data testing method, device, computer equipment and storage medium based on scenario-based message queues. First, based on each scenario to be tested, mirror copy traffic data is obtained from a message queue server cluster to form a mirror copy traffic data set corresponding to each scenario to be tested. Then, the mirror copy traffic data set corresponding to each scenario to be tested is used to test the object to be tested under the production version through traffic replay, and the first test result set corresponding to each scenario to be tested is obtained. The first test result set is stored in a Hive database. The mirror copy traffic data set corresponding to each scenario to be tested is used to test the object to be tested under the version to be released through traffic replay, and the second test result set corresponding to each scenario to be tested is obtained. The second test result set is stored in the Hive database. Finally, the first test result set and the second test result set in the Hive database are compared for difference to obtain the corresponding difference comparison result, and the difference comparison result is sent to a receiving terminal. The mirror data of real traffic data is used to participate in the test of the object to be tested under the production version and the version to be released, respectively. The test data acquisition efficiency is high, the data volume is sufficient and all are real historical business data, and the test efficiency and test accuracy are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0022] Figure 1 A schematic diagram of an application scenario of a data testing method based on a scenario-based message queue provided in an embodiment of the present invention;

[0023] Figure 2 A schematic diagram of a flow chart of a data testing method based on a scenario-based message queue provided in an embodiment of the present invention;

[0024] Figure 3 A schematic block diagram of a data testing device based on a scenario-based message queue provided in an embodiment of the present invention;

[0025] Figure 4 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0028] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0029] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0030] See also Figure 1 and Figure 2 , Figure 1 A schematic diagram of an application scenario of a data testing method based on a scenario-based message queue provided in an embodiment of the present invention; Figure 2 A flow chart of a data testing method based on a scenario-based message queue provided in an embodiment of the present invention is provided. The data testing method based on a scenario-based message queue is applied in a server, and the method is executed by application software installed in the server.

[0031] like Figure 2 As shown, the method includes steps S101 to S106.

[0032] S101. In response to a message queue multi-scenario test instruction, obtain to-be-tested scenario information corresponding to the message queue multi-scenario test instruction.

[0033] In this embodiment, the technical solution is described with the server as the execution subject. Specifically, the server is locally installed with a Hive database, and the server communicates and interacts with the message queue server cluster (the message queue server cluster includes multiple message queue servers, and each message queue server can deploy a message queue for a specific scenario). In this way, the server can be used to test the object to be tested (for example, the object to be tested is a functional module that can process user data in the message queue, and the functional module belongs to a single or multiple functional modules in a certain application, more specifically, such as a user verification module, a user information merging module, etc.) in multiple environments. For example, in the production version environment, the mirror copy traffic data of the object to be tested based on the message queue is tested, or in the version to be released environment, the mirror copy traffic data of the object to be tested based on the message queue is tested. Among them, the mirror copy traffic data in the message queue server is a mirror of the real business data, which completely copies the real business data of a certain time period. Compared with manually constructing the message queue message data, it is more efficient and has better test results. That is, since the test process uses a mirror copy of the real traffic in the message queue, there is no need to rely on testers to manually construct message queue message data (i.e., MQ message data). The business scenarios are fully covered and the message data is more realistic.

[0034] S102: Acquire the scenarios to be tested included in the scenario information to be tested, and the target message queue corresponding to each scenario to be tested.

[0035] In this embodiment, the test object can also be tested in various business scenarios based on the server, such as testing the above-listed applications in a normal purchase scenario, testing the above-listed applications in a group purchase scenario, and testing the above-listed applications in a limited-time discount scenario. In order to test the test object in various specific business scenarios, it is necessary to first obtain specific information about the scenarios to be tested. Specifically, the name of the scenario to be tested can be understood as the scenario information to be tested, and the scenario information to be tested includes several scenarios to be tested (that is, at least 1 scenario to be tested). After obtaining the scenario information to be tested, the server can obtain mirror copy traffic data from the corresponding message queue server according to each scenario to be tested for subsequent testing.

[0036] In one embodiment, step S102 includes:

[0037] Obtaining a first total number of the scenarios to be tested included in the scenario information to be tested; wherein the first total number is recorded as N;

[0038] Obtaining the i-th scene to be tested included in the scene to be tested information; wherein the initial value of i is 1, and the value range of i is [1, N];

[0039] If it is determined that the i-th scenario to be tested corresponds to a single message queue message test mode, obtaining a target message queue corresponding to the i-th scenario to be tested;

[0040] If it is determined that the i-th scenario to be tested corresponds to a multi-message queue message test mode, multiple message queues corresponding to the i-th scenario to be tested are obtained to form a target message queue;

[0041] Increment the value of i by 1 to update the value of i;

[0042] If the value of i does not exceed N, return to the step of obtaining the i-th scene to be tested included in the scene to be tested information;

[0043] If the value of i exceeds N, the target message queue corresponding to the first to-be-tested scenario to the target message queue corresponding to the Nth to-be-tested scenario are saved.

[0044] In this embodiment, in order to perform tests on the object to be tested under various business scenarios, the target message queues and corresponding message queue servers required to interact with each scenario to be tested can be obtained in sequence, so as to determine the amount of mirror copy traffic data required for testing in each business scenario.

[0045] For example, the first test scenario (such as a normal purchase scenario) corresponds to a single message queue message test mode, which only needs to obtain mirror copy traffic data from message queue server 1 in the message queue server cluster, and use message queue server 1 as the target message queue corresponding to the first test scenario. When testing the first test scenario, it is necessary to obtain mirror copy traffic data from message queue server 1 for testing.

[0046] For example, the second test scenario (such as a limited-time discount scenario) corresponds to the multi-message queue message test mode, which only needs to obtain mirror copy traffic data from the message queue server 2 to the message queue server 10 in the message queue server cluster, and use the current queue cluster composed of the message queue server 2 to the message queue server 10 as the target message queue corresponding to the second test scenario. When testing the second test scenario, it is necessary to obtain mirror copy traffic data from the message queue server 2 to the message queue server 10 for testing.

[0047] It can be seen that only after determining whether the scenario to be tested is a single message queue message test mode or a multi-message queue message test mode, can the target message queue be obtained accordingly to further obtain the mirror copy traffic data used for the test.

[0048] In one embodiment, if it is determined that the i-th scenario to be tested corresponds to a single message queue message test mode, obtaining a target message queue corresponding to the i-th scenario to be tested includes:

[0049] If it is determined that the i-th scenario to be tested corresponds to the single message queue message test mode, the preset first message queue selection strategy is called, and the target message queue corresponding to the i-th scenario to be tested is obtained from the message queue server cluster according to the first message queue selection strategy.

[0050] In this embodiment, the first message queue selection strategy is used to obtain a message queue server with corresponding business scenario user data in the message queue server cluster as the target message queue server according to the scenario name of the scenario to be tested. Or the first message queue selection strategy is used to randomly obtain a message queue server in the message queue server cluster as the target message queue server. For example, still referring to the above example, the scenario to be tested No. 1 (such as a normal purchase scenario) corresponds to a single message queue message test mode, and the user data in the message queue server 1 in the message queue server cluster has a business scenario of a normal purchase scenario. In this way, according to the first message queue selection strategy, the message queue server 1 is selected from the message queue server cluster as the target message queue server, and then the mirror copy traffic data is obtained from the target message queue server 1 as the target message queue for testing. It can be seen that the target message queue can be quickly selected through the first message queue selection strategy to carry out the next step of testing, thereby improving the efficiency of the entire testing process.

[0051] In one embodiment, if it is determined that the i-th scenario to be tested corresponds to a multi-message queue message test mode, obtaining multiple message queues corresponding to the i-th scenario to be tested to form a target message queue includes:

[0052] If it is determined that the i-th test scenario corresponds to a multi-message queue message test mode, call the preset second message queue selection strategy, and obtain multiple message queues of the i-th test scenario from the message queue server cluster according to the second message queue selection strategy to form a target message queue.

[0053] Among them, the selected message queue server set is determined according to the minimum test data requirement corresponding to the second message queue selection strategy and the data volume of the mirrored copy traffic data in each message queue server in the message queue server cluster, so as to satisfy that the total data volume of the mirrored copy traffic data in the selected message queue server set exceeds the minimum test data requirement.

[0054] In this embodiment, the second message queue selection strategy is used to determine the selected message queue server set according to the minimum test data requirement corresponding to the scenario to be tested (the minimum test data requirement is a preset value) and the data volume of the mirror copy traffic data in each message queue server in the message queue server cluster, so as to meet the requirement that the total data volume of the mirror copy traffic data in the selected message queue server set exceeds the minimum test data requirement. For example, still referring to the above example, the scenario to be tested No. 2 (such as the limited-time discount scenario) corresponds to the multi-message queue message test mode, and the minimum test data requirement of the scenario to be tested No. 2 is 20 million. After analysis, it can be known that the total data volume of all mirror copy traffic data in the current queue cluster composed of message queue servers 2-message queue servers 10 is 20.05 million, which meets the requirement that the total data volume of the mirror copy traffic data in the selected message queue server set exceeds the minimum test data requirement. In this way, the current queue cluster composed of message queue servers 2-message queue servers 10 is selected from the message queue server cluster according to the second message queue selection strategy, and then the mirror copy traffic data is obtained from the multiple target message queue servers of message queue servers 2-message queue servers 10 as the target message queue for testing. It can be seen that the target message queue can be quickly selected through the second message queue selection strategy to carry out the next step of testing, thereby improving the efficiency of the entire testing process.

[0055] S103 . Acquire a mirror copy traffic data set corresponding to each scenario to be tested according to the target message queue corresponding to each scenario to be tested and the mirror copy traffic data of each target message queue.

[0056] In this embodiment, since each message queue server has pre-copied the real business data of a certain time period as the mirror copy traffic data, when the target message queue corresponding to each test scenario is known, and the mirror copy traffic data of each target message queue is known, it is possible to obtain the target message queues from which the mirror copy traffic data is obtained for each test scenario to form the corresponding mirror copy traffic data set. This directed retrieval method for obtaining data improves the efficiency of data acquisition.

[0057] S104: Perform a test on the test object under the production version by replaying the mirror copy traffic data set corresponding to each scenario to be tested, obtain a first test result set corresponding to each scenario to be tested, and store the first test result set in a Hive database.

[0058] In this embodiment, after obtaining the mirror copy traffic data set corresponding to each scenario to be tested, the object to be tested is tested under the production version, wherein the production version of the object to be tested is the version of the object to be tested that is currently being used by users. When the object to be tested is tested under the production version, the purpose is to obtain the test results of the object to be tested in the production environment. If the mirror copy traffic data set corresponding to each scenario to be tested is tested under the production version by traffic replay, the first test results corresponding to each scenario to be tested can be obtained, and the first test result set is composed of the first test results corresponding to each scenario to be tested.

[0059] In order to compare the test results later, the test results corresponding to each scenario to be tested can be stored in the corresponding partition table in the Hive database. For example, the test results corresponding to scenario 1 to be tested are stored in partition table A1 in the Hive database, and the test results corresponding to scenario 2 to be tested are stored in partition table A2 in the Hive database, etc.

[0060] In one embodiment, step S104 includes:

[0061] Obtain a mirror copy traffic data set of the jth scene to be tested; wherein the initial value of j is 1, and the value range of j is [1, N], and the first total number of scenes to be tested included in the scene information to be tested is recorded as N;

[0062] Remove the date parameter in the consumption time of each mirror copy traffic data in the mirror copy traffic data set of the jth test scenario to obtain the data consumption day time of each mirror copy traffic data;

[0063] Sorting each mirror copy traffic data in the mirror copy traffic data set of the jth test scenario according to the ascending order of the time of the data consumption day to obtain a sorting result;

[0064] The sorting results are sequentially replayed for traffic to perform the jth round of testing on the test object under the production version, and the jth round of testing results corresponding to the jth test scenario are obtained. The jth round of testing results are stored in the Ath j In the partition table;

[0065] Update the value of j by increasing the value of j by 1;

[0066] If the value of j does not exceed N, return to the step of obtaining the mirror copy traffic data set of the jth test scenario;

[0067] If the value of j exceeds N, the first test result set is composed of the test results of the first round to the Nth round.

[0068] In this embodiment, since each mirror copy traffic data in the mirror copy traffic data set has the attributes of the time of joining the message queue and the time of being removed from the message queue after being consumed, that is, the time when each mirror copy traffic data is consumed from the message queue and enters the corresponding server is known. In this way, the specific date of the consumption time when each mirror copy traffic data in the mirror copy traffic data set is consumed and enters the corresponding server can be removed, and only the other parts of the consumption time of each mirror copy traffic data except the date are retained (for example, the hour value, minute value and second value of the consumption time are retained at this time), and the other parts of the consumption time except the date can be simply recorded as the data consumption day time, so that each mirror copy traffic data in the mirror copy traffic data set is sorted in ascending order according to the data consumption day time to obtain the sorting result, and then each mirror copy traffic data in the sorting result is sent to the server according to the data consumption day time for simulation testing, and the traffic replay is realized in this way. Moreover, since the influence of date on the sorting results is eliminated, the mirror copy traffic data of multiple different dates can be effectively combined into the data of the same day, so as to participate in the test in the form of traffic replay, increase the data volume of the test data, and achieve better test results.

[0069] Among them, when the server tests the test object under the production version based on the mirror copy traffic data set corresponding to each test scenario, the server's request processing volume per second (the full name in English is Query Per Second, abbreviated as QPC) when the test object is tested under the production version can also be obtained as the server's first MQ processing performance baseline.

[0070] S105. Perform a test on the test object under the version to be released by replaying the mirror copy traffic data set corresponding to each scenario to be tested, obtain a second test result set corresponding to each scenario to be tested, and store the second test result set in the Hive database.

[0071] In this embodiment, the object to be tested can also be tested under the version to be released, wherein the version to be released of the object to be tested, i.e., the version of the object to be tested that can be put online for users to update and use after passing the test, is essentially still a test version. When the object to be tested is tested under the version to be released, the purpose is to obtain the test results of the object to be tested under the test environment. If the mirror copy traffic data set corresponding to each scene to be tested is respectively tested under the version to be released through traffic replay, the second test results corresponding to each scene to be tested can be obtained, and the test results corresponding to each scene to be tested constitute the second test result set.

[0072] In order to compare the test results later, the second test results corresponding to each scenario to be tested can be stored in the corresponding partition table in the Hive database. For example, the second test results corresponding to scenario to be tested 1 are stored in partition table B1 in the Hive database, and the test results corresponding to scenario to be tested 2 are stored in partition table B2 in the Hive database, etc.

[0073] In one embodiment, step S105 includes:

[0074] Obtain a mirror copy traffic data set of the kth scene to be tested; wherein the initial value of k is 1, and the value range of k is [1, N], and the first total number of scenes to be tested included in the scene information to be tested is recorded as N;

[0075] Remove the date parameter in the consumption time of each mirror copy traffic data in the mirror copy traffic data set of the kth scene to be tested, and obtain the data consumption day time of each mirror copy traffic data in the mirror copy traffic data set of the kth scene to be tested;

[0076] Sorting each mirror copy traffic data in the mirror copy traffic data set of the kth test scenario according to the ascending order of the time of the data consumption day to obtain a sorting result;

[0077] The sorting results are sequentially replayed for traffic to perform the kth round of testing on the test object under the version to be released, and the kth round of testing results corresponding to the kth test scenario are obtained. The kth round of testing results are stored in the Bth round of the Hive database. k In the partition table;

[0078] Update the value of k by increasing the value of k by 1;

[0079] If the value of k does not exceed N, return to the step of obtaining the mirror copy traffic data set of the kth test scenario;

[0080] If the value of k exceeds N, the second test result set is composed of the test results of the first round to the Nth round.

[0081] In this embodiment, the process of testing the object to be tested under the version to be released also refers to the testing of the object to be tested under the production version. In addition, when the server tests the object to be tested under the version to be released based on the mirror copy traffic data set corresponding to each test scenario, the server's request processing volume per second when the object to be tested is tested under the production version can also be obtained as the second MQ processing performance baseline of the server.

[0082] S106: Perform a difference comparison between the first test result set and the second test result set in the Hive database to obtain a corresponding difference comparison result, and send the difference comparison result to a receiving terminal.

[0083] In this embodiment, after the first test result set and the second test result set are stored in different partitions of the Hive database, for example, still referring to the above example, the data stored in the A1 partition table in the first test result set in the Hive database is compared with the data stored in the B1 partition table in the second test result set to obtain a first difference comparison sub-result; then, the data stored in the A2 partition table in the first test result set is compared with the data stored in the B2 partition table in the second test result set to obtain a second difference comparison sub-result; and so on until the Nth difference comparison sub-result is obtained, so that the first difference comparison sub-result to the Nth difference comparison sub-result are combined and filled into a preset blank template to obtain a difference comparison result, and the difference comparison result can be sent to the receiving terminal to view the comparison result in time.

[0084] This method uses mirror data of real traffic data to participate in the testing of the object to be tested in the production version and the version to be released. The test data is acquired efficiently, the data volume is sufficient and all are real historical business data, which improves the test efficiency and test accuracy.

[0085] The embodiment of the present invention also provides a data testing device based on a scenario-based message queue, which is used to execute any embodiment of the data testing method based on a scenario-based message queue. Figure 3 , Figure 3 It is a schematic block diagram of a data testing device 100 based on a scenario-based message queue provided in an embodiment of the present invention.

[0086] Among them, Figure 3 As shown, the data testing device 100 based on the scenario-based message queue includes a test scenario information acquisition unit 101, a target message queue acquisition unit 102, a mirror data set acquisition unit 103, a first test result set acquisition unit 104, a second test result set acquisition unit 105, and a test result comparison unit 106.

[0087] The test scenario information acquisition unit 101 is used to respond to the message queue multi-scenario test instruction and acquire the to-be-tested scenario information corresponding to the message queue multi-scenario test instruction.

[0088] In this embodiment, the technical solution is described with the server as the execution subject. Specifically, the server is locally installed with a Hive database, and the server communicates and interacts with the message queue server cluster (the message queue server cluster includes multiple message queue servers, and each message queue server can deploy a message queue for a specific scenario). In this way, the server can be used to test the object to be tested (for example, the object to be tested is a functional module that can process user data in the message queue, and the functional module belongs to a single or multiple functional modules in a certain application, more specifically, such as a user verification module, a user information merging module, etc.) in multiple environments. For example, in the production version environment, the mirror copy traffic data of the object to be tested based on the message queue is tested, or in the version to be released environment, the mirror copy traffic data of the object to be tested based on the message queue is tested. Among them, the mirror copy traffic data in the message queue server is a mirror of the real business data, which completely copies the real business data of a certain time period. Compared with manually constructing the message queue message data, it is more efficient and has better test results. That is, since the test process uses a mirror copy of the real traffic in the message queue, there is no need to rely on testers to manually construct message queue message data (i.e., MQ message data). The business scenarios are fully covered and the message data is more realistic.

[0089] The target message queue acquisition unit 102 is used to acquire the scenarios to be tested included in the scenario to be tested information and the target message queue corresponding to each scenario to be tested.

[0090] In this embodiment, the test object can also be tested in various business scenarios based on the server, such as testing the above-listed applications in a normal purchase scenario, testing the above-listed applications in a group purchase scenario, and testing the above-listed applications in a limited-time discount scenario. In order to test the test object in various specific business scenarios, it is necessary to first obtain specific information about the scenarios to be tested. Specifically, the name of the scenario to be tested can be understood as the scenario information to be tested, and the scenario information to be tested includes several scenarios to be tested (that is, at least 1 scenario to be tested). After obtaining the scenario information to be tested, the server can obtain mirror copy traffic data from the corresponding message queue server according to each scenario to be tested for subsequent testing.

[0091] In one embodiment, the target message queue acquisition unit 102 includes:

[0092] A first total number acquisition unit, used to acquire a first total number of the scenarios to be tested included in the scenario information to be tested; wherein the first total number is recorded as N;

[0093] A first sub-scenario to be tested acquiring unit, configured to acquire the i-th scenario to be tested included in the scenario to be tested information; wherein the initial value of i is 1, and the value range of i is [1, N];

[0094] The sub-target message queue first acquisition unit is used to acquire the target message queue corresponding to the i-th scenario to be tested if it is determined that the i-th scenario to be tested corresponds to the single message queue message test mode;

[0095] The sub-target message queue second acquisition unit is used to acquire multiple message queues corresponding to the i-th to-be-tested scenario to form a target message queue if it is determined that the i-th to-be-tested scenario corresponds to a multi-message queue message test mode;

[0096] A first self-increment unit, used to update the value of i by incrementing the value of i by 1;

[0097] A first execution unit, configured to return to the step of obtaining the i-th scene to be tested included in the scene to be tested information if the value of i does not exceed N;

[0098] The second execution unit is used for saving the target message queue corresponding to the first to-be-tested scenario to the target message queue corresponding to the Nth to-be-tested scenario if the value of i exceeds N.

[0099] In this embodiment, in order to perform tests on the object to be tested under various business scenarios, the target message queues and corresponding message queue servers required to interact with each scenario to be tested can be obtained in sequence, so as to determine the amount of mirror copy traffic data required for testing in each business scenario.

[0100] For example, the first test scenario (such as a normal purchase scenario) corresponds to a single message queue message test mode, which only needs to obtain mirror copy traffic data from message queue server 1 in the message queue server cluster, and use message queue server 1 as the target message queue corresponding to the first test scenario. When testing the first test scenario, it is necessary to obtain mirror copy traffic data from message queue server 1 for testing.

[0101] For example, the second test scenario (such as a limited-time discount scenario) corresponds to the multi-message queue message test mode, which only needs to obtain mirror copy traffic data from the message queue server 2 to the message queue server 10 in the message queue server cluster, and use the current queue cluster composed of the message queue server 2 to the message queue server 10 as the target message queue corresponding to the second test scenario. When testing the second test scenario, it is necessary to obtain mirror copy traffic data from the message queue server 2 to the message queue server 10 for testing.

[0102] It can be seen that only after determining whether the scenario to be tested is a single message queue message test mode or a multi-message queue message test mode, can the target message queue be obtained accordingly to further obtain the mirror copy traffic data used for the test.

[0103] In one embodiment, the sub-target message queue first acquisition unit is further used for:

[0104] If it is determined that the i-th scenario to be tested corresponds to the single message queue message test mode, the preset first message queue selection strategy is called, and the target message queue corresponding to the i-th scenario to be tested is obtained from the message queue server cluster according to the first message queue selection strategy.

[0105] In this embodiment, the first message queue selection strategy is used to obtain a message queue server with corresponding business scenario user data in the message queue server cluster as the target message queue server according to the scenario name of the scenario to be tested. Or the first message queue selection strategy is used to randomly obtain a message queue server in the message queue server cluster as the target message queue server. For example, still referring to the above example, the scenario to be tested No. 1 (such as a normal purchase scenario) corresponds to a single message queue message test mode, and the user data in the message queue server 1 in the message queue server cluster has a business scenario of a normal purchase scenario. In this way, according to the first message queue selection strategy, the message queue server 1 is selected from the message queue server cluster as the target message queue server, and then the mirror copy traffic data is obtained from the target message queue server 1 as the target message queue for testing. It can be seen that the target message queue can be quickly selected through the first message queue selection strategy to carry out the next step of testing, thereby improving the efficiency of the entire testing process.

[0106] In one embodiment, the sub-target message queue second acquisition unit is further used for:

[0107] If it is determined that the i-th test scenario corresponds to a multi-message queue message test mode, call the preset second message queue selection strategy, and obtain multiple message queues of the i-th test scenario from the message queue server cluster according to the second message queue selection strategy to form a target message queue.

[0108] Among them, the selected message queue server set is determined according to the minimum test data requirement corresponding to the second message queue selection strategy and the data volume of the mirrored copy traffic data in each message queue server in the message queue server cluster, so as to satisfy that the total data volume of the mirrored copy traffic data in the selected message queue server set exceeds the minimum test data requirement.

[0109] In this embodiment, the second message queue selection strategy is used to determine the selected message queue server set according to the minimum test data requirement corresponding to the scenario to be tested (the minimum test data requirement is a preset value) and the data volume of the mirror copy traffic data in each message queue server in the message queue server cluster, so as to meet the requirement that the total data volume of the mirror copy traffic data in the selected message queue server set exceeds the minimum test data requirement. For example, still referring to the above example, the scenario to be tested No. 2 (such as the limited-time discount scenario) corresponds to the multi-message queue message test mode, and the minimum test data requirement of the scenario to be tested No. 2 is 20 million. After analysis, it can be known that the total data volume of all mirror copy traffic data in the current queue cluster composed of message queue servers 2-message queue servers 10 is 20.05 million, which meets the requirement that the total data volume of the mirror copy traffic data in the selected message queue server set exceeds the minimum test data requirement. In this way, the current queue cluster composed of message queue servers 2-message queue servers 10 is selected from the message queue server cluster according to the second message queue selection strategy, and then the mirror copy traffic data is obtained from the multiple target message queue servers of message queue servers 2-message queue servers 10 as the target message queue for testing. It can be seen that the target message queue can be quickly selected through the second message queue selection strategy to carry out the next step of testing, thereby improving the efficiency of the entire testing process.

[0110] The mirror data set acquisition unit 103 is used to acquire the mirror copy traffic data set corresponding to each scenario to be tested according to the target message queue corresponding to each scenario to be tested and the mirror copy traffic data of each target message queue.

[0111] In this embodiment, since each message queue server has pre-copied the real business data of a certain time period as the mirror copy traffic data, when the target message queue corresponding to each test scenario is known, and the mirror copy traffic data of each target message queue is known, it is possible to obtain the target message queues from which the mirror copy traffic data is obtained for each test scenario to form the corresponding mirror copy traffic data set. This directed retrieval method for obtaining data improves the efficiency of data acquisition.

[0112] The first test result set acquisition unit 104 is used to perform tests on the test object under the production version by replaying the mirror copy traffic data set corresponding to each test scenario through traffic, to obtain the first test result set corresponding to each test scenario, and store the first test result set in the Hive database.

[0113] In this embodiment, after obtaining the mirror copy traffic data set corresponding to each scenario to be tested, the object to be tested is tested under the production version, wherein the production version of the object to be tested is the version of the object to be tested that is currently being used by users. When the object to be tested is tested under the production version, the purpose is to obtain the test results of the object to be tested in the production environment. If the mirror copy traffic data set corresponding to each scenario to be tested is tested under the production version by traffic replay, the first test results corresponding to each scenario to be tested can be obtained, and the first test result set is composed of the first test results corresponding to each scenario to be tested.

[0114] In order to compare the test results later, the test results corresponding to each scenario to be tested can be stored in the corresponding partition table in the Hive database. For example, the test results corresponding to scenario 1 to be tested are stored in partition table A1 in the Hive database, and the test results corresponding to scenario 2 to be tested are stored in partition table A2 in the Hive database, etc.

[0115] In one embodiment, the first test result set acquiring unit 104 includes:

[0116] A first sub-mirror copy traffic data set acquisition unit, used to acquire a mirror copy traffic data set of a j-th scene to be tested; wherein the initial value of j is 1, and the value range of j is [1, N], and the first total number of scenes to be tested included in the scene information to be tested is recorded as N;

[0117] A first data consumption intra-day time acquisition unit is used to remove the date parameter in the consumed time of each mirror copy traffic data in the mirror copy traffic data set of the jth scene to be tested, so as to obtain the data consumption intra-day time of each mirror copy traffic data;

[0118] A first sorting result obtaining unit, configured to sort each mirror copy traffic data in the mirror copy traffic data set of the j-th scenario to be tested according to the ascending order of the time within the data consumption day, to obtain a sorting result;

[0119] The first test result partition storage unit is used to perform traffic replay on the sorted results in order to perform the jth round of testing on the test object under the production version, obtain the jth round of testing results corresponding to the jth test scenario, and store the jth round of testing results in the Ath partition storage unit of the Hive database. j In the partition table;

[0120] A second self-increment unit is used to update the value of j by incrementing the value of j by 1;

[0121] A third execution unit is configured to return to the step of obtaining the mirror copy traffic data set of the jth to-be-tested scenario if the value of j does not exceed N;

[0122] The fourth execution unit is used to form a first test result set from the first round of test results to the Nth round of test results if the value of j exceeds N.

[0123] In this embodiment, since each mirror copy traffic data in the mirror copy traffic data set has the attributes of the time of joining the message queue and the time of being removed from the message queue after being consumed, that is, the time when each mirror copy traffic data is consumed from the message queue and enters the corresponding server is known. In this way, the specific date of the consumption time when each mirror copy traffic data in the mirror copy traffic data set is consumed and enters the corresponding server can be removed, and only the other parts of the consumption time of each mirror copy traffic data except the date are retained (for example, the hour value, minute value and second value of the consumption time are retained at this time), and the other parts of the consumption time except the date can be simply recorded as the data consumption day time, so that each mirror copy traffic data in the mirror copy traffic data set is sorted in ascending order according to the data consumption day time to obtain the sorting result, and then each mirror copy traffic data in the sorting result is sent to the server according to the data consumption day time for simulation testing, and the traffic replay is realized in this way. Moreover, since the influence of date on the sorting results is eliminated, the mirror copy traffic data of multiple different dates can be effectively combined into the data of the same day, so as to participate in the test in the form of traffic replay, increase the data volume of the test data, and achieve better test results.

[0124] Among them, when the server tests the test object under the production version based on the mirror copy traffic data set corresponding to each test scenario, the server's request processing volume per second (the full name in English is Query Per Second, abbreviated as QPC) when the test object is tested under the production version can also be obtained as the server's first MQ processing performance baseline.

[0125] The second test result set acquisition unit 105 is used to perform tests on the test object under the version to be released by replaying the mirror copy traffic data set corresponding to each scene to be tested, obtain the second test result set corresponding to each scene to be tested, and store the second test result set in the Hive database.

[0126] In this embodiment, the object to be tested can also be tested under the version to be released, wherein the version to be released of the object to be tested, i.e., the version of the object to be tested that can be put online for users to update and use after passing the test, is essentially still a test version. When the object to be tested is tested under the version to be released, the purpose is to obtain the test results of the object to be tested under the test environment. If the mirror copy traffic data set corresponding to each scene to be tested is respectively tested under the version to be released through traffic replay, the second test results corresponding to each scene to be tested can be obtained, and the test results corresponding to each scene to be tested constitute the second test result set.

[0127] In order to compare the test results later, the second test results corresponding to each scenario to be tested can be stored in the corresponding partition table in the Hive database. For example, the second test results corresponding to scenario to be tested 1 are stored in partition table B1 in the Hive database, and the test results corresponding to scenario to be tested 2 are stored in partition table B2 in the Hive database, etc.

[0128] In one embodiment, the second test result set acquiring unit 105 includes:

[0129] The second sub-mirror copy traffic data set acquisition unit is used to acquire the mirror copy traffic data set of the kth scene to be tested; wherein the initial value of k is 1, and the value range of k is [1, N], and the first total number of scenes to be tested included in the scene information to be tested is recorded as N;

[0130] A second data consumption intra-day time acquisition unit is used to remove the date parameter in the consumed time of each mirror copy traffic data in the mirror copy traffic data set of the kth scene to be tested, and obtain the data consumption intra-day time of each mirror copy traffic data in the mirror copy traffic data set of the kth scene to be tested;

[0131] A second sorting result obtaining unit is used to sort each mirror copy traffic data in the mirror copy traffic data set of the kth scene to be tested according to the ascending order of the time of the data consumption day to obtain a sorting result;

[0132] The second test result partition storage unit is used to perform traffic replay on the sorted results in order to perform the kth round of testing on the test object under the version to be released, obtain the kth round of testing results corresponding to the kth test scenario, and store the kth round of testing results in the Bth round of the Hive database. k In the partition table;

[0133] A third self-increment unit is used to update the value of k by incrementing the value of k by 1;

[0134] A fifth execution unit, configured to return to the step of obtaining the mirror copy traffic data set of the kth scenario to be tested if the value of k does not exceed N;

[0135] The sixth execution unit is used to, if the value of k exceeds N, form a second test result set consisting of the first round of test results to the Nth round of test results.

[0136] In this embodiment, the process of testing the object to be tested under the version to be released also refers to the testing of the object to be tested under the production version. In addition, when the server tests the object to be tested under the version to be released based on the mirror copy traffic data set corresponding to each test scenario, the server's request processing volume per second when the object to be tested is tested under the production version can also be obtained as the second MQ processing performance baseline of the server.

[0137] The test result comparison unit 106 is used to compare the first test result set and the second test result set in the Hive database to obtain a corresponding difference comparison result, and send the difference comparison result to a receiving terminal.

[0138] In this embodiment, after the first test result set and the second test result set are stored in different partitions of the Hive database, for example, still referring to the above example, the data stored in the A1 partition table in the first test result set in the Hive database is compared with the data stored in the B1 partition table in the second test result set to obtain a first difference comparison sub-result; then, the data stored in the A2 partition table in the first test result set is compared with the data stored in the B2 partition table in the second test result set to obtain a second difference comparison sub-result; and so on until the Nth difference comparison sub-result is obtained, so that the first difference comparison sub-result to the Nth difference comparison sub-result are combined and filled into a preset blank template to obtain a difference comparison result, and the difference comparison result can be sent to the receiving terminal to view the comparison result in time.

[0139] The device uses mirror data of real traffic data to participate in the testing of the object to be tested under the production version and the version to be released. The test data is acquired efficiently, the data volume is sufficient and all are real historical business data, which improves the test efficiency and test accuracy.

[0140] The above-mentioned data testing device based on scenario message queue can be implemented in the form of a computer program. The computer program can be used in Figure 4 Runs on the computer device shown.

[0141] See also Figure 4 , Figure 45 is a schematic block diagram of a computer device provided in an embodiment of the present invention. The computer device 500 is a server or a server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0142] See also Figure 4 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a device bus 501 , wherein the memory may include a storage medium 503 and an internal memory 504 .

[0143] The storage medium 503 can store an operating device 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 can execute a data testing method based on a scenario-based message queue.

[0144] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .

[0145] The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a data testing method based on a scenario-based message queue.

[0146] The network interface 505 is used for network communication, such as providing data information transmission, etc. Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device 500 to which the solution of the present invention is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0147] The processor 502 is used to run a computer program 5032 stored in the memory to implement the data testing method based on the scenario-based message queue disclosed in an embodiment of the present invention.

[0148] Those skilled in the art will understand that Figure 4The embodiments of the computer device shown in the figure do not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such embodiments, the structure and function of the memory and the processor are the same as those of the embodiment of the present invention. Figure 4 The embodiments shown are consistent and will not be described again here.

[0149] It should be understood that in the embodiment of the present invention, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0150] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the data testing method based on the scenario-based message queue disclosed in the embodiment of the present invention is implemented.

[0151] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the above-described equipment, devices and units can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. Those of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0152] In the several embodiments provided by the present invention, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. Units with the same function may also be combined into one unit. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be electrical, mechanical or other forms of connection.

[0153] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.

[0154] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0155] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a backend server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), disk or optical disk and other media that can store program code.

[0156] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A data testing method based on scenario-based message queue, characterized in that: include: In response to a message queue multi-scenario test instruction, acquiring to-be-tested scenario information corresponding to the message queue multi-scenario test instruction; Obtain the scenarios to be tested included in the scenario information to be tested, and the target message queues corresponding to the scenarios to be tested, wherein the first total number of the scenarios to be tested included in the scenario information to be tested is recorded as N, and the i-th scenario to be tested included in the scenario information to be tested is obtained; wherein the initial value of i is 1, and the value range of i is [1, N]. If it is determined that the i-th scenario to be tested corresponds to a single message queue message test mode, obtain the target message queue corresponding to the i-th scenario to be tested. If it is determined that the i-th scenario to be tested corresponds to a multi-message queue message test mode, obtain the target message queue composed of multiple message queues corresponding to the i-th scenario to be tested, and update the value of i by incrementing i by 1. If the value of i does not exceed N, return to execute the step of obtaining the i-th scenario to be tested included in the scenario information to be tested. If the value of i exceeds N, save the target message queues corresponding to the 1st scenario to be tested to the target message queues corresponding to the Nth scenario to be tested. According to the target message queue corresponding to each scenario to be tested and the mirror copy traffic data of each target message queue, a mirror copy traffic data set corresponding to each scenario to be tested is obtained; The mirror copy traffic data set corresponding to each scenario to be tested is used to perform traffic replay on the test object under the production version to obtain the first test result set corresponding to each scenario to be tested, and the first test result set is stored in the Hive database, wherein the mirror copy traffic data set of the jth scenario to be tested is obtained; wherein the initial value of j is 1, and the value range of j is [1, N], the first total number of scenarios to be tested in the scenario information to be tested is recorded as N, the date parameter in the consumed time of each mirror copy traffic data in the mirror copy traffic data set of the jth scenario to be tested is removed to obtain the data consumption day time of each mirror copy traffic data, the mirror copy traffic data in the mirror copy traffic data set of the jth scenario to be tested is sorted according to the ascending order of the data consumption day time to obtain the sorting result, the sorting result is sequentially traffic replayed to perform the jth round of testing on the test object under the production version to obtain the jth round of test results corresponding to the jth scenario to be tested, and the jth round of test results are stored in the Ath round of the Hive database. j In the partition table, the value of j is incremented by 1 to update the value of j. If the value of j does not exceed N, return to the step of obtaining the mirror copy traffic data set of the jth test scenario. If the value of j exceeds N, the first test result set is composed of the test results of the first round to the Nth round. Replaying the mirror copy traffic data sets corresponding to each scenario to be tested to test the test object under the version to be released, obtaining a second test result set corresponding to each scenario to be tested, and storing the second test result set in a Hive database; and The first test result set and the second test result set in the Hive database are compared for differences to obtain corresponding difference comparison results, and the difference comparison results are sent to a receiving terminal.

2. The data testing method based on scenario-based message queue according to claim 1 is characterized in that: The method of performing a test on the test object under the version to be released by replaying the mirror copy traffic data set corresponding to each scenario to be tested, obtaining a second test result set corresponding to each scenario to be tested, and storing the second test result set in the Hive database includes: Obtain a mirror copy traffic data set of the kth scene to be tested; wherein the initial value of k is 1, and the value range of k is [1, N], and the first total number of scenes to be tested included in the scene information to be tested is recorded as N; Remove the date parameter in the consumption time of each mirror copy traffic data in the mirror copy traffic data set of the kth scene to be tested, and obtain the data consumption day time of each mirror copy traffic data in the mirror copy traffic data set of the kth scene to be tested; Sorting each mirror copy traffic data in the mirror copy traffic data set of the kth test scenario according to the ascending order of the time of the data consumption day to obtain a sorting result; The sorting results are sequentially replayed for traffic to perform the kth round of testing on the test object under the version to be released, and the kth round of testing results corresponding to the kth test scenario are obtained. The kth round of testing results are stored in the Bth round of the Hive database. k In the partition table; Update the value of k by increasing the value of k by 1; If the value of k does not exceed N, return to the step of obtaining the mirror copy traffic data set of the kth test scenario; If the value of k exceeds N, the second test result set is composed of the test results of the first round to the Nth round.

3. The data testing method based on scenario-based message queue according to claim 1 is characterized in that: If it is determined that the i-th scenario to be tested corresponds to a single message queue message test mode, obtaining a target message queue corresponding to the i-th scenario to be tested includes: If it is determined that the i-th scenario to be tested corresponds to the single message queue message test mode, the preset first message queue selection strategy is called, and the target message queue corresponding to the i-th scenario to be tested is obtained from the message queue server cluster according to the first message queue selection strategy.

4. The data testing method based on scenario-based message queue according to claim 1 is characterized in that: If it is determined that the i-th scenario to be tested corresponds to a multi-message queue message test mode, obtaining multiple message queues corresponding to the i-th scenario to be tested to form a target message queue includes: If it is determined that the i-th test scenario corresponds to a multi-message queue message test mode, call the preset second message queue selection strategy, and obtain multiple message queues of the i-th test scenario from the message queue server cluster according to the second message queue selection strategy to form a target message queue.

5. The data testing method based on scenario-based message queue according to claim 4 is characterized in that: The step of acquiring multiple message queues of the i-th scenario to be tested from the message queue server cluster according to the second message queue selection strategy to form a target message queue includes: The selected message queue server set is determined based on the minimum test data requirement corresponding to the second message queue selection strategy and the data volume of the mirrored copy traffic data in each message queue server in the message queue server cluster, so as to ensure that the total data volume of the mirrored copy traffic data in the selected message queue server set exceeds the minimum test data requirement.

6. A data testing device based on scenario-based message queue, characterized in that: include: A test scenario information acquisition unit, configured to obtain, in response to a message queue multi-scenario test instruction, information of a scenario to be tested corresponding to the message queue multi-scenario test instruction; A target message queue acquisition unit, used for acquiring the scenarios to be tested included in the scenario information to be tested, and the target message queues corresponding to the scenarios to be tested, wherein the first total number of the scenarios to be tested included in the scenario information to be tested is recorded as N, and the i-th scenario to be tested included in the scenario information to be tested is acquired; wherein the initial value of i is 1, and the value range of i is [1, N], if it is determined that the i-th scenario to be tested corresponds to a single message queue message test mode, the target message queue corresponding to the i-th scenario to be tested is acquired, if it is determined that the i-th scenario to be tested corresponds to a multi-message queue message test mode, a plurality of message queues corresponding to the i-th scenario to be tested are acquired to form a target message queue, the value of i is incremented by 1 to update the value of i, if the value of i does not exceed N, return to execute the step of acquiring the i-th scenario to be tested included in the scenario information to be tested, if the value of i exceeds N, the target message queues corresponding to the 1st scenario to be tested to the target message queues corresponding to the Nth scenario to be tested are saved; A mirror data set acquisition unit, used to acquire a mirror copy traffic data set corresponding to each to-be-tested scenario according to a target message queue corresponding to each to-be-tested scenario and mirror copy traffic data of each target message queue; A first test result set acquisition unit is used to perform a test on the production version of the mirror copy traffic data set corresponding to each scenario to be tested by traffic replaying to obtain a first test result set corresponding to each scenario to be tested, and store the first test result set in a Hive database, wherein a mirror copy traffic data set of the jth scenario to be tested is obtained; wherein the initial value of j is 1, and the value range of j is [1, N], the first total number of scenarios to be tested included in the scenario information to be tested is recorded as N, the date parameter in the consumed time of each mirror copy traffic data in the mirror copy traffic data set of the jth scenario to be tested is removed to obtain the data consumption day time of each mirror copy traffic data, the mirror copy traffic data in the mirror copy traffic data set of the jth scenario to be tested is sorted in ascending order of the data consumption day time to obtain a sorting result, the sorting result is sequentially traffic replayed to perform the jth round of testing on the test object under the production version, and the jth round of test results corresponding to the jth scenario to be tested are obtained, and the jth round of test results are stored in the Ath round of the Hive database. j In the partition table, the value of j is incremented by 1 to update the value of j. If the value of j does not exceed N, return to the step of obtaining the mirror copy traffic data set of the jth test scenario. If the value of j exceeds N, the first test result set is composed of the test results of the first round to the Nth round. A second test result set acquisition unit is used to perform a test on the to-be-tested object under the to-be-tested version by replaying the mirror copy traffic data set corresponding to each to-be-tested scenario through traffic, obtain a second test result set corresponding to each to-be-tested scenario, and store the second test result set in a Hive database; The test result comparison unit is used to compare the first test result set and the second test result set in the Hive database to obtain corresponding difference comparison results, and send the difference comparison results to a receiving terminal.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the data testing method based on the scenario-based message queue as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to execute the data testing method based on a scenario-based message queue as described in any one of claims 1 to 5.