CN113360375A - Transaction testing method and device, electronic equipment and storage medium - Google Patents

Transaction testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113360375A
CN113360375A CN202110607744.XA CN202110607744A CN113360375A CN 113360375 A CN113360375 A CN 113360375A CN 202110607744 A CN202110607744 A CN 202110607744A CN 113360375 A CN113360375 A CN 113360375A
Authority
CN
China
Prior art keywords
transaction
test
communication
queue
testing
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.)
Granted
Application number
CN202110607744.XA
Other languages
Chinese (zh)
Other versions
CN113360375B (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 CN202110607744.XA priority Critical patent/CN113360375B/en
Publication of CN113360375A publication Critical patent/CN113360375A/en
Application granted granted Critical
Publication of CN113360375B publication Critical patent/CN113360375B/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/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to the field of testing, and discloses a transaction testing method, which comprises the following steps: receiving a transaction request, dividing the transaction request into a plurality of transaction test tasks, sequencing the transaction test tasks and transmitting the sequenced transaction test tasks to a transaction waiting queue; calculating the matching degree of each transaction test task in the transaction waiting queue and the transaction communication strategy in the transaction communication strategy library, and taking the transaction communication strategy of which the matching degree is not less than a preset threshold value as a target transaction communication strategy of the corresponding transaction test task; responding to the transaction running event, transmitting the transaction testing task in the transaction waiting queue to the transaction running queue, and creating a transaction communication link of the transaction testing task in the transaction running queue; and transmitting the transaction test task in the transaction running queue to a corresponding server for transaction test according to the target transaction communication strategy and the transaction communication link. Furthermore, the invention also relates to blockchain techniques, in which the transaction test tasks may be stored. The invention can improve the efficiency of transaction testing.

Description

Transaction testing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of testing, and in particular, to a transaction testing method and apparatus, an electronic device, and a computer-readable storage medium.
Background
Transaction testing refers to a mode of transaction between analog card organizations for securing the security before formal transaction of card organizations, and is often applied in the field of banking, such as credit card transaction testing. At present, transaction tests are usually realized by means of simulation of a card organization union and a card organization transaction simulator, but the means of simulation of the card organization union and the card organization transaction simulator only support a transaction communication mode of a corresponding card, and a server is required to analyze the transaction communication mode of each card transaction test, so that the server is easy to have overlarge test pressure, and more transaction test time is consumed, so that the efficiency of the transaction test is influenced.
Disclosure of Invention
The invention provides a transaction testing method, a transaction testing device, electronic equipment and a computer readable storage medium, and mainly aims to improve the efficiency of transaction testing.
In order to achieve the above object, the present invention provides a transaction testing method, including:
receiving a transaction request, dividing the transaction request into a plurality of transaction test tasks, carrying out transaction priority ordering on the transaction test tasks, and transmitting the transaction test tasks to a preset transaction waiting queue;
calculating the matching degree of each transaction test task in the transaction waiting queue and a transaction communication strategy in a pre-established transaction communication strategy library, and taking the transaction communication strategy of which the matching degree is not less than a preset threshold value as a target transaction communication strategy of the corresponding transaction test task;
responding to a transaction running event, transmitting the transaction testing tasks in the transaction waiting queue to a preset transaction running queue, and creating a transaction communication link of the transaction testing tasks in the transaction running queue;
and transmitting the transaction test task in the transaction operation queue to a corresponding server for transaction test according to the target transaction communication strategy and the transaction communication link, and receiving a transaction test result returned by the server.
Optionally, the dividing the transaction request into a plurality of transaction test tasks includes:
acquiring a transaction test field in the transaction request, and identifying the transaction test type of the transaction test field;
clustering the transaction test fields with the same transaction test type to form one or more transaction test clustering points;
and generating a corresponding transaction test task according to the transaction test clustering points.
Optionally, the performing transaction prioritization on the transaction testing task includes:
acquiring an importance degree identifier of each transaction testing task;
and carrying out transaction priority sequencing on the transaction testing tasks according to the importance degree identification of the transaction testing tasks.
Optionally, before the matching the transaction test task in the transaction waiting queue with the transaction communication policy in the pre-created transaction communication policy library, the method further includes:
collecting codes, protocols, communication modes and message formats of all transaction tests;
and arranging and combining the codes, the protocols, the communication modes and the message formats to form a transaction communication strategy set, and generating a transaction communication strategy library according to the transaction communication strategy set.
Optionally, the calculating a matching degree between each transaction test task in the transaction waiting queue and a transaction communication policy in a pre-created transaction communication policy base includes:
calculating the matching degree of each transaction test task in the transaction waiting queue and the transaction communication strategy in the pre-created transaction communication strategy library by using the following formula, wherein the matching degree comprises the following steps:
Figure BDA0003094626180000021
wherein T (x, y) represents a degree of matching, xhIndicating the h-th code, y, in the transaction test taskiRepresenting the ith code, x, in a transaction communication policyaIndicating the a-th agreement, y, in a transaction test taskbIndicating the b-th protocol, x, in a transaction communication policycIndicating the c-th communication format, y, in the transaction test taskdIndicating the d-th communication format, x, in a transaction communication policymIndicating the mth message format, y, in a transaction test taskhAnd the nth message format in the transaction communication strategy is represented.
Optionally, the transmitting the transaction test task in the transaction waiting queue to a preset transaction running queue in response to the transaction test running event includes:
triggering a transaction test running event of the transaction test task in the transaction waiting queue based on a transaction test task time stamp preset in the transaction waiting queue;
and transmitting the transaction test task in the transaction waiting queue to a preset transaction running queue according to the transaction test running event and a pre-configured task transmission channel.
Optionally, the creating a transaction communication link of the transaction test task in the transaction running queue includes:
acquiring a communication log of a transaction test task in the transaction running queue;
and inquiring a server interface corresponding to the transaction test task in the transaction running queue according to the communication log, and creating a transaction communication link of the transaction test task in the transaction running queue according to the server interface.
In order to solve the above problem, the present invention also provides a transaction testing device, comprising:
the system comprises a dividing module, a transaction waiting queue and a processing module, wherein the dividing module is used for receiving a transaction request, dividing the transaction request into a plurality of transaction testing tasks, carrying out transaction priority ordering on the transaction testing tasks and transmitting the transaction testing tasks to the preset transaction waiting queue;
the calculation module is used for calculating the matching degree of each transaction test task in the transaction waiting queue and a transaction communication strategy in a pre-established transaction communication strategy library, and taking the transaction communication strategy of which the matching degree is not less than a preset threshold value as a target transaction communication strategy of the corresponding transaction test task;
the creating module is used for responding to a transaction running event, transmitting the transaction testing tasks in the transaction waiting queue to a preset transaction running queue, and creating a transaction communication link of the transaction testing tasks in the transaction running queue;
and the test module is used for transmitting the transaction test tasks in the transaction running queue to a corresponding server for transaction test according to the target transaction communication strategy and the transaction communication link and receiving a transaction test result returned by the server.
In order to solve the above problem, the present invention also provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to implement the transaction testing method described above.
In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored, the at least one computer program being executed by a processor in an electronic device to implement the transaction testing method described above.
The embodiment of the invention firstly divides the transaction request into a plurality of transaction test tasks, and transmits the transaction test tasks to a preset transaction waiting queue after performing transaction priority sequencing, so that the subsequent transaction tasks can be ensured to be orderly tested; secondly, the invention calculates the matching degree of each transaction test task in the transaction waiting queue and the transaction communication strategy in the pre-established transaction communication strategy library, and takes the transaction communication strategy of which the matching degree is not less than a preset threshold value as a target transaction communication strategy of the corresponding transaction test task, so that the transaction communication strategy of the transaction test task can be identified, the transaction test pressure of the server is reduced, the transaction test time is saved, and the transaction test efficiency is improved; further, in response to a transaction test running event, the embodiment of the present invention transmits the transaction test tasks in the transaction waiting queue to a preset transaction running queue, creates a transaction communication link of the transaction test tasks in the transaction running queue, transmits the transaction test tasks in the transaction running queue to a corresponding server for transaction test according to the target transaction communication policy and the transaction communication link, and receives a transaction test result returned by the server. Therefore, the transaction testing method, the transaction testing device, the electronic equipment and the storage medium can improve the efficiency of transaction testing.
Drawings
FIG. 1 is a flow chart illustrating a transaction testing method according to an embodiment of the present invention;
FIG. 2 is a detailed flowchart of a step of the transaction testing method provided in FIG. 1 according to a first embodiment of the present invention;
FIG. 3 is a block diagram of a transaction testing device according to an embodiment of the present invention;
fig. 4 is a schematic internal structural diagram of an electronic device implementing a transaction testing method according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention 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 invention and are not intended to limit the invention.
The embodiment of the application provides a transaction testing method. The execution subject of the transaction testing method includes, but is not limited to, at least one of electronic devices such as a server and a terminal, which can be configured to execute the method provided by the embodiments of the present application. In other words, the transaction testing method may be performed by software or hardware installed in the terminal device or the server device, and the software may be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Referring to fig. 1, a flow chart of a transaction testing method according to an embodiment of the invention is shown. In an embodiment of the present invention, the transaction testing method includes:
s1, receiving a transaction request, dividing the transaction request into a plurality of transaction test tasks, carrying out transaction priority ordering on the transaction test tasks, and transmitting the transaction test tasks to a preset transaction waiting queue.
In the embodiment of the present invention, the transaction request is obtained based on a user requirement, and includes: credit card transaction requests and online banking payment requests, etc. In one embodiment of the present invention, the transaction request is received through a preset transaction routing converter, which is a component capable of implementing transaction testing from a corresponding server, and optionally, the transaction routing converter is compiled through Java language.
In an embodiment of the present invention, the transaction routing converter includes: the system comprises an interrupt processing thread, a queue monitoring thread and a test processing thread, wherein the interrupt processing thread is used for finding an interrupt point of a last transaction test task and can continue the interrupted transaction test task; the queue monitoring thread is used for observing the priority of the transaction testing tasks in the transaction waiting queue in real time and submitting the transaction testing tasks in the transaction waiting queue to the transaction running queue; the test processing thread is used for transaction testing of transaction testing tasks in the transaction implementation running queue.
Further, referring to fig. 2, the dividing the transaction request into a plurality of transaction test tasks includes:
s20, acquiring a transaction test field in the transaction request, and identifying the transaction test type in the transaction test field;
s21, clustering the transaction test fields with the same transaction test type to form one or more transaction test clustering points;
and S22, generating a corresponding transaction test task according to the transaction test clustering points.
In detail, the transaction test field is obtained by query in sql statement, which includes, but is not limited to: id. date, name, etc., the transaction test type is identified based on the corresponding id, e.g., id is credit card, then the corresponding transaction test type can be identified as credit card transaction test.
In an alternative embodiment, the clustering may be implemented by the currently known k-means algorithm.
In an alternative embodiment, the transaction test task is compiled in Java language, for example, the transaction test cluster point is a credit card transaction test cluster point, and a credit card transaction test task is created in the transaction routing converter by using the Java language.
Based on the division of the transaction test tasks, the tasks in the transaction request can be better arranged and summarized, so that the transaction test type of the transaction test tasks can be conveniently inquired, and the time period of the transaction test tasks in the offline transaction request can be easily inquired.
Furthermore, the transaction test tasks are subjected to priority sequencing and then submitted to a preset waiting queue, so that each transaction test task can be ensured to be capable of executing the transaction test tasks orderly. The preset transaction waiting queue runs in the transaction routing converter and is used for receiving a transaction test task and transmitting the transaction test task to the transaction running queue to execute the transaction test task.
In a preferred embodiment, the preset transaction waiting queue is constructed by a redis cache.
Specifically, the performing transaction priority ranking on the transaction test task includes: acquiring an importance degree identifier of each transaction testing task; and carrying out transaction priority sequencing on the transaction testing task according to the importance degree identifier.
Wherein the importance level identification comprises: grade identification of the transaction testing task. Further, it is emphasized that the higher the importance degree identifier is, the higher the transaction priority of the corresponding transaction test task is, that is, the higher the level identifier of the transaction test task is, the higher the priority of the transaction test task is, in the embodiment of the present invention, the level identifier of the transaction test task is identified according to the user requirement.
Further, in order to ensure privacy and security of the transaction test task, the transaction test task may also be stored in a blockchain node.
S2, calculating the matching degree of each transaction test task in the transaction waiting queue and the transaction communication strategy in the pre-established transaction communication strategy library, and taking the transaction communication strategy of which the matching degree is not less than a preset threshold value as a target transaction communication strategy of the corresponding transaction test task.
It should be understood that in the transaction testing process, different transaction testing tasks correspond to different transaction communication strategies, if transaction testing is directly performed on the server, the server is required to analyze the transaction communication strategy of each transaction testing task, so that the server pressure is easily over-high, and more transaction testing time is consumed. Wherein the transaction communication policy comprises: the code, the protocol, the communication mode and the message format of the transaction test task are specifically as follows: BCD, ASCII, EBIDIC, and BASE 64; the protocol comprises the following steps: ISO and 8583; the communication mode comprises the following steps: TCP (active long, passive long, short); the message format comprises: XML and JSON.
Further, in the embodiment of the present invention, before the matching the transaction test task in the transaction waiting queue with the transaction communication policy in the pre-created transaction communication policy library, the method further includes: collecting codes, protocols, communication modes and message formats of all transaction tests, arranging and combining the codes, the protocols, the communication modes and the message formats to form a transaction communication strategy set, and generating a transaction communication strategy library according to the transaction communication strategy set. Based on the generation of the transaction communication strategy library, the transaction communication strategy identification time of the transaction testing task can be greatly reduced, so that the transaction testing time of the subsequent transaction testing task can be reduced
In an optional embodiment, the code, protocol, communication mode and message format of the transaction test are collected from a webpage by using a crawler technology, and the crawler technology may be a node.
In an optional embodiment, the permutation and combination of the codes, the protocols, the communication modes and the message formats are realized through a preset permutation and combination script, and the preset permutation and combination script is compiled through a JavaScript language.
Further, the embodiment of the present invention calculates the matching degree between each transaction test task in the transaction waiting queue and the transaction communication policy in the pre-created transaction communication policy library to identify the code, protocol, communication mode and message format of the transaction test task in the transaction waiting queue.
In an optional embodiment of the present invention, calculating a matching degree between the transaction test task in the transaction waiting queue and the transaction communication policy in the pre-created transaction communication policy library by using the following formula includes:
Figure BDA0003094626180000061
wherein T (x, y) represents a degree of matching, xhIndicating the h-th code, y, in the transaction test taskiRepresenting the ith code, x, in a transaction communication policyaIndicating the a-th agreement, y, in a transaction test taskbIndicating the b-th protocol, x, in a transaction communication policycIndicating the c-th communication format, y, in the transaction test taskdIndicating the d-th communication format, x, in a transaction communication policymIndicating the mth message format, y, in a transaction test tasknAnd the nth message format in the transaction communication strategy is represented.
Further, the transaction communication strategy with the matching degree not less than the preset threshold is used as a target transaction communication strategy corresponding to the transaction test task, wherein the preset threshold is 1, that is, when the code, the protocol, the communication format and the message format of the transaction test task and the transaction communication strategy are all consistent, the target transaction communication strategy of the transaction test task is obtained.
S3, responding to the transaction test operation event, transmitting the transaction test tasks in the transaction waiting queue to a preset transaction operation queue, and creating a transaction communication link of the transaction test tasks in the transaction operation queue.
In at least one embodiment of the present invention, the transaction execution event is implemented by a queue monitoring thread in the transaction routing converter. The preset transaction running queue runs in the transaction routing converter and is used for receiving the transaction testing task transmitted by the transaction waiting queue and running the transaction testing task.
In an optional embodiment, the preset transaction run queue is constructed in a linked list form.
In detail, the transmitting the transaction test task in the transaction waiting queue to a preset transaction running queue in response to the transaction test running event includes: triggering a transaction test running event of the transaction test task in the transaction waiting queue based on a transaction test task time stamp preset in the transaction waiting queue; and transmitting the transaction test task in the transaction waiting queue to a preset transaction running queue according to the transaction test running event and a pre-configured task transmission channel.
And the transaction test task timestamp is compiled through java language based on user requirements, and the transaction test tasks in the transaction waiting queue are set to be executed every five minutes, for example.
In an alternative embodiment, the pre-configured task transmission channel may be configured by using currently known message middleware, such as: RabbitMQ message middleware.
Further, it needs to be stated that, the transmission of the transaction test tasks in the transaction waiting queue is transmitted to a preset transaction running queue, and the transmission of the transaction test tasks is executed according to the order of the priority in the transaction waiting queue, that is, the transaction test task with the highest priority starts the transmission of the transaction test task first.
Further, in the embodiment of the present invention, the creating a transaction communication link of the transaction test task in the transaction running queue to identify a server path for performing a transaction test on the transaction test task in the transaction running queue includes: and acquiring a communication log of the transaction test tasks in the transaction running queue, inquiring a server interface corresponding to the transaction test tasks in the transaction running queue according to the communication log, and creating a transaction communication link of the transaction test tasks in the transaction running queue according to the server interface.
The communication log is obtained by querying based on historical transaction records of corresponding transaction test tasks, the server interface is queried by a post method, and the transaction communication link is compiled by Java language and used for realizing transmission of the transaction test tasks in the transaction running queue to corresponding services.
And S4, transmitting the transaction test task in the transaction operation queue to a corresponding server for transaction test according to the target transaction communication strategy and the transaction communication link, and receiving a transaction test result returned by the server.
In the embodiment of the invention, the transaction test tasks in the transaction running queue are transmitted to the corresponding server for transaction test according to the target transaction communication strategy and the transaction communication link, and the transaction test result returned by the server is received. The transaction test result returns a corresponding result according to the type of the transaction test task, for example, if the type of the transaction test task is credit card transaction, the returned transaction test result includes: a credit card transaction is successful or a credit card transaction is unsuccessful.
It is stated that: when the transaction test fails, the interruption point which fails during the transaction test is inquired through the interruption processing thread in the transaction routing converter, so that the transaction test task can be continuously tested without transmitting the transaction test task again, and the efficiency of the transaction test task is improved.
Further, in another embodiment of the present invention, the method may further include: and a visual interface of the transaction test task is configured, so that a user can better check the progress and the state of the transaction test task and stop or restart the corresponding transaction test task, and the efficiency of transaction test is improved.
The embodiment of the invention firstly divides the transaction request into a plurality of transaction test tasks, and transmits the transaction test tasks to a preset transaction waiting queue after performing transaction priority sequencing, so that the subsequent transaction tasks can be ensured to be orderly tested; secondly, the invention calculates the matching degree of the transaction test task in the transaction waiting queue and the transaction communication strategy in the pre-established transaction communication strategy library, and takes the transaction communication strategy of which the matching degree is not less than a preset threshold value as a target transaction communication strategy of the corresponding transaction test task, so that the transaction communication strategy of the transaction test task can be identified, the transaction test pressure of the server is reduced, the transaction test time is saved, and the transaction test efficiency is improved; further, in response to a transaction test running event, the embodiment of the present invention transmits the transaction test tasks in the transaction waiting queue to a preset transaction running queue, creates a transaction communication link of the transaction test tasks in the transaction running queue, transmits the transaction test tasks in the transaction running queue to a corresponding server for transaction test according to the target transaction communication policy and the transaction communication link, and receives a transaction test result returned by the server. Therefore, the transaction testing method, the transaction testing device, the electronic equipment and the storage medium can improve the efficiency of transaction testing.
Fig. 3 is a functional block diagram of the transaction testing device of the present invention.
The transaction testing device 100 of the present invention may be installed in an electronic device. Depending on the implemented functionality, the transaction testing apparatus may include a partitioning module 101, a calculation module 102, a creation module 103, and a testing module 104. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the dividing module 101 is configured to receive a transaction request, divide the transaction request into a plurality of transaction test tasks, perform transaction priority ordering on the transaction test tasks, and transmit the transaction test tasks to a preset transaction waiting queue;
the calculation module 102 is configured to calculate a matching degree between each transaction test task in the transaction waiting queue and a transaction communication policy in a pre-created transaction communication policy library, and use a transaction communication policy of which the matching degree is not less than a preset threshold as a target transaction communication policy of a corresponding transaction test task;
the creating module 103 is configured to respond to a transaction running event, transmit the transaction test task in the transaction waiting queue to a preset transaction running queue, and create a transaction communication link of the transaction test task in the transaction running queue;
the test module 104 is configured to transmit the transaction test task in the transaction running queue to a corresponding server for performing a transaction test according to the target transaction communication policy and the transaction communication link, and receive a transaction test result returned by the server.
In detail, when the modules in the transaction testing device 100 in the embodiment of the present invention are used, the same technical means as the transaction testing method described in fig. 1 and fig. 2 are adopted, and the same technical effects can be produced, and no further description is provided here.
Fig. 4 is a schematic structural diagram of an electronic device implementing the transaction testing method according to the present invention.
The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program, such as a transaction test program 12, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes for transaction testing, etc., but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (e.g., performing transaction tests, etc.) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 4 only shows an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 4 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The transaction test 12 stored by the memory 11 in the electronic device 1 is a combination of computer programs which, when run in the processor 10, may implement:
receiving a transaction request, dividing the transaction request into a plurality of transaction test tasks, carrying out transaction priority ordering on the transaction test tasks, and transmitting the transaction test tasks to a preset transaction waiting queue;
calculating the matching degree of each transaction test task in the transaction waiting queue and a transaction communication strategy in a pre-established transaction communication strategy library, and taking the transaction communication strategy of which the matching degree is not less than a preset threshold value as a target transaction communication strategy of the corresponding transaction test task;
responding to a transaction running event, transmitting the transaction testing tasks in the transaction waiting queue to a preset transaction running queue, and creating a transaction communication link of the transaction testing tasks in the transaction running queue;
and transmitting the transaction test task in the transaction operation queue to a corresponding server for transaction test according to the target transaction communication strategy and the transaction communication link, and receiving a transaction test result returned by the server.
Specifically, the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a non-volatile computer-readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
receiving a transaction request, dividing the transaction request into a plurality of transaction test tasks, carrying out transaction priority ordering on the transaction test tasks, and transmitting the transaction test tasks to a preset transaction waiting queue;
calculating the matching degree of each transaction test task in the transaction waiting queue and a transaction communication strategy in a pre-established transaction communication strategy library, and taking the transaction communication strategy of which the matching degree is not less than a preset threshold value as a target transaction communication strategy of the corresponding transaction test task;
responding to a transaction running event, transmitting the transaction testing tasks in the transaction waiting queue to a preset transaction running queue, and creating a transaction communication link of the transaction testing tasks in the transaction running queue;
and transmitting the transaction test task in the transaction operation queue to a corresponding server for transaction test according to the target transaction communication strategy and the transaction communication link, and receiving a transaction test result returned by the server.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A transaction testing method, the method comprising:
receiving a transaction request, dividing the transaction request into a plurality of transaction test tasks, carrying out transaction priority ordering on the transaction test tasks, and transmitting the transaction test tasks to a preset transaction waiting queue;
calculating the matching degree of each transaction test task in the transaction waiting queue and a transaction communication strategy in a pre-established transaction communication strategy library, and taking the transaction communication strategy of which the matching degree is not less than a preset threshold value as a target transaction communication strategy of the corresponding transaction test task;
responding to a transaction running event, transmitting the transaction testing tasks in the transaction waiting queue to a preset transaction running queue, and creating a transaction communication link of the transaction testing tasks in the transaction running queue;
and transmitting the transaction test task in the transaction operation queue to a corresponding server for transaction test according to the target transaction communication strategy and the transaction communication link, and receiving a transaction test result returned by the server.
2. The transaction testing method of claim 1, wherein said dividing the transaction request into a plurality of transaction testing tasks comprises:
acquiring a transaction test field in the transaction request, and identifying the transaction test type of the transaction test field;
clustering the transaction test fields with the same transaction test type to form one or more transaction test clustering points;
and generating a corresponding transaction test task according to the transaction test clustering points.
3. The transaction testing method of claim 1, wherein said prioritizing transactions for said transaction testing tasks comprises:
acquiring an importance degree identifier of each transaction testing task;
and carrying out transaction priority sequencing on the transaction testing tasks according to the importance degree identification of the transaction testing tasks.
4. The transaction testing method of claim 1, wherein prior to matching the transaction testing tasks in the transaction pending queue with the transaction communication policies in the pre-created transaction communication policy repository, further comprising:
collecting codes, protocols, communication modes and message formats of all transaction tests;
and arranging and combining the codes, the protocols, the communication modes and the message formats to form a transaction communication strategy set, and generating a transaction communication strategy library according to the transaction communication strategy set.
5. The transaction testing method of claim 4, wherein said calculating a match of each transaction test task in said transaction wait queue to a transaction communication policy in a pre-created transaction communication policy repository comprises:
calculating the matching degree of each transaction test task in the transaction waiting queue and the transaction communication strategy in the pre-created transaction communication strategy library by using the following formula, wherein the matching degree comprises the following steps:
Figure FDA0003094626170000021
wherein T (x, y) represents a degree of matching, xhIndicating the h-th code, y, in the transaction test taskiRepresenting the ith code, x, in a transaction communication policyaIndicating the a-th agreement, y, in a transaction test taskbIndicating the b-th protocol, x, in a transaction communication policycIndicating the c-th communication format, y, in the transaction test taskdIndicating the d-th communication format, x, in a transaction communication policymIndicating the mth message format, y, in a transaction test tasknAnd the nth message format in the transaction communication strategy is represented.
6. The transaction testing method of claim 1, wherein said transmitting transaction testing tasks in said transaction wait queue to a pre-set transaction run queue in response to a transaction testing run event comprises:
triggering a transaction test running event of the transaction test task in the transaction waiting queue based on a transaction test task time stamp preset in the transaction waiting queue;
and transmitting the transaction test task in the transaction waiting queue to a preset transaction running queue according to the transaction test running event and a pre-configured task transmission channel.
7. The transaction testing method of any one of claims 1 to 6, wherein the creating a transaction communication link for transaction testing tasks in the transaction run queue comprises:
acquiring a communication log of a transaction test task in the transaction running queue;
and inquiring a server interface corresponding to the transaction test task in the transaction running queue according to the communication log, and creating a transaction communication link of the transaction test task in the transaction running queue according to the server interface.
8. A transaction testing device, the device comprising:
the system comprises a dividing module, a transaction waiting queue and a processing module, wherein the dividing module is used for receiving a transaction request, dividing the transaction request into a plurality of transaction testing tasks, carrying out transaction priority ordering on the transaction testing tasks and transmitting the transaction testing tasks to the preset transaction waiting queue;
the calculation module is used for calculating the matching degree of each transaction test task in the transaction waiting queue and a transaction communication strategy in a pre-established transaction communication strategy library, and taking the transaction communication strategy of which the matching degree is not less than a preset threshold value as a target transaction communication strategy of the corresponding transaction test task;
the creating module is used for responding to a transaction running event, transmitting the transaction testing tasks in the transaction waiting queue to a preset transaction running queue, and creating a transaction communication link of the transaction testing tasks in the transaction running queue;
and the test module is used for transmitting the transaction test tasks in the transaction running queue to a corresponding server for transaction test according to the target transaction communication strategy and the transaction communication link and receiving a transaction test result returned by the server.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the transaction testing method of any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out a transaction testing method according to any one of claims 1 to 7.
CN202110607744.XA 2021-06-01 2021-06-01 Transaction testing method, device, electronic equipment and storage medium Active CN113360375B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110607744.XA CN113360375B (en) 2021-06-01 2021-06-01 Transaction testing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110607744.XA CN113360375B (en) 2021-06-01 2021-06-01 Transaction testing method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113360375A true CN113360375A (en) 2021-09-07
CN113360375B CN113360375B (en) 2023-07-25

Family

ID=77530697

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110607744.XA Active CN113360375B (en) 2021-06-01 2021-06-01 Transaction testing method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113360375B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998013797A2 (en) * 1996-09-26 1998-04-02 Verifone, Inc. A system, method and article of manufacture for a gateway payment architecture utilizing a multichannel, extensible, flexible architecture
US20080270289A1 (en) * 2007-04-24 2008-10-30 Rts Realtime Systems Software Gmbh Algorithmic trading system and method for testing automated trading of financial instruments
US20090183143A1 (en) * 2008-01-10 2009-07-16 Zhong Jie Li Method and apparatus for generating test cases of software system
US9069904B1 (en) * 2011-05-08 2015-06-30 Panaya Ltd. Ranking runs of test scenarios based on number of different organizations executing a transaction
EP3021225A1 (en) * 2014-11-14 2016-05-18 Mastercard International, Inc. Automated configuration code based selection of test cases for payment terminals
US9916234B1 (en) * 2015-01-21 2018-03-13 State Farm Mutual Automobile Insurance Company Systems and methods for mainframe batch testing
CN110471834A (en) * 2019-06-28 2019-11-19 平安银行股份有限公司 Credit card analog detection method and relevant device under more transaction channels

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998013797A2 (en) * 1996-09-26 1998-04-02 Verifone, Inc. A system, method and article of manufacture for a gateway payment architecture utilizing a multichannel, extensible, flexible architecture
US20080270289A1 (en) * 2007-04-24 2008-10-30 Rts Realtime Systems Software Gmbh Algorithmic trading system and method for testing automated trading of financial instruments
US20090183143A1 (en) * 2008-01-10 2009-07-16 Zhong Jie Li Method and apparatus for generating test cases of software system
US9069904B1 (en) * 2011-05-08 2015-06-30 Panaya Ltd. Ranking runs of test scenarios based on number of different organizations executing a transaction
EP3021225A1 (en) * 2014-11-14 2016-05-18 Mastercard International, Inc. Automated configuration code based selection of test cases for payment terminals
US9916234B1 (en) * 2015-01-21 2018-03-13 State Farm Mutual Automobile Insurance Company Systems and methods for mainframe batch testing
CN110471834A (en) * 2019-06-28 2019-11-19 平安银行股份有限公司 Credit card analog detection method and relevant device under more transaction channels

Also Published As

Publication number Publication date
CN113360375B (en) 2023-07-25

Similar Documents

Publication Publication Date Title
CN112653760B (en) Cross-server file transmission method and device, electronic equipment and storage medium
CN112115145A (en) Data acquisition method and device, electronic equipment and storage medium
CN112256783A (en) Data export method and device, electronic equipment and storage medium
CN114881616A (en) Business process execution method and device, electronic equipment and storage medium
CN115129753A (en) Data blood relationship analysis method and device, electronic equipment and storage medium
CN114519084A (en) Block chain-based medical data inspection method, device, equipment and medium
CN112085611A (en) Asynchronous data verification method and device, electronic equipment and storage medium
CN112541688A (en) Service data checking method and device, electronic equipment and computer storage medium
CN114510400A (en) Task execution method and device, electronic equipment and storage medium
CN114820132A (en) Order distribution method and device, electronic equipment and storage medium
CN113360375A (en) Transaction testing method and device, electronic equipment and storage medium
CN115220740A (en) Database environment deployment method and device, electronic equipment and storage medium
CN114896164A (en) Interface optimization method and device, electronic equipment and storage medium
CN112667244A (en) Data verification method and device, electronic equipment and computer readable storage medium
CN114185588A (en) Incremental package generation method, device, equipment and storage medium
CN114185502B (en) Log printing method, device, equipment and medium based on production line environment
CN114237689A (en) System version monitoring method and device, electronic equipment and readable storage medium
CN114185748A (en) System monitoring method and device, electronic equipment and storage medium
CN114138513A (en) Data sharing method, device, equipment and storage medium based on association system
CN114138378A (en) Non-invasive current-limiting fusing method, device, equipment and medium
CN114185502A (en) Log printing method, device, equipment and medium based on production line environment
CN113064797A (en) Front-end monitoring method and device, electronic equipment and storage medium
CN115033605A (en) Data query method and device, electronic equipment and storage medium
CN111612417A (en) System resource allocation method and device, electronic equipment and storage medium
CN114416575A (en) Method, device and equipment for generating Mock data and storage medium

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