Replication state machine regression testing system and regression testing method
Through the design of the replication state machine regression test system, the problems of insufficient coverage of test cases and inappropriate warning information display in the replication state machine system are solved, which improves the comprehensiveness and user experience of functional testing, and ensures the adaptation of different devices. sex.
Patent Information
- Application Number
- CN202411274353.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-09-12
AI Technical Summary
In a system based on a replication state machine, there are fewer scenarios that affect memory state covered by manual selection and execution of test cases in preset scenarios, resulting in low comprehensiveness and accuracy of system functional testing, and the method of displaying early warning information is easily affected by Other visual elements are interfered with, poor user experience, and the screen size adaptation problem of different devices.
Design a replication state machine regression testing system, generate memory state and output test information through the exchange of log files and memory state information between the verification replication state machine node and the verification replication state machine node, display test warning information in response to abnormal conditions, and pass Dynamically adjust the size and position of pop-up windows to adapt to screen sizes of different devices.
It improves the comprehensiveness and accuracy of system functional testing, reduces the possibility of potential problems not being discovered, improves the user experience, and ensures that early warning information is displayed appropriately on different devices.
Smart Images

Figure CN118820115B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a replication state machine regression testing system and a regression testing method. Background Art
[0002] Systems based on replicated state machines (e.g., trading systems) ensure the normal functioning of system functions (e.g., user online trading functions) in the event of node failure or network partitioning. When a system based on replicated state machines is upgraded and new functions are added, it is often necessary to test the original functions in the upgraded system based on replicated state machines in order to detect whether the newly added functions affect the original functions of the system. Currently, when testing the original functions in a system based on replicated state machines, the method usually adopted is: manually select and execute test cases under preset scenarios in the system based on replicated state machines before the upgrade and the system based on replicated state machines after the upgrade, and compare the memory states of the two after executing the test cases.
[0003] However, when the above method is used to test the original functions in the system based on the replicated state machine, the following technical problems often occur:
[0004] First, manually select and execute test cases under preset scenarios in the system based on the replicated state machine before the upgrade and in the system based on the replicated state machine after the upgrade, and compare the memory states of the two after executing the test cases. Manually selecting and executing test cases under preset scenarios relies on the selected scenarios for testing, and covers fewer scenarios that affect the memory state, which may cause some potential problems to go undetected, resulting in low comprehensiveness and accuracy of system function testing. At the same time, only memory state verification may not cover the output function of the system (for example, output information is the response to external input), which in turn leads to low comprehensiveness and accuracy of system function testing.
[0005] Continuing, in the process of adopting technical solutions to solve the above-mentioned technical problem 1, the following technical problems often occur: in the case of abnormal system function testing, it is necessary to display the warning information. The conventional solution for displaying warning information is generally: directly display the warning information of the test on the preset page or directly display the warning information on the preset page through a pop-up window of preset position and size. However, the above conventional solution directly displays the warning information of the test on the preset page or directly displays the warning information on the preset page through a pop-up window of preset position and size, and the following problems still exist:
[0006] Second, the warning information of the test is directly displayed on the preset page. The warning information is only part of the page content. The warning information may be disturbed by other visual elements, such as advertisements, icons, etc., which distracts the user's attention and makes it difficult to focus on the warning information. The user experience is poor. At the same time, the warning information is directly displayed on the preset page through a pop-up window with a preset position and size. Different users may use devices with different screen sizes to access the page. There are significant differences in the screen sizes of different devices (such as mobile phones, tablets, laptops, desktop monitors, etc.). The preset pop-up window size and position may be suitable for a certain type of device, but it may appear too large or too small on devices of other sizes, and may even block important information on the page. This results in a poor user (tester) experience.
[0007] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0008] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0009] Some embodiments of the present disclosure propose a replication state machine regression testing system and a regression testing method to solve one or more of the technical intentions mentioned in the above background technology section.
[0010] In a first aspect, some embodiments of the present disclosure provide a replication state machine regression test system, the system comprising: a verified replication state machine node end, a to-be-verified replication state machine node end, and a regression test node terminal, wherein: the verified replication state machine node end is configured to perform the following steps: receiving various request information within a preset time sent by an external system; based on the various request information, generating a to-be-processed log file, a verified memory state information set, and an output information log file corresponding to the verified replication state machine node end; sending the verified memory state information set and the output information log file to the regression test node terminal; sending the to-be-processed log file to the to-be-verified replication state machine node end; and the to-be-verified replication state machine node end. The state machine node end is configured to generate a memory state information set to be verified and an output information log file to be verified corresponding to the above-mentioned to-be-verified copy state machine node end based on the above-mentioned to-be-processed log file, and send the above-mentioned memory state information set to be verified and the above-mentioned output information log file to be verified to the above-mentioned regression test node terminal; the above-mentioned regression test node terminal is configured to perform the following regression test steps: based on the above-mentioned verified memory state information set and the above-mentioned memory state information set to be verified, generate memory state test information; based on the above-mentioned output information log file and the above-mentioned output information log file to be verified, generate output test information; in response to detecting that the above-mentioned memory state test information or the above-mentioned output test information meets the preset test abnormality condition, display test warning information.
[0011] In a second aspect, some embodiments of the present disclosure provide a regression testing method, which includes: receiving a verified memory status information set and an output information log file sent by the verified replication state machine node end; receiving a to-be-verified memory status information set and an to-be-verified output information log file sent by the to-be-verified replication state machine node end; generating memory status test information based on the verified memory status information set and the to-be-verified memory status information set; generating output test information based on the output information log file and the to-be-verified output information log file; and displaying test warning information in response to detecting that the memory status test information or the output test information meets a preset test abnormality condition.
[0012] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the replication state machine regression test system of some embodiments of the present disclosure, the comprehensiveness and accuracy of the system function test are improved. Specifically, the reason for the low comprehensiveness and accuracy of the system function test is that: in the system based on the replication state machine before the upgrade and the system based on the replication state machine after the upgrade, the test cases under the preset scenario are manually selected and executed, and the memory states after the test cases are compared. Manually selecting and executing the test cases under the preset scenario depends on the selected scenario for testing, and the coverage of the scenarios affecting the memory state is small, which may cause some potential problems to be undiscovered, resulting in low comprehensiveness and accuracy of the system function test. At the same time, the output function of the system (for example, the output information, i.e., the response to the external input) may not be covered by only the memory state verification, which leads to low comprehensiveness and accuracy of the system function test. Based on this, the replication state machine regression test system of some embodiments of the present disclosure includes: a verified replication state machine node end, a to-be-verified replication state machine node end, and a regression test node terminal, wherein: the verified replication state machine node end is configured to perform the following steps: First, receive each request information within a preset time sent by the external system. Thus, each request information actually sent by the external system in each scenario within the preset time can be obtained. Then, based on the above-mentioned request information, the to-be-processed log file, the verified memory state information set and the output information log file corresponding to the above-mentioned verified replication state machine node end are generated. Thus, the to-be-processed log file for determining the to-be-verified memory state information set and the to-be-verified output information log file of the to-be-verified replication state machine node end can be obtained through the verified replication state machine node end. Afterwards, the above-mentioned verified memory state information set and the above-mentioned output information log file are sent to the above-mentioned regression test node terminal. Thus, the verified memory state information set and the output information log file can be sent to the regression test node terminal for the regression test node terminal to perform functional testing on the upgraded system. The above-mentioned verified memory state information set can represent the verified memory state information set corresponding to the memory state in the process of processing each request information by the system before the upgrade. The storage content of the above-mentioned output information log file is the various output information generated after the system processes each request information before the upgrade. Then, the above-mentioned to-be-processed log file is sent to the above-mentioned to-be-verified replication state machine node end. The above-mentioned replica state machine node end to be verified is configured to generate a memory state information set to be verified and a log file of output information to be verified corresponding to the above-mentioned replica state machine node end to be verified based on the above-mentioned log file to be processed, and send the above-mentioned memory state information set to be verified and the above-mentioned output information log file to be verified to the above-mentioned regression test node terminal. Thus, the replica state machine node end can generate a memory state information set to be verified and a log file of output information to be verified that represent the corresponding memory state in the process of the system processing each request information to be processed after the upgrade based on the log file to be processed.The above-mentioned output information log file to be verified can represent each output information generated after the upgraded system processes each request information. Afterwards, the above-mentioned regression test node terminal is configured to perform the following regression test steps: based on the above-mentioned verified memory state information set and the above-mentioned memory state information set to be verified, memory state test information is generated. Thus, memory state test information representing whether the memory state of the system in the process of processing each information before and after the upgrade is consistent can be generated through the regression test node end. Afterwards, output test information is generated based on the above-mentioned output information log file and the above-mentioned output information log file to be verified. Thus, output test information representing whether the external output function (response to external input) of the system before and after the upgrade is consistent can be generated. Finally, in response to detecting that the above-mentioned memory state test information or the above-mentioned output test information meets the preset test abnormality condition, the test warning information is displayed. Also because the verified replication state machine node end is adopted, the verified memory state information set representing the process of the system processing each request information in each scene before the upgrade and the output information log file storing each output information (response to external input) are generated. Through the node end of the to-be-verified replication state machine, a set of to-be-verified memory state information is generated to represent the process of the system processing each request information in each scenario after the upgrade, and each output information (response to external input) generated after the system processes each request information in each scenario after the upgrade. The coverage of test cases for each scenario that affects the memory state is improved, and the possibility of some potential problems going undiscovered is reduced. This improves the comprehensiveness and accuracy of system function testing. Through the regression test node terminal, memory state test information is generated to represent whether the memory state of the system in the process of processing each information before and after the upgrade is consistent, and output test information is generated to represent whether the system's external output function (response to external input) is consistent before and after the upgrade. Combined with the verification of the memory state of the system processing information and the verification of the output function, the comprehensiveness and accuracy of the system function testing are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0014] Figure 1 is an architectural diagram of an exemplary system of a replicated state machine regression testing system according to the present disclosure;
[0015] Figure 2 Flowchart of some embodiments of the regression testing method according to the present disclosure. DETAILED DESCRIPTION
[0016] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0017] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0018] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0019] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0020] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0021] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0022] Figure 1 An exemplary system architecture 100 of a heterogeneous data exchange system is shown to which some embodiments of the present disclosure may be applied.
[0023] like Figure 1 As shown, the system architecture 100 may include: a verified copy state machine node end 101, a to-be-verified copy state machine node end 102, and a regression test node terminal 103. Among them, the verified copy state machine node end 101 and the to-be-verified copy state machine node end 102 may be connected via a medium of a communication link. The to-be-verified copy state machine node end 102 and the regression test node terminal 103 may be connected via a medium of a communication link. The medium of the above-mentioned communication link may be a physical medium or method for transmitting data, such as a wired or wireless communication link or an optical fiber cable, etc.
[0024] In some embodiments, the verified replication state machine node 101 may be configured to perform the following steps:
[0025] The first step is to receive various request information sent by the external system within a preset time. The external system may refer to various transaction systems. Each of the request information may be a request information sent by various transaction systems. For example, the request information may be order information.
[0026] Among them, the verified replication state machine node end includes a verified replication state machine node (a replication state machine in a verified version), a timed task node (timed thread), and a verified core task node (core thread). The verified replication state machine node can represent a replication state machine set in the verified replication state machine node end before the system upgrade (for example, a trading system), and can be used to process (consume) each piece of information in the log file to be processed, and generate each piece of output information corresponding to each piece of information. The verified core task node can be a thread node set in the verified replication state machine node end for reading log files, processing various messages, driving the memory state change of the verified replication state machine node, and driving the verified replication state machine node to generate output information. Each of the above-mentioned output information can be the information generated by the verified replication state machine node processing one of the pieces of information in the above-mentioned log file to be processed. For example, the output information can be an SQL statement. The timed task node can be a task node set in the verified replication state machine node end for periodically generating heartbeat messages and adding each heartbeat message to a preset log file.
[0027] The above-mentioned replication state machine node end to be verified includes a replication state machine node to be verified (a replication state machine in the version to be verified) and a core task node to be verified (core thread). The above-mentioned replication state machine node to be verified may be a replication state machine set in the replication state machine node end to be verified. The above-mentioned core task node to be verified may be a thread node set in the replication state machine node end to read preset log files, process various messages, drive the memory state change of the replication state machine node to be verified, and drive the replication state machine node to be verified to generate output information corresponding to the above-mentioned various messages.
[0028] It should be noted that each node in the present application can be hardware, software, or even a function in the software.
[0029] The second step is to generate a to-be-processed log file, a verified memory state information set and an output information log file corresponding to the verified replicated state machine node end based on the above-mentioned request information. Among them, the above-mentioned to-be-processed log file can be a log file used to store each request information and each heartbeat message. Each verified memory state information in the above-mentioned verified memory state information set can represent the information corresponding to the memory state after the verified replicated state machine node is changed. The verified memory state information set can represent the verified memory state information set corresponding to the memory state in the process of processing each request information by the verified core task node before the upgrade. For example, the information corresponding to the above-mentioned memory state can be represented by the hash value of the memory state. The above-mentioned output information log file can be used to store each output information. The storage content of the above-mentioned output information log file can be each output information generated after the verified replicated state machine node processes each request information before the upgrade (representing each output information generated after processing each request information before the system upgrade).
[0030] In some optional implementations of some embodiments, the verified replication state machine node end 101 may generate a to-be-processed log file, a verified memory state information set, and an output information log file corresponding to the verified replication state machine node end based on the above-mentioned request information through the following steps:
[0031] The first step is to add the above-mentioned various request information to the preset log file, and the above-mentioned timing task node adds each heartbeat message to the above-mentioned preset log file. Wherein, each heartbeat message in the above-mentioned various heartbeat messages includes a message identifier and a heartbeat message timestamp. In practice, the verified replication state machine node in the above-mentioned verified replication state machine node end can add the above-mentioned various request information to the preset log file one by one according to the preset order. At the same time, in the process that the verified replication state machine node adds the above-mentioned various request information to the preset log file one by one according to the preset order, the above-mentioned timing task node can generate a heartbeat message according to a preset time interval, and add the generated heartbeat message to the request information being added at this moment. As an example, the information content in the above-mentioned preset log file can be expressed as "request information 1, request information 2, heartbeat message 1, request information 3, request information 4, heartbeat message 2, request information 5". The "1" in the above-mentioned "request information 1" can be the sequence number of the request information. The "1" in the above-mentioned "heartbeat message 1" can represent the sequence number generated by the heartbeat message.
[0032] In the second step, the preset log file to which the above-mentioned request information and the above-mentioned heartbeat messages are added is determined as the log file to be processed.
[0033] In the third step, the verified core task node processes each piece of information in the log file to be processed, and performs the following processing steps for each heartbeat message in each heartbeat message in the log file to be processed:
[0034] The first sub-step is, in response to processing the heartbeat message, driving the verified replication state machine node to generate output information corresponding to the heartbeat message, and driving the verified replication state machine node to change the memory state. The output information corresponding to the heartbeat message can be information generated by the verified replication state machine node during the processing of the heartbeat message. For example, the output information corresponding to the heartbeat message can be a SQL statement generated by processing the heartbeat message.
[0035] The second sub-step is to save the generated output information to a preset output log file to update the preset output log file. The preset output log file can be used to store a log file of the output information.
[0036] In the third sub-step, the information corresponding to the memory state after the verified replication state machine node is changed is determined as the verified memory state information, wherein the verified memory state information corresponds to the heartbeat message.
[0037] In the fourth step, each verified memory state information is determined as a verified memory state information set.
[0038] The fifth step is to determine the updated preset output log file as the output information log file.
[0039] The third step is to send the verified memory status information set and the output information log file to the regression test node terminal.
[0040] The fourth step is to send the above-mentioned log file to be processed to the above-mentioned replication state machine node end to be verified.
[0041] In some embodiments, the above-mentioned replica state machine node 102 can be configured to generate a memory state information set to be verified and a log file of output information to be verified corresponding to the above-mentioned replica state machine node based on the above-mentioned log file to be processed, and send the above-mentioned memory state information set to be verified and the above-mentioned log file of output information to be verified to the above-mentioned regression test node terminal. The above-mentioned regression test node terminal can be a physical device, or a virtual machine or a cloud instance.
[0042] In some optional implementations of some embodiments, the above-mentioned to-be-verified replication state machine node end 102 may generate a to-be-verified memory state information set and a to-be-verified output information log file corresponding to the above-mentioned to-be-verified replication state machine node end based on the above-mentioned to-be-processed log file through the following steps:
[0043] In the first step, the core task node to be verified processes each piece of information in the log file to be processed, and performs the following regression processing steps for each heartbeat message in each heartbeat message in the log file to be processed:
[0044] The first sub-step is, in response to processing the heartbeat message, driving the above-mentioned replication state machine node to generate the output information to be verified corresponding to the above-mentioned heartbeat message, and driving the above-mentioned replication state machine node to be verified to change the memory state. The above-mentioned output information to be verified can be the output information corresponding to the heartbeat message generated by the replication state machine node to be verified processing the heartbeat message.
[0045] The second sub-step is to save the generated output information to be verified to a preset output log file to be verified, so as to update the preset output log file to be verified.
[0046] In the third sub-step, the information corresponding to the memory state of the changed replication state machine node to be verified is determined as the memory state information to be verified, wherein the memory state information to be verified corresponds to the heartbeat message.
[0047] The second step is to determine the determined memory state information to be verified as a memory state information set to be verified, wherein the memory state information set to be verified may represent the memory state information to be verified in the process of the upgraded system processing each request information in each scenario.
[0048] The third step is to determine the updated preset output log file to be verified as the output information log file to be verified. The above output information log file to be verified may include each output information generated after the upgraded replication state machine node (system) to be verified processes each request information.
[0049] In some optional implementations of some embodiments, the information corresponding to the memory state after the change of the above-mentioned to-be-verified replication state machine node is generated by the to-be-verified core task node through the following steps:
[0050] The first step is to obtain preset hash function information from a preset database. The hash function information may represent a hash function. For example, the preset database may be a MySQL database.
[0051] The second step is to extract the information to be converted from the preset storage location of the memory corresponding to the to-be-verified replica state machine node after the memory state is changed. In practice, the above-mentioned to-be-verified core task node can obtain the storage information from the preset storage location of the memory corresponding to the to-be-verified replica state machine node after the memory state is changed as the extracted information to be converted. Among them, the above-mentioned preset storage location can be a pre-defined data storage area.
[0052] The third step is to perform a hash conversion process on the information to be converted according to the preset hash function information to obtain a conversion hash value corresponding to the information to be converted. In practice, the core task node to be verified can perform a hash operation on the information to be converted according to the hash function corresponding to the preset hash function information to obtain a conversion hash value.
[0053] The fourth step is to determine the above conversion hash value as the information corresponding to the above memory state.
[0054] In some embodiments, the regression test node terminal 103 may be configured to perform the following steps:
[0055] The first step is to generate memory state test information based on the verified memory state information set and the memory state information set to be verified. In practice, the node end of the replication state machine to be verified can perform regression testing on the replication state machine to be verified through containerization technology and CI / CD pipeline. Among them, the memory state test information can indicate whether the memory states of the verified replication state machine node end (before upgrade) and the replication state machine node end to be verified (after upgrade) are consistent in processing various information before and after the upgrade.
[0056] The second step is to generate output test information based on the output information log file and the output information log file to be verified. The output test information can indicate whether the external output function (response to external input) of the verified replication state machine node end (before upgrade) and the replication state machine node end to be verified (after upgrade) when processing each information before and after the upgrade is consistent.
[0057] The third step is to display test warning information in response to detecting that the memory state test information or the output test information meets a preset test abnormality condition, wherein the preset test abnormality condition may be a test information characterization test abnormality.
[0058] In some optional implementations of some embodiments, the regression test node terminal 103 may generate memory state test information based on the verified memory state information set and the memory state information set to be verified by the following steps:
[0059] In the first step, for each verified memory status information in the verified memory status information set, the following steps are performed:
[0060] The first sub-step is to determine the heartbeat message corresponding to the verified memory status information.
[0061] In a second sub-step, the memory state information to be verified corresponding to the heartbeat message in the memory state information set to be verified is determined as target memory state information to be verified.
[0062] In the third sub-step, the similarity between the verified memory state information and the target memory state information to be verified is determined as the target similarity, wherein the similarity can be represented by the Hamming distance.
[0063] In the second step, in response to determining that the determined similarities of each target are equal to a preset value, the information representing that the test is normal is determined as the memory status test information. The preset value may be 1. The information representing that the test is normal may be represented by a Boolean value, a status code or text information. For example, when represented by a Boolean value, the information representing that the test is normal may be "true".
[0064] In the third step, in response to determining that at least one of the target similarities is less than the preset value, the information characterizing the test abnormality is determined as memory status test information. The information characterizing the test abnormality can be represented by a Boolean value, a status code, or text information. For example, when represented by a Boolean value, the information characterizing the test abnormality can be "false".
[0065] In some optional implementations of some embodiments, the regression test node terminal 103 may generate output test information based on the output information log file and the output information log file to be verified by the following steps:
[0066] In the first step, the hash value of the output information log file is determined as the target hash value.
[0067] In the second step, the hash value of the output information log file to be verified is determined as the hash value to be verified.
[0068] In a third step, in response to determining that the target hash value is the same as the hash value to be verified, information indicating that the test is normal is determined as output test information.
[0069] In a fourth step, in response to determining that the target hash value is different from the hash value to be verified, information characterizing the test abnormality is determined as output test information.
[0070] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the replication state machine regression test system of some embodiments of the present disclosure, the comprehensiveness and accuracy of the system function test are improved. Specifically, the reason for the low comprehensiveness and accuracy of the system function test is that: in the system based on the replication state machine before the upgrade and the system based on the replication state machine after the upgrade, the test cases under the preset scenario are manually selected and executed, and the memory states after the test cases are compared. Manually selecting and executing the test cases under the preset scenario depends on the selected scenario for testing, and the coverage of the scenarios affecting the memory state is small, which may cause some potential problems to be undiscovered, resulting in low comprehensiveness and accuracy of the system function test. At the same time, the output function of the system (for example, the output information, i.e., the response to the external input) may not be covered by only the memory state verification, which leads to low comprehensiveness and accuracy of the system function test. Based on this, the replication state machine regression test system of some embodiments of the present disclosure includes: a verified replication state machine node end, a to-be-verified replication state machine node end, and a regression test node terminal, wherein: the verified replication state machine node end is configured to perform the following steps: First, receive each request information within a preset time sent by the external system. Thus, each request information actually sent by the external system in each scenario within the preset time can be obtained. Then, based on the above-mentioned request information, the to-be-processed log file, the verified memory state information set and the output information log file corresponding to the above-mentioned verified replication state machine node end are generated. Thus, the to-be-processed log file for determining the to-be-verified memory state information set and the to-be-verified output information log file of the to-be-verified replication state machine node end can be obtained through the verified replication state machine node end. Afterwards, the above-mentioned verified memory state information set and the above-mentioned output information log file are sent to the above-mentioned regression test node terminal. Thus, the verified memory state information set and the output information log file can be sent to the regression test node terminal for the regression test node terminal to perform functional testing on the upgraded system. The above-mentioned verified memory state information set can represent the verified memory state information set corresponding to the memory state in the process of processing each request information by the system before the upgrade. The storage content of the above-mentioned output information log file is the various output information generated after the system processes each request information before the upgrade. Then, the above-mentioned to-be-processed log file is sent to the above-mentioned to-be-verified replication state machine node end. The above-mentioned replica state machine node end to be verified is configured to generate a memory state information set to be verified and a log file of output information to be verified corresponding to the above-mentioned replica state machine node end to be verified based on the above-mentioned log file to be processed, and send the above-mentioned memory state information set to be verified and the above-mentioned output information log file to be verified to the above-mentioned regression test node terminal. Thus, the replica state machine node end can generate a memory state information set to be verified and a log file of output information to be verified that represent the corresponding memory state in the process of the system processing each request information to be processed after the upgrade based on the log file to be processed.The above-mentioned output information log file to be verified can represent each output information generated after the upgraded system processes each request information. Afterwards, the above-mentioned regression test node terminal is configured to perform the following regression test steps: based on the above-mentioned verified memory state information set and the above-mentioned memory state information set to be verified, memory state test information is generated. Thus, memory state test information representing whether the memory state of the system in the process of processing each information before and after the upgrade is consistent can be generated through the regression test node end. Afterwards, output test information is generated based on the above-mentioned output information log file and the above-mentioned output information log file to be verified. Thus, output test information representing whether the external output function (response to external input) of the system before and after the upgrade is consistent can be generated. Finally, in response to detecting that the above-mentioned memory state test information or the above-mentioned output test information meets the preset test abnormality condition, the test warning information is displayed. Also because the verified replication state machine node end is adopted, the verified memory state information set representing the process of the system processing each request information in each scene before the upgrade and the output information log file storing each output information (response to external input) are generated. Through the node end of the to-be-verified replication state machine, a set of to-be-verified memory state information is generated to represent the process of the system processing each request information in each scenario after the upgrade, and each output information (response to external input) generated after the system processes each request information in each scenario after the upgrade. The coverage of test cases for each scenario that affects the memory state is improved, and the possibility of some potential problems going undiscovered is reduced. This improves the comprehensiveness and accuracy of system function testing. Through the regression test node terminal, memory state test information is generated to represent whether the memory state of the system in the process of processing each information before and after the upgrade is consistent, and output test information is generated to represent whether the system's external output function (response to external input) is consistent before and after the upgrade. Combined with the verification of the memory state of the system processing information and the verification of the output function, the comprehensiveness and accuracy of the system function testing are improved.
[0071] Figure 2 The process 200 of some embodiments of the regression testing method of the regression testing node terminal included in the above-mentioned replication state machine regression testing system according to the present disclosure is shown. The regression testing method includes the following steps:
[0072] Step 201, receiving a verified memory state information set and an output information log file sent by a verified replication state machine node.
[0073] In some embodiments, the execution subject of the regression testing method (eg, a regression testing node terminal included in the replication state machine regression testing system) may receive the verified memory state information set and output information log file sent by the verified replication state machine node terminal.
[0074] Step 202: Receive a memory state information set to be verified and a log file of output information to be verified sent by a node of a replica state machine to be verified.
[0075] In some embodiments, the execution subject may receive a memory state information set to be verified and a log file of output information to be verified sent by the node of the replication state machine to be verified.
[0076] Step 203: Generate memory status test information based on the verified memory status information set and the memory status information set to be verified.
[0077] In some embodiments, the execution entity may generate memory status test information based on the verified memory status information set and the to-be-verified memory status information set.
[0078] Step 204: Generate output test information based on the output information log file and the output information log file to be verified.
[0079] In some embodiments, the execution entity may generate output test information based on the output information log file and the output information log file to be verified.
[0080] Step 205 , in response to detecting that the memory status test information or the output test information meets a preset test abnormality condition, displaying a test warning message.
[0081] In some optional implementations of some embodiments, the execution subject may display the test warning information through the following steps:
[0082] The first step is to obtain preset pop-up window display information from a preset database, wherein the preset pop-up window display information includes pop-up window type information, pop-up window color information, pop-up window position information, and pop-up window size information. The preset pop-up window display information may be the initial preset pop-up window display information. The pop-up window size information may include the initial preset pop-up window length and the initial preset pop-up window width. The pop-up window type information may indicate the type of pop-up window containing the test warning information. The pop-up window color information may indicate the color of the pop-up window to be displayed.
[0083] The second step is to display a pop-up window containing the test warning information corresponding to the preset pop-up window display information on the preset test warning page. The preset test warning page can be a page for displaying test warning information for access by a preset device (such as a mobile phone, tablet, laptop, desktop monitor, etc.).
[0084] In the third step, the time for displaying the above pop-up window is determined as the pop-up window display time.
[0085] The fourth step is to monitor the size change of the preset test alarm page within a preset time period after the above pop-up window is displayed, and obtain the monitoring result. In practice, the above execution subject can monitor the size change of the defect rate graphical display interface through an event handler that monitors the window size change, and obtain the monitoring result. In practice, the above execution subject can monitor the size change of the preset test alarm page of its own device or other devices that log in to the preset test alarm page through an event handler that monitors the window size change, and obtain the monitoring result. Among them, the above monitoring result can indicate whether the size of the preset test alarm page has changed.
[0086] Step 5: In response to determining that the monitoring result indicates that the preset test alarm page size has changed, the following update display step is performed:
[0087] In a first sub-step, the size information of the changed preset test alarm page is determined as the target page size information, wherein the target page size information includes a target page length and a target page width.
[0088] The second sub-step is to determine the location information of the changed preset test alarm page as the target page location information, wherein the target page location information includes the page center location information. The page center location information may represent the location of the exact center of the visible area of the page. As an example, if the target page length is 1000 pixels and the target page width is 800 pixels, then the page center location information may be (500 pixels, 400 pixels).
[0089] In the third sub-step, the product of the target page length in the target page size information and the first predefined ratio is determined as the pop-up window length. As an example, the target page length may be 1000 pixels, the first predefined ratio may be 1 / 5, and the pop-up window length may be 800 pixels×(1 / 5)=200 pixels.
[0090] In the fourth sub-step, the product of the target page width in the target page size information and the second predefined ratio is determined as the pop-up window width. As an example, the target page length may be 800 pixels, the second predefined ratio may be 1 / 5, and the pop-up window length may be 1000 pixels × (1 / 5) = 160 pixels.
[0091] In a fifth sub-step, the pop-up window length and the pop-up window width are determined as the pop-up window size information to be updated.
[0092] The sixth sub-step is to determine the above page center point position information as the pop-up window center point position information.
[0093] The seventh sub-step is to determine the position information of the area corresponding to the above pop-up window center point position information, the above pop-up window length, and the above pop-up window width in the preset test alarm page as the pop-up window position information to be updated. Among them, the position information of the above area can be the coordinates of each vertex of the pop-up window. As an example, the center point position information of the page can be (500 pixels, 400 pixels), the pop-up window length can be 200 pixels, and the pop-up window width can be 160 pixels, then the position information of the corresponding area can be "the upper left corner vertex coordinates can be: (400 pixels, 480 pixels), the lower left corner vertex coordinates can be: (400 pixels, 320 pixels), the upper right corner vertex coordinates can be (600 pixels, 480 pixels), and the lower right corner vertex coordinates can be: (600 pixels, 320 pixels)".
[0094] An eighth sub-step is to replace the pop-up window size information and the pop-up window position information in the above-mentioned preset pop-up window display information with the above-mentioned pop-up window size information to be updated and the above-mentioned pop-up window position information to be updated, so as to update the preset pop-up window display information.
[0095] The ninth sub-step is to close the displayed pop-up window, and according to the updated preset pop-up window display information, display a pop-up window containing the test warning information corresponding to the above-mentioned updated preset pop-up window display information on the preset test alarm page.
[0096] The above technical solution and its related contents, as an inventive point of an embodiment of the present disclosure, solve the second technical problem mentioned in the background technology, "The warning information of the test is directly displayed on the preset page. The warning information is only part of the page content. The warning information may be interfered with by other visual elements, such as advertisements, icons, etc., which distracts the user's attention and makes it difficult to focus on the warning information. The user experience is poor. At the same time, the warning information is directly displayed on the preset page through a pop-up window of preset position and size. Different users may use devices with different screen sizes to access the page. There are significant differences in the screen sizes of different devices (such as mobile phones, tablets, laptops, desktop monitors, etc.). The preset pop-up window size and position may be suitable for a certain type of device, but it may appear too large or too small on devices of other sizes, and may even block important information on the page. The user (tester) experience is poor." The factors that lead to the poor user (tester) experience are often as follows: the warning information of the test is directly displayed on the preset page. The warning information is only part of the page content. The warning information may be interfered with by other visual elements, such as advertisements, icons, etc., which distracts the user's attention and makes it difficult to focus on the warning information. The user experience is poor. At the same time, the warning information is directly displayed on the preset page through a pop-up window of preset position and size. Different users may use devices of different screen sizes to access the page, and the screen sizes of different devices (such as mobile phones, tablets, laptops, desktop monitors, etc.) are significantly different. The preset pop-up window size and position may be suitable for a certain type of device, but it appears too large or too small on devices of other sizes, and may even block important information on the page. This leads to a poor user (tester) experience. This leads to a poor user (tester) experience. If the above factors are solved, the effect of improving the user (tester) experience can be achieved. In order to achieve this effect, the present disclosure adopts the following steps: First, the preset pop-up window display information is obtained from the preset database, wherein the preset pop-up window display information includes pop-up window type information, pop-up window color information, pop-up window position information, and pop-up window size information. Thus, the initial preset pop-up window display information can be obtained. Then, the pop-up window containing the above test warning information corresponding to the preset pop-up window display information is displayed on the preset test alarm page. Thus, a pop-up window corresponding to the initial preset pop-up window display information can be displayed in the device accessing the preset test alarm page. Afterwards, the time for displaying the above pop-up window is determined as the pop-up window display time. Then, within the preset time period after the above pop-up window display time, the size change of the preset test alarm page is monitored to obtain the monitoring result. When the user uses a device with a different screen size to access the page, the pop-up window display size corresponding to the initial preset pop-up window display information is too large or too small on the device screen. The user may zoom in or out of the page to control the size of the pop-up window relative to the page. Therefore, the size change of the pop-up window can be monitored within the preset time period to determine whether the pop-up window displayed by the initial preset pop-up window display information is appropriate.Next, in response to determining that the above monitoring result indicates that the size of the preset test alarm page has changed, the following update display steps are performed: the first step is to determine the size information of the preset test alarm page after the change as the target page size information, wherein the target page size information includes the target page length and the target page width. Thus, the size information of the preset test alarm page after the change can be determined. The second step is to determine the position information of the preset test alarm page after the change as the target page position information, wherein the target page position information includes the page center point position information. Thus, the position information of the preset test alarm page after the change can be determined. The third step is to determine the product of the target page length in the target page size information and the first predefined ratio as the pop-up window length. Thus, the pop-up window length suitable for the preset test alarm page after the change can be determined according to the target page length and the first predefined ratio. The fourth step is to determine the product of the target page width in the target page size information and the second predefined ratio as the pop-up window width. Thus, the pop-up window width suitable for the preset test alarm page after the change can be determined. The fifth step is to determine the pop-up window length and the pop-up window width as the pop-up window size information to be updated. Thus, the pop-up window size information suitable for the preset test alarm page after the change can be determined. The sixth step is to determine the above-mentioned page center point position information as the pop-up window center point position information. Thus, the pop-up window center point position information can be used to determine the pop-up window position information to be updated. The seventh step is to determine the position information of the area corresponding to the above-mentioned pop-up window center point position information, the above-mentioned pop-up window length, and the above-mentioned pop-up window width in the preset test alarm page as the pop-up window position information to be updated. Thus, the pop-up window position information to be updated suitable for the preset test alarm page after the change can be determined. The eighth step is to replace the pop-up window size information and pop-up window position information in the above-mentioned preset pop-up window display information with the above-mentioned pop-up window size information to be updated and the above-mentioned pop-up window position information to be updated, so as to update the preset pop-up window display information. Thus, the preset pop-up window display information can be updated. The ninth step is to close the displayed pop-up window, and according to the updated preset pop-up window display information, display the pop-up window containing the above-mentioned test warning information on the preset test alarm page. Thus, the pop-up window corresponding to the preset test alarm page after the size change can be displayed on the preset test alarm page after the size change. Also, because the size change of the preset test alarm page is monitored within the preset time, according to the monitoring result, when the size of the preset test alarm page changes, according to the preset test alarm page after the size change in the device accessing the page, the updated preset pop-up window display information suitable for the preset test alarm page after the size change is determined. After closing the pop-up window corresponding to the original initial preset pop-up window display information, a pop-up window suitable for the preset test alarm page after the change is displayed, which improves the user experience.At the same time, displaying the warning information through a pop-up window has a stronger visual highlighting effect than directly displaying the warning information on the preset page, which makes it easier for users (tester) to focus on the test warning information, thereby improving the user experience.
[0097] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through the regression test method of the regression test node terminal included in the above-mentioned replication state machine regression test system according to some embodiments of the present disclosure, the comprehensiveness and accuracy of the system function test are improved. Specifically, the reason for the low comprehensiveness and accuracy of the system function test is that only the memory state verification of the system based on the replication state machine before and after the upgrade may not cover the output function of the system (for example, the output information is the response to the external input), which leads to the low comprehensiveness and accuracy of the system function test. Based on this, the regression test method of the regression test node terminal included in the above-mentioned replication state machine regression test system according to some embodiments of the present disclosure includes: first, receiving the verified memory state information set and output information log file sent by the verified replication state machine node end. Thus, the verified memory state information set and the output information log file storing each output information (response to external input) in the process of processing each request information in each scenario before the upgrade can be obtained. Then, the memory state information set to be verified and the output information log file to be verified sent by the above-mentioned replication state machine node end to be verified are received. Thus, a memory state information set to be verified and an output information log file to be verified that stores each output information to be verified (response to external input) in the process of processing each request information in each scenario after the upgrade can be obtained. Then, based on the above-mentioned verified memory state information set and the above-mentioned memory state information set to be verified, memory state test information is generated. Thus, memory state test information is generated to characterize whether the memory state of the system in the process of processing each information before and after the upgrade is consistent. Then, based on the above-mentioned output information log file and the above-mentioned output information log file to be verified, output test information is generated. Thus, output test information is generated to characterize whether the external output function (response to external input) of the system before and after the upgrade is consistent. Finally, in response to detecting that the above-mentioned memory state test information or the above-mentioned output test information meets the preset test abnormality condition, the test warning information is displayed. Since the memory state test information characterizing whether the memory state of the system in the process of processing each information before and after the upgrade is consistent and the output test information characterizing whether the external output function (response to external input) of the system before and after the upgrade is consistent is generated. Combined with the memory state verification and output function verification of the system processing information, the comprehensiveness and accuracy of the system function test are improved.
[0098] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of technical features, but should also cover other technical solutions formed by any combination of technical features or their equivalent features without departing from the inventive concept. For example, a technical solution formed by replacing a feature with a technical feature with similar functions disclosed in the embodiments of the present disclosure (but not limited to).
Claims
1. A replication state machine regression test system, comprising a verified replication state machine node end, a to-be-verified replication state machine node end, and a regression test node terminal, wherein: The verified replication state machine node is configured to perform the following steps: Receive various request information sent by the external system within a preset time; Based on the respective request information, a to-be-processed log file, a verified memory state information set and an output information log file corresponding to the verified replication state machine node end are generated; Sending the verified memory status information set and the output information log file to the regression test node terminal; Sending the log file to be processed to the node end of the replication state machine to be verified; The to-be-verified replication state machine node end is configured to generate a to-be-verified memory state information set and a to-be-verified output information log file corresponding to the to-be-verified replication state machine node end based on the to-be-processed log file, and send the to-be-verified memory state information set and the to-be-verified output information log file to the regression test node terminal, wherein the to-be-verified replication state machine node end includes a to-be-verified replication state machine node and a to-be-verified core task node, and the to-be-verified replication state machine node end is further configured to generate a to-be-verified memory state information set and a to-be-verified output information log file corresponding to the to-be-verified replication state machine node end based on the to-be-processed log file through the following steps: The core task node to be verified processes each piece of information in the log file to be processed, and performs the following regression processing steps for each heartbeat message in each heartbeat message in the log file to be processed: In response to processing the heartbeat message, driving the to-be-verified replication state machine node to generate to-be-verified output information corresponding to the heartbeat message, and driving the to-be-verified replication state machine node to change a memory state; Saving the generated output information to be verified to a preset output log file to be verified, so as to update the preset output log file to be verified; Determine information corresponding to the memory state after the change of the to-be-verified replication state machine node as the to-be-verified memory state information, wherein the to-be-verified memory state information corresponds to the heartbeat message; Determine the determined individual pieces of memory state information to be verified as a memory state information set to be verified; Determine the updated preset output log file to be verified as the output information log file to be verified; The regression test node terminal is configured to perform the following regression test steps: Generate memory status test information based on the verified memory status information set and the memory status information set to be verified, wherein the regression test node terminal is further configured to generate memory status test information based on the verified memory status information set and the memory status information set to be verified by the following steps: For each verified memory state information in the verified memory state information set, the following steps are performed: Determine a heartbeat message corresponding to the verified memory status information; Determine the memory status information to be verified corresponding to the heartbeat message in the memory status information to be verified as the target memory status information to be verified; Determine the similarity between the verified memory state information and the target memory state information to be verified as a target similarity; In response to determining that the determined similarities of each target are equal to a preset value, determining information indicating that the test is normal as memory state test information; In response to determining that at least one target similarity among the respective target similarities is less than the preset value, determining the information characterizing the test abnormality as memory state test information; Based on the output information log file and the output information log file to be verified, output test information is generated, wherein the regression test node terminal is further configured to generate output test information based on the output information log file and the output information log file to be verified through the following steps: Determine the hash value of the output information log file as a target hash value; Determine the hash value of the output information log file to be verified as the hash value to be verified; In response to determining that the target hash value is the same as the hash value to be verified, determining information indicating that the test is normal as output test information; In response to determining that the target hash value is different from the hash value to be verified, determining information characterizing the test abnormality as output test information; In response to detecting that the memory status test information or the output test information meets a preset test abnormality condition, a test warning message is displayed.
2. The replication state machine regression testing system according to claim 1, wherein: The verified replication state machine node end includes a verified replication state machine node, a timed task node, and a verified core task node. The verified replication state machine node end is further configured to generate a to-be-processed log file, a verified memory state information set, and an output information log file corresponding to the verified replication state machine node end based on each request information through the following steps: Adding each request information to a preset log file, and the scheduled task node adding each heartbeat message to the preset log file, wherein each of the heartbeat messages includes a message identifier and a heartbeat message timestamp; Determine the preset log file to which each request information and each heartbeat message are added as the log file to be processed; The verified core task node processes each piece of information in the log file to be processed, and performs the following processing steps for each heartbeat message in each heartbeat message in the log file to be processed: In response to processing the heartbeat message, driving the verified replication state machine node to generate output information corresponding to the heartbeat message, and driving the verified replication state machine node to change the memory state; Saving the generated output information to a preset output log file to update the preset output log file; Determine the information corresponding to the memory state after the verified replication state machine node is changed as the verified memory state information, wherein the verified memory state information corresponds to the heartbeat message; Determine the determined individual verified memory state information as a verified memory state information set; The updated preset output log file is determined as the output information log file.
3. A regression testing method, applied to the regression testing node terminal included in the replication state machine regression testing system according to any one of claims 1-2, the method comprising: Receiving a verified memory state information set and an output information log file sent by the verified replication state machine node end; Receiving a memory state information set to be verified and an output information log file to be verified sent by the node end of the replica state machine to be verified; Generate memory state test information based on the verified memory state information set and the to-be-verified memory state information set; Generate output test information based on the output information log file and the output information log file to be tested; In response to detecting that the memory status test information or the output test information meets a preset test abnormality condition, a test warning message is displayed.
Citation Information
Patent Citations
Derivative trading system and device based on replication state machine and computer medium
CN117422556A
Replication state machine monitoring method and device and computer medium
CN118069468A
