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

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

Info

Publication number
CN113360375B
CN113360375B CN202110607744.XA CN202110607744A CN113360375B CN 113360375 B CN113360375 B CN 113360375B CN 202110607744 A CN202110607744 A CN 202110607744A CN 113360375 B CN113360375 B CN 113360375B
Authority
CN
China
Prior art keywords
transaction
test
task
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.)
Active
Application number
CN202110607744.XA
Other languages
Chinese (zh)
Other versions
CN113360375A (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

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 transaction test tasks to a transaction waiting queue; calculating the matching degree of each transaction testing task in the transaction waiting queue and the transaction communication strategy in the transaction communication strategy library, and taking the transaction communication strategy with the matching degree not smaller than a preset threshold value as a target transaction communication strategy of the corresponding transaction testing task; transmitting the transaction test tasks in the transaction waiting queue to the transaction running queue in response to the transaction running event, and creating a transaction communication link of the transaction test 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. Furthermore, the present invention also relates to blockchain technology, where the transaction testing tasks may be stored in the blockchain. The invention can improve the efficiency of transaction test.

Description

Transaction testing method, 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, a transaction testing device, an electronic device, and a computer readable storage medium.
Background
Transaction testing refers to a manner of simulating transactions between card organizations, and is used for guaranteeing the safety and reliability before performing formal transactions of the card organizations, and is often applied to banking fields, such as credit card transaction testing. At present, the transaction test is usually realized by adopting a means of simulating a card organization union and a card organization transaction simulator, but only a transaction communication mode of a corresponding card is supported by the means of simulating the card organization union and the card organization transaction simulator, and the transaction communication mode of each card transaction test needs to be analyzed by a server, so that the overlarge test pressure of the server is easy to cause, and more transaction test time is consumed, so that the efficiency of the transaction test can be 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, sequencing the transaction priority of the transaction test tasks, and transmitting the transaction test tasks to a preset transaction waiting queue;
calculating the matching degree of each transaction testing 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 with the matching degree not smaller than a preset threshold value as a target transaction communication strategy of the corresponding transaction testing task;
transmitting the transaction test tasks in the transaction waiting queue to a preset transaction running queue in response to a transaction running event, and creating a transaction communication link of the transaction test 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 testing tasks includes:
acquiring a transaction test field in the transaction request, and identifying a transaction test type of the transaction test field;
clustering transaction test fields with the same transaction test type to form one or more transaction test clustering points;
and generating corresponding transaction test tasks according to the transaction test cluster points.
Optionally, the prioritizing the transaction test tasks includes:
acquiring importance degree identifiers of each transaction test task;
and sorting the transaction priorities of the transaction test tasks according to the importance degree identifiers of the transaction test 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 the matching degree between each transaction testing task in the transaction waiting queue and the transaction communication policy in the pre-created transaction communication policy library includes:
calculating the matching degree of each transaction testing 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:
wherein T (x, y) represents the degree of matching, x h Representing the h code, y in the transaction test task i Representing the ith code, x in the transaction communication strategy a Representing the a-th protocol, y in the transaction test task b Representing the b-th protocol, x in the transaction communication strategy c Representing the c-th communication format, y in the transaction test task d Representing the d-th communication format, x in the transaction communication strategy m Representing the m-th message format, y in the transaction test task h Indicating the nth message format in the transaction communication policy.
Optionally, the responding to the transaction test running event transmits the transaction test task in the transaction waiting queue to a preset transaction running queue, including:
triggering a transaction test operation event of a 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 preset task transmission channel.
Optionally, the creating a transaction communication link of the transaction test task in the transaction run queue includes:
acquiring a communication log of a transaction test task in the transaction operation queue;
and inquiring a server interface corresponding to the transaction test task in the transaction operation queue according to the communication log, and creating a transaction communication link of the transaction test task in the transaction operation queue according to the server interface.
In order to solve the above problems, the present invention also provides a transaction testing device, including:
the dividing module is used for receiving a transaction request, dividing the transaction request into a plurality of transaction test tasks, sequencing the transaction priority of the transaction test tasks, and transmitting the transaction test tasks to a preset transaction waiting queue;
the calculation module is used for calculating the matching degree of each transaction testing 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 with the matching degree not smaller than a preset threshold value as a target transaction communication strategy of the corresponding transaction testing task;
the creation module is used for responding to the transaction operation event, transmitting the transaction test task in the transaction waiting queue to a preset transaction operation queue, and creating a transaction communication link of the transaction test task in the transaction operation queue;
and the test module is used for 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 order to solve the above-mentioned problems, the present invention also provides an electronic apparatus including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores a computer program executable by the at least one processor to implement the transaction testing method described above.
In order to solve the above-mentioned problems, the present invention also provides a computer-readable storage medium having stored therein at least one computer program that is executed by a processor in an electronic device to implement the transaction testing method described above.
According to the embodiment of the invention, the transaction request is divided into a plurality of transaction test tasks, and the transaction test tasks are transmitted to the preset transaction waiting queue after being subjected to transaction priority sorting, so that the orderly testing of the subsequent transaction tasks can be ensured; 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 with the matching degree not smaller than the preset threshold value as the 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 a server is reduced, the transaction test time is saved, and the transaction test efficiency is improved; further, in the embodiment of the invention, in response to a transaction test operation event, a transaction test task in the transaction waiting queue is transmitted to a preset transaction operation queue, a transaction communication link of the transaction test task in the transaction operation queue is created, the transaction test task in the transaction operation queue is transmitted to a corresponding server for transaction test according to the target transaction communication strategy and the transaction communication link, and a transaction test result returned by the server is received. Therefore, the transaction testing method, the device, the electronic equipment and the storage medium can improve the efficiency of transaction testing.
Drawings
FIG. 1 is a flow chart of a transaction testing method according to an embodiment of the invention;
FIG. 2 is a detailed flowchart illustrating one of the steps of the transaction testing method shown in FIG. 1 according to a first embodiment of the present invention;
FIG. 3 is a schematic block diagram of a transaction testing device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an internal structure of an electronic device for implementing a transaction testing method according to an embodiment of the present invention;
the achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of 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 a server, a terminal, etc. capable of being 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 a terminal device or a server device, and the software may be a blockchain platform. The service end 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, sequencing transaction priorities of the transaction test tasks, and transmitting the transaction test tasks to a preset transaction waiting queue.
In an embodiment of the present invention, the transaction request is obtained based on a user demand, which includes: credit card transaction requests and bank payment requests, etc. In one embodiment of the invention, the transaction request is received by a preset transaction routing switch, which is a component that enables transaction testing from a corresponding server, optionally compiled in the Java language.
In an embodiment of the present invention, the transaction routing switch 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 out the interrupt point of the 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 test task in the transaction waiting queue in real time and submitting the transaction test task of the transaction waiting queue to the transaction running queue; and the test processing thread is used for realizing transaction test of the transaction test task in the operation queue.
Further, referring to fig. 2, the dividing the transaction request into a plurality of transaction testing tasks includes:
s20, acquiring a transaction test field in the transaction request, and identifying a transaction test type in the transaction test field;
s21, clustering transaction test fields with the same transaction test type to form one or more transaction test clustering points;
s22, generating corresponding transaction test tasks according to the transaction test clustering points.
In detail, the transaction test field is queried for by sql statements, which include, but are not limited to: id. date, name, etc., the transaction test type is identified based on the corresponding id, e.g., id is a credit card, then the corresponding transaction test type may be identified as a 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 Java language is compiled, for example, the transaction test cluster point is a credit card transaction test cluster point, and then a credit card transaction test task is created in the transaction routing switch using the Java language.
Based on the division of the transaction test tasks, the tasks in the transaction request can be better sorted and summarized, so that the transaction test types of the transaction test tasks can be conveniently inquired, and the transaction test task time period in the off-line transaction request can be more easily inquired.
Further, the transaction testing tasks are submitted to a preset waiting queue after being subjected to priority sorting, so that each transaction testing task can be orderly executed. The transaction waiting queue is operated in the transaction routing converter and is used for receiving transaction testing tasks and transmitting the transaction testing tasks to the transaction operation queue to execute the transaction testing tasks.
In a preferred embodiment, the preset transaction waiting queue is constructed through a redis cache.
Specifically, the sorting the transaction priorities of the transaction testing tasks includes: acquiring importance degree identifiers of each transaction test task; and according to the importance degree identification, carrying out transaction priority ranking on the transaction testing task.
Wherein, the importance level identification includes: the rank identification of the transaction test task. Further, it should be emphasized that, the higher the importance level identifier is, the higher the corresponding trade priority of the trade test task is, that is, the higher the level identifier of the trade test task is, the higher the priority of the trade test task is.
Further, to ensure privacy and security of the transaction testing tasks, the transaction testing tasks may also be stored in a blockchain node.
S2, calculating the matching degree of each transaction testing task in the transaction waiting queue and the transaction communication strategy in the pre-created transaction communication strategy library, and taking the transaction communication strategy with the matching degree not smaller than a preset threshold value as a target transaction communication strategy of the corresponding transaction testing task.
It should be appreciated that in the transaction test process, different transaction test tasks correspond to different transaction communication strategies, if transaction test is directly performed on the server, the server is required to analyze the transaction communication strategy of each transaction test task, so that the server is easy to be excessively stressed, and more transaction test time is consumed, so that the embodiment of the invention calculates the matching degree of the transaction test task in the transaction waiting queue and the transaction communication strategy in the pre-created transaction communication strategy library, so as to identify the transaction communication strategy of the transaction test task, reduce the transaction test pressure of the server, save the transaction test time, and improve the transaction test efficiency. Wherein the transaction communication policy comprises: the method comprises the steps of coding, protocol, communication mode and message format of transaction test tasks, wherein the coding comprises the following specific steps: BCD, ASCII, EBIDIC and BASE64; the protocol includes: ISO and 8583; the communication mode comprises the following steps: TCP (active long chain, passive long chain, short chain); the message format includes: XML and JSON.
Further, in an 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, protocols, communication modes and 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 test task can be greatly reduced, so that the transaction test time of the subsequent transaction test task can be reduced
In an alternative embodiment, the code, protocol, communication mode and message format of the transaction test are collected from the web page by a crawler technology, and the crawler technology may be node.
In an alternative embodiment, the permutation and combination of the coding, the protocol, the communication mode and the message format is implemented through a preset permutation and combination script, and the preset permutation and combination script is compiled through JavaScript language.
Further, the embodiment of the invention calculates the matching degree of each transaction testing task in the transaction waiting queue and the transaction communication strategy in the pre-created transaction communication strategy library so as to identify the codes, protocols, communication modes and message formats of the transaction testing tasks in the transaction waiting queue.
In an optional embodiment of the present invention, calculating the 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 according to the following formula includes:
wherein T (x, y) represents the degree of matching, x h Representing the h code, y in the transaction test task i Representing the ith code, x in the transaction communication strategy a Representing the a-th protocol, y in the transaction test task b Representing the b-th protocol, x in the transaction communication strategy c Representing the c-th communication format, y in the transaction test task d Representing the d-th communication format, x in the transaction communication strategy m Representing the m-th message format, y in the transaction test task n Indicating the nth message format in the transaction communication policy.
Further, the embodiment of the invention takes the transaction communication strategy with the matching degree not smaller than a preset threshold value as a target transaction communication strategy of a corresponding transaction test task, wherein the preset threshold value is 1, namely, when the transaction test task is consistent with the code, protocol, communication format and message format of the transaction communication strategy, the target transaction communication strategy of the transaction test task is obtained.
S3, responding to a transaction test operation event, transmitting the transaction test task in the transaction waiting queue to a preset transaction operation queue, and creating a transaction communication link of the transaction test task in the transaction operation queue.
In at least one embodiment of the present invention, the transaction run event is implemented by a queue monitor thread in the transaction routing switch described above. And the preset transaction running queue runs in the transaction routing converter and is used for receiving the transaction test task transmitted by the transaction waiting queue and running the transaction test task.
In an alternative embodiment, the preset transaction running queue is constructed in a linked list form.
In detail, the responding to the transaction test operation event transmits the transaction test task in the transaction waiting queue to a preset transaction operation queue, and comprises the following steps: triggering a transaction test operation event of a 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 preset task transmission channel.
The transaction test task time stamp is compiled through java language based on user requirements, and for example, transaction test tasks in the transaction waiting queue are set to be executed every five minutes.
In an alternative embodiment, the pre-configured task transmission channel may be configured using currently known message middleware such as: rabbitMQ message middleware.
Further, it is required to state that the transmission of the transaction test task in the transaction waiting queue is performed in the preset transaction running queue according to the order of priority in the transaction waiting queue, that is, the transaction test task with the highest priority begins to transmit the transaction test task first.
Further, the embodiment of the present invention creates a transaction communication link of a 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, and in detail, the creating the transaction communication link of the transaction test task in the transaction running queue includes: and acquiring a communication log of the transaction test task in the transaction operation queue, inquiring a server interface corresponding to the transaction test task in the transaction operation queue according to the communication log, and creating a transaction communication link of the transaction test task in the transaction operation queue according to the server interface.
The communication log is obtained based on historical transaction record inquiry of the corresponding transaction test task, the server interface is inquired through a post method, and the transaction communication link is compiled through Java language and is used for realizing transmission of the transaction test task to the corresponding service in the transaction operation queue.
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, according to the target transaction communication strategy and the transaction communication link, the transaction test task in the transaction operation queue is transmitted to the corresponding server for transaction test, 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, the type of the transaction test task is a credit card transaction, and the returned transaction test result comprises: credit card transaction success or credit card transaction failure.
What needs to be stated is: when the transaction test fails, the interrupt processing thread in the transaction routing converter is used for inquiring the interrupt point which fails in the transaction test, so that the continuous transaction test of the transaction test task is realized, and the transaction test task is not required to be retransmitted, so that the efficiency of the transaction test task is improved.
Further, in another embodiment of the present invention, it may further include: the visual interface of the transaction test task is configured, so that a user can conveniently check the progress and state of the transaction test task better, stop or restart the corresponding transaction test task, and the efficiency of transaction test is improved.
According to the embodiment of the invention, the transaction request is divided into a plurality of transaction test tasks, and the transaction test tasks are transmitted to the preset transaction waiting queue after being subjected to transaction priority sorting, so that the orderly testing of the subsequent transaction tasks can be ensured; 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 with the matching degree not smaller than the preset threshold value as the 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 a server is reduced, the transaction test time is saved, and the transaction test efficiency is improved; further, in the embodiment of the invention, in response to a transaction test operation event, a transaction test task in the transaction waiting queue is transmitted to a preset transaction operation queue, a transaction communication link of the transaction test task in the transaction operation queue is created, the transaction test task in the transaction operation queue is transmitted to a corresponding server for transaction test according to the target transaction communication strategy and the transaction communication link, and a transaction test result returned by the server is received. Therefore, the transaction testing method, the 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 apparatus. The transaction testing device may include a partitioning module 101, a computing module 102, a creating module 103, and a testing module 104, depending on the functions implemented. The module of the present invention may also be referred to as a unit, meaning a series of computer program segments capable of being executed by the processor of the electronic device and of performing fixed functions, stored in the memory of the electronic device.
In the present embodiment, the functions concerning 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, and sort transaction priorities of the transaction test tasks, and then transmit the transaction test tasks to a preset transaction waiting queue;
the calculating module 102 is configured to calculate a matching degree between each transaction testing 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 with the matching degree not less than a preset threshold as a target transaction communication policy of the corresponding transaction testing task;
the creating module 103 is configured to respond to a transaction operation event, transmit a transaction test task in the transaction waiting queue to a preset transaction operation queue, and create a transaction communication link of the transaction test task in the transaction operation queue;
the test module 104 is configured to transmit a transaction test task in the transaction operation 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, the modules in the transaction testing device 100 in the embodiment of the present invention use the same technical means as the transaction testing method described in fig. 1 and 2, and can produce the same technical effects, which are not described herein.
Fig. 4 is a schematic structural diagram of an electronic device for 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, including flash memory, a mobile hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an 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 in other embodiments also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or 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 for storing application software installed in the electronic device 1 and various types of data, such as codes for transaction tests, but also for temporarily storing data that has been output or is to be output.
The processor 10 may be comprised of integrated circuits in some embodiments, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, combinations of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the entire electronic device using various interfaces and lines, and executes various functions of the electronic device 1 and processes data by running or executing programs or modules stored in the memory 11 (for example, executing transaction tests, etc.), and calling data stored in the memory 11.
The bus may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
Fig. 4 shows only an electronic device with components, it being understood by a person 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 shown, or may combine certain components, or may be arranged in different components.
For example, although not shown, the electronic device 1 may further include a power source (such as a battery) for supplying power to each component, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device 1 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described herein.
Further, the electronic device 1 may also comprise a network interface, optionally the network interface may comprise a wired interface and/or a wireless interface (e.g. WI-FI interface, bluetooth interface, etc.), typically used for establishing a communication connection between the electronic device 1 and other electronic devices.
The electronic device 1 may optionally further comprise a user interface, which may be a Display, an input unit, such as a Keyboard (Keyboard), or 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, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device 1 and for displaying a visual user interface.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The transaction test 12 stored by the memory 11 in the electronic device 1 is a combination of a plurality 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, sequencing the transaction priority of the transaction test tasks, and transmitting the transaction test tasks to a preset transaction waiting queue;
calculating the matching degree of each transaction testing 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 with the matching degree not smaller than a preset threshold value as a target transaction communication strategy of the corresponding transaction testing task;
transmitting the transaction test tasks in the transaction waiting queue to a preset transaction running queue in response to a transaction running event, and creating a transaction communication link of the transaction test 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 particular, the specific implementation method of the processor 10 on the computer program may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein.
Further, the integrated modules/units of the electronic device 1 may be stored in a non-volatile computer readable storage medium if implemented in the form of software functional units and sold or used as a stand alone product. The computer readable storage medium may be volatile or nonvolatile. For example, the computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a 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, can implement:
receiving a transaction request, dividing the transaction request into a plurality of transaction test tasks, sequencing the transaction priority of the transaction test tasks, and transmitting the transaction test tasks to a preset transaction waiting queue;
calculating the matching degree of each transaction testing 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 with the matching degree not smaller than a preset threshold value as a target transaction communication strategy of the corresponding transaction testing task;
transmitting the transaction test tasks in the transaction waiting queue to a preset transaction running queue in response to a transaction running event, and creating a transaction communication link of the transaction test 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 several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
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 characteristics 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 blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (8)

1. A transaction testing method, the method comprising:
receiving a transaction request, dividing the transaction request into a plurality of transaction test tasks, sequencing the transaction priority of the transaction test tasks, and transmitting the transaction test tasks to a preset transaction waiting queue;
calculating the matching degree of each transaction testing 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 with the matching degree not smaller than a preset threshold value as a target transaction communication strategy of the corresponding transaction testing task;
transmitting the transaction test tasks in the transaction waiting queue to a preset transaction running queue in response to a transaction running event, and creating a transaction communication link of the transaction test tasks in the transaction running queue;
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;
before calculating the matching degree between each transaction testing task in the transaction waiting queue and the transaction communication strategy in the pre-created transaction communication strategy library, the method further comprises: collecting codes, protocols, communication modes and message formats of all transaction tests; the codes, the protocols, the communication modes and the message formats are arranged and combined to form a transaction communication strategy set, and a transaction communication strategy library is generated according to the transaction communication strategy set;
the calculating the matching degree of each transaction testing task in the transaction waiting queue and the transaction communication strategy in the pre-created transaction communication strategy library comprises the following steps: calculating the matching degree of each transaction testing 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:
wherein T (x, y) represents the degree of matching, x h Representing the h code, y in the transaction test task i Representing the ith code, x in the transaction communication strategy a Representing the a-th protocol, y in the transaction test task b Representing the b-th protocol, x in the transaction communication strategy c Representing the c-th communication format, y in the transaction test task d Representing the d-th communication format, x in the transaction communication strategy m Representing the m-th message format, y in the transaction test task n Representing an nth message format in the transaction communication strategy;
the transaction request is received through a preset transaction routing converter, the transaction routing converter is a component for realizing transaction test from a corresponding server, and the transaction routing converter comprises: 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 the interrupt point of the last transaction test task and continuing the interrupted transaction test task; the queue monitoring thread is used for observing the priority of the transaction test task in the transaction waiting queue in real time and submitting the transaction test task of the transaction waiting queue to the transaction running queue; the test processing thread is used for realizing transaction test of transaction test tasks in the transaction running queue.
2. The transaction testing method of claim 1, wherein said dividing the transaction request into a plurality of transaction testing tasks includes:
acquiring a transaction test field in the transaction request, and identifying a transaction test type of the transaction test field;
clustering transaction test fields with the same transaction test type to form one or more transaction test clustering points;
and generating corresponding transaction test tasks according to the transaction test cluster points.
3. The transaction testing method of claim 1, wherein said prioritizing the transactions of the transaction testing tasks includes:
acquiring importance degree identifiers of each transaction test task;
and sorting the transaction priorities of the transaction test tasks according to the importance degree identifiers of the transaction test tasks.
4. The transaction testing method of claim 1, wherein transmitting the transaction testing tasks in the transaction waiting queue to a preset transaction run queue in response to a transaction testing run event comprises:
triggering a transaction test operation event of a 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 preset task transmission channel.
5. A transaction testing method according to any one of claims 1 to 4, wherein creating a transaction communications link for a transaction testing task in the transaction run queue includes:
acquiring a communication log of a transaction test task in the transaction operation queue;
and inquiring a server interface corresponding to the transaction test task in the transaction operation queue according to the communication log, and creating a transaction communication link of the transaction test task in the transaction operation queue according to the server interface.
6. A transaction testing device for implementing a transaction testing method according to any one of claims 1 to 5, the device comprising:
the dividing module is used for receiving a transaction request, dividing the transaction request into a plurality of transaction test tasks, sequencing the transaction priority of the transaction test tasks, and transmitting the transaction test tasks to a preset transaction waiting queue;
the calculation module is used for calculating the matching degree of each transaction testing 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 with the matching degree not smaller than a preset threshold value as a target transaction communication strategy of the corresponding transaction testing task;
the creation module is used for responding to the transaction operation event, transmitting the transaction test task in the transaction waiting queue to a preset transaction operation queue, and creating a transaction communication link of the transaction test task in the transaction operation queue;
and the test module is used for 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.
7. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
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 5.
8. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the transaction testing method according to any one of claims 1 to 5.
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 CN113360375A (en) 2021-09-07
CN113360375B true 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 (5)

* 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
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN101482815B (en) * 2008-01-10 2013-08-07 国际商业机器公司 Method and equipment for generating test case of software system

Patent Citations (5)

* 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
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
CN113360375A (en) 2021-09-07

Similar Documents

Publication Publication Date Title
CN110851298B (en) Abnormality analysis and processing method, electronic device and storage medium
CN112506559B (en) Gray release method and device based on gateway, electronic equipment and storage medium
CN112702228B (en) Service flow limit response method, device, electronic equipment and readable storage medium
CN113688923B (en) Order abnormity intelligent detection method and device, electronic equipment and storage medium
CN112084486A (en) User information verification method and device, electronic equipment and storage medium
CN112256783A (en) Data export method and device, electronic equipment and storage medium
CN113051224A (en) File transmission method and device, electronic equipment and computer readable storage medium
CN113360375B (en) Transaction testing method, device, electronic equipment and storage medium
CN112541640A (en) Resource authority management method and device, electronic equipment and computer storage medium
CN112182562A (en) Data auditing method and system in sandbox environment, electronic equipment and medium
CN112085611A (en) Asynchronous data verification method and device, electronic equipment and storage medium
CN114399397A (en) Renewal tracking method, device, equipment and medium
CN114185502A (en) Log printing method, device, equipment and medium based on production line environment
CN114826725A (en) Data interaction method, device, equipment and storage medium
CN115357666A (en) Abnormal business behavior identification method and device, electronic equipment and storage medium
CN112667244A (en) Data verification method and device, electronic equipment and computer readable storage medium
CN112637280B (en) Data transmission method, device, electronic equipment and storage medium
CN114598624B (en) Cluster monitoring method and device, electronic equipment and readable storage medium
CN115964307B (en) Automatic test method, device, equipment and medium for transaction data
CN113032168B (en) Data transmission rate dynamic adjustment method and device, electronic equipment and storage medium
CN114978991B (en) Route distribution method, route distribution device, electronic equipment and computer readable storage medium
CN112579046B (en) User story analysis method and device, electronic equipment and storage medium
CN113221888B (en) License plate number management system test method and device, electronic equipment and storage medium
CN114138513A (en) Data sharing method, device, equipment and storage medium based on association system
CN116610465A (en) Event notification-based message sending method and device, electronic equipment and 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