Baffle plate testing method and device

By providing a baffle testing method and device in the field of banking business testing, it solves the static response, high usage threshold and security risks problems existing in the interaction of complex external systems, and realizes an efficient and flexible testing environment and improves the Test efficiency and coverage.

CN119420540AActive Publication Date: 2025-02-11CHINA CONSTRUCTION BANK +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411544609.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-11
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

Traditional baffle tools have static response, high usage threshold and potential security risks in the field of banking business testing, making it difficult to meet the complex and dynamic external system interaction needs.

Method used

Provide a baffle testing method and device, by receiving request messages sent by the system to be tested, obtaining transaction information based on transaction identification code information, determining the target system type, adjusting the request messages, and generating target response messages, supporting multiple sets of Test the environment to send concurrent requests and make full use of system resources.

Benefits of technology

It realizes high simulation of external system interaction, reduces the complexity and time cost of test preparation, improves test coverage and response speed, reduces the work burden of developers, and improves testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420540A_ABST
    Figure CN119420540A_ABST
Patent Text Reader

Abstract

The invention discloses a baffle testing method and device, relates to the technical field of testing and can also be used in the financial field, and the method comprises the steps that first request messages sent by at least one to-be-tested system are received, and each first request message comprises transaction identification code information; according to the transaction identification code information of each first request message, obtaining transaction information of a current transaction corresponding to the first request message; based on the transaction information corresponding to each first request message, determining a target system type corresponding to the first request message; according to the target system type corresponding to each first request message, adjusting the first request message to obtain a second request message corresponding to the first request message; and according to the second request message corresponding to each first request message, generating a target response message of the first request message. The method can support concurrent requests of multiple sets of test environments, and system resources are fully utilized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of testing technology and can also be used in the financial field, in particular to a baffle testing method and device. Background Art

[0002] Faced with the increasing dependence and complexity of external systems in the software development industry, especially in the field of banking business testing, building an efficient and flexible testing environment has become the key to improving development efficiency and ensuring system quality. In this context, the importance of baffle services as an effective means of simulating external system interactions has become increasingly prominent. However, the limitations of traditional baffle tools, such as static response, high usage threshold and potential security risks, urgently require a new type of baffle tool.

[0003] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section. Summary of the invention

[0004] The embodiment of the present invention provides a baffle testing method to support concurrent requests from multiple test environments and fully utilize system resources. The method includes:

[0005] Receiving a first request message sent by at least one system under test, wherein each of the first request messages includes transaction identification code information;

[0006] According to the transaction identification code information of each first request message, acquiring transaction information of a current transaction corresponding to the first request message from the architecture management system;

[0007] Determining a target system type corresponding to each first request message based on the transaction information corresponding to the first request message;

[0008] According to the target system type corresponding to each of the first request messages, the first request message is adjusted to obtain a second request message corresponding to the first request message;

[0009] According to the second request message corresponding to each first request message, a target response message of the first request message is generated, and the target response message of the first request message is sent to the system under test corresponding to the first request message.

[0010] In some embodiments, adjusting the first request message according to the target system type corresponding to each first request message to obtain a second request message corresponding to the first request message includes:

[0011] Grouping the at least one first request message according to the target system type corresponding to each first request message;

[0012] According to the result of the grouping, a destination identifier is added to each of the first request messages to obtain a second request message corresponding to the first request message.

[0013] In some embodiments, generating a target response message of the first request message according to the second request message corresponding to each first request message includes:

[0014] For each of the first request packets,

[0015] Extracting key information from the second request message;

[0016] Matching the key information with the baffle rule of the second request message corresponding to the first request message to obtain a matching result;

[0017] A target response message for the first request message is generated according to the matching result.

[0018] In some embodiments, generating a target response message of the first request message according to the matching result includes:

[0019] If the matching result is a successful match, determining at least two response results according to the first request message;

[0020] constructing test data that conforms to the at least two response results;

[0021] At least two target response messages are generated according to the test data, wherein the response result includes at least one of the following: success, failure, and partial success.

[0022] In some embodiments, generating a target response message of the first request message according to the matching result includes:

[0023] If the matching result is unsuccessful, obtaining historical transaction record information;

[0024] Performing a similarity evaluation on the first request message and the historical request messages in the historical transaction record information;

[0025] A historical request message having the highest similarity to the first request message is selected as a reference request message, and a historical response message corresponding to the reference request message is used as a target response message of the first request message.

[0026] In some embodiments, generating a target response message of the first request message according to the second request message corresponding to each first request message, and sending the target response message of the first request message to the system under test corresponding to the first request message includes:

[0027] For each first request message,

[0028] Generate a target response message for the first request message according to the second request message corresponding to the first request message;

[0029] Dynamically adjust the response configuration item of the target response message of the first request message based on the transaction scenario to obtain the adjusted target response message of the first request message;

[0030] The adjusted target response message is sent to the system under test corresponding to the first request message.

[0031] In some embodiments, the method further comprises:

[0032] Intercepting a first request message sent by the system under test;

[0033] Determine whether each of the first request messages meets a preset detection rule;

[0034] If the first request message meets the preset detection rule, the first request message is received.

[0035] In some embodiments, the method further comprises:

[0036] If the first request message does not conform to the preset detection rule, sending the first request message to the original application system corresponding to the first request message;

[0037] Receive the original application system corresponding to the first request message, and feedback a target response message according to the first request message;

[0038] The target response message is sent to the system under test corresponding to the first request message.

[0039] The embodiment of the present invention also provides a baffle testing device to support concurrent requests of multiple test environments and fully utilize system resources. The device includes:

[0040] A relay module, configured to receive a first request message sent by at least one system under test, wherein each of the first request messages includes transaction identification code information;

[0041] an acquisition module, configured to acquire, from the architecture management system, transaction information of a current transaction corresponding to each first request message according to the transaction identification code information of the first request message;

[0042] A determination module, configured to determine a target system type corresponding to each first request message based on the transaction information corresponding to the first request message;

[0043] An adjustment module, configured to adjust the first request message according to the target system type corresponding to each of the first request messages, so as to obtain a second request message corresponding to the first request message;

[0044] The data processing module is used to generate a target response message of the first request message according to the second request message corresponding to each first request message, and send the target response message of the first request message to the system under test corresponding to the first request message.

[0045] In some embodiments, the adjustment module includes:

[0046] a grouping module, configured to group the at least one first request message according to the target system type corresponding to each of the first request messages;

[0047] An adding module is used to add a destination identifier in each of the first request messages according to the result of the grouping, so as to obtain a second request message corresponding to the first request message.

[0048] In some embodiments, for each of the first request messages, the data processing module includes:

[0049] An extraction module, used to extract key information from the second request message;

[0050] A matching module, used for matching the key information with the baffle rule of the second request message corresponding to the first request message to obtain a matching result;

[0051] A generating module is used to generate a target response message for the first request message according to the matching result.

[0052] In some embodiments, the generating module comprises:

[0053] A determination submodule, configured to determine at least two response results according to the first request message when the matching result is a successful match;

[0054] A construction module, used for constructing test data that conforms to the at least two response results;

[0055] A generating submodule is used to generate at least two target response messages according to the test data, wherein the response result includes at least one of the following: success, failure and partial success.

[0056] In some embodiments, the generating module further comprises:

[0057] An acquisition module, used for acquiring historical transaction record information when the matching result is unsuccessful;

[0058] An evaluation module, configured to evaluate the similarity between the first request message and the historical request messages in the historical transaction record information;

[0059] The selection module is used to select the historical request message with the highest similarity to the first request message as a reference request message, and use the historical response message corresponding to the reference request message as a target response message for the first request message.

[0060] In some embodiments, for each first request message, the data processing module includes:

[0061] A dynamic adjustment module, configured to dynamically adjust a response configuration item of a target response message of the first request message based on a transaction scenario, to obtain a target response message after the first request message is adjusted;

[0062] The sending module is used to send the adjusted target response message to the system under test corresponding to the first request message.

[0063] In some embodiments, the relay module includes:

[0064] An interception module, used for intercepting a first request message sent by the system under test;

[0065] A judging module, used to judge whether each of the first request messages complies with a preset detection rule;

[0066] The receiving module is used to receive the first request message when the first request message meets the preset detection rule.

[0067] In some embodiments, the relay module further includes:

[0068] A sending submodule, configured to send the first request message to an original application system corresponding to the first request message when the first request message does not conform to a preset detection rule;

[0069] The receiving module is further used to receive a target response message fed back by the original application system corresponding to the first request message in response to the first request message;

[0070] The sending submodule is further configured to send the target response message to the system under test corresponding to the first request message.

[0071] In a third aspect, an embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the baffle testing method when executing the computer program.

[0072] 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 the computer program implements the above-mentioned baffle testing method when executed by a processor.

[0073] In a fifth aspect, an embodiment of the present invention further provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the baffle testing method described above is implemented.

[0074] The baffle testing method and device provided in the embodiment of the present invention can simultaneously receive first request messages sent by one or more different systems to be tested. The present invention determines the target system type corresponding to the first request message through the transaction identification code information in each first request message, thereby adjusting the first request message to obtain its corresponding second request message, and then can distinguish the target systems corresponding to each first request message in multiple first request messages according to the second request message, so as to finally obtain the target response message corresponding to each first request message according to the target system. The baffle testing method provided by the present invention can support concurrent requests of multiple test environments, make full use of system resources, realize cross-team and cross-platform baffle sharing, reduce the workload of developers, reduce waste of human resources, and improve testing efficiency. At the same time, the baffle testing method provided by the present invention does not require a code foundation and has a low threshold for use; and the baffle is non-invasively deployed, simple to deploy, and configuration changes will not affect the running system to be tested. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0076] Figure 1 A flowchart of a business process of a baffle test provided by an embodiment of the present invention;

[0077] Figure 2 A flow chart of a baffle testing method provided by an embodiment of the present invention;

[0078] Figure 3 A baffle testing device provided by an embodiment of the present invention;

[0079] Figure 4 Another baffle testing device provided by an embodiment of the present invention;

[0080] Figure 5 A structural block diagram of a data processing module provided in an embodiment of the present disclosure;

[0081] Figure 6 A flow chart of a baffle test provided by the present invention;

[0082] Figure 7 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0083] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0084] The information collected in the technical solution of this application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0085] The acquisition, transmission, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of relevant laws and regulations.

[0086] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0087] In the prior art, tools such as WireMock, Postman, Fiddler, and SoapUI are usually used to perform baffle testing by defining mock services, creating mock interfaces, defining response rules, and starting mock services. However, these tools have the following disadvantages:

[0088] (1) The threshold for use is high, requires coding knowledge, and has a certain learning cost.

[0089] (2) It is not custom-developed for banking application systems and has poor support for internal systems.

[0090] (3) The logical response is rigid and cannot accurately respond to the testing requirements of multiple logical branches.

[0091] Based on the above problems existing in the prior art, in the first aspect, the present invention provides a baffle testing method. The baffle testing method not only reduces the complexity and time cost of test preparation, but also improves the test coverage and response speed, and achieves a high degree of simulation of external system interaction. The core advantage of the baffle testing method provided by the embodiment of the present invention is that it can flexibly adjust the logic according to different test scenarios, which not only improves the test efficiency and accuracy, but also effectively simulates complex and changeable business environments, providing strong support for software quality assurance.

[0092] First, the business process of the baffle testing method involved in the present invention is introduced.

[0093] Figure 1 A flow chart of a baffle test business process provided by an embodiment of the present invention. Figure 1 As shown, the business process includes the following steps:

[0094] Step YS1: Demand analysis.

[0095] First, you need to confirm the test environment for the baffle test, which determines which specific systems to be tested the baffle needs to be deployed on. Then you need to obtain the transaction code definition document. You can better set the matching rules after you are familiar with the logic of the request message based on the transaction code definition document. Secondly, you need to sort out the transaction call relationship and understand which transaction requests are called by upstream and downstream. Analyze the baffle response rules to meet the test requirements.

[0096] Step YS2, configure baffle parameters.

[0097] Transaction codes are usually unique identifiers for business operations and are particularly important in financial transaction systems. In order to fully cover the test, it is necessary to collect all relevant transaction codes and their corresponding functional descriptions. This step can be completed by reading system documents or directly extracting information from system interface logs. After the collection is completed, these transaction codes are sorted into a list, and the expected input, output and possible abnormal conditions of each transaction code are defined to provide a basis for subsequent test design. Add the physical system to which the system to be tested belongs, add the transaction code to be tested, set the transaction keyword information of the baffle service item, and design the transaction code response rules.

[0098] Step YS3, configure the baffle application.

[0099] The baffle application is started on the server of the system under test. The present invention adopts a non-intrusive design for testing the system under test. Due to the non-intrusive design, there is no need to modify the code of the system under test or restart the system under test.

[0100] Step YS4, debug the baffle.

[0101] Through actual calls, verify whether the response of the baffle to different transaction codes is as expected.

[0102] Step YS5, determine whether the baffle debugging is successful.

[0103] If the baffle is not successfully debugged, then execute step YS1 or step YS2. If the baffle is successfully debugged, then execute step YS6 and put it into use.

[0104] If an abnormality is found, the configuration or rules are quickly adjusted based on the log feedback until the verification is passed and the baffle is officially enabled.

[0105] Based on the above-mentioned business process of the baffle test, the baffle test method involved in the present invention is introduced below through specific embodiments.

[0106] Figure 2 A flow chart of a baffle testing method provided by an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:

[0107] S1. Receive a first request message sent by at least one system under test, wherein each of the first request messages includes transaction identification code information.

[0108] Among them, the system to be tested refers to the server that the baffle needs to test. A system to be tested can send only one first request message, and multiple systems to be tested correspond to multiple first request messages. Of course, a system to be tested can also send multiple different first request messages to test the various functions of the system to be tested, and the present invention does not limit this. When multiple first request messages are received, the baffle testing method can support concurrent requests from multiple test environments to make full use of system resources.

[0109] Specifically, the baffle includes at least one relay module, which is used to be deployed on the system under test and receive the first request message sent by the system under test. The relay module needs to be deployed on each system under test. It follows the non-intrusive principle, which means that it can monitor the behavior of the system under test and capture data without affecting the normal operation of the system under test. This feature avoids the risk of modifying the application code due to testing needs, maintains the original state and functional integrity of the software, and reduces the possibility of introducing new errors.

[0110] The present invention does not require changes to the program code under test, and this feature greatly simplifies the implementation process of the test. The development team does not need to adjust the production code specifically to meet the test requirements, which shortens the test preparation time and reduces the coordination cost between development and testing, making the test activities more flexible and autonomous. At the same time, the relay module will not require the restart of the tested service after startup, which is crucial for a continuously running production environment. The hot deployment capability ensures the continuity and stability of the service, avoids service interruptions caused by test intervention, and meets the pursuit of high availability by modern enterprises.

[0111] In addition, the module occupies limited server resources after startup, ensuring that testing activities will not become a burden on server performance. This is particularly critical in resource-constrained environments, especially when testing needs to be performed in an environment similar to production. Minimizing the impact of testing on system resources is a necessary condition for maintaining system stability.

[0112] Each first request message corresponds to a transaction, and each transaction corresponds to a unique transaction identification code information for identifying the transaction. When any transaction is initiated, the first request message corresponding to the transaction contains this specific transaction identification code information. The transaction identification code information can be an identification code or other identifier, which is not limited in the present invention.

[0113] S2. According to the transaction identification code information of each first request message, obtain transaction information of the current transaction corresponding to the first request message from the architecture management system.

[0114] Specifically, the architecture management system stores the specific transaction information of each transaction involved in the system under test, including but not limited to the transaction identification code corresponding to the transaction, the requester and responder information of the transaction, and other additional details of the transaction content.

[0115] After receiving multiple first request messages, the key transaction identification code information is first extracted from each first request message. Then, the identification code in the transaction identification code information can be used as a query parameter to send a request to the architecture management system to obtain the specific attribution information and additional details about the transaction corresponding to the first request message.

[0116] S3. Based on the transaction information corresponding to each of the first request messages, determine the target system type corresponding to the first request message.

[0117] Specifically, the target system corresponding to the first request message refers to the target system to which the transaction corresponding to the first request message will be routed. The target system can generate a corresponding response message based on the first request message, and the response messages generated by different target systems based on the first request message are not completely the same.

[0118] The target system types include internal business systems and external business systems. The internal business systems refer to the systems within the bank, including clearing systems, risk control systems, etc. The external business systems refer to the partners outside the bank, including the credit reporting services of the People's Bank of China, insurance company platforms, etc.

[0119] S4. Adjust the first request message according to the target system type corresponding to each of the first request messages to obtain a second request message corresponding to the first request message.

[0120] Specifically, the second request message and the first request message are in a one-to-one correspondence, and according to the second request message generated after adjusting the first request message, the target system type to which the transaction corresponding to each first request message will be routed can be determined.

[0121] S5. Generate a target response message of the first request message according to the second request message corresponding to each first request message, and send the target response message of the first request message to the system under test corresponding to the first request message.

[0122] Specifically, according to the second request message generated after adjusting the first request message, the target system type corresponding to the first request message can be determined. Thus, the baffle can obtain the target response message of the first request message from the target system type corresponding to the first request message, and send the target response message to the system to be tested corresponding to the first request message, thereby completing the entire baffle test process.

[0123] In the test environment, in order to comply with the regulations on not using real customer information, the baffle testing method provided by the present invention will simulate external responses such as the People's Bank of China's credit reporting system, thereby supporting complete transaction process testing without exposing sensitive information. For example, in the credit card account opening scenario, it is necessary to check the applicant's credit record first. At this time, the credit card system will generate a first request message with a unique transaction code, wherein the first request message contains the basic information of the applicant. After the first request message is processed by the above process, it will be sent to the People's Bank of China's credit reporting system and the bank's internal risk control system. During the testing phase, baffle technology is used to simulate the response behavior of these two systems, so as to complete the entire qualification review link before opening the card. This method not only ensures that the operation meets regulatory requirements, but also improves development efficiency and quality control level.

[0124] The baffle testing method provided by the present invention can simultaneously receive first request messages sent by one or more different systems to be tested. The present invention determines the target system type corresponding to the first request message through the transaction identification code information in each first request message, thereby adjusting the first request message to obtain its corresponding second request message, and then can distinguish the target systems corresponding to each first request message in multiple first request messages according to the second request message, so as to finally obtain the target response message corresponding to each first request message according to the target system. The baffle testing method provided by the present invention can support concurrent requests of multiple test environments, make full use of system resources, realize cross-team and cross-platform baffle sharing, reduce the workload of developers, reduce waste of human resources, and improve testing efficiency. At the same time, the baffle testing method provided by the present invention does not require a code foundation and has a low threshold for use; and the relay module deployed in the system to be tested is non-invasively deployed, and the deployment is simple, and changes in the configuration will not affect the running system to be tested.

[0125] In some embodiments, step S4, adjusting the first request message according to the target system type corresponding to each of the first request messages to obtain a second request message corresponding to the first request message, specifically includes the following steps:

[0126] S41. Group the at least one first request message according to the target system type corresponding to each first request message.

[0127] S42: According to the result of the grouping, add a destination identifier to each of the first request messages to obtain a second request message corresponding to the first request message.

[0128] The destination identifier may identify the target system to which the transaction corresponding to the first request message is to be routed. Optionally, the destination identifier may be a specific target system name to which the transaction corresponding to the first request message is to be routed. The present invention may preliminarily group the first request messages sent by at least one system under test according to the target system name corresponding to the first request message, and group the first request messages corresponding to the same target system name into one group, and the rules for generating target response messages in the same group are the same.

[0129] Optionally, the present invention can also pre-logically group different systems under test according to their physical system names. This automated grouping method, relying on the data interface between the system under test and other platforms, can directly import the physical system name of the external system, thereby completely liberating the manual input work of test and development personnel, greatly reducing their burden, and allowing them to focus more on the core test design and development tasks.

[0130] Optionally, the destination identifier may also be the response message logic of the target system to which the transaction corresponding to the first request message is to be routed. The present invention may also preliminarily group the first request messages sent by at least one system under test according to the logic of generating the response message by the target system corresponding to the first request message, and group the first request messages corresponding to the same logic of generating the response message by the target system into one group, and the rules of generating the target response messages in the same group are the same.

[0131] Each group contains various external / internal systems related to the system under test. The establishment of this mapping relationship ensures that the test environment is highly matched with the actual business scenario. In this way, the test plan can more accurately simulate the interaction between different systems, improve the accuracy and coverage of the test, and help to discover and solve potential integration problems in advance.

[0132] In this configuration mode, the association between the system under test and its corresponding transaction code baffle rules is more intuitive. Among them, the baffle rules refer to the processing logic set for specific transaction codes during the test, such as simulated responses, intercepted requests, etc., to simulate various situations in actual operation. Since the systems under test are clearly grouped, the classification and management of these rules become more orderly, easy to identify and adjust, effectively preventing rule confusion and improving maintenance efficiency.

[0133] The present invention preliminarily groups the first request messages sent by at least one system to be tested according to the target system type corresponding to each of the first request messages, thereby distinguishing the response message generation rules of the target system corresponding to each of the multiple first request messages, and finally obtaining the target response message corresponding to each first request message according to the target system. The baffle testing method provided by the present invention can support concurrent requests of multiple test environments, make full use of system resources, realize cross-team and cross-platform baffle sharing, reduce the workload of developers, reduce waste of human resources, and improve test efficiency.

[0134] In some embodiments, in step S5, generating a target response message of the first request message according to the second request message corresponding to each first request message specifically includes performing the following steps for each of the first request messages:

[0135] S51. Extract key information from the second request message.

[0136] S52: Match the key information with the baffle rule of the second request message corresponding to the first request message to obtain a matching result.

[0137] S53: Generate a target response message for the first request message according to the matching result.

[0138] Specifically, when the baffle receives the second message request, it first parses it and extracts key information. Optionally, the key information can be a keyword or key logic in the first request message. Optionally, these key information are used as the basis for querying the hash table. A hash table (also called a hash table) is used to store the label information in the baffle rule. The hash table determines its storage location by calculating the hash value of the keyword, which makes the search time complexity close to O(1), that is, it is almost unaffected by the size of the data. Each label or keyword is mapped to a unique index of the hash table, and the corresponding value can be all the baffle rules related to the label or a pointer to these rules. Subsequently, the system begins to traverse the hash table and compares the keyword list in each second message request with the label information stored in the hash table. This process may involve multiple levels of matching, such as first matching the HTTP method, then the URL path, and finally the specific field in the request header or request body. Each step of matching is to narrow the scope of potential baffle rules until a completely matching rule is found to generate the target response message of the first request message.

[0139] In addition, regular expression is a powerful and flexible text matching tool. The present invention can use regular expressions to check whether a specific field in the second request message meets the preset format or content rules (fence rules). For example, if you want to verify whether the order number in a transaction request is a 16-digit alphanumeric combination. This step verifies whether the specific field value in the test transaction request message meets the expected conditions based on the regular expression. Then, according to the response configuration rules preset by the user, the corresponding response message information is generated.

[0140] In some embodiments, the baffle test method includes not only the above steps S1 to S5, but also includes encapsulating the second request message according to a standard format before executing step S5. The standard format refers to a format corresponding to the format of the parsing rule, so that multiple second request messages are encapsulated according to the same rule, and the same parsing rule can be used to parse the second request message, which can improve the efficiency of parsing the second request message.

[0141] In some embodiments, step S53, generating a target response message of the first request message according to the matching result, comprises the following steps:

[0142] S531: If the matching result is a successful match, determine at least two response results according to the first request message.

[0143] S532: Construct test data that conforms to the at least two response results.

[0144] S533. Generate at least two target response messages according to the test data, wherein the response result includes at least one of the following: success, failure, and partial success.

[0145] Specifically, if the matching result is a successful match, it means that the baffle has pre-stored target response messages with multiple response results corresponding to the first request message. The baffle test method provided by the embodiment of the present disclosure configures multiple possible response results for the transaction code corresponding to the same first request message, such as success, failure, partial success, etc., to cover more comprehensive test cases according to different scenario requirements. For example, in the scenario of applying for a car installment loan with a credit card, querying the installment approval result is a complex task. During the test, it is necessary to simulate different financial institutions and counter roles, and construct a variety of judgment conditions to generate corresponding test data. These judgment conditions include but are not limited to: age requirements, identity verification, residential stability, income level and occupational status, credit history, down payment ability, guarantee or collateral provision, and marital status. Depending on the different combinations of these factors, the response of the system will also vary. For example, if the applicant's age, credit record or down payment ability does not meet the standard, it may directly lead to the rejection of the loan application; while for some other conditions, the system may only issue a low-risk prompt, rather than immediately rejecting the application. The present invention can greatly simplify this process by using the smart baffle service. The baffle can quickly construct test data that meets various preset conditions, and then generate corresponding target response messages based on the test data, which effectively reduces the workload of testers. In this way, not only can the test efficiency be improved, but also more comprehensive coverage of all potential situations can be ensured, thereby helping the development team to more accurately evaluate the performance of new functions in different user contexts, and ultimately achieve a significant improvement in product quality. In addition, with the help of smart baffle technology, the team can also complete more test case analysis in a shorter period of time, speed up product iteration, and better meet market demand.

[0146] In some embodiments, step S53, generating a target response message of the first request message according to the matching result, comprises the following steps:

[0147] S534: If the matching result is unsuccessful, obtain historical transaction record information.

[0148] S535: Evaluate the similarity between the first request message and the historical request messages in the historical transaction record information.

[0149] S536: Select a historical request message with the highest similarity to the first request message as a reference request message, and use a historical response message corresponding to the reference request message as a target response message for the first request message.

[0150] Specifically, if the matching result is a failed match, it means that there is no response message corresponding to the first request message pre-set on the baffle. For those first request messages that cannot match the baffle rules, the present invention adopts an intelligent response strategy, that is, enabling the intelligent baffle logic. This process involves a deep understanding of the first request message and flexible processing capabilities. When the baffle recognizes that a first request message does not meet the established baffle rules, it does not simply refuse service or return an error message, but turns to a more complex processing mechanism.

[0151] Specifically, the smart baffle will automatically connect to the message monitoring platform, which is responsible for collecting and saving transaction information on all relevant servers. These transaction information covers multiple key fields, such as transaction identification code, physical system name, request message, response message, request time, and specific information of the server. By comprehensively recording such data, the trading platform can not only ensure the transparency and traceability of each transaction, but also provide strong support for subsequent data analysis and troubleshooting. Through advanced algorithms and data analysis, the smart baffle will search for existing real response messages that are closest to or related to the current first request message in these historical data. The smart baffle service retrieves the transaction monitoring platform, queries the transaction records that have responded successfully within the recent preset time period (for example, within the last 24 hours) according to the transaction identification code, extracts the request messages, evaluates the similarity between the request parameters of the request message in each historical record and the first request message of the current test, and finally selects the record with the closest parameters. After selection, the smart baffle service directly feeds back the response message corresponding to this record to the system under test as a reference answer or simulated reply. This is intended to simulate feedback that is closest to actual scenarios, ensuring that a reasonable and coherent response is provided even when faced with unexpected requests, thereby maintaining stable system operation and consistent user experience.

[0152] The advantage of this strategy is that it can not only effectively manage unexpected traffic and prevent the system from being affected by abnormal requests, but also provide a dynamic adaptability, making the system more robust and flexible in the face of complex and changing network environments. By reusing successful interaction instances in the past, intelligent baffle logic reduces the need for manual intervention and improves the level of automated processing. It is an indispensable part of modern high-performance systems, especially in application scenarios that require high availability and fault tolerance.

[0153] The baffle test method provided by the present invention can generate a target response message regardless of whether the first request message can match the response rule in the message platform, which is to ensure that the baffle system can provide a basic feedback mechanism regardless of how the test scenario changes. The design flexibility of the response configuration item is extremely high, and it can contain static, fixed message information, and can also be designed into a dynamic, parameterized structure to adapt to complex and changing test requirements.

[0154] In some embodiments, in step S5, according to the second request message corresponding to each first request message, a target response message of the first request message is generated, and the target response message of the first request message is sent to the system under test corresponding to the first request message, including performing the following steps for each first request message:

[0155] S54: Generate a target response message for the first request message according to the second request message corresponding to the first request message.

[0156] S55. Dynamically adjust the response configuration item of the target response message of the first request message based on the transaction scenario to obtain the adjusted target response message of the first request message.

[0157] S56: Send the adjusted target response message to the system under test corresponding to the first request message.

[0158] Specifically, the transaction scenario includes the time of the transaction, the location of the transaction, and the characteristics of the transaction content. The baffle test method provided by the present invention can also dynamically adjust the generated target response message based on the transaction scenario.

[0159] In addition to directly performing parameter replacement, the present invention also involves complex data processing logic, such as date format conversion, currency unit conversion, data encryption and decryption, etc. These data conversion rules are set in advance according to business needs and are automatically applied when constructing responses, which meets the requirements of actual business scenarios. For example, in cross-border banking transactions, the baffle system needs to dynamically adjust the date and currency display format according to the language preference or regional settings in the request. Furthermore, it can also adjust the dynamic variables in the target response message in real time based on upstream and downstream information. For example, the variable information such as the serial number and timestamp in the target response message is dynamically adjusted according to the upstream and downstream information.

[0160] The baffle testing method provided by the present invention adopts dynamic response messages, so that the test environment can be closer to the complexity of the production environment, effectively improves the test coverage and the authenticity of the test results, and can simulate various edge cases and abnormal processes.

[0161] For scenarios where the test objectives are clear and no dynamic changes are required, static response messages can ensure the consistency and predictability of each test result. This consistency is the basis for verifying the stability and reliability of the system, helps to quickly locate problems, and reduces the uncertainty of test results caused by response changes, thereby improving overall test efficiency. Compared with dynamic responses, the use of static messages reduces the demand for computing resources during the test process. Since there is no need for real-time calculation or database query, this is particularly important in large-scale automated testing or continuous integration / continuous deployment (CI / CD) processes, which can effectively reduce server load and save computing resources. This type of configuration simplifies the test process. Once the baffle system recognizes a specific test request keyword, it can directly extract the corresponding message from the preset library and send it to the system under test. The test engineer only needs to define the expected response template in advance, and the system can automatically respond to the template when a specific trigger condition is detected, which greatly simplifies the preparation of the test and accelerates the test cycle.

[0162] In some embodiments, the baffle testing method includes not only steps S1 to S5, but also the following steps before executing step S1:

[0163] S00. Intercept a first request message sent by the system to be tested.

[0164] S01. Determine whether each of the first request messages complies with a preset detection rule.

[0165] If the first request message meets the preset detection rule, step S1 is executed to receive the first request message.

[0166] In some embodiments, if the first request message does not meet the preset detection rule, the following steps are performed:

[0167] S02. Send the first request message to the original application system corresponding to the first request message.

[0168] S03: Receive the original application system corresponding to the first request message, and feedback a target response message according to the first request message.

[0169] S04: Send the target response message to the system under test corresponding to the first request message.

[0170] The detection rule may be a specific transaction code, IP or port number, which is used to determine whether the first request message sent by the system to be tested can simulate a corresponding target response message through the baffle.

[0171] Specifically, the baffle system includes a relay module, which is deployed on the server of the system to be tested. First, the relay module intercepts the first request message sent by the system to be tested, and then detects the first request message of all transaction requests sent by the system to be tested according to the detection rules (transaction code, IP and port number). If the detection rules are matched, the baffle will further process the data of the first request message; if the detection rules are not matched, the baffle penetration technology is used to directly obtain the corresponding target response message from the application system corresponding to the first request message. Among them, the baffle penetration technology, also known as direct service or bypass mode, plays a vital role in software testing, especially in the integration test and system test stages. The core of this technology is that it enables the transaction request in the test environment to directly penetrate (or bypass) the test or monitoring baffle placed in the middle without going through the conventional processing flow, and be delivered to the target external application server. It ensures that the test data or simulated transaction can touch the actual business processing logic, so as to obtain the response message that is closest to the real scene.

[0172] The baffle test method provided by the present invention uses the baffle service through a highly organized and intelligent design to achieve accurate processing and response generation of test requests, greatly improving the practicality and efficiency of the test. The core mechanism of the service lies in its sophisticated layering and classification strategy, as well as the ability to respond dynamically. The first request message is preliminarily classified according to the target system type based on the keyword information, ensuring that the test environment can simulate the interaction of multiple independent systems. On this basis, the field data is further used to determine whether it meets the baffle rules, and the first request message is subdivided into different business logic branches. This two-layer classification method not only organizes the test resources in an orderly manner, but also ensures the high pertinence of the test scenario. This process involves intelligent parsing of the key fields in the first request message, thereby achieving accurate matching of the test requirements. Subsequently, according to the matched business logic branch, the corresponding response configuration item is selected to dynamically generate the target response message. Compared with the test scheme in the prior art, this baffle response service can provide more appropriate simulation in a wider range of business scenarios and logic complexity through the above mechanism. It can not only handle standardized test requirements, but also effectively deal with special or edge cases, ensuring the comprehensiveness and depth of test coverage. More importantly, the service can flexibly respond to changing testing requirements, especially in an environment with rapid development iterations and changing business logic. By dynamically adjusting response configuration items, it can quickly adapt to new testing scenarios without frequently modifying the underlying code or testing framework, significantly reducing maintenance costs and test preparation time.

[0173] Based on the same invention, in the second aspect, the embodiments of the present invention further provide a baffle testing device, as described in the following embodiments. Since the principle of solving the problem by the device is similar to that of the baffle testing method provided in the first aspect, the implementation of the device can refer to the implementation of the baffle testing method, and the repeated parts will not be repeated.

[0174] Figure 3 A baffle testing device 300 is provided in an embodiment of the present invention. Figure 3 As shown, the baffle testing device 300 includes a relay module 301 , a data filtering module 302 and a data processing module 303 .

[0175] The relay module 301 is used to receive a first request message sent by at least one system under test, wherein each of the first request messages includes transaction identification code information.

[0176] Specifically, the relay module 301 needs to be deployed on each server to be tested. It follows the non-intrusive principle, which means that it can monitor system behavior and capture data without affecting the normal operation of the system under test. This feature avoids the risk of modifying application code due to testing needs, maintains the original state and functional integrity of the software, and reduces the possibility of introducing new errors.

[0177] There is no need to modify the program code under test, which greatly simplifies the test implementation process. The development team does not need to adjust the production code specifically to meet the test requirements, which shortens the test preparation time and reduces the coordination cost between development and testing, making the test activities more flexible and autonomous.

[0178] After the relay module 301 is started, it will not require the restart of the tested service, which is crucial for a continuously running production environment. The hot deployment capability ensures the continuity and stability of the service, avoids service interruptions caused by test intervention, and meets the pursuit of high availability by modern enterprises.

[0179] After the relay module 301 is started, it occupies limited server resources, ensuring that the test activity will not become a burden on the server performance. This is particularly critical in resource-constrained environments, especially when the test needs to be performed in an environment similar to production, minimizing the impact of the test on system resources is a necessary condition for maintaining system stability.

[0180] The data filtering module 302 is used to group the received first request messages to obtain second request messages corresponding to the first request messages.

[0181] Specifically, the data filtering module 302 logically groups different systems to be tested, and each group contains various external systems related to it. The establishment of such mapping relationship ensures that the test environment is highly matched with the real business scenario. In this way, the test plan can more accurately simulate the interaction between different external systems, improve the accuracy and coverage of the test, and help to discover and solve potential integration problems in advance.

[0182] In this configuration mode, the association between the system under test and its corresponding transaction code baffle rules is more intuitive. Baffle rules refer to the processing logic set for specific transaction codes during the test, such as simulated responses, intercepted requests, etc., to simulate various situations in actual operation. Due to the clear system grouping, the classification and management of these rules become more orderly, easy to identify and adjust, effectively preventing rule confusion and improving maintenance efficiency.

[0183] The data processing module 303 is used to generate a target response message of the first request message according to the second request message corresponding to each first request message, and send the target response message of the first request message to the system under test corresponding to the first request message.

[0184] Figure 4 Another baffle testing device 300 is provided in an embodiment of the present invention. Figure 4 As shown, the baffle testing device 300 includes a relay module 301, a data filtering module 302 and a data processing module 303. The data filtering module 302 includes an acquisition module 312, a determination module 322 and an adjustment module 332.

[0185] The acquisition module 312 is used to acquire the transaction information of the current transaction corresponding to each first request message from the architecture management system according to the transaction identification code information of each first request message. The determination module 322 is used to determine the target system type corresponding to the first request message based on the transaction information corresponding to each first request message. The adjustment module 332 is used to adjust the first request message according to the target system type corresponding to each first request message to obtain the second request message corresponding to the first request message.

[0186] The baffle testing device provided by the present invention deploys a relay module 301 on one or more systems to be tested, which can simultaneously receive first request messages sent by one or more different systems to be tested; the determination module 322 determines the target system type corresponding to the first request message through the transaction identification code information in each first request message, so that the adjustment module 332 adjusts the first request message to obtain its corresponding second request message, and then the data processing module 303 can distinguish the target systems corresponding to each first request message in multiple first request messages according to the second request message, so as to finally obtain the target response message corresponding to each first request message according to the target system. The baffle testing device provided by the present invention can support concurrent requests of multiple test environments, make full use of system resources, realize cross-team and cross-platform baffle sharing, reduce the workload of developers, reduce waste of human resources, and improve test efficiency.

[0187] In some embodiments, the adjustment module 332 includes a grouping module 132 and an adding module 232. The grouping module 132 is used to group the at least one first request message according to the target system type corresponding to each first request message. The adding module 232 is used to add a destination identifier to each first request message according to the result of the grouping to obtain a second request message corresponding to the first request message.

[0188] In the baffle testing device provided by the present invention, the grouping module 132 preliminarily groups the first request messages sent by at least one system to be tested according to the target system type corresponding to each first request message, thereby distinguishing the response message generation rules of the target system corresponding to each first request message in multiple first request messages, so as to finally obtain the target response message corresponding to each first request message according to the target system. The baffle testing device provided by the present invention can support concurrent requests of multiple test environments, make full use of system resources, realize cross-team and cross-platform baffle sharing, reduce the workload of developers, reduce waste of human resources, and improve test efficiency.

[0189] Figure 5 A structural block diagram of a data processing module 303 provided in an embodiment of the present disclosure.

[0190] like Figure 5 As shown, in some embodiments, the data processing module 303 includes an extraction module 313, a matching module 323 and a generation module 333. The extraction module 313 is used to extract key information in the second request message. The matching module 323 is used to match the key information with the baffle rule of the second request message corresponding to the first request message to obtain a matching result. The generation module 333 is used to generate a target response message of the first request message according to the matching result.

[0191] In some embodiments, the generation module 333 includes a determination submodule 10, a construction module 20, and a generation submodule 30. The determination submodule 10 is used to determine at least two response results according to the first request message if the matching result is a successful match. The construction module 20 is used to construct test data that conforms to the at least two response results. The generation submodule 30 is used to generate at least two target response messages according to the test data, wherein the response result includes at least one of the following: success, failure, and partial success.

[0192] The baffle testing device provided in the embodiment of the present disclosure has a construction module 20 that constructs test data that conforms to the at least two response results for the transaction code corresponding to the same first request message, so that the generation submodule 30 can generate a variety of possible response results, such as success, failure, partial success, etc., and can cover more comprehensive test cases according to different scenario requirements.

[0193] In some embodiments, the generation module 333 further includes an acquisition module 40, an evaluation module 50 and a selection module 60. The acquisition module 40 is used to acquire historical transaction record information when the matching result is an unsuccessful match. The evaluation module 50 is used to perform a similarity evaluation between the first request message and the historical request message in the historical transaction record information. The selection module 60 is used to select the historical request message with the highest similarity to the first request message as a reference request message, and use the historical response message corresponding to the reference request message as the target response message of the first request message.

[0194] The baffle testing device provided by the present invention can achieve the generation of a target response message regardless of whether the first request message can match the response rule in the message platform. This is to ensure that the baffle system can provide a basic feedback mechanism no matter how the test scenario changes.

[0195] In some embodiments, the data processing module 303 further includes a dynamic adjustment module 343 and a sending module 353. The dynamic adjustment module 343 is used to dynamically adjust the response configuration item of the target response message of the first request message based on the transaction scenario to obtain the adjusted target response message of the first request message. The sending module 353 is used to send the adjusted target response message to the system under test corresponding to the first request message.

[0196] The baffle test device provided by the present invention has extremely high design flexibility in responding to configuration items, and can contain static, fixed message information, and can also be designed into a dynamic, parameterized structure to adapt to complex and changeable test requirements.

[0197] In some embodiments, the relay module 301 includes an interception module 351, a judgment module 321 and a receiving module 331. The interception module 351 is used to intercept the first request message sent by the system under test. The judgment module 321 is used to judge whether each of the first request messages meets the preset detection rules. The receiving module 331 is used to receive the first request message when the first request message meets the preset detection rules.

[0198] In some embodiments, the relay module 301 further includes a sending submodule 341, which is used to send the first request message to the original application system corresponding to the first request message if the first request message does not meet the preset detection rules. The receiving module 331 is also used to receive the target response message fed back by the original application system corresponding to the first request message for the first request message. The sending submodule 341 is also used to send the target response message to the system to be tested corresponding to the first request message.

[0199] The baffle testing device provided by the present invention has a relay module 301 that intercepts the first request message sent by the system to be tested, and then detects the first request message of all transaction requests sent by the system to be tested according to the detection rules (transaction code, IP and port number). If the detection rules are matched, the baffle will further process the data of the first request message; if the detection rules are not matched, the baffle penetration technology is used to directly obtain the corresponding target response message from the application system corresponding to the first request message. Among them, the core of the baffle penetration technology is that it enables the transaction request in the test environment to directly penetrate (or bypass) the test or monitoring baffle placed in the middle without going through the conventional processing flow, and be delivered to the target external application server. It ensures that the test data or simulated transaction can touch the actual business processing logic, so as to obtain the response message that is closest to the real scene.

[0200] Figure 6 A flow chart of a baffle test provided by the present invention, wherein the baffle test is applied to any of the baffle test devices 300 described above.

[0201] like Figure 6 As shown, the baffle testing method specifically includes the following steps:

[0202] The relay module 301 executes step 1: intercepting and analyzing the request message to determine whether the request message matches the detection rule.

[0203] If the request message does not match the detection rule, the relay module executes step 6: allowing the request message to penetrate the baffle and directly obtain a response message corresponding to the request message from the original application system corresponding to the request message.

[0204] If the request message matches the detection rule, the data filtering module 302 executes step 2: encapsulates the request message into a standard format, and sends the encapsulated request message to the data processing module 303 .

[0205] The data processing module 303 executes step 3: receiving and parsing the request message, and matching the baffle rules according to the parsed request message until a completely matching rule is found.

[0206] Further, if the match is successful, the data processing module 303 executes step 4: generates a corresponding response message according to the response configuration rule preset by the user. If the match fails, the data processing module 303 executes step 5: enables the intelligent baffle logic to find the response message that is closest to success.

[0207] Finally, the data processing module 303 executes step 7: the response message generated by the speech baffle test device is sent to the corresponding system to be tested.

[0208] It should be noted that Figure 6 The corresponding flowchart is intended to illustrate the overall process of the baffle test provided by the present disclosure. The specific details of each step can be referred to any of the above embodiments, and will not be repeated here.

[0209] It should also be noted that the baffle testing method provided in the embodiment of the present invention can be used in the financial field, and can also be used in any technical field other than the financial field. The embodiment of the present invention does not limit the application field of the virtual reality-based bank training system and its training method.

[0210] An embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-mentioned baffle testing methods when executing the computer program.

[0211] Figure 7 A schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, such as Figure 7 As shown, the electronic device includes: a processor (processor) 501, a memory (memory) 502 and a bus 503.

[0212] The processor 501 and the memory 502 communicate with each other via a bus 503 .

[0213] The processor 501 is used to call the program instructions in the memory 502 to execute the baffle testing method provided by the above-mentioned method embodiments.

[0214] 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 baffle testing method is implemented.

[0215] An embodiment of the present invention further provides a computer program product, the computer program product comprising a computer program, and the computer program implements the above baffle testing method when executed by a processor.

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

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

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

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

[0220] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A baffle testing method, characterized in that: The method comprises: Receiving a first request message sent by at least one system under test, wherein each of the first request messages includes transaction identification code information; According to the transaction identification code information of each first request message, acquiring transaction information of a current transaction corresponding to the first request message from the architecture management system; Determining a target system type corresponding to each first request message based on the transaction information corresponding to the first request message; According to the target system type corresponding to each of the first request messages, the first request message is adjusted to obtain a second request message corresponding to the first request message; According to the second request message corresponding to each first request message, a target response message of the first request message is generated, and the target response message of the first request message is sent to the system under test corresponding to the first request message.

2. The method according to claim 1, characterized in that The adjusting the first request message according to the target system type corresponding to each of the first request messages to obtain a second request message corresponding to the first request message includes: Grouping the at least one first request message according to the target system type corresponding to each first request message; According to the result of the grouping, a destination identifier is added to each of the first request messages to obtain a second request message corresponding to the first request message.

3. The method according to claim 1, characterized in that The step of generating a target response message of the first request message according to the second request message corresponding to each first request message includes: For each of the first request packets, Extracting key information from the second request message; Matching the key information with the baffle rule of the second request message corresponding to the first request message to obtain a matching result; A target response message for the first request message is generated according to the matching result.

4. The method according to claim 3, characterized in that The generating a target response message of the first request message according to the matching result includes: If the matching result is a successful match, determining at least two response results according to the first request message; constructing test data that conforms to the at least two response results; At least two target response messages are generated according to the test data, wherein the response result includes at least one of the following: success, failure, and partial success.

5. The method according to claim 3, characterized in that: The generating a target response message of the first request message according to the matching result includes: If the matching result is unsuccessful, obtaining historical transaction record information; Performing a similarity evaluation on the first request message and the historical request messages in the historical transaction record information; A historical request message having the highest similarity to the first request message is selected as a reference request message, and a historical response message corresponding to the reference request message is used as a target response message of the first request message.

6. The method according to claim 1, characterized in that The method of generating a target response message of the first request message according to the second request message corresponding to each first request message, and sending the target response message of the first request message to the system under test corresponding to the first request message, includes: For each first request message, Generate a target response message for the first request message according to the second request message corresponding to the first request message; Dynamically adjust the response configuration item of the target response message of the first request message based on the transaction scenario to obtain the adjusted target response message of the first request message; The adjusted target response message is sent to the system under test corresponding to the first request message.

7. The method according to claim 1, characterized in that The method further comprises: Intercepting a first request message sent by the system under test; Determine whether each of the first request messages meets a preset detection rule; If the first request message meets the preset detection rule, the first request message is received.

8. The method according to claim 7, characterized in that The method further comprises: If the first request message does not conform to the preset detection rule, sending the first request message to the original application system corresponding to the first request message; Receive the original application system corresponding to the first request message, and feedback a target response message according to the first request message; The target response message is sent to the system under test corresponding to the first request message.

9. A baffle testing device, characterized in that: The device comprises: A relay module, configured to receive a first request message sent by at least one system under test, wherein each of the first request messages includes transaction identification code information; an acquisition module, configured to acquire, from the architecture management system, transaction information of a current transaction corresponding to each first request message according to the transaction identification code information of the first request message; A determination module, configured to determine a target system type corresponding to each first request message based on the transaction information corresponding to the first request message; An adjustment module, configured to adjust the first request message according to the target system type corresponding to each of the first request messages, so as to obtain a second request message corresponding to the first request message; The data processing module is used to generate a target response message of the first request message according to the second request message corresponding to each first request message, and send the target response message of the first request message to the system under test corresponding to the first request message.

10. The device according to claim 9, characterized in that The adjustment module comprises: a grouping module, configured to group the at least one first request message according to the target system type corresponding to each of the first request messages; An adding module is used to add a destination identifier in each of the first request messages according to the result of the grouping, so as to obtain a second request message corresponding to the first request message.

11. The device according to claim 9, characterized in that For each of the first request messages, the data processing module includes: An extraction module, used to extract key information from the second request message; A matching module, used for matching the key information with the baffle rule of the second request message corresponding to the first request message to obtain a matching result; A generating module is used to generate a target response message for the first request message according to the matching result.

12. The device according to claim 11, characterized in that The generation module comprises: A determination submodule, configured to determine at least two response results according to the first request message when the matching result is a successful match; A construction module, used for constructing test data that conforms to the at least two response results; A generating submodule is used to generate at least two target response messages according to the test data, wherein the response result includes at least one of the following: success, failure, and partial success.

13. The device according to claim 11, characterized in that The generating module also includes: An acquisition module, used for acquiring historical transaction record information when the matching result is unsuccessful; An evaluation module, configured to evaluate the similarity between the first request message and the historical request messages in the historical transaction record information; The selection module is used to select the historical request message with the highest similarity to the first request message as a reference request message, and use the historical response message corresponding to the reference request message as a target response message for the first request message.

14. The device according to claim 9, characterized in that For each first request message, the data processing module includes: A dynamic adjustment module, used to dynamically adjust the response configuration item of the target response message of the first request message based on the transaction scenario, to obtain the target response message after the first request message is adjusted; The sending module is used to send the adjusted target response message to the system under test corresponding to the first request message.

15. The device according to claim 9, characterized in that The relay module comprises: An interception module, used for intercepting a first request message sent by the system under test; A judging module, used to judge whether each of the first request messages complies with a preset detection rule; The receiving module is used to receive the first request message when the first request message meets the preset detection rule.

16. The device according to claim 15, characterized in that The relay module also includes: A sending submodule, configured to send the first request message to an original application system corresponding to the first request message when the first request message does not conform to a preset detection rule; The receiving module is further configured to receive a target response message fed back by the original application system corresponding to the first request message in response to the first request message; The sending submodule is further configured to send the target response message to the system under test corresponding to the first request message.

17. 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, the method according to any one of claims 1 to 8 is implemented.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

19. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Transaction test method and device

    CN106815148A

  • Pressure test method, device and equipment for bank core system and medium

    CN113590440A

  • Message low-code configuration access method and system based on middleware routing

    CN117472611A

  • Baffle response method and system and server

    CN118069523A

  • Building management system with generative ai-based automated flexible customer report generation

    US20240346611A1