CN110309022B - Method, simulator, device and storage medium for simulating transaction test - Google Patents

Method, simulator, device and storage medium for simulating transaction test Download PDF

Info

Publication number
CN110309022B
CN110309022B CN201910427780.0A CN201910427780A CN110309022B CN 110309022 B CN110309022 B CN 110309022B CN 201910427780 A CN201910427780 A CN 201910427780A CN 110309022 B CN110309022 B CN 110309022B
Authority
CN
China
Prior art keywords
test
transaction
message
simulator
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910427780.0A
Other languages
Chinese (zh)
Other versions
CN110309022A (en
Inventor
阙龙辉
符永晟
陈鲲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN201910427780.0A priority Critical patent/CN110309022B/en
Publication of CN110309022A publication Critical patent/CN110309022A/en
Application granted granted Critical
Publication of CN110309022B publication Critical patent/CN110309022B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/261Functional testing by simulating additional hardware, e.g. fault simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to the field of performance test of a transaction system, and provides a method, a simulator, equipment and a storage medium for simulating transaction test, wherein the method comprises the following steps: the first simulator splits and reconstructs transaction logic to shield subordinate operations in the transaction logic; the transaction logic comprises statistical mining, data mining, technical indexes and transaction signals, and the dependent operation refers to unnecessary operation in the transaction logic; the first simulator obtains a test message, and carries out validity check on the test message according to a message rule, wherein the test message is used for the first simulator to test a tested system; and if the test message is legal, packaging the test message and sending the test message to a tested system so as to respond to the test message. By adopting the scheme, unnecessary steps can be automatically shielded so as to reduce association dependence and reduce the entry of meaningless fields.

Description

Method, simulator, device and storage medium for simulating transaction test
Technical Field
The present application relates to the field of performance testing of transaction systems, and in particular, to a method, simulator, device, and storage medium for simulating a transaction test.
Background
The simulators on the market at present can only support full-flow tests, and when interaction of multiple banks is involved, the simulators need to communicate with the multiple banks, but the transaction system conditions of each bank are different, so the communication cost is high, the stability of test data is very poor, and finally the transaction system cannot be tested quickly.
At present, a simulator is mainly used for testing a transaction system of a bank, but a complex filling rule needs to be set in the simulator, and the use threshold of the simulator is high. Before a simulator is used for testing a bank, a tester needs to spend a lot of time to be familiar with filling rules of each field in a message, in addition, the simulator does not support validity check, once filling errors cause great increase of subsequent checking work, and the simulator is not beneficial to rapid operation.
Disclosure of Invention
The application provides a method, a simulator, equipment and a storage medium for simulating transaction testing, which can solve the problem of low efficiency of full-flow testing in the prior art.
In a first aspect, the present application provides a method for simulating a transaction test, where the method is used for a first simulator capable of only supporting a full-process test mode, the first simulator belongs to a test system for testing the performance of a transaction system of a bank, and the full-process test mode is a test mode in which a transaction needs to complete all steps of tests; the method comprises the following steps:
the first simulator splits and reconstructs transaction logic to shield subordinate operations in the transaction logic; the transaction logic comprises statistical mining, data mining, technical indexes and transaction signals, and the dependent operation refers to unnecessary operation in the transaction logic;
the first simulator obtains a test message, and carries out validity check on the test message according to a message rule, wherein the test message is used for the first simulator to test a tested system;
and if the test message is legal, packaging the test message and sending the test message to a tested system so as to respond to the test message.
In some possible designs, the first simulator splits and reconstructs transaction logic to mask dependent operations in the transaction logic, including:
performing logic splitting and reconstruction on at least one of the basis of logic transaction, capital management, entrance conditions, loss stopping conditions and exit conditions;
the logical splitting mode comprises vertical splitting and horizontal splitting, wherein the vertical splitting refers to splitting the table of the same service module and placing the table on one physical db, and the horizontal splitting refers to splitting the data of the table of the unified service module to a plurality of physical dbs according to ID hash.
In some possible designs, the logically splitting and reconstructing at least one of the basis of the logical transaction, the fund management, the admission condition, the stop-loss condition and the departure condition includes one of the following implementation manners:
changing the bank category of the spare payment;
or, automatically masking for unnecessary slave operations in the transaction logic;
or, for a protocol payment, if the selected deposit is not a preset bank, shielding data filled by the user for the deposit according to the default value of the transaction system.
In some possible designs, the test message includes a header, a sequence number field, a data offset field, a flag bit field, a data field, and a checksum field; the header carries a destination IP, the sequence number field is used for carrying a sequence number of a message segment, the data offset field carries a starting offset value of a data area in the message segment, the flag bit field carries a finish flag for releasing a link, the data field carries data filled by a user, and the checksum field is calculated and stored by a sending end and is verified by a first simulator serving as a receiving end.
In some possible designs, the performing validity check on the test packet according to the packet rule includes:
reading the content of each field in the test message;
according to the message rule, the content of each field in the test message is respectively subjected to validity check;
if the content in the field accords with the message rule, determining that the field which accords with the message rule is legal;
and if the contents of the target fields in the test message all accord with the message rule, determining that the test message is legal, wherein the target fields at least comprise data fields for bearing data filled by a user.
In some possible designs, the performing, according to the message rule, validity check on the content of each field in the test message includes:
setting conditions for validity check according to the interface specification, wherein the conditions for validity check comprise one of the following conditions:
generating and displaying prompt information, wherein the prompt information is used for prompting a user to perform selective processing; if no user input is detected, the transaction system automatically enters default values;
or, defaulting that other fields except the data field in the transaction message are legal, and only performing validity check on the data field where the data filled by the user is located.
In a second aspect, the present application provides a simulator having the functionality to implement a method of simulating a transaction test corresponding to that provided in the first aspect above. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions, which may be software and/or hardware.
In one possible design, the simulator is a simulator that can only support a full-flow test mode, the simulator belongs to a test system for testing the performance of a transaction system of a bank, and the full-flow test mode is a test mode in which all test steps need to be completely completed for one transaction. The simulator includes:
the processing module is used for splitting and reconstructing the transaction logic so as to shield subordinate operations in the transaction logic; the transaction logic comprises statistical mining, data mining, technical indexes and transaction signals, and the dependent operation refers to unnecessary operation in the transaction logic;
the receiving and sending module is used for acquiring the test message;
the processing module is further configured to perform validity check on the test packet according to a packet rule, where the test packet is a packet used for the first simulator to test a system under test; and if the test message is legal, packaging the test message and sending the test message to a tested system through the transceiver module so as to respond to the test message.
In one possible design, the processing module is specifically configured to:
performing logic splitting and reconstruction on at least one of the basis of logic transaction, fund management, entrance condition, loss stopping condition and departure condition;
the logical splitting mode comprises vertical splitting and horizontal splitting, wherein the vertical splitting refers to splitting the table of the same service module and placing the table on one physical database db, and the horizontal splitting refers to splitting the data of the table of the unified service module to a plurality of physical dbs according to ID hash.
In one possible design, the processing module performs at least one of the following operations for logically splitting and restructuring the basis of the logical transaction, the fund management, the entry condition, the stop-loss condition and the exit condition:
changing the bank category of the spare payment;
or, automatically masking against unnecessary dependent operations in the transaction logic;
or, for a protocol payment, if the selected payment reserve is not a preset bank, shielding data filled by the user for the payment reserve according to a default value of the transaction system.
In some possible designs, the test message includes a header, a sequence number field, a data offset field, a flag bit field, a data field, and a checksum field; the header carries a destination IP, the sequence number field is used for carrying a sequence number of a message segment, the data offset field carries a starting offset value of a data area in the message segment, the flag bit field carries a finish flag for releasing a link, the data field carries data filled by a user, and the checksum field is calculated and stored by a sending end and is verified by a first simulator serving as a receiving end.
In some possible designs, the processing module is specifically configured to:
reading the content of each field in the test message;
according to the message rule, the content of each field in the test message is respectively subjected to validity check;
if the content in the field accords with the message rule, determining that the field which accords with the message rule is legal;
and if the contents of the target fields in the test message all accord with the message rule, determining that the test message is legal, wherein the target fields at least comprise data fields for bearing data filled by a user.
In some possible designs, the processing module is specifically configured to:
setting conditions for validity check according to the interface specification, wherein the conditions for validity check comprise one of the following conditions:
generating and displaying prompt information, wherein the prompt information is used for prompting a user to perform selective processing; if no user input is detected, the transaction system automatically enters default values;
or, defaulting that other fields except the data field in the transaction message are legal, and only performing validity check on the data field where the data filled by the user is located.
A further aspect of the application provides a computer device comprising at least one connected processor, memory and transceiver, wherein the memory is configured to store program code and the processor is configured to invoke the program code in the memory to perform the method of the first aspect.
A further aspect of the present application provides a computer storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect described above.
Compared with the prior art, in the scheme provided by the application, the first simulator splits and reconstructs the transaction logic to shield the subordinate operation in the transaction logic, so that the scheme can automatically shield unnecessary steps to reduce the association dependence and the entry of meaningless fields, and further reduce the communication cost. After the first simulator obtains the test message, the legality of the test message is checked according to the message rule, if the test message is legal, the test message is packaged and sent to a tested system to respond to the test message, further, the fact that the filling data is not legally checked is optimized, the legality check of fields is supported, and the difficulty of follow-up checking problems is reduced.
Drawings
FIG. 1 is a schematic diagram of an architecture of a test system according to an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating a method for simulating a transaction test according to an embodiment of the present disclosure;
fig. 3 is a code diagram of a data format for generating a test packet in an embodiment of the present application;
FIG. 4 is a schematic view of an interface for selecting a home page for payment according to an embodiment of the present application;
fig. 5 is a schematic interface diagram of a subscription payment information entry page in the embodiment of the present application;
FIG. 6 is a schematic diagram of a simulator according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a computer device in the embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. The terms "first," "second," and the like in the description and in the claims of the present application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to such process, method, article, or apparatus, and such that a division of modules presented in this application is merely a logical division that may be implemented in an actual application in a different manner, such that multiple modules may be combined or integrated into another system, or some features may be omitted, or may not be implemented.
The application provides a method, a simulator, equipment and a storage medium for simulating transaction test, which can be used for a simulator of a full-flow test, wherein the simulator is used for testing a transaction system of a bank. Fig. 1 is a schematic diagram of an architecture of a test system for testing the performance of a transaction system of a bank in the present application.
As shown in fig. 1, the simulator is configured to simulate a candidate system to send a test packet to a system under test during a performance test, and provide various test environments to the system under test. The test equipment is used for testing various performance indexes of the tested system under various test environments. The back-end system in the application refers to an application system at the back end of a tested system in the testing process.
In order to solve the technical problems, the application mainly provides the following technical scheme:
by aiming at the fact that only the full-flow test can be supported, the simulator carries out splitting reconstruction on the transaction, shielding is automatically carried out aiming at unnecessary steps, association dependence is reduced, for example, aiming at a protocol payment, if the selected deposit is not the bank, filling of the deposit is directly shielded, entry of meaningless fields is reduced, more fields adopt default values of the system, and the use threshold of the simulator is reduced.
Referring to fig. 2, a method of simulating a transaction test in an embodiment of the present application is described below, the method being used for a first simulator capable of supporting only a full-flow test mode, the first simulator belonging to a test system for testing performance of a transaction system of a bank. The method comprises the following steps:
201. determining from the trading system a first simulator that can only support a full flow test mode.
The full-flow test mode refers to a test mode in which all test steps need to be completely completed for one transaction. The full-flow test is for services, such as agreement payment, quick payment, online payment, withholding payment and authentication payment. The agreement payment means that the customer binds the bank account of the customer with the associated account of the merchant through signing an agreement with the bank, and the payment can be finished by directly inputting the payment password of the associated account of the merchant during payment.
The first simulator is equipment for simulating a candidate system to send a test message to a tested system in a performance test process and providing various test environments for the tested system. The first simulator may include a packet packaging module, a database, a monitoring module, a transceiver module, and a processing module.
In some embodiments, a transaction system of a bank may be configured with a first simulator that supports only a full-flow test mode and a second simulator that supports only a single-flow test mode or a simulator that switches between a single-flow test mode and a full-flow test mode. In the embodiment of the present application, the first simulator may also be regarded as a simulator in the full-flow test mode, and is not limited to a simulator that supports only the full-flow test mode.
202. The first simulator splits and reconstructs transaction logic to mask dependent operations in the transaction logic.
The trading logic refers to trading rules, namely, underlying logic under a trading system has inevitable causal relationship or similar regularity. The transaction logic includes statistical mining, data mining, technical indicators, and transaction signals. The transaction logic may specify the basis of the logical transaction, funds management, admission conditions, stop-loss conditions, and departure conditions.
The dependent operations refer to operations that are not necessary in the transaction logic. For example, the transaction system is specified to support only the payment operation for the bank a with the reserve payment, and if the operation of filling data for the bank B with the reserve payment by the user is detected, the data filled with the bank B with the reserve payment is prevented from being written into the transaction in a mode of popping up a prompt box or animation.
In some embodiments, the first simulator splits and reconstructs the transaction logic, including:
and performing logic splitting and reconstruction on at least one of the basis of the logic transaction, fund management, entrance condition, loss stopping condition and exit condition. The logical splitting mode can include vertical splitting and horizontal splitting. Vertical splitting refers to splitting a table with close relationship (such as the same service module) and placing the table on a physical database (db). Horizontal splitting refers to splitting the data of a table into multiple physical dbs according to some rule, such as hashing by ID. The method and the device can independently use vertical splitting or horizontal splitting, and can also comprehensively use the vertical splitting and the horizontal splitting so as to divide the original database into the database array which can be infinitely expanded like a matrix. The transaction logic can be split from different dimensions and each sql can be fully overlaid with automation scripts directly from the data access layer.
For example, in the case of a stock trading system, the stock trading system is provided with buy, sell, deal, and cross-house services. The flow of buying and selling services of the stock trading system is very large, while the flow of delivery and cross-client services is relatively little, but the delivery and cross-client services also perform a plurality of large-data-volume operations, and the influence on db is very large. Therefore, to ensure the stability of the delivery and transit service, the db level can be reconstructed by vertical splitting, and the buy and sell services and the delivery and transit service promotion data can be stored and accessed in two physical dbs, for example, the db can be split horizontally according to the dimension of the stock user id.
In the application, the transaction logic is realized according to the logic of the sub-database and the sub-table. If the application relates to the splitting across databases, after the splitting, operations of the databases occur multiple times in one transaction template, and data sources corresponding to the operations are directed to different physical storages, that is, the operations of the databases multiple times in one transaction may be directed to different physical storages, which finally results in that the consistency of the transaction cannot be ensured. Since a transaction in the transaction logic is a unit of integrity and the execution of a transaction is to convert the database from one consistent state to another, the transaction logic needs to be reconstructed after the data is split across data to ensure consistency. For example, a database is cut into portions and placed into different databases.
203. And the first simulator acquires a test message and carries out validity check on the test message according to a message rule.
The test message is a message used for the first simulator to test the system to be tested, and may also be referred to as a transaction message, and the test message simulates a message generated by a real transaction. The test message includes a plurality of fields, each field carrying different content.
For example, the test message includes a header, a sequence number field, a data offset field, a flag bit field, a data field (which may also be referred to as a message field), a checksum field, and the like. Wherein the destination IP is carried in the header. The sequence number field is used for bearing the sequence number of the message segment so as to ensure the orderliness of the whole test message. The data offset field carries the starting offset value of the data area in the segment. The flag bit field carries a finish flag for releasing the link. The data field carries data filled by the user. The checksum field is calculated and stored by the sender and verified by the first simulator, which is the receiver. Referring to fig. 3, which is a code of a data format for generating a test message, a transaction test message (also referred to as a transaction message) can be generated according to the code shown in fig. 3.
The data fields in the test message are data filled in by the user. When the validity of the test message is checked, in order to improve checking efficiency, other fields can be defaulted to be legal, and validity checking can be performed only on data fields where data filled by a user is located.
In the embodiment of the present application, the message rule refers to a batch number. Taking the transaction of the POS terminal as an example, the transaction from sign-in to settlement and sign-out of the POS terminal is a batch, and the transaction batch number (batch id) is used to identify a batch of transactions. The POS center distributes a batch number for each batch of each POS terminal and transmits the batch number to the POS terminal in the check-in response message. Corresponding to message header field 7 of the union pay ISO8583 message. For example, T201901030011 shown in fig. 3 is the batch number.
In some embodiments, the performing validity check on the test packet according to the packet rule includes:
reading the content of each field in the test message;
according to the message rule, the content of each field in the test message is respectively subjected to validity check;
if the content in the field accords with the message rule, determining that the field which accords with the message rule is legal;
and if the contents of the target fields in the test message all accord with the message rule, determining that the test message is legal, wherein the target fields at least comprise data fields for bearing data filled by a user.
For example, taking the content of the test packet as "batch number", where "batch id" is the content of the data field, if it is determined that "batch id" in the data field conforms to the packet rule according to the packet rule, it is determined that the "batch number" of the test packet conforms to the packet rule.
In other embodiments, when performing the validity check, the validity check condition may be set according to the interface specification. Generating and displaying prompt information, where the prompt information is used to prompt a user to perform selective processing, that is, to be selectively processed by the user, and if the user does not input the default value, the system may automatically input the default value, which may specifically refer to the descriptions in the embodiments corresponding to fig. 4 and fig. 5.
204. And if the test message is legal, packaging the test message and sending the test message to a tested system so as to respond to the test message.
The step of packaging the test messages refers to the step of assembling the test messages into fixed-length character strings, namely fixed-length message packets (msgpackages), wherein each message slice consists of one or more message fields (msgfields). The attributes of the message field include the domain name, length, value, and if the length of the value is less than a defined maximum length, whether the value is left or right aligned and what characters are left filled. For example, taking 8583 messages in a micropayment system as an example, the first simulator simulates a process of a pos terminal sending 8583 messages for multiple protocol payments to the pos terminal. The message formats of 8583 messages paid by each protocol are respectively 11H, 01H, 00H, 13H00H, 25H, 0EH and 84H, the first simulator determines which message fields the 8583 messages need to be composed of, then calls a bitmap tool to obtain bitmaps corresponding to consumption fields, then respectively generates a test message according to the message structure of byte length, TPDU value, message header and message data, the micropayment system performs batch packaging on all the test messages by the test messages paid by each protocol according to the clearing line number of a receiving line, and sends the packaged messages in the form of batch packaging. The TPDU refers to a Transport Protocol Data Unit (TPDU), and represents a message sent from one Transport entity to another Transport entity, and the TPDU value of each bank is different.
In some embodiments, if the test packet is legal, a prompt message of field validity may be generated. The prompt information is used for prompting the testing personnel that the test message is legal, so that the testing personnel can conveniently check the test result subsequently, and the difficulty of the subsequent check problem is reduced.
Compared with the existing mechanism, in the embodiment of the application, the first simulator splits and reconstructs the transaction logic to shield the subordinate operation in the transaction logic, so that by adopting the scheme, unnecessary steps can be automatically shielded to reduce the association dependence and the entry of meaningless fields, and further the communication cost and the use threshold of the simulator are reduced. For example, before a plurality of banks are tested by using the first simulator, a tester is not required to spend a great deal of time to be familiar with filling rules of each field in a transaction message, and when interaction among a plurality of banks is involved, the entry of relevant dependent fields and meaningless fields can be reduced by automatically shielding subordinate operations, and meanwhile, the tester is facilitated to be handed up quickly. After obtaining a test message, the first simulator carries out validity check on the test message according to a message rule, if the test message is legal, the test message is packaged and sent to a system to be tested so as to respond to the test message, further, the effect of optimizing whether filled data has validity check is achieved, the validity check of fields is supported, and the difficulty of subsequent check problems is reduced.
Optionally, in some embodiments of the present application, the logically splitting and reconstructing at least one of the basis of the logical transaction, the fund management, the admission condition, the stop-loss condition, and the departure condition includes one of the following implementation manners:
(1) The bank category of the funds on hand is changed.
For example, for a protocol payment, the bank type of the currently selected reserve payment is a, and the transaction system only supports the payment operation for the reserve payment being bank B, then a prompt box or animation is popped up to prompt the user to reselect the bank type of the reserve payment, and the data filled in the protocol payment is written into the transaction until the bank type of the reserve payment selected by the user is detected as B.
(2) Masking is automatically performed for optional dependent operations in the transaction logic.
For example, a prompt box is popped up or the progress of the filling operation is stopped to terminate unnecessary data writing to the transaction system. By shielding unnecessary subordinate operations in the transaction logic, on one hand, the correlation dependence of the test flow on test data and a test environment can be reduced, so that the first simulator is more focused on testing rather than learning; on the other hand, the use threshold of the first simulator can be lowered.
(3) And for one agreement payment, if the selected payment reserve is not a preset bank, shielding data filled by the user for the payment reserve according to a default value of the transaction system.
The bank type of the preset bank is multiple, and the bank type and the bank number of the preset bank are not limited in the application.
For example, for a protocol payment, if the selected reimbursement is not the preset bank, the data filled by the user for the reimbursement is shielded, so that the entry of meaningless fields is reduced, more fields adopt the default values of the transaction system, and the use threshold of the simulator is lowered.
For convenience of understanding, the following description will be made by taking a transaction system of a secure bank as an example, as shown in fig. 4 and 5:
in fig. 4, after entering the payment selection homepage, the user selects PASF-secure receipt in the transaction type menu, clicks the "continue" icon in the payment selection homepage, and then enters the subscription payment information entry page shown in fig. 5, in which the user fills in the communication header information, payer information, payee information, reserve payment information, transaction information, and order information, and clicks the "submit" icon in the subscription payment information entry page after completion of the filling, thus completing one transaction information entry.
Technical features mentioned in any of the embodiments or implementation manners corresponding to fig. 1 to 5 are also applicable to the embodiments corresponding to fig. 6 and 7 in the present application, and subsequent similarities are not repeated.
A method for simulating a transaction test in the present application is described above, and a simulator for performing the method for simulating a transaction test is described below.
Fig. 6 is a schematic diagram of a simulator 60, which can be applied to testing a transaction system of a bank. The simulator is a simulator which can only support a full-process test mode, the simulator belongs to a test system for testing the performance of a transaction system of a bank, and the full-process test mode is a test mode in which all test steps are required to be completely finished in one transaction. The simulator in the embodiment of the present application can implement the steps in the method corresponding to the simulated transaction test executed in the embodiment corresponding to fig. 1 described above. The functions performed by the simulator 60 may be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, which may be software and/or hardware. The simulator may include a transceiver module 601 and a processing module 602, and the processing module 602 and the obtaining module 601 may refer to operations executed in the embodiment corresponding to fig. 1, which are not described herein again. The processing module 602 can be used to control the transceiving operation of the transceiving module 601.
In some embodiments, the processing module 602 may be configured to split and reconstruct transaction logic to mask dependent operations in the transaction logic; the transaction logic comprises statistical mining, data mining, technical indexes and transaction signals, and the subordinate operations refer to unnecessary operations in the transaction logic;
the transceiver module 601 may be configured to obtain a test packet;
the processing module 602 is further configured to perform validity check on the test packet according to a packet rule, where the test packet is a packet used for the first simulator to test a system under test; if the test message is legal, the test message is packaged and sent to the system under test through the transceiver module 601 to respond to the test message.
In the embodiment of the present application, the processing module 602 splits and reconstructs the transaction logic to shield the dependent operations in the transaction logic, and thus by adopting the scheme, unnecessary steps can be automatically shielded to reduce the association dependency and reduce the entry of meaningless fields, thereby further reducing the communication cost and the use threshold of the simulator. After obtaining the test message, the transceiver module 601 performs validity check on the test message according to the message rule, and if the test message is legal, the test message is packaged and then sent to the system under test by the transceiver module 601 to respond to the test message, so that the validity check on filling data is optimized, the validity check on fields is supported, and the difficulty of subsequent check problems is reduced.
In some embodiments, the processing module 602 is specifically configured to:
performing logic splitting and reconstruction on at least one of the basis of logic transaction, fund management, entrance condition, loss stopping condition and departure condition;
the logical splitting mode comprises vertical splitting and horizontal splitting, wherein the vertical splitting refers to splitting the table of the same service module and placing the table on one physical database db, and the horizontal splitting refers to splitting the data of the table of the unified service module to a plurality of physical dbs according to ID hash.
In some embodiments, the processing module 602 performs at least one of the following operations for logically splitting and reconfiguring the grounds, funds management, admission conditions, stop-loss conditions, and departure conditions for a logical transaction:
changing the bank category of the spare payment;
or, automatically masking against unnecessary dependent operations in the transaction logic;
or, for a protocol payment, if the selected deposit is not a preset bank, shielding data filled by the user for the deposit according to the default value of the transaction system.
In some embodiments, the test message includes a header, a sequence number field, a data offset field, a flag bit field, a data field, and a checksum field; the header carries a destination IP, the sequence number field is used for carrying a sequence number of a message segment, the data offset field carries a starting offset value of a data area in the message segment, the flag bit field carries a finish flag for releasing a link, the data field carries data filled by a user, and the checksum field is calculated and stored by a sending end and is verified by a first simulator serving as a receiving end.
In some embodiments, the processing module 602 is specifically configured to:
reading the content of each field in the test message;
according to the message rule, the content of each field in the test message is respectively subjected to validity check;
if the content in the field accords with the message rule, determining that the field which accords with the message rule is legal;
and if the contents of the target fields in the test message all accord with the message rule, determining that the test message is legal, wherein the target fields at least comprise data fields for bearing data filled by a user.
In some embodiments, the processing module 602 is specifically configured to:
setting conditions for validity check according to the interface specification, wherein the conditions for validity check comprise one of the following conditions:
generating and displaying prompt information, wherein the prompt information is used for prompting a user to perform selective processing; if no user input is detected, the transaction system automatically enters default values;
or, defaulting that other fields except the data field in the transaction message are legal, and only performing validity check on the data field where the data filled by the user is located.
The simulator in the embodiment of the present application is described above from the perspective of the modular functional entity, and the following describes a computer device from the perspective of hardware, as shown in fig. 7, which includes: a processor, a memory, a transceiver (which may also be an input-output unit, not identified in fig. 7), and a computer program stored in the memory and executable on the processor. For example, the computer program may be a program corresponding to the method for simulating a transaction test in the embodiment corresponding to fig. 1. For example, when the computer device implements the functions of the simulator 60 shown in fig. 6, the processor executes the computer program to implement the steps of the method for simulating the transaction test performed by the simulator 60 in the embodiment corresponding to fig. 6; alternatively, the processor implements the functions of the modules in the simulator 60 according to the embodiment corresponding to fig. 6 when executing the computer program. For another example, the computer program may be a program corresponding to the method for simulating the transaction test in the embodiment corresponding to fig. 1.
It should be noted that the entity device corresponding to the transceiver module 601 shown in fig. 6 is the transceiver shown in fig. 7, and the transceiver can implement part or all of the functions of the transceiver module 601, or implement the same or similar functions as the transceiver module 601.
The physical device corresponding to the processing module 602 shown in fig. 6 is a processor shown in fig. 7, and the processor can implement part or all of the functions of the processing module 602, or implement the same or similar functions as the processing module 602.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like which is the control center for the computer device and which connects the various parts of the overall computer device using various interfaces and lines.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the computer device by running or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, video data, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The transceivers may also be replaced by receivers and transmitters, which may be the same or different physical entities. When the same physical entity, may be collectively referred to as a transceiver. The transceiver may be an input-output unit.
The memory may be integrated in the processor or may be provided separately from the processor.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM), and includes several instructions for enabling a terminal (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
The embodiments of the present application have been described above with reference to the drawings, but the present application is not limited to the above-mentioned embodiments, which are only illustrative and not restrictive, and those skilled in the art can make many changes and modifications without departing from the spirit and scope of the present application and the protection scope of the claims, and all changes and modifications that come within the meaning and range of equivalency of the claims are to be embraced within their scope.

Claims (9)

1. A method for simulating transaction test is characterized in that the method is used for a first simulator which can only support a full-process test mode, the first simulator belongs to a test system for testing the performance of a transaction system of a bank, and the full-process test mode refers to a test mode in which all test steps need to be completely finished for one transaction; the method comprises the following steps:
the first simulator splits and reconstructs transaction logic to shield subordinate operations in the transaction logic; the transaction logic comprises statistical mining, data mining, technical indexes and transaction signals, and the dependent operation refers to unnecessary operation in the transaction logic; popping up a prompt box or an animation mode to prompt a user to reselect the bank category of the reserve payment so as to change the bank category of the reserve payment; the unnecessary data writing into the transaction system is stopped by popping up a prompt box or stopping the filling operation, so that unnecessary subordinate operations in the transaction logic are automatically shielded; for one agreement payment, if the selected payment reserve is not a preset bank, shielding data filled by a user for the payment reserve according to a default value of the transaction system;
the first simulator obtains a test message, and carries out validity check on the test message according to a message rule, wherein the test message is used for the first simulator to test a tested system;
and if the test message is legal, packaging the test message and sending the test message to a tested system so as to respond to the test message.
2. The method of claim 1, wherein the first simulator splits and reconstructs transaction logic to mask dependent operations in the transaction logic, comprising:
performing logic splitting and reconstruction on at least one of the basis of logic transaction, fund management, entrance condition, loss stopping condition and departure condition;
the logical splitting mode comprises vertical splitting and horizontal splitting, wherein the vertical splitting refers to splitting the table of the same service module and placing the table on one physical database db, and the horizontal splitting refers to splitting the data of the table of the unified service module to a plurality of physical dbs according to ID hash.
3. The method of any of claims 1-2, wherein the test packet includes a header, a sequence number field, a data offset field, a flag bit field, a data field, and a checksum field; the header carries a destination IP, the sequence number field is used for carrying a sequence number of a message segment, the data offset field carries a starting offset value of a data area in the message segment, the flag bit field carries a finish flag for releasing a link, the data field carries data filled by a user, and the checksum field is calculated and stored by a transmitting end and is verified by the first simulator serving as a receiving end.
4. The method of claim 3, wherein said performing a validity check on said test packet according to packet rules comprises:
reading the content of each field in the test message;
according to the message rule, the content of each field in the test message is respectively subjected to validity check;
if the content in the field accords with the message rule, determining that the field which accords with the message rule is legal;
and if the contents of the target fields in the test message all accord with the message rule, determining that the test message is legal, wherein the target fields at least comprise data fields for bearing data filled by a user.
5. The method according to claim 2, wherein said performing validity checking on the contents of each field in the test message according to the message rule comprises:
setting conditions for validity check according to the interface specification, wherein the conditions for validity check comprise one of the following conditions:
generating and displaying prompt information, wherein the prompt information is used for prompting a user to perform selective processing; if no user input is detected, the transaction system automatically enters default values;
or, the other fields except the data field in the default transaction message are legal, and the validity check is only performed on the data field where the data filled by the user is located.
6. A simulator is characterized in that the simulator can only support a full-process test mode, belongs to a test system for testing the performance of a transaction system of a bank, and the full-process test mode refers to a test mode in which all test steps are required to be completely taken for one transaction; the simulator includes:
the processing module is used for splitting and reconstructing the transaction logic so as to shield subordinate operations in the transaction logic; the transaction logic comprises statistical mining, data mining, technical indexes and transaction signals, and the dependent operation refers to unnecessary operation in the transaction logic; popping up a prompt box or an animation mode to prompt the user to reselect the bank category of the reserve payment so as to change the bank category of the reserve payment; the unnecessary data writing into the transaction system is stopped by popping up a prompt box or stopping the filling operation, so that unnecessary subordinate operations in the transaction logic are automatically shielded; for a protocol payment, if the selected reserve payment is not a preset bank, shielding data filled by the user for the reserve payment according to a default value of the transaction system;
the receiving and sending module is used for acquiring the test message;
the processing module is further used for carrying out validity check on the test message according to a message rule, wherein the test message is used for testing the tested system by the first simulator; and if the test message is legal, packaging the test message and sending the test message to a tested system through the transceiver module so as to respond to the test message.
7. The simulator of claim 6, wherein the processing module is specifically configured to:
performing logic splitting and reconstruction on at least one of the basis of logic transaction, fund management, entrance condition, loss stopping condition and departure condition;
the logical splitting mode comprises vertical splitting and horizontal splitting, wherein the vertical splitting refers to splitting the table of the same service module and placing the table on one physical database db, and the horizontal splitting refers to splitting the data of the table of the unified service module to a plurality of physical dbs according to ID hash.
8. A computer device, the device comprising:
at least one processor, memory, and transceiver;
wherein the memory is configured to store program code and the processor is configured to invoke the program code stored in the memory to perform the method of any of claims 1-5.
9. A computer storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 1-5.
CN201910427780.0A 2019-05-22 2019-05-22 Method, simulator, device and storage medium for simulating transaction test Active CN110309022B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910427780.0A CN110309022B (en) 2019-05-22 2019-05-22 Method, simulator, device and storage medium for simulating transaction test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910427780.0A CN110309022B (en) 2019-05-22 2019-05-22 Method, simulator, device and storage medium for simulating transaction test

Publications (2)

Publication Number Publication Date
CN110309022A CN110309022A (en) 2019-10-08
CN110309022B true CN110309022B (en) 2022-11-08

Family

ID=68075297

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910427780.0A Active CN110309022B (en) 2019-05-22 2019-05-22 Method, simulator, device and storage medium for simulating transaction test

Country Status (1)

Country Link
CN (1) CN110309022B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110930608A (en) * 2019-10-31 2020-03-27 福建新大陆支付技术有限公司 POS terminal ISO8583 message testing method and simulation background baffle system
CN111144887A (en) * 2019-12-20 2020-05-12 辽宁振兴银行股份有限公司 Protection method for block chain shared data
CN111309594B (en) * 2020-01-17 2024-04-23 腾讯科技(深圳)有限公司 System testing method, device, equipment and storage medium
CN111538664A (en) * 2020-04-27 2020-08-14 中国银行股份有限公司 System and method for testing payment marking application
CN111625467B (en) * 2020-06-03 2021-08-03 深圳华锐金融技术股份有限公司 Automatic testing method and device, computer equipment and storage medium
CN113535260B (en) * 2021-06-29 2022-11-04 未鲲(上海)科技服务有限公司 Simulator-based data processing method, device, equipment and storage medium
CN115378937B (en) * 2022-08-10 2023-04-18 北京友友天宇系统技术有限公司 Distributed concurrency method, device, equipment and readable storage medium for tasks

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5450545A (en) * 1991-07-29 1995-09-12 International Business Machines Corporation Generation of rules-based computer programs using data entry screens

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104079562B (en) * 2014-06-09 2017-07-11 中国建设银行股份有限公司 A kind of safety certifying method and relevant apparatus based on payment terminal
CN104065490B (en) * 2014-06-20 2017-12-08 普元信息技术股份有限公司 The system and method for analog transceiver equipment signaling is realized based on online charging environment
CN106506283B (en) * 2016-12-08 2020-01-21 用友网络科技股份有限公司 Business test method and device of bank and enterprise docking system
CN106815148A (en) * 2016-12-30 2017-06-09 中国银联股份有限公司 A kind of transaction test method and device
CN108614777A (en) * 2018-05-08 2018-10-02 山东浪潮通软信息科技有限公司 A kind of financial transaction test system and test method based on actual services
CN109672727A (en) * 2018-11-29 2019-04-23 中国人民银行清算总中心 Ebanking services data processing method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5450545A (en) * 1991-07-29 1995-09-12 International Business Machines Corporation Generation of rules-based computer programs using data entry screens

Also Published As

Publication number Publication date
CN110309022A (en) 2019-10-08

Similar Documents

Publication Publication Date Title
CN110309022B (en) Method, simulator, device and storage medium for simulating transaction test
CN108334387B (en) Dynamic interface rendering method and device
WO2020029631A1 (en) Transaction method and system based on centralized settlement and blockchain deposit certificates
US11455238B2 (en) Systems and methods for testing software applications
WO2020029629A1 (en) Transaction method and system based on centralized settlement and block chain storage
CN108200203A (en) Block catenary system based on double-layer network
CN106648556B (en) Method and device for front-end and back-end integrated development test
US8874479B2 (en) Systems and methods for testing a financial trading system
US11399062B2 (en) Multiple server automation for secure cloud reconciliation
US10511453B2 (en) Information processing system and charge calculation apparatus
CN107730385A (en) Simulation process method, apparatus, storage medium and the computer equipment of sequence information
JP7161538B2 (en) Systems, apparatus and methods for processing and managing web traffic data
CN114205273A (en) System testing method, device and equipment and computer storage medium
CN110659870A (en) Business audit test method, device, equipment and storage medium
CN106815725A (en) A kind of transaction verification method and device
US20200192781A1 (en) Electronic services use-case testing framework
CN106034148B (en) Rapid information interaction method, local server, remote server and system
CN111598693B (en) Block chain-based account management method, system and device
US20230267430A1 (en) Data processing method and device, and computer-readable storage medium
CN111865726B (en) Service message testing method, device, computer system and storage medium
CN106981146A (en) A kind of billing method based on many Golden Taxes disks
CN105205720A (en) On-line financing examination and approval method, device and system
CN108153660A (en) The simulation process method and apparatus of sequence information
CN114428723A (en) Test system, system test method, related device and storage medium
CN111581283A (en) Application program processing system based on block chain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant