Transaction processing test method and device, equipment, medium and program product
By using stored forwarding tables and preset test request information in the trading system, the test value of the key domain in the test response message returned by the trading system is solved, and the problem that the existing technology cannot effectively guarantee the correctness of the transaction processing business logic is improved, and the accuracy and reliability of the trading system test are improved.
Patent Information
- Application Number
- CN202411598753.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-02-28
AI Technical Summary
The existing technology cannot effectively ensure the correctness of the transaction processing business logic of the trading system. It is mostly to judge whether the transaction is completed by verifying the return code, but it cannot ensure the correctness of the business logic.
By introducing store-forwarding tables in the trading system, preset test request information, generate test request messages, and verify whether the test value of the key domain in the test response message returned by the trading system to be tested is consistent with the preset target values, to determine the correctness of the business logic.
It realizes verification of the business logic level of the trading system, improves the accuracy and reliability of the trading system test, and ensures the correctness of the transaction processing process.
Smart Images

Figure CN119537220A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the financial field or other fields, and in particular to a transaction processing testing method, device, equipment, medium and program product. Background Art
[0002] The transaction processing of banks is inseparable from the transaction system. The transaction system can process transaction information based on the transaction request triggered by the user and return the processing result. Therefore, it is necessary to ensure the correctness of the transaction processing process of the transaction system.
[0003] At present, the test of transaction processing in the trading system is mostly to verify whether the return code returned after the transaction processing is a preset value to determine whether the transaction is completed, but this method cannot guarantee whether the business logic of the transaction processing is correct. Therefore, a testing method that can ensure the correctness of the business logic of the transaction processing is urgently needed. Summary of the invention
[0004] The transaction processing test method, device, equipment, medium and program product provided in the embodiments of the present application are used to verify the business logic level of the transaction system and improve the accuracy and reliability of the transaction system test.
[0005] In a first aspect, an embodiment of the present application provides a transaction processing testing method, including:
[0006] In response to the test instruction, the transaction system to be tested sends a test request message based on the test request information preset in the storage forwarding table; wherein the test request information represents the transaction information;
[0007] The transaction system to be tested receives and stores a test response message corresponding to the test request message; wherein the test response message includes a test value of a key field, and the test value of the key field represents a processing result after processing the transaction information;
[0008] The test system obtains the test response message; and generates a test result based on the test value of the key field in the test response message and the preset target value of the key field; wherein the test result represents whether the transaction processing of the transaction system to be tested based on the transaction information to obtain the processing result is correct.
[0009] In a possible implementation, in response to the test instruction, the transaction system to be tested sends a test request message based on the test request information preset in the storage forwarding table, including:
[0010] In response to the test instruction, the transaction system to be tested obtains test request information; and stores the test request information in the storage-forwarding table;
[0011] The transaction system to be tested executes the message retransmission logic corresponding to the storage forwarding table, and sends the test request message based on the test request information in the storage forwarding table.
[0012] In a possible implementation manner, the transaction system to be tested stores the test request information in the storage-and-forwarding table, including:
[0013] The transaction system to be tested stores the test request information in the storage-and-forwarding table, and adds a first identifier to the test request information.
[0014] In a possible implementation manner, the test system generates a test result according to the test value of the key field in the test response message and the preset target value of the key field, including:
[0015] The test system determines the target response information corresponding to the test response message according to the test response message; wherein the target response information represents the preset response information corresponding to the test request information;
[0016] The test system determines the preset target value of the key field and the test value of the key field in the test response message according to the target response information;
[0017] The test system generates a test result according to the test value of the key field in the test response message and the preset target value of the key field.
[0018] In a possible implementation manner, the test response message has a first identifier; and the test system determines, according to the test response message, target response information corresponding to the test response message, including:
[0019] The test system obtains a test case; wherein each test case includes test request information and target response information; the test case has a second identifier; the second identifier has a corresponding relationship with the first identifier;
[0020] The test system determines, according to the first identifier of the test response message, a second identifier corresponding to the first identifier;
[0021] The test system determines target response information in the test case corresponding to the test response message according to a second identifier corresponding to the first identifier.
[0022] In a possible implementation manner, the test system determines, according to the target response information, a preset target value of the key field and a test value of the key field in the test response message, including:
[0023] The test system determines, according to the target response information, a key domain corresponding to the target response information;
[0024] The test system determines a test value corresponding to the key field in the test response message, and a preset target value corresponding to the key field in the target response information.
[0025] In a second aspect, an embodiment of the present application provides a transaction processing test device, including:
[0026] The sending module in the transaction system to be tested is used to respond to the test instruction and send a test request message based on the test request information preset in the storage forwarding table; wherein the test request information represents the transaction information;
[0027] A storage module in the transaction system to be tested, used to receive and store a test response message corresponding to the test request message; wherein the test response message includes a test value of a key field, and the test value of the key field represents a processing result after processing the transaction information;
[0028] The test module in the test system is used to obtain the test response message; and generate a test result based on the test value of the key field in the test response message and the preset target value of the key field; wherein the test result represents whether the transaction processing of the transaction system to be tested based on the transaction information to obtain the processing result is correct.
[0029] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;
[0030] The memory stores computer-executable instructions;
[0031] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0032] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0033] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0034] The transaction processing test method, device, equipment, medium and program product provided in the embodiment of the present application, the test system starts the test system to send the test request message based on the storage forwarding table through the test instruction, and verifies the test value of the key field in the test response message returned by the test system and the preset target value to generate the final test result. In this way, by verifying the test value of the key field, the business logic level of the transaction system is verified in different business scenarios, and the accuracy and reliability of the transaction system test are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0036] Figure 1 A schematic diagram of an application scenario provided for this application;
[0037] Figure 2 Schematic diagram of the transaction processing test method provided for this application Figure 1 ;
[0038] Figure 3 Schematic diagram of the transaction processing test method provided for this application Figure 2 ;
[0039] Figure 4 A schematic diagram of the structure of the test device for transaction processing provided by this application;
[0040] Figure 5 A schematic diagram of the structure of the electronic device provided in this application.
[0041] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0042] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0043] The transaction processing of banks is inseparable from the transaction system. The transaction system can process transaction information based on the transaction request triggered by the user and return the processing result. It is necessary to ensure the correctness of the transaction processing process of the transaction information by the transaction system. At present, the functional test of the transaction system is mostly to verify whether the return code returned after the transaction processing is the preset value to determine whether the transaction is completed, but this method cannot guarantee whether the business logic of the transaction processing is correct.
[0044] In view of this, the present application provides a test method for transaction processing, which utilizes the existing message retransmission logic of the transaction system to implement the sending of test request messages, and determines whether the values of key fields in the test response messages are consistent with preset values, so as to determine whether the business logic is correct, realizes the verification of the business logic level of the transaction request, realizes comprehensive testing of transaction processing, and ensures the reliability of the test.
[0045] Figure 1 A schematic diagram of an application scenario provided for this application, such as Figure 1 As shown, the scenario includes a transaction system to be tested and a test system, and the transaction system to be tested is communicatively connected with the test system.
[0046] The above-mentioned transaction system to be tested represents a transaction system in an enterprise, and this application does not limit the specific functions implemented by the transaction system.
[0047] The above-mentioned test system refers to a system for performing tests, and the test system may be an electronic device with processing capabilities, such as a computer, a server, or a notebook computer, etc., which is not limited in the present application.
[0048] It should be noted that the present application does not limit the deployment method of the above-mentioned trading system to be tested and the test system. The above-mentioned trading system to be tested and the test system can be deployed in an integrated manner, such as deployed on the same server; or can be deployed in a distributed manner.
[0049] It should be noted that the transaction processing test methods, devices, equipment, media and program products provided in this application can be used in the financial field or other fields, and can also be used in any field other than the financial field or other fields. The application field of the transaction processing test methods, devices, equipment, media and program products provided in this application is not limited.
[0050] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and corresponding operation entrances shall be provided for users to choose to authorize or refuse.
[0051] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0052] Figure 2 Schematic diagram of the transaction processing test method provided for this application Figure 1 ,like Figure 2 As shown, the method includes:
[0053] S201. In response to a test instruction, the transaction system to be tested sends a test request message based on the test request information preset in the storage and forwarding table.
[0054] Exemplarily, the above-mentioned test instruction is used to instruct a functional test of the trading system to be tested. The test instruction may indicate an identifier of the test request information, and the identifier of the test request information may be, for example, a serial number; it may also include other information such as the sending time of the test request information. The present application does not limit the content included in the test instruction.
[0055] The above test instructions may be manually triggered by a user using a test system, and then the trading system under test may receive the test instructions from the test system, or may be automatically triggered by the test system, which is not limited in this application.
[0056] The above-mentioned store and forward table (SAF) is a method for caching request messages and resending messages in the trading system to be tested. For example, if the request message fails to be sent due to network reasons, it can be stored in the SAF table and wait for resending. The trading system to be tested can pre-store preset test request information in the SAF table before the test. The identifier of the preset test request information is different from the identifier of the request information generated by normal operation. Therefore, the test request information can be distinguished based on the identifier. Alternatively, the trading system to be tested responds to the test instruction, obtains the test request information from the test system, and stores it in the SAF table.
[0057] The test request information represents transaction information, for example, the test request information may indicate the transaction type, transaction amount, information of both parties to the transaction, etc., and the present application does not limit the content of the test request information. The format of the test request information included in the test request information is consistent with the format of the transaction request information sent by the transaction system to be tested during normal operation.
[0058] In some possible implementations, the test instruction indicates an identifier of the test request information, and the trading system to be tested may respond to the test instruction, query the SAF table for the test request information corresponding to the identifier of the test request information indicated by the test instruction, and generate and send a test request message based on the test request information; or the trading system to be tested may respond to the test instruction, generate and send test messages based on the test request information in sequence according to the order of the test request information in the SAF table.
[0059] It should be noted that this application does not limit the format of the test message, for example, it can be an 8583 message, which is related to the specific settings of the transaction system to be tested. In addition, this application does not limit how to generate a test request message.
[0060] In some possible implementations, the trading system under test may send the test request message to a downstream trading system or a downstream database for processing, or may send the test request message to other modules of the trading system under test for processing, which is not limited in the present application.
[0061] S202: The transaction system to be tested receives and stores a test response message corresponding to the test request message.
[0062] Exemplarily, after the transaction system to be tested sends a test request message, a returned test response message may be received, which indicates the processing result of the test request message and is the actual response message returned by the transaction system to be tested based on the test request message. The test response message may include a test value of a key field, and the test value of the key field represents the processing result after the transaction information is processed. Among them, the above-mentioned key field is a core data item used to determine whether the transaction system processing meets expectations. For example, in a payment system, the key field may include transaction amount, transaction time, transaction status, transaction ID, etc. In other words, the key field may represent a preset field in the test response message, and the test pointer of the key field is the field value of the preset field. In other words, the field value of the preset field in the test response message may represent the processing result after the transaction information is processed. For example, the transaction information in the test request message may be "query the deposit amount of user A", and correspondingly, the processing result in the test response message may be "the deposit amount is 1000".
[0063] It should be noted that, in this application, where the tested transaction system receives the test response message from is related to the recipient of the test request message, and this application does not make any limitation here.
[0064] In some possible implementations, after receiving the test response message corresponding to the test request message, the transaction system under test can store the test response message in a preset storage location, for example, it can be stored in a preset flow table, in which a correspondence can be established between the test response message and the test request message in the SAF table based on the serial number. It should be noted that the present application does not limit the storage location of the test response message, for example, it can be stored in the transaction system under test or in the cloud.
[0065] S203: The test system obtains a test response message.
[0066] Exemplarily, the test system may obtain the test response message from the above-mentioned preset storage location. For example, the test system may periodically send a query request to the transaction system to be tested to obtain the test response message from the above-mentioned preset table, or the transaction system to be tested may feedback prompt information to the test system to prompt the test system to obtain the test response message.
[0067] S204: The test system generates a test result according to the test value of the key field in the test response message and the preset target value of the key field.
[0068] Exemplarily, the above test result indicates whether the transaction processing of the transaction system to be tested based on the transaction information to obtain the processing result is correct. The above test system is preset with a preset target value of the key field in the correct response message corresponding to the test request information. The preset target value of the key field is usually predefined before the test. For example, the expected transaction amount should be 100 yuan and the transaction status should be "successful".
[0069] In some possible implementations, the test system can extract the test value of the key field from the test response message and compare it with the preset target value of the key field corresponding to the test response message. If the test value is consistent with the preset target value, the test result is passed; if the test value is inconsistent with the preset target value, the test result is failed. Optionally, the test system can generate a test report based on the test results and provide detailed difference analysis information for the test request information with a failed test result, so that developers can troubleshoot.
[0070] In the transaction processing test method provided in the embodiment of the present application, the test system starts the test system to send a test request message based on the storage forwarding table through a test instruction, and verifies the test value of the key field in the test response message returned by the test system and the preset target value to generate the final test result. In this way, by verifying the test value of the key field, the business logic level of the transaction system is verified in different business scenarios, thereby improving the accuracy and reliability of the transaction system test.
[0071] Figure 3 Schematic diagram of the transaction processing test method provided for this application Figure 2 ,like Figure 3 As shown, in this embodiment Figure 2 Based on the embodiment, a test method for transaction processing is described in detail, and the method includes:
[0072] S301. In response to a test instruction, the trading system to be tested obtains test request information.
[0073] Exemplarily, the above test instruction may include information such as a reference, an identifier or a storage path of the test request information.
[0074] For example, the trading system under test may directly parse the test instruction to obtain the test request information, or the trading system under test may extract the identification of the test request information indicated by the test instruction or the test request information of the storage path from the test system according to the test instruction.
[0075] S302: The transaction system to be tested stores the test request information in a storage-and-forwarding table.
[0076] For example, the transaction system to be tested stores the test request information in a storage-forwarding table and adds a first identifier to the test request information. The first identifier is used to uniquely characterize the test request information, for example, it can be a serial number or other identifiers such as an ID. For example, Table 1 is a schematic diagram of a storage-forwarding table provided by the present application.
[0077] Table 1 Storage forwarding table
[0078] serial number Test Request Serial number 1 Test request information 1 Serial number 2 Test request information 2
[0079] It should be understood that the storage-forwarding table is the business processing logic originally existing in the transaction system under test, and the transaction system under test can store the acquired test request information in the storage-forwarding table.
[0080] S303: The transaction system to be tested executes the message retransmission logic corresponding to the storage forwarding table, and sends a test request message based on the test request information in the storage forwarding table.
[0081] For example, as mentioned above, the storage forwarding table is the business processing logic originally existing in the transaction system under test. Therefore, the transaction system under test can execute the message retransmission logic corresponding to the storage forwarding table, and generate and send the test request message based on the test request information in the storage forwarding table.
[0082] Specifically, the transaction system under test can check the status of the test request information in the storage and forwarding table, confirm whether the sending conditions are met (such as whether the retransmission limit is reached, whether it has timed out, etc.), and assemble it into a test request message that complies with the protocol specification based on the test request information in the storage and forwarding table and send it, such as the 8583 message format.
[0083] S304: The transaction system to be tested receives and stores a test response message corresponding to the test request message.
[0084] For example, the transaction system to be tested can perform integrity check on the received test response message to ensure that the message is not damaged or lost, and store the received test response message in association with the test request information in the storage forwarding table, for example, in a flow table. Exemplarily, Table 2 is a schematic diagram of a flow table provided in the present application. Referring to Tables 1 and 2, the test response message can be associated with the test request information in the storage forwarding table based on the serial number in the flow table.
[0085] Table 2 Water flow table
[0086] serial number Test Response Serial number 1 Test response message 1 Serial number 2 Test response message 2
[0087] S305: The test system obtains a test response message.
[0088] For example, the test system sends a query request to the trading system under test, requesting a test response message with specified test request information; the trading system under test extracts the corresponding test response message from a preset storage location according to the identifier or condition in the query request, and returns the extracted test response message to the test system.
[0089] S306: The test system determines target response information corresponding to the test response message according to the test response message.
[0090] Exemplarily, the target response information represents preset response information corresponding to the test request information, that is, correct response information.
[0091] In some possible implementations, the test system may search for target response information corresponding to the test request information from a preset test case, that is, determine the target response information corresponding to the test response message.
[0092] Specifically, the test system obtains a test case; determines a second identifier corresponding to the first identifier according to the first identifier of the test response message; and determines target response information in the test case corresponding to the test response message according to the second identifier corresponding to the first identifier. Each test case includes test request information and target response information; the test case has a second identifier; and the second identifier has a corresponding relationship with the first identifier.
[0093] Exemplarily, a test case library may be preset in the test system for storing test cases. The second identifier is used to uniquely represent the test case, for example, it may be a serial number or an ID, etc. The second identifier of the test case has a corresponding relationship with the first identifier of the test request information stored in the forwarding table. It should be noted that the first identifier and the second identifier may be the same or different, and this application does not limit this. Table 3 is a schematic diagram of a test case library provided by this application.
[0094] Table 3 Test case library
[0095] serial number Test Cases Test Request Information Target response information Serial number a1 Test Case 1 Test request information 1 Target response information 1 Serial number a2 Test Case 2 Test request information 2 Target response information 2 Serial number a3 Test case 3 Test request information 3 Target response information 3
[0096] As shown in Reference Table 3, the test system can determine the serial number of the test case corresponding to the test response message based on the serial number of the test response message and the correspondence between the serial numbers, and then determine the target response information in the test case corresponding to the test response message.
[0097] S307: The test system determines the preset target value of the key field and the test value of the key field in the test response message according to the target response information.
[0098] Exemplarily, the target response information in the test case library stored in the above test system may be a preset target value that only stores the key fields in the target response information; or, the test case library may indicate the key fields of each target response information. Therefore, the test system may determine the key fields corresponding to the target response information based on the target response information; and then determine the test value corresponding to the key fields in the test response message, and the target value corresponding to the key fields in the target response information.
[0099] S308. The test system generates a test result according to the test value of the key field in the test response message and the preset target value of the key field.
[0100] For example, the test system can compare the test value of the key domain with the preset target value to generate a comparison result, which may include equality, inequality, out of range, missing, etc. Then, based on the comparison result, a test result can be generated, which may include information such as test pass / fail, failure reason, and failure detailed description. The above test results can be stored in a test report or database for subsequent analysis and viewing.
[0101] The transaction processing test method provided in the embodiment of the present application is that the test system starts the transaction system to be tested through the test instruction to obtain the test request information, and stores the test request information in the storage forwarding table, so as to send the test request message based on the message retransmission logic of the storage forwarding table, and then the test system can verify the test value of the key field in the test response message returned by the transaction system to be tested and the preset target value to generate the final test result. In this way, when testing the transaction system, the original message retransmission logic of the transaction system can be used based on the storage forwarding table to implement the sending of the test request message, without the need to set up an additional sending mechanism for the test request message, saving test resources, and ensuring that the transaction system to be tested can correctly respond to various requests in different business scenarios, achieving verification at the business logic level of the transaction system to be tested, and improving the accuracy of the transaction system test.
[0102] Figure 4 A schematic diagram of the structure of the test device for transaction processing provided by this application, such as Figure 4 As shown, the transaction processing test device 40 provided in this embodiment includes:
[0103] The sending module 401 in the transaction system to be tested is used to send a test request message in response to the test instruction based on the test request information preset in the storage forwarding table; wherein the test request information represents the transaction information;
[0104] The storage module 402 in the transaction system to be tested is used to receive and store the test response message corresponding to the test request message; wherein the test response message includes the test value of the key field, and the test value of the key field represents the processing result after processing the transaction information;
[0105] The test module 403 in the test system is used to obtain the test response message; and generate a test result based on the test value of the key field in the test response message and the preset target value of the key field; wherein the test result represents whether the transaction processing of the transaction system to be tested based on the transaction information to obtain the processing result is correct.
[0106] In a possible implementation manner, the sending module 401 is specifically configured to:
[0107] In response to the test instruction, the transaction system to be tested obtains test request information; and stores the test request information in the storage-forwarding table;
[0108] The transaction system to be tested executes the message retransmission logic corresponding to the storage forwarding table, and sends the test request message based on the test request information in the storage forwarding table.
[0109] In a possible implementation, the storage module 402 is specifically configured to:
[0110] The transaction system to be tested stores the test request information in the storage-and-forwarding table, and adds a first identifier to the test request information.
[0111] In a possible implementation, the testing module 403 is specifically configured to:
[0112] The test system determines the target response information corresponding to the test response message according to the test response message; wherein the target response information represents the preset response information corresponding to the test request information;
[0113] The test system determines the preset target value of the key field and the test value of the key field in the test response message according to the target response information;
[0114] The test system generates a test result according to the test value of the key field in the test response message and the preset target value of the key field.
[0115] In a possible implementation manner, the test response message has a first identifier; the test module 403 is specifically configured to:
[0116] The test system obtains a test case; wherein each test case includes test request information and target response information; the test case has a second identifier; the second identifier has a corresponding relationship with the first identifier;
[0117] The test system determines, according to the first identifier of the test response message, a second identifier corresponding to the first identifier;
[0118] The test system determines target response information in the test case corresponding to the test response message according to a second identifier corresponding to the first identifier.
[0119] In a possible implementation, the testing module 403 is specifically configured to:
[0120] The test system determines, according to the target response information, a key domain corresponding to the target response information;
[0121] The test system determines a test value corresponding to the key field in the test response message, and a preset target value corresponding to the key field in the target response information.
[0122] The transaction processing test device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0123] Figure 5 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 5As shown, the electronic device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the device 50 also includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus 504.
[0124] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the above method.
[0125] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0126] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0127] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0128] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0129] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0130] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0131] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0132] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0133] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0134] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0135] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0136] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0137] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0138] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A transaction processing testing method, characterized in that: include: In response to the test instruction, the transaction system to be tested sends a test request message based on the test request information preset in the storage forwarding table; wherein the test request information represents the transaction information; The transaction system to be tested receives and stores a test response message corresponding to the test request message; wherein the test response message includes a test value of a key field, and the test value of the key field represents a processing result after processing the transaction information; The test system obtains the test response message; and generates a test result based on the test value of the key field in the test response message and the preset target value of the key field; wherein the test result represents whether the transaction processing of the transaction system to be tested based on the transaction information to obtain the processing result is correct.
2. The method according to claim 1, characterized in that In response to the test instruction, the transaction system to be tested sends a test request message based on the test request information preset in the storage forwarding table, including: In response to the test instruction, the transaction system to be tested obtains test request information; and stores the test request information in the storage-forwarding table; The transaction system to be tested executes the message retransmission logic corresponding to the storage forwarding table, and sends the test request message based on the test request information in the storage forwarding table.
3. The method according to claim 2, characterized in that The transaction system to be tested stores the test request information in the storage-forwarding table, including: The transaction system to be tested stores the test request information in the storage-and-forwarding table, and adds a first identifier to the test request information.
4. The method according to any one of claims 1 to 3, characterized in that: The test system generates a test result according to the test value of the key field in the test response message and the preset target value of the key field, including: The test system determines the target response information corresponding to the test response message according to the test response message; wherein the target response information represents the preset response information corresponding to the test request information; The test system determines the preset target value of the key field and the test value of the key field in the test response message according to the target response information; The test system generates a test result according to the test value of the key field in the test response message and the preset target value of the key field.
5. The method according to claim 4, characterized in that The test response message has a first identifier; The test system determines, according to the test response message, target response information corresponding to the test response message, including: The test system obtains a test case; wherein each test case includes test request information and target response information; the test case has a second identifier; the second identifier has a corresponding relationship with the first identifier; The test system determines, according to the first identifier of the test response message, a second identifier corresponding to the first identifier; The test system determines target response information in the test case corresponding to the test response message according to a second identifier corresponding to the first identifier.
6. The method according to claim 4, characterized in that The test system determines the preset target value of the key field and the test value of the key field in the test response message according to the target response information, including: The test system determines, according to the target response information, a key domain corresponding to the target response information; The test system determines a test value corresponding to the key field in the test response message, and a preset target value corresponding to the key field in the target response information.
7. A transaction processing testing device, characterized in that: include: The sending module in the transaction system to be tested is used to respond to the test instruction and send a test request message based on the test request information preset in the storage forwarding table; wherein the test request information represents the transaction information; A storage module in the transaction system to be tested, used to receive and store a test response message corresponding to the test request message; wherein the test response message includes a test value of a key field, and the test value of the key field represents a processing result after processing the transaction information; The test module in the test system is used to obtain the test response message; and generate a test result based on the test value of the key field in the test response message and the preset target value of the key field; wherein the test result represents whether the transaction processing of the transaction system to be tested based on the transaction information to obtain the processing result is correct.
8. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.