Test methods, apparatuses, electronic devices, and media
By using receive and send queues within the bank to process card organization messages and configuring parsing and assembly rules for each card organization, the communication and network complexity issues in bank-card organization testing are resolved, achieving efficient project testing and cost reduction.
Patent Information
- Application Number
- CN202310458411.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-25
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2043-04-25
AI Technical Summary
Banks face communication difficulties, time zone differences, and complex network architecture when conducting project testing with multiple card organizations, resulting in low testing efficiency and increased operating costs.
The system employs a receive queue and a send queue design to store and process message exchanges between the bank and multiple card organizations. It configures message parsing and assembly rules for each card organization, enabling efficient interaction with the bank's front-end server and avoiding external online testing.
By conducting project testing internally within the bank, operating costs can be reduced, rapid deployment requirements can be met, external dependency risks can be minimized, and testing efficiency can be improved.
Smart Images

Figure CN116633834B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of finance, and more particularly, to a testing method, device, equipment, medium and program product. BACKGROUND
[0002] A bank can be connected to many card organizations, for example, including MasterCard, ITMX organization in Thailand, 1link card organization in Pakistan, etc. The bank has problems such as communication difficulties, time difference differences and network architecture complexity in the project testing process with these card organizations, and some card organizations do not provide related services of simulators, and need to develop corresponding tools by the bank to complete the related testing.
[0003] Therefore, how to provide an efficient and convenient testing method, which can complete the project testing of the bank and one or more card organizations, is a current problem to be solved. SUMMARY
[0004] In view of the above problems, the present disclosure provides a testing method, device, equipment, medium and program product.
[0005] In one aspect of the embodiments of the present disclosure, a testing method is provided, including: when a first message sent by a bank front-end server is received, putting the first message into a receiving queue, the receiving queue being used to store messages sent to N card organizations, N being greater than or equal to 1; taking the first message from the receiving queue, processing the first message according to a message parsing rule of a target card organization to which the first message belongs; calling a message assembling rule of the target card organization to generate a second message, wherein the N card organizations each have a corresponding message parsing rule and a message assembling rule; putting the second message into a sending queue, the sending queue being used to store messages generated by simulating at least one card organization in the N card organizations; taking the second message from the sending queue and sending it to the bank front-end server.
[0006] According to the embodiments of the present disclosure, the calling the message parsing rule of the target card organization to process the first message includes causing a main service to perform the following operations: taking the first message from the receiving queue, identifying an identifier of the target card organization; calling the message parsing rule to process the first message according to the identifier of the target card organization.
[0007] According to an embodiment of the present disclosure, the message assembling rule comprises an automatic reply rule, and the calling the message assembling rule of the target card organization to generate the second message comprises: calling an automatic reply service to generate the second message when the main service identifies the reply content in the first message, wherein the automatic reply service is configured to generate the second message according to a corresponding automatic reply rule; or calling the message assembling rule to generate the second message in response to a first message parameter input by a user.
[0008] According to an embodiment of the present disclosure, before the calling the message assembling rule to generate the second message, the method comprises: determining the identity of the target card organization according to an option of the target card organization selected by a user on a first front-end interface, wherein N card organization options are provided for the user to select; displaying a corresponding second front-end interface to the user according to the identity of the target card organization, wherein at least one card organization of the N card organizations has a different second front-end interface from the remaining card organizations; and receiving the first message parameter input by the user on the second front-end interface.
[0009] According to an embodiment of the present disclosure, when testing the agent transaction, before the receiving the first message, the method further comprises: in response to a case of the agent transaction to be tested, calling the message assembling rule of the target card organization to generate an agent transaction request message; putting the agent transaction request message into the sending queue; taking the agent transaction request message from the sending queue and sending it to the bank front-end server, wherein the first message comprises a message returned by the bank front-end server in response to the agent transaction request.
[0010] According to an embodiment of the present disclosure, before the receiving the first message, the method further comprises: connecting a socket connection service to the bank front-end server, wherein the socket connection service is configured to provide at least two communication rule modes to simulate the N card organizations to receive messages, and the communication rule between at least one card organization of the N card organizations and the remaining card organizations is different.
[0011] According to an embodiment of the present disclosure, the putting the first message into the receiving queue comprises: causing a read service to process the first message received by the socket connection service and put the first message into the receiving queue; and / or the sending to the bank front-end server comprises: causing a write service to take the second message from the sending queue and call the socket connection service to send the second message.
[0012] According to an embodiment of the present disclosure, the method further comprises: according to an access mode of the target card organization, causing the socket connection service to simulate a client and / or a server to communicate with the bank front-end server, wherein the access mode between at least one card organization and the remaining card organizations in the N card organizations is different.
[0013] Another aspect of the embodiments of the present disclosure provides a testing device, comprising: a receiving queue module configured to place a first message sent by a bank front-end server into a receiving queue when the first message is received, wherein the receiving queue is configured to store messages to be sent to N card organizations; a first calling module configured to take the first message from the receiving queue, and call a message parsing rule of a target card organization to process the first message according to the target card organization to which the first message belongs; a second calling module configured to call a message assembling rule of the target card organization to generate a second message, wherein each of the N card organizations has a corresponding message parsing rule and message assembling rule; a sending queue module configured to place the second message into a sending queue, wherein the sending queue is configured to store messages generated by simulating at least one card organization in the N card organizations; and a message sending module configured to take the second message from the sending queue and send the second message to the bank front-end server.
[0014] Another aspect of the embodiments of the present disclosure provides an electronic device, comprising: one or more processors; and a storage device configured to store one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method described above.
[0015] Another aspect of the embodiments of the present disclosure further provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method described above.
[0016] Another aspect of the embodiments of the present disclosure further provides a computer program product comprising a computer program that, when executed by a processor, implements the method described above.
[0017] The one or more embodiments have the beneficial effects that: the received message is stored by using the receiving queue of the simulation card organization, the generated message is stored by using the sending queue of the simulation card organization, a plurality of card organizations and message parsing rules and message assembly rules under different card organizations are configured, one or more card organizations can be simulated to simultaneously support message interaction with the bank front-end server, and project testing is efficiently completed. In the technical transformation of the bank, especially for internal technical optimization transformation or transaction preparation test data, online testing with external organizations is not required, communication difficulties, time difference differences, and network architecture complexity in the testing process are avoided, the needs of project rapid online are met, and the operation cost is reduced. When a card organization is newly added, the internal development and testing needs can be quickly met by configuring the message parsing rules and the message assembly rules, and the external dependence risk is reduced. BRIEF DESCRIPTION OF DRAWINGS
[0018] The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure taken in conjunction with the accompanying drawings, in which:
[0019] Figure 1 An application scenario diagram of a test method according to an embodiment of the present disclosure is schematically shown;
[0020] Figure 2 A test architecture example diagram according to an embodiment of the present disclosure is schematically shown;
[0021] Figure 3 A flowchart of a test method according to an embodiment of the present disclosure is schematically shown;
[0022] Figure 4 An architecture diagram in the process of executing a test method according to an embodiment of the present disclosure is schematically shown;
[0023] Figure 5 A flowchart of processing a first message according to an embodiment of the present disclosure is schematically shown;
[0024] Figure 6 A configuration interface of a message parsing rule according to an embodiment of the present disclosure is schematically shown;
[0025] Figure 7 A configuration interface of a plurality of automatic reply rules according to an embodiment of the present disclosure is schematically shown;
[0026] Figure 8 A detailed information configuration interface of an automatic reply rule according to an embodiment of the present disclosure is schematically shown;
[0027] Figure 9 A flowchart of switching a front-end interface according to an embodiment of the present disclosure is schematically shown;
[0028] Figure 10 A flowchart illustrating a main interface according to an embodiment of the present disclosure is shown schematically;
[0029] Figure 11 A connection diagram illustrating an association of a front-end interface and card organization configuration information according to an embodiment of the present disclosure is shown schematically;
[0030] Figure 12 A connection diagram illustrating a connection configuration according to an embodiment of the present disclosure is shown schematically;
[0031] Figure 13 A test flowchart of a third-party transaction according to an embodiment of the present disclosure is shown exemplarily;
[0032] Figure 14 A test flowchart of a self-party transaction according to an embodiment of the present disclosure is shown exemplarily;
[0033] Figure 15 A structural block diagram of a test device according to an embodiment of the present disclosure is shown schematically; and
[0034] Figure 16 A block diagram of an electronic device suitable for implementing the test method according to an embodiment of the present disclosure is shown schematically. DETAILED DESCRIPTION
[0035] First, some terms involved in some embodiments of the present disclosure are explained as follows:
[0036] Bank front-end: to realize the channel connection of bank core system (host or platform) and UnionPay, overseas card organization system, to provide communication channel for cross-bank transactions of UnionPay brand card.
[0037] Class: is the basis for object-oriented program to realize information encapsulation, each class contains data description and a set of functions that operate data or pass messages. Services can be implemented by encapsulating as class objects.
[0038] JETCO: full name is Joint Electronic Teller Services Limited (JETCO), which is a bank teller machine network system.
[0039] 1LINK: is the first fully authorized payment system operator and payment service provider in Pakistan, is the largest payment gateway and switching system, is committed to managing and developing a strong electronic payment network in Pakistan.
[0040] EURO6000: one of the three major bank card networks in Spain, with more than 30 member banks.
[0041] ARTAJASA: one of the four major cross-bank ATM network operators in Indonesia.
[0042] JALIN: One of the four major local cross-bank ATM network operators in Indonesia.
[0043] ITMX: National ITMX (Interbank Transaction Management and Exchange) was established by the Thai Bankers' Association under the guidance of the Payment Systems Committee (PSC) of the Bank of Thailand (BOT), the developer and service provider of Thailand's electronic payment infrastructure.
[0044] PAYMARK: New Zealand's electronic transaction system, providing electronic payment, POS services, and also including retail transaction payment systems.
[0045] CSS: Cambodia Shared Switch, a local payment network ecosystem in Cambodia.
[0046] FirstData: A well-known financial industry information service company in the United States, providing e-commerce and payment services for financial institutions and merchants in dozens of countries around the world.
[0047] MSPK: The local bank card clearing system in Kazakhstan. The KISC Central Bank Clearing Center is responsible for daily operations. The systems of various commercial banks are connected to the MSPK system, realizing the interconnection of local ATMs / POSs between banks, and the use of bank cards issued by MSPK member banks on ATMs / POSs of various banks.
[0048] Wanxiwanglian: Full name Wanxiwanglian Information Technology (Beijing) Co., Ltd. It is a joint venture established by MasterCard in China.
[0049] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments can be implemented without such specific details. Furthermore, in the following description, descriptions of well-known structures and techniques are omitted to avoid unnecessarily obscuring the concept of the present disclosure.
[0050] The terms used herein are merely for the purpose of describing specific embodiments and are not intended to limit the present disclosure. The terms "include", "contain" and the like used herein indicate the presence of a feature, step, operation and / or component, but do not exclude the presence or addition of one or more other features, steps, operations or components.
[0051] All terms used herein, including technical and scientific terms, have the meanings as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the use of terms herein, such as should be construed to have a meaning consistent with the context of this specification and relevant art, and should not be construed ideally or overly formally unless expressly so defined herein.
[0052] In the case of using expressions similar to "at least one of A, B, and C, etc.", in general, it should be interpreted as having the meaning as commonly understood by one of ordinary skill in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, a system having B alone, a system having C alone, a system having both A and B, a system having both A and C, a system having both B and C, and / or a system having A, B, and C, etc.).
[0053] In the related art, only each card group can be tested together, and at least one or more of the following problems exist:
[0054] 1. The card organization does not provide a corresponding simulator, and if the bank is internally optimized and reformed, it needs to be tested online with external organizations, and there are many difficulties in the testing process:
[0055] ① Language barrier, communication difficulties. The overseas branches of the current bank are spread all over the world, and the system development work is responsible by the domestic development center, while the card organizations being interfaced all use local languages, and when testing online, personnel need to be dispatched to overseas branches to coordinate and translate.
[0056] ② Time difference. If the test is done with a region with a large time span from Europe and the United States, night shift is needed.
[0057] ③ Network architecture is complex. The network of external organizations is first connected to the branch line from the head office line, and then connected to the external organization, which needs the support of the branch technology personnel.
[0058] 2. The test with the card organization involves scheduling problems, and cannot meet the needs of the bank to go online quickly.
[0059] 3. Part of the card organization's test requirements need to be charged, increasing the operating cost.
[0060] The embodiment of the present disclosure provides a test method, which utilizes the received packets stored in the receiving queue to receive the packets generated by the simulation card organization, utilizes the sending queue to store the packets generated by the simulation card organization, configures a plurality of card organizations and packet analysis rules and packet assembly rules under different card organizations, can support the simulation of one or more card organizations to interact with the bank front-end server, and can efficiently complete the project test. When the technical transformation is performed in the bank, especially when the internal technical optimization transformation or the transaction preparation test data is performed, the online test with the external organization is not needed, the problems in the test process, such as the communication difficulty, the time difference and the network architecture complexity, are avoided, the demand of the project rapid online is met, and the operation cost is reduced. When the card organization is newly added, the packet analysis rules and the packet assembly rules can be configured, the internal development test demand is met, and the external dependence risk is reduced.
[0061] It should be noted that the test method, the device, the equipment, the medium and the program product provided by the embodiment of the present disclosure can be used for the test in the financial field in the financial technology related aspects, and can also be used in any field except the financial field, and the application field of the present disclosure is not limited.
[0062] Figure 1 The application scenario diagram of the test method according to the embodiment of the present disclosure is schematically shown. Figure 2 The test architecture example diagram according to the embodiment of the present disclosure is schematically shown.
[0063] As shown in Figure 1 , the application scenario 100 according to the embodiment can include one or more bank front-end servers (such as a first front-end server 111, a second front-end server 112 and a third front-end server 113), a test server 120, a bank core server 130, a network 140 and terminal devices 151, 152 and 153. The network 140 is used as a medium to provide a communication link between the terminal devices 151, 152 and 153 and the test server 120. The network 140 can include various connection types, such as wired, wireless communication links or optical fiber cables and the like. It can be understood that the network 140 can also be arranged between the test server 120 and the bank front-end server, or the bank front-end server and the bank core server 130.
[0064] Referring to Figure 1 and Figure 2 , the bank core server 130 can be deployed with a bank core system, such as a transaction system. The first front-end server 111, the second front-end server 112 and the third front-end server 113 can not be bank front-end applications, and correspond to the front-ends 1-3 in Figure 2 .
[0065] Exemplarily, the test server 120 can execute the test method provided by the embodiments of the present disclosure. The test device can be deployed in the test server 120, and the test front-end interface is deployed on the terminal device of the user, the background database is built on the public test server, the test case and the message rule are saved in the database, and the purpose of being shared by multiple users or test projects is achieved. The user can test the activity according to the needs of the corresponding card organization front-end.
[0066] The user (for example, a test personnel) can use the terminal device 151, 152, 153 to interact with the test server 120 through the network 104 to receive or send messages, etc., for example, inputting a message parameter, sending a message, setting a test case or other operations. Various communication client applications can be installed on the terminal device 151, 152, 153, for example, a shopping application, a web browser application, a search application, an instant messaging tool, an email client, a social platform software, etc. (only as an example).
[0067] The terminal device 151, 152, 153 can be a display device, or various electronic devices with a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop computer and a desktop computer, etc.
[0068] The bank front-end server, the test server 120 or the bank core server 130 can be a server or a server cluster providing various services, and can analyze and process the received message data, etc., and feed back the processing result.
[0069] It should be understood that Figure 1 The number of terminal devices, networks and servers in
[0070] The test method of the embodiments of the present disclosure will be described in detail based on the scenario described below. Figure 1 Figures 2-14 The test method of the embodiments of the present disclosure will be described in detail based on the scenario described below.
[0071] Figure 3 The flowchart of the test method according to the embodiments of the present disclosure is schematically shown. Figure 4 The architecture diagram in the process of executing the test method according to the embodiments of the present disclosure is schematically shown.
[0072] As shown in Figure 3 The test method of the embodiments includes operations S310-S350.
[0073] In operation S310, when receiving the first message sent by the bank front-end server, the first message is put into a receiving queue, and the receiving queue is used to store the messages sent to N card organizations, and N is greater than or equal to 1.
[0074] The card organization refers to a bank card switching clearing institution, which is responsible for formulating bank card standards, and is responsible for processes such as forwarding, transaction splitting, transaction clearing, and transaction reconciliation of bank card transactions.
[0075] Exemplarily, data enters from one end of a linear table and exits from the other end, and a linear storage structure that follows the "first-in first-out" principle is a queue. The queue can be implemented using an array or a linked list. Therefore, one or more messages can be stored as Figure 4 The receiving queue (Input Queue) shown.
[0076] In operation S320, the first message is taken out from the receiving queue, and the message parsing rule of the target card organization is called to process the first message according to the target card organization to which the first message belongs.
[0077] As Figure 4 The first message can be taken out from the receiving queue (Input Queue) and parsed according to the message parsing rule of the target card organization. The message format of each card organization is set based on ISO8583. An ISO8583 message is composed of a total of 128 data fields. The encoding of the ISO8583 message data field has two types of BCD and character. The first four bits of the ISO8583 message header are the transaction code, the next 16 bits are the bitmap, and then the valid data field. Each field can have a uniform specification and can be fixed-length or variable-length.
[0078] In operation S330, the message assembly rule of the target card organization is called to generate the second message, wherein the N card organizations each have a corresponding message parsing rule and message assembly rule.
[0079] Exemplarily, the message parsing rule and the message assembly rule can be defined for each card organization separately in advance according to the data type and length of each field of each card organization, and the like, so as to realize the function of simulating N card organizations.
[0080] In operation S340, the second message is placed in the sending queue, and the sending queue is used to store the message generated by at least one card organization in the simulated N card organizations.
[0081] One or more messages can be stored as Figure 4 The sending queue (Output Queue) shown.
[0082] In operation S350, the second message is taken out from the sending queue and sent to the bank front-end server.
[0083] It can be understood that one or more rounds of message receiving and sending can be performed with the bank front-end server until the test purpose is achieved or a transaction is completed. For example, after the second message is sent to the bank front-end server, a new first message returned by the bank front-end server can be received.
[0084] According to an embodiment of the present disclosure, the messages received by the receiving queue for storing the simulated card organization and the messages generated by the sending queue for storing the simulated card organization are configured with a plurality of card organizations and message parsing rules and message assembly rules under different card organizations, which can support message interaction between one or more card organizations and the bank front-end server at the same time, and efficiently complete project testing. When technical transformation is performed in a bank, especially for internal technical optimization transformation or transaction preparation test data, online testing with external organizations is not required, which avoids problems such as communication difficulties, time difference differences, and network architecture complexity in the testing process, meets the needs of project rapid online, and reduces operation costs. When a card organization is newly added later, the internal development and testing needs can be quickly met by configuring the message parsing rules and the message assembly rules, and the external dependence risk is reduced.
[0085] In some embodiments, before the first message is received, the method further includes: connecting the socket connection service to the bank front-end server, and the socket connection service is configured to provide at least two communication rules to simulate N card organizations to receive messages, and the communication rules between at least one card organization and the remaining card organizations in the N card organizations are different.
[0086] For example, referring to Figure 4 The socket connection service is responsible for establishing a connection with the bank front-end server and supporting multiple TCP communication connections. The communication rules can be determined by one or more factors such as encoding mode, communication protocol, communication mode, and message format. Because the card organizations are different, different communication rules exist.
[0087] According to an embodiment of the present disclosure, the communication rules under a plurality of card organizations are configured, which can support communication connection with one or more card organizations and the bank front-end server at the same time.
[0088] In some embodiments, placing the first message in the receiving queue includes: causing a read service to process the first message received by the socket connection service and placing the first message in the receiving queue. And / or sending to the bank front-end server includes: causing a write service to take the second message from the sending queue and calling the socket connection service to send the second message.
[0089] For example, referring to Figure 4ReadNetService, the read service, handles all messages received by the front-end Socket connection service and places them into the input queue. WriteNetService, the write service, handles all messages to be sent. If a message is detected in the output queue, it is retrieved and sent by calling the Socket connection service.
[0090] According to embodiments of this disclosure, messages received by the front-end Socket connection service can be processed uniformly through a read service and a receive queue, while messages to be sent can be processed uniformly through a send queue and a write service. This avoids the need to repeatedly write code and logic for message processing across multiple card organizations. Furthermore, using queues enables asynchronous processing, improving the system's concurrency performance.
[0091] Figure 5 A flowchart illustrating the processing of a first message according to an embodiment of the present disclosure is shown schematically. Figure 6 The illustration schematically shows a configuration interface for message parsing rules according to an embodiment of the present disclosure.
[0092] like Figure 5 As shown, processing the first message in this embodiment includes using, for example... Figure 4 The main service (ServerMain) operates from S510 to S520. The main service can coordinate various services to implement card organization simulation functions and can respond to user operations for human-computer interaction.
[0093] When operating the S510, the first message is retrieved from the receive queue, and the identifier of the target card organization is identified.
[0094] When operating the S520, the first message is processed by invoking the message parsing rules based on the identifier of the target card organization.
[0095] For example, the message parsing rules include the message header length format. Each card organization is assigned a specific identifier, which is mapped to the message header length format (MLI) of each organization. This allows the message length to be read correctly upon receiving a message, and thus the message body. This can be achieved by automatically inserting the target card organization's identifier when assembling the first message in the bank's front-end server, thus enabling automatic identification. Alternatively, it can be based on the card organization options set by the user in the front-end interface, and the identifier can be automatically determined according to these options. Users can set one or more card organization options. When multiple options are set, the identifier corresponding to each option can be traversed, and the corresponding message parsing rules can be retrieved one by one to parse the message until successful parsing.
[0096] Referring to Figure 6 , the message analysis rule can include domain number, domain name, Chinese name, data type, length attribute, domain length, length of length (variable length), and alignment mode, etc. In the simulation of message receiving, the received 8583 message is unpacked according to the message rule of each corresponding domain (determined by domain number, domain name, etc.), and the content of each domain is parsed. According to the message version, message length rule and card group type, the type of the 8583 message is determined.
[0097] According to the embodiments of the present disclosure, the respective card organizations are distinguished by card organization identification, the corresponding messages of each card organization can be effectively parsed and assembled, and the test efficiency is improved by utilizing the main service to coordinate each service.
[0098] Figure 7 The configuration interface of a plurality of automatic reply rules according to an embodiment of the present disclosure is schematically shown. Figure 8 The detailed information configuration interface of an automatic reply rule according to an embodiment of the present disclosure is schematically shown.
[0099] In some embodiments, the message assembly rule includes an automatic reply rule, and the calling of the message assembly rule of the target card organization to generate the second message includes: calling a reply service to generate the second message when the main service identifies the reply content in the first message, wherein the reply service is used to generate the second message according to the corresponding automatic reply rule. Or, in response to the first message parameter input by the user, the message assembly rule is called to generate the second message.
[0100] Exemplarily, the user can define the message rule of each domain in advance for different kinds of 8583 message types, forming different automatic reply rules. In this way, when the card organization generates the message, the message rule of each domain and the domain content can be packed according to the configuration.
[0101] As Figure 7 , the automatic reply rules of different transactions are configured in the database, including rule ID, rule name, package mode and rule description, and the retrieval according to ID and name is supported. After the message keyword (such as transaction type keyword) in the reply content is matched successfully, the reply package is packaged according to the specific definition of the rule. For example Figure 8 The specific instance of the definition of each domain of the reply rule (message rule ID 1000000172) is shown, and the system generation mode can be defined, such as returning a fixed value, or returning a specified format date, or taking a domain from the request message for return, and the corresponding system user-defined function is configured for executing the corresponding system generation mode.
[0102] In some embodiments, the main service judges the type of the received transaction (i.e., the response content), finds the corresponding response rule from the background database according to the type of the transaction, and returns the message to the front end according to the response rule.
[0103] In some embodiments, the second message is generated by invoking the message assembly rule in response to the first message parameter input by the user. For example, the user flexibly configures the rule according to the test purpose, such as wanting to test the scenario of a successful balance query transaction and an illegal card number, and takes the value of the 39 field response code of the response message rule to meet the requirement. Similarly, if the user wants to use a different account or card number, the user only needs to create a new case or change the specific field value of the case.
[0104] According to embodiments of the present disclosure, various types of transaction response rules are encapsulated according to user predefinition, such as various field definition response rules and response content, automatic response or manual response, fast and efficient implementation of interaction, and improved test efficiency.
[0105] Figure 9 A flowchart of a switching front end interface according to embodiments of the present disclosure is schematically shown. Figure 10 A flowchart of a main interface according to embodiments of the present disclosure is schematically shown. Figure 11 A correlation diagram of a front end interface and card organization configuration information according to embodiments of the present disclosure is schematically shown.
[0106] Before the second message is generated by invoking the message assembly rule, as shown in Figure 9 the switching front end interface of the embodiments includes operation S910 to operation S930.
[0107] In operation S910, the identification of the target card organization is determined according to the option of the target card organization selected by the user in the first front end interface, wherein N card organization options are provided for the user to select.
[0108] Exemplarily, a configuration interface is pre-set, and card organization simulator information can be configured on the configuration interface to simulate the message transceiving function of the card organization. Referring to Figure 4 and Figure 10 after the configuration is completed, the first front end interface as shown in Figure 10 is shown to the user through the UI. Since the communication rules, access methods, message parsing rules, and message assembly rules of different card organizations are different, in order to simulate the interaction process of one or more card organizations in the test scenario, the first front end interface can provide N card organization options, and the user selects one or more simulators or sub-simulators (such as Figure 10 the Thai ITMX simulator in Figure 10 includes two sub-simulators) through the simulator category. When the simulator is determined, the corresponding card organization can be simulated.
[0109] In operation S920, according to the identification of the target card organization, the corresponding second front-end interface is displayed to the user, wherein at least one card organization in the N card organizations has a different second front-end interface corresponding to the remaining card organizations.
[0110] Referring to Figure 11 , for example, the MainUI can correspond to the first front-end interface, and the SimulatorUI, the JetcoMiragateUI, the McsSimulatorUI, and the NpgSimulatorUI are all one of the second front-end interfaces. The mapping relationship between each and the card organization can be pre-set as shown in Figure 11 . The mapping relationship between the different front-end interfaces and the corresponding card organizations is pre-defined, which facilitates the calling of the class object and the method name of the corresponding card organization, and the obtaining of the message parsing rule and the message assembly rule.
[0111] In operation S930, the first message parameter input by the user on the second front-end interface is received.
[0112] When the user inputs the first message parameter on the second front-end interface, the simulation message can be generated, and the generated simulation message is the same as the message generated in the real production environment.
[0113] According to the embodiments of the present disclosure, the different front-end interfaces have an inheritance relationship, and different classes are called, which can reflect clear architecture logic and simulation process, and reduce the probability of calling errors in the test process.
[0114] Figure 12 The interface diagram of the connection configuration according to the embodiments of the present disclosure is schematically shown.
[0115] In some embodiments, it further includes: according to the access mode of the target card organization, making the socket connection service simulate the client and / or the server, and being communicatively connected with the bank front-end server, and the access mode between at least one card organization in the N card organizations and the remaining card organizations is different.
[0116] Exemplarily, each card organization has different requirements for the access mode of the bank, and therefore supports the connection mode based on TCP, which can be used as a client or a server. Or both as a client and a server. Taking the Jetco interface as an example, according to the specification of the Jetco, “JETCO ATM Switching Network - Data Communication Specification v1.4”, the bank needs to access as both a client and a server. For example, Figure 12, the corresponding configuration can be made according to the requirement, set as simplex dual connection, and at the same time, configure the front-end IP and simulator port as the server and the front-end IP and front-end port as the client. In other card organization specifications, it can also be set as duplex single connection-AS SERVER or duplex single connection-AS CLIENT mode.
[0117] During the test, the card organization can simulate the request initiated to the bank front-end server (he on behalf of the transaction), or the request initiated by the bank front-end server to the card organization (the transaction on behalf of him). The following will be further described through Figure 13 and Figure 14 further description.
[0118] Figure 13 The test flowchart of the he on behalf of the transaction according to the embodiment of the present disclosure is exemplarily shown.
[0119] Referring to Figure 13 , the card organization simulates the request initiated to the bank front-end server, and the main process of the he on behalf of the transaction is as follows:
[0120] In operation S1301, the user clicks to send the case on the UI interface. Or according to the test task set by the user, the test case is automatically sent.
[0121] Exemplarily, in the second front-end interface, a plurality of areas can be provided, such as area 1 is a case list, which is maintained by the user according to the test requirement. Area 2 is the specific definition of the case, including which domain needs to be assembled for the case, how to assign values, is it automatically generated by the system or is it filled in by the user. Area 3 is the actual sending content. The message sent by the tool is also displayed here if the tool has received the response of the front-end. It can be convenient for the user to use and improve the test efficiency.
[0122] In operation S1302, in response to the he on behalf of the transaction case to be tested, the message assembly rule of the target card organization is called to generate the he on behalf of the transaction request message.
[0123] In operation S1303, the he on behalf of the transaction request message is put into the sending queue, output queue.
[0124] In operation S1304, WriteNetService reads the output message and sends the front-end. The he on behalf of the transaction request message is taken out from the sending queue and sent to the bank front-end server, and the first message includes the message returned by the bank front-end server in response to the he on behalf of the transaction request.
[0125] In operation S1305, ReadNetService reads the first message and puts it into the input queue.
[0126] In operation S1306, ServerMain reads the message from the input queue.
[0127] In operation S1307, it is determined whether a reply is needed. If yes, operation S1308 is performed. If no, the process ends.
[0128] In some embodiments, the AutoAnswer class can be called directly, and the class determines whether automatic reply is needed.
[0129] In operation S1308, the AutoAnswer class unpacks according to the message parsing rule.
[0130] In operation S1309, the AutoAnswer class obtains the reply rule.
[0131] In operation S1310, the AutoAnswer class assembles the reply message.
[0132] In operation S1311, the AutoAnswer class puts the reply message into the output queue.
[0133] In operation S1312, WriteNetService reads the output message and returns the front end.
[0134] Figure 14 An exemplary test flowchart of the present transaction according to an embodiment of the present disclosure is shown.
[0135] Referring to Figure 14 , the simulation card organization receives the request from the bank front-end server, and the main process of the present transaction is as follows:
[0136] In operation S1401, ReadNetService reads the first message and puts it into the input queue.
[0137] In operation S1402, ServerMain reads the message from the input queue.
[0138] In operation S1403, it is determined whether a reply is needed. If yes, operation S1308 is performed. If no, the process ends.
[0139] In operation S1404, the AutoAnswer class unpacks according to the message parsing rule.
[0140] In operation S1405, the AutoAnswer class obtains the reply rule.
[0141] In operation S1406, the AutoAnswer class assembles the reply message.
[0142] At operation S1407, the AutoAnswer class puts the reply message into the output queue.
[0143] At operation S1408, the WriteNetService reads the output message and returns the prefix.
[0144] Based on the above test method, the present disclosure further provides a test device. The following will be described in detail in combination with Figure 15 The device is described in detail.
[0145] Figure 15 The structural block diagram of the test device according to the embodiment of the present disclosure is schematically shown.
[0146] As Figure 15 shown, the test device 1500 of the embodiment includes a receiving queue module 1510, a first calling module 1520, a second calling module 1530, a sending queue module 1540, and a message sending module 1550.
[0147] The receiving queue module 1510 can perform operation S310, for putting the first message into the receiving queue when receiving the first message sent by the bank prefix server, and the receiving queue is used to store the messages sent to N card organizations.
[0148] The first calling module 1520 can perform operation S320, for taking the first message from the receiving queue, and processing the first message according to the message parsing rule of the target card organization to which the first message belongs.
[0149] The second calling module 1530 can perform operation S330, for calling the message assembly rule of the target card organization to generate the second message, wherein the N card organizations each have a corresponding message parsing rule and message assembly rule.
[0150] The sending queue module 1540 can perform operation S340, for putting the second message into the sending queue, and the sending queue is used to store the message generated by simulating at least one card organization in the N card organizations.
[0151] The message sending module 1550 can perform operation S350, for taking the second message from the sending queue and sending it to the bank prefix server.
[0152] It should be noted that the test device 1500 includes the receiving queue module 1510, the first calling module 1520, the second calling module 1530, the sending queue module 1540, and the message sending module 1550, which are respectively used to perform the operations S310-S350 as described above. Figures 2-14The modules of the steps of any one of the described embodiments. The implementation of each module / unit / subunit, etc. in the device part embodiment, the technical problems solved, the functions implemented, and the technical effects achieved are the same as or similar to the implementation of each corresponding step in the method part embodiment, the technical problems solved, the functions implemented, and the technical effects achieved, and will not be repeated here.
[0153] According to embodiments of the present disclosure, any one or more of the receiving queue module 1510, the first calling module 1510, the second calling module 1530, the sending queue module 1540, and the packet sending module 1550 can be combined in one module for implementation, or any one of them can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules, and implemented in one module.
[0154] According to embodiments of the present disclosure, at least one of the receiving queue module 1510, the first calling module 1510, the second calling module 1530, the sending queue module 1540, and the packet sending module 1550 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on substrate, a system on package, an application specific integrated circuit (ASIC), or any other reasonable manner that can be integrated or packaged by a circuit, etc. hardware or firmware, or any one of the three implementation ways of software, hardware and firmware or any appropriate combination of any of them. Alternatively, at least one of the receiving queue module 1510, the first calling module 1510, the second calling module 1530, the sending queue module 1540, and the packet sending module 1550 can be at least partially implemented as a computer program module that can perform corresponding functions when the computer program module is run.
[0155] Figure 16 The block diagram of an electronic device suitable for implementing the test method according to embodiments of the present disclosure is schematically shown.
[0156] As Figure 16As shown, the electronic device 1600 according to embodiments of the present disclosure includes a processor 1601 that can perform various appropriate actions and processes according to programs stored in a read only memory (ROM) 1602 or loaded from a storage section 1608 into a random access memory (RAM) 1603. The processor 1601 can include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor, and / or a related chip set, and / or a dedicated microprocessor (e.g., an application specific integrated circuit (ASIC)), and so on. The processor 1601 can also include an on-board memory for cache use. The processor 1601 can include a single processing unit or multiple processing units for executing different actions of the method processes according to embodiments of the present disclosure.
[0157] In the RAM 1603, various programs and data required for the operation of the electronic device 1600 are stored. The processor 1601, the ROM 1602, and the RAM 1603 are connected to each other via a bus 1604. The processor 1601 performs various operations of the method processes according to embodiments of the present disclosure by executing the programs in the ROM 1602 and / or the RAM 1603. Note that the programs can also be stored in one or more memories other than the ROM 1602 and the RAM 1603. The processor 1601 can also perform various operations of the method processes according to embodiments of the present disclosure by executing the programs stored in the one or more memories.
[0158] According to embodiments of the present disclosure, the electronic device 1600 can further include an input / output (I / O) interface 1605, which is also connected to the bus 1604. The electronic device 1600 can further include one or more of the following components connected to the I / O interface 1605: an input section 1606 including a keyboard, a mouse, etc. An output section 1607 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc. A storage section 1608 including a hard disk, etc. And a communication section 1609 including a network interface card such as a LAN card, a modem, etc. The communication section 1609 performs communication processing via a network such as the Internet. A drive 1610 is also connected to the I / O interface 1605 as necessary. A removable medium 1611 such as a magnetic disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 1610 as necessary, so that a computer program read out therefrom is installed into the storage section 1608 as necessary.
[0159] The present disclosure also provides a computer readable storage medium, which can be included in the device / apparatus / system described in the above embodiments. It can also exist separately without being assembled into the device / apparatus / system. The above computer readable storage medium carries one or more programs, which when executed, implement the method according to the embodiments of the present disclosure.
[0160] According to an embodiment of the present disclosure, the computer readable storage medium can be a non-volatile computer readable storage medium, which can include, but is not limited to, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium can be any tangible medium that contains or stores a program, which can be used by or in connection with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, the computer readable storage medium can include one or more memories, such as the ROM 1602 and / or the RAM 1603 described above, and / or one or more additional memories.
[0161] Embodiments of the present disclosure also include a computer program product, which includes a computer program containing program codes for executing the methods shown in the flowcharts. When the computer program product is run in a computer system, the program codes are used to make the computer system implement the methods provided by the embodiments of the present disclosure.
[0162] The above functions defined in the system / apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 1601. According to an embodiment of the present disclosure, the above described system, apparatus, module, unit, etc. can be implemented by computer program modules.
[0163] In one embodiment, the computer program can rely on a tangible storage medium, such as an optical storage medium, a magnetic storage medium, etc. In another embodiment, the computer program can also be transmitted, distributed, and downloaded in the form of a signal via a network medium, and be downloaded and installed through the communication part 1609, and / or installed from the detachable medium 1611. The program codes contained in the computer program can be transmitted by any suitable network medium, including but not limited to wireless, wired, etc., or any suitable combination of the foregoing.
[0164] In such embodiments, the computer program can be downloaded and installed from the network through the communication section 1609, and / or installed from the removable media 1611. When the computer program is executed by the processor 1601, the above-described functions defined in the system of the embodiments of the present disclosure are performed. According to the embodiments of the present disclosure, the system, device, apparatus, module, unit, and the like described above can be implemented by computer program modules.
[0165] According to the embodiments of the present disclosure, the program code for executing the computer program provided by the embodiments of the present disclosure can be written in any combination of one or more programming languages, and specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming language, and / or assembly / machine language. The programming language includes, but is not limited to, such as Java, C++, python, “C” language or similar programming language. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case involving a remote computing device, the remote computing device can be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, connected to the Internet through an Internet service provider).
[0166] The flowcharts and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams can represent a module, a segment, or a portion of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in a different order than that shown in the figures. For example, two blocks noted in succession can actually be executed substantially concurrently, or they can sometimes be executed in reverse order, depending on the functionality involved. It should also be noted that each block in the flowcharts or block diagrams, and combinations of blocks in the flowcharts or block diagrams, can be implemented by dedicated hardware-based systems that perform the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0167] Those skilled in the art can understand that the features described in various embodiments of the present disclosure and / or claims can be combined or / and integrated, even if such combinations or integrations are not explicitly described in the present disclosure. In particular, the features described in various embodiments of the present disclosure and / or claims can be combined and / or integrated in various combinations, without departing from the spirit and teachings of the present disclosure. All these combinations and / or integrations fall within the scope of the present disclosure.
[0168] The above described embodiments of the present disclosure. However, these embodiments are merely for illustrative purposes, and are not intended to limit the scope of the present disclosure. Although each embodiment is described above separately, this does not mean that the measures in each embodiment cannot be advantageously used in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Those skilled in the art can make various substitutions and modifications without departing from the scope of the present disclosure, and all such substitutions and modifications shall fall within the scope of the present disclosure.
Claims
1. A testing method comprising: upon receiving a first message sent by a bank front-end server, placing the first message into a receiving queue, the receiving queue being used to store messages to be sent to N card organizations, N being greater than or equal to 1; taking the first message from the receiving queue, and invoking a message parsing rule of a target card organization to which the first message belongs to process the first message; invoking a message assembling rule of the target card organization to generate a second message, wherein each of the N card organizations has a corresponding message parsing rule and message assembling rule; placing the second message into a sending queue, the sending queue being used to store messages simulating those generated by at least one of the N card organizations; taking the second message from the sending queue and sending it to the bank front-end server; wherein the invoking the message parsing rule of the target card organization to process the first message comprises causing a main service to perform the following operations: taking the first message from the receiving queue, and identifying an identifier of the target card organization; invoking the message parsing rule to process the first message according to the identifier of the target card organization, wherein each card organization is assigned a specified identifier, and the identifier has a mapping relationship with the message header length format of each organization.
2. The method of claim 1, wherein, the message assembling rule comprises an automatic response rule, and the invoking the message assembling rule of the target card organization to generate a second message comprises: upon the main service identifying a response content in the first message, invoking a response service to generate the second message, wherein the response service is configured to generate the second message according to a corresponding automatic response rule; or in response to a first message parameter input by a user, invoking the message assembling rule to generate a second message.
3. The method of claim 2, wherein, before the invoking the message assembling rule to generate a second message, comprising: determining the identifier of the target card organization according to an option of the target card organization selected by a user in a first front-end interface, wherein N card organization options are provided for the user to select; according to the identifier of the target card organization, presenting a corresponding second front-end interface to the user, wherein at least one of the N card organizations has a second front-end interface different from those of the remaining card organizations; receiving the first message parameter input by the user in the second front-end interface.
4. The method of claim 1, wherein, when testing an agent transaction, before the receiving the first message, the method further comprises: in response to a case of an agent transaction to be tested, invoking the message assembling rule of the target card organization to generate an agent transaction request message; placing the agent transaction request message into the sending queue; taking the agent transaction request message from the sending queue and sending it to the bank front-end server, the first message comprising a message returned by the bank front-end server in response to the agent transaction request.
5. The method of claim 1, wherein, before the receiving the first message, the method further comprises: The socket connection service is connected with the bank front-end server, and the socket connection service is used to provide at least two communication rule simulation messages received by the N card organizations, and communication rules between at least one card organization and the remaining card organizations in the N card organizations are different.
6. The method of claim 5, wherein, The first message is placed in the receiving queue by causing a read service to process the first message received by the socket connection service and place the first message in the receiving queue; and / or The sending to the bank front-end server includes causing a write service to take the second message from the sending queue and invoke the socket connection service to send the second message.
7. The method of claim 5, wherein, The method further includes: According to the access mode of the target card organization, the socket connection service simulates a client and / or a server to be connected with the bank front-end server, and access modes between at least one card organization and the remaining card organizations in the N card organizations are different.
8. A testing device, comprising: a receiving queue module configured to place a first message received from a bank front-end server in a receiving queue, the receiving queue configured to store messages to be sent to N card organizations; a first invoking module configured to take the first message from the receiving queue and invoke a message parsing rule of a target card organization to process the first message according to the target card organization to which the first message belongs, wherein the invoking the message parsing rule of the target card organization to process the first message includes causing a main service to perform the following operations: taking the first message from the receiving queue and identifying an identifier of the target card organization; and invoking the message parsing rule to process the first message according to the identifier of the target card organization, wherein each card organization is assigned a specified identifier, and the identifier has a mapping relationship with a message header length format of each organization; a second invoking module configured to invoke a message assembly rule of the target card organization to generate a second message, wherein each of the N card organizations has a corresponding message parsing rule and message assembly rule; a sending queue module configured to place the second message in a sending queue, the sending queue configured to store messages simulated by at least one card organization of the N card organizations; a message sending module configured to take the second message from the sending queue and send the second message to the bank front-end server.
9. An electronic device, comprising: one or more processors; a storage device configured to store one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any one of claims 1-7.
10. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method of any one of claims 1-7.
11. A computer program product comprising a computer program that, when executed by a processor, implements the method of any one of claims 1-7.
Citation Information
Patent Citations
Bank card network transaction test method and device
CN110837470A
Simulation transaction processing method and device
CN114022278A