CN114546871A - Lightweight testing method and device based on financial application - Google Patents

Lightweight testing method and device based on financial application Download PDF

Info

Publication number
CN114546871A
CN114546871A CN202210182775.XA CN202210182775A CN114546871A CN 114546871 A CN114546871 A CN 114546871A CN 202210182775 A CN202210182775 A CN 202210182775A CN 114546871 A CN114546871 A CN 114546871A
Authority
CN
China
Prior art keywords
transaction
processed
transaction data
test
cache
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.)
Pending
Application number
CN202210182775.XA
Other languages
Chinese (zh)
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202210182775.XA priority Critical patent/CN114546871A/en
Publication of CN114546871A publication Critical patent/CN114546871A/en
Pending legal-status Critical Current

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
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a lightweight test method and a device based on financial application, relating to the technical field of finance, wherein the method comprises the following steps: continuously receiving transaction data to be processed, and storing the transaction data to be processed into a cache, wherein the transaction data to be processed is generated by simulating user transaction by a test transaction initiating device; judging whether the current quantity of the transaction data to be processed stored in the cache reaches a target transaction quantity to be processed; and if the current quantity reaches the target transaction amount to be processed, controlling the financial system to be tested to start processing the transaction data to be processed in the cache. The invention can realize the test of larger test pressure by using less test resources, and can flexibly control the data volume of the transaction data to be processed stored in the cache, thereby meeting the requirement of flexibility on the adjustment of the test pressure at any time.

Description

Lightweight testing method and device based on financial application
Technical Field
The invention relates to the technical field of finance, in particular to a lightweight test method and device based on financial application.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
In the field of financial science and technology, after the development of a financial system is completed, the quality of the system is required to be checked to reach the standard through a testing link, so that the system can be put into practical use. Meanwhile, the test is also an important means for running a financial system to troubleshoot faults. The better the test quality, the stronger the security to the financial system. The test resource is one of the important factors influencing the test quality, and generally speaking, the small pressure load test is realized under the condition of small test resource, and the large pressure load test is realized under the condition of large test resource. With the increasing development of financial business, the load pressure of financial systems is increasing, and therefore the requirement of heavy-pressure load testing is increasing, which puts higher and higher requirements on testing resources.
The existing financial application test method adopts a weight-level test method. For the test requirements of the financial system, a test transaction simulator is adopted to send loads to the test system, and then the operation results of the test system are monitored, collected and analyzed. The test transaction simulator resource determines the ability to initiate a test load, and a sufficiently large test transaction simulator resource needs to be configured in order to implement a high-pressure load test of the financial system.
Therefore, the existing heavyweight test method has high requirements on test resources, and the higher the target test load is, the more test resources are required. In addition, the heavyweight test method is limited by test resources, lacks flexibility, and cannot realize dynamic adjustment of test pressure.
Disclosure of Invention
The embodiment of the invention provides a lightweight test method based on financial application, which is used for realizing the test of larger test pressure by using less test resources and can flexibly control the data volume of transaction data to be processed stored in a cache to meet the flexibility requirement on adjusting the test pressure at any time, and the method comprises the following steps:
continuously receiving transaction data to be processed, and storing the transaction data to be processed into a cache, wherein the transaction data to be processed is generated by simulating user transaction by a test transaction initiating device;
judging whether the current quantity of the transaction data to be processed stored in the cache reaches a target transaction quantity to be processed;
and if the current quantity reaches the target transaction quantity to be processed, controlling the financial system to be tested to start processing the transaction data to be processed in the cache.
The embodiment of the invention also provides a lightweight testing device based on financial application, which is used for realizing the test of larger test pressure by using less test resources and can flexibly control the data volume of transaction data to be processed stored in a cache to meet the requirement of flexibility on the adjustment of the test pressure at any time, and the device comprises:
the transaction cache module is used for continuously receiving transaction data to be processed and storing the transaction data to be processed into a cache, wherein the transaction data to be processed is generated by simulating user transaction by the test transaction initiating device;
the transaction control module is used for judging whether the current quantity of the transaction data to be processed stored in the cache reaches the target transaction quantity to be processed;
and the transaction control module is also used for controlling the to-be-processed transaction system to start processing the to-be-processed transaction data in the cache when the current quantity reaches the target to-be-processed transaction quantity.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the computer program to realize the lightweight testing method based on the financial application.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the light-weight testing method based on the financial application is realized.
An embodiment of the present invention further provides a computer program product, where the computer program product includes a computer program, and when executed by a processor, the computer program implements the lightweight testing method based on financial applications.
In the embodiment of the invention, the to-be-processed transaction data generated by the test transaction initiating device is stored in the cache and is continuously cached, so that a large amount of to-be-processed transaction data is stored in the cache, and when the current amount of the stored to-be-processed transaction data reaches the preset target to-be-processed transaction amount, the to-be-processed transaction data in the cache is controlled to be started and processed by the financial system to be tested. In this way, by utilizing the cumulative effect of the transaction data to be processed in the buffer, the test transaction initiating device can cumulatively realize larger test pressure even if less test resources are provided at a single time, and the dependence on the test transaction initiating device is reduced. In addition, the time length for continuously receiving the transaction data to be processed can be controlled, and the amount of the transaction data to be processed accumulated in the cache can be reasonably controlled, so that the requirement on flexibility for adjusting the test pressure at any time is met.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
FIG. 1 is a block diagram of an embodiment of the present invention illustrating an overall architecture for testing a financial system under test using a lightweight testing device based on financial applications;
FIG. 2 is a flow chart of a lightweight testing method based on financial applications in an embodiment of the invention;
FIG. 3 is a schematic diagram of a transaction cache module according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another embodiment of a transaction cache module;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
The embodiment of the invention provides a lightweight test method based on financial application. It is assumed here that the upper limit of the test load generated by the test transaction initiation module is a, the upper limit of the processing capacity of the financial system transaction execution module is B, and B is much greater than a. The aim of the lightweight test method is to realize the execution of the transaction execution module of the financial application system with the maximum processing capacity B for the duration T and verify the system performance on the premise of testing the transaction initiation module to initiate the transaction load A.
The overall architecture of the financial system to be tested when the lightweight testing device based on financial application corresponding to the method tests the financial system to be tested is shown in figure 1.
The test device is deployed in the financial system to be tested in the form of a plug-in. Referring to fig. 1, the financial system to be tested includes a transaction identification module and a transaction execution module, the transaction identification module is connected to the test transaction initiation device, and is configured to receive a test load from the test transaction initiation device in real time, analyze the test load, and read keywords from the test load to obtain transaction data to be processed; the transaction execution module is used for processing the transaction data to be processed. The test device (namely a light-weight test device based on financial application) comprises a transaction cache module and a transaction control module, wherein the transaction cache module is connected between a transaction identification module and a transaction execution module and is used for caching transaction data to be processed, which is obtained by the transaction identification module; the transaction control module is connected with the transaction execution module and controls the transaction execution module to be started or stopped in a switch mode. When the switch of the transaction control module is set to be ON, the transaction execution module is started, and the to-be-processed transaction data are read from the transaction cache region and processed; when the switch of the transaction control module is set to be OFF, the transaction execution module stops, the connection with the transaction cache module is interrupted, and the transaction execution module does not process the transaction data to be processed.
It can be seen that the transaction control module provides a way to control the transaction processing of the financial system under test. When the transaction execution module is idle or busy, the user can switch the on-off state of the transaction control module at any time according to the test requirement, so that the aim of controlling the system to execute the transaction or suspend the transaction is fulfilled.
Specifically, the lightweight testing method based on financial applications in the embodiment of the present invention will be specifically described below with reference to fig. 1. As shown in fig. 2, the method includes the following steps 201 to 203:
step 201, continuously receiving the transaction data to be processed, and storing the transaction data to be processed into a cache.
Step 202, determining whether the current amount of the transaction data to be processed stored in the cache reaches the target transaction amount to be processed.
And step 203, if the current quantity reaches the target transaction amount to be processed, controlling the financial system to be tested to start processing the transaction data to be processed in the cache.
In the embodiment of the invention, the transaction data to be processed is generated by simulating the user transaction by the test transaction initiating device. The test transaction initiation module typically consists of several test pressure initiators and test transaction simulators. The test pressure initiator is configured with a pressure test tool and a test script is deployed to simulate user transaction. After the test transaction simulator receives the user transaction, the simulation terminal device generates a transaction message which is used as a test load and input into the financial system to be tested.
The financial system to be tested receives the test load, analyzes the transaction message, reads the key words recorded in the transaction message, such as the transaction code, the transaction type and the like, and simultaneously numbers the transaction recorded in the transaction message to obtain the sequence number of the transaction, wherein the sequence number and the extracted key words form a piece of transaction data to be processed. The financial system to be tested sends the transaction data to be processed to the transaction cache module, and the transaction cache module continuously receives the transaction data to be processed which is obtained by the financial system to be tested through analysis from the test load.
The level of resource allocation of the test transaction initiating device determines its level of capability to generate the test load. For example, the number and model of test pressure initiators, the test transaction simulator CPU and memory configuration, etc. are all factors that affect the test load. It is assumed here that the test transaction initiation module can generate an upper limit of the test load of a. The test load upper limit a is less than a target pending transaction amount used when the user desires to stress test the financial system under test.
Assuming that a large enough capacity is allocated to the transaction buffer area, the maximum processing capacity of the financial system to be tested (i.e. the maximum data amount that the financial system to be tested can process in a unit time) is B, and the expected execution time length of the test is T, the target transaction amount to be processed can be reached only by executing the time length T with the maximum processing capacity B, i.e. B × T. For the test transaction initiating device, the test load initiating duration T' needs to be at least bxt/a to ensure that the transaction identifying module cumulatively writes sufficient transaction data to be processed into the transaction cache module. In other words, the testing device needs to wait for T' time to start testing the to-be-tested financial system, and during the waiting time, the testing device continuously receives the to-be-processed transaction data analyzed from the test load by the to-be-tested financial system, and meanwhile, when the current amount is less than the target to-be-processed transaction amount, the to-be-tested financial system is always controlled to keep stopping processing the running state of the to-be-processed transaction data in the cache.
Pending transaction data is stored in a cache. Referring to fig. 3, the cache (i.e., the transaction cache module in fig. 3) includes a plurality of cache queues, the number of the cache queues is the same as the number of concurrent threads of the to-be-processed transaction data processing of the to-be-processed financial system, and each concurrent thread processes the to-be-processed transaction data in one cache queue.
The buffer queue follows the principle of "first in first out". The transaction data to be processed written into the transaction cache module is firstly waited for processing by the transaction execution module. For example, assume that the transaction caching module is configured with N concurrent queues, named queue 1, queue 2 …, and queue N, respectively. The transaction identification module adopts a single thread and writes the transaction data to be processed into the N concurrent queues of the transaction cache module in turn. The connection relationship between the N concurrent queues of the transaction cache module and the N concurrent threads of the transaction execution module is 1 to 1. After the financial system to be tested receives the test load, the transaction identification module generates the 1 st transaction data to be processed, and writes the transaction data into the queue 1; then generating the 2 nd transaction data to be processed, and writing the transaction data into the queue 2; …, respectively; generating Nth transaction data to be processed, and writing the Nth transaction data into a queue N; generating the (N + 1) th transaction data to be processed, and writing the data into the queue 1 again; generating the (N + 2) th transaction data to be processed, and writing the transaction data into the queue 2 again; …; and so on as shown in figure 3.
And after the transaction cache module accumulates the target transaction amount to be processed, the transaction control module sets the switch to be ON and restores the connection between each concurrent thread and the corresponding processed cache queue. Specifically, referring to fig. 4, the 1 to 1 connections of the N concurrent threads of the transaction execution module and the N concurrent queues of the transaction cache module are respectively restored, and each concurrent thread of the transaction execution module starts executing transaction logic.
And after the transaction execution module is started, the to-be-processed transaction record of the transaction buffer module is read, and transaction logic is executed. Still in the previous example, the transaction buffer area accumulates B × T pending transactions, the number of buffer queues is N, and each buffer queue accumulates B × T/N pending transactions. The maximum processing capacity of the transaction execution module is B, the number of concurrent threads is N, and the maximum processing capacity of each concurrent thread is B/N. Each concurrent thread of the transaction execution module reads transaction data to be processed from a cache queue of the transaction cache module connected with the concurrent thread, transaction logic is executed by using the maximum processing capacity B/N until the queue is empty, no transaction record to be processed exists in the queue, and the execution duration is (B multiplied by T/N)/(B/N) ═ T. The transaction execution module can realize a test scenario of executing the duration T with the maximum processing capacity B under the combined action of the N buffer queues. And the same test resource configuration can only apply the test pressure of the load A to the financial system to be tested at the highest under the condition of no transaction buffer module to accumulate the effect on the transaction data to be processed.
And after the transaction execution module finishes processing, the financial system to be tested outputs system running state data serving as a test result. Common system operating state data includes: system load throughput, system run length, transaction execution speed, and the like. The parameter types included in the system operation state data can be set according to actual requirements. Therefore, the evaluation of the financial system to be tested can be obtained by analyzing the system operation state parameters, and the test is completed.
In the embodiment of the invention, the to-be-processed transaction data generated by the test transaction initiating device is stored in the cache and is continuously cached, so that a large amount of to-be-processed transaction data is stored in the cache, and when the current amount of the stored to-be-processed transaction data reaches the preset target to-be-processed transaction amount, the to-be-processed transaction data in the cache is controlled to be started and processed by the financial system to be tested. In this way, by utilizing the cumulative effect of the transaction data to be processed in the buffer, the test transaction initiating device can cumulatively realize larger test pressure even if less test resources are provided at a single time, and the dependence on the test transaction initiating device is reduced. In addition, the time length for continuously receiving the transaction data to be processed can be controlled, and the amount of the transaction data to be processed accumulated in the cache can be reasonably controlled, so that the requirement on flexibility for adjusting the test pressure at any time is met.
The embodiment of the invention also provides a light-weight testing device based on financial application, which is described in the following embodiment. Because the principle of the device for solving the problems is similar to the lightweight test method based on the financial application, the implementation of the device can be referred to the implementation of the lightweight test method based on the financial application, and repeated details are not repeated.
As shown in FIG. 1, the apparatus 100 includes a transaction caching module 101 and a transaction control module 102.
The transaction cache module 101 is configured to continuously receive transaction data to be processed, store the transaction data to be processed in a cache, where the transaction data to be processed is generated by simulating a user transaction by a test transaction initiating device;
the transaction control module 102 is configured to determine whether the current amount of the to-be-processed transaction data stored in the cache reaches a target to-be-processed transaction amount;
the transaction control module 102 is further configured to control the to-be-processed financial system to start processing the to-be-processed transaction data in the cache when the current amount reaches the target to-be-processed transaction amount.
In one implementation manner of the embodiment of the present invention, the transaction control module 102 is further configured to:
and when the current quantity is less than the target transaction amount to be processed, controlling the financial system to be tested to keep stopping processing the running state of the transaction data to be processed in the cache.
In one implementation manner of the embodiment of the present invention, the transaction control module 102 is further configured to:
acquiring the maximum processing capacity and the expected execution duration of the financial system to be tested, wherein the maximum processing capacity represents the maximum data volume which can be processed by the financial system to be tested in unit time;
and determining the product of the maximum processing capacity and the expected execution time length as the target transaction amount to be processed.
In an implementation manner of the embodiment of the present invention, the transaction cache module 101 is configured to:
and continuously receiving the transaction data to be processed which is obtained by analyzing the financial system to be tested from the test load, wherein a transaction message generated by simulating user transaction by the test transaction initiating device is used as the test load.
In one implementation of this embodiment of the present invention, the transaction control module 102 is further configured to execute the steps of
Acquiring a test load upper limit value generated by a test transaction initiating device in unit time;
determining the ratio of the target transaction amount to be processed to the upper limit value of the test load as waiting time;
a transaction caching module 101 configured to: and continuously receiving the transaction data to be processed analyzed from the test load by the financial system to be tested in the waiting time.
In an implementation manner of the embodiment of the present invention, the cache includes a plurality of cache queues, the number of the cache queues is the same as the number of concurrent threads of the to-be-processed transaction data in the to-be-processed financial system, and each concurrent thread processes the to-be-processed transaction data in one cache queue; the transaction data to be processed are sequentially stored in each buffer queue in turn according to the receiving time sequence;
a transaction control module 102 for: and restoring the connection between each concurrent thread and the corresponding processed buffer queue.
In the embodiment of the invention, the to-be-processed transaction data generated by the test transaction initiating device is stored in the cache and is continuously cached, so that a large amount of to-be-processed transaction data is stored in the cache, and when the current amount of the stored to-be-processed transaction data reaches the preset target to-be-processed transaction amount, the to-be-processed transaction data in the cache is controlled to be started and processed by the financial system to be tested. In this way, by utilizing the cumulative effect of the transaction data to be processed in the buffer, the test transaction initiating device can cumulatively realize larger test pressure even if less test resources are provided at a single time, and the dependence on the test transaction initiating device is reduced. In addition, the time length for continuously receiving the transaction data to be processed can be controlled, and the amount of the transaction data to be processed accumulated in the cache can be reasonably controlled, so that the requirement on flexibility for adjusting the test pressure at any time is met.
An embodiment of the present invention further provides a computer device, and fig. 5 is a schematic diagram of a computer device in an embodiment of the present invention, where the computer device is capable of implementing all steps in the lightweight test method based on financial application in the foregoing embodiment, and the computer device specifically includes the following contents:
a processor (processor)501, a memory (memory)502, a communication Interface (Communications Interface)503, and a communication bus 504;
the processor 501, the memory 502 and the communication interface 503 complete mutual communication through the communication bus 504; the communication interface 503 is used for implementing information transmission between related devices;
the processor 501 is used to call the computer program in the memory 502, and when the processor executes the computer program, the processor implements the lightweight testing method based on financial applications in the above embodiments.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the light-weight testing method based on the financial application is realized.
An embodiment of the present invention further provides a computer program product, where the computer program product includes a computer program, and when executed by a processor, the computer program implements the lightweight testing method based on financial applications.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (15)

1. A lightweight testing method based on financial applications, the method comprising:
continuously receiving transaction data to be processed, and storing the transaction data to be processed into a cache, wherein the transaction data to be processed is generated by simulating user transaction by a test transaction initiating device;
judging whether the current quantity of the transaction data to be processed stored in the cache reaches a target transaction quantity to be processed;
and if the current quantity reaches the target transaction amount to be processed, controlling the financial system to be tested to start processing the transaction data to be processed in the cache.
2. The method of claim 1, wherein after determining whether the current amount of pending transaction data stored in the cache reaches a target pending transaction amount, the method further comprises:
and if the current quantity is less than the target transaction amount to be processed, controlling the financial system to be tested to keep stopping processing the running state of the transaction data to be processed in the cache.
3. The method of claim 1, wherein before determining whether the current amount of pending transaction data stored in the cache reaches a target pending transaction amount, the method further comprises:
acquiring the maximum processing capacity and the expected execution time length of the financial system to be tested, wherein the maximum processing capacity represents the maximum data volume which can be processed by the financial system to be tested in unit time;
and determining the product of the maximum processing capacity and the expected execution time length as a target transaction amount to be processed.
4. A method according to claim 2 or 3, wherein receiving pending transaction data comprises:
and continuously receiving to-be-processed transaction data which is analyzed and obtained from the test load by the to-be-tested financial system, wherein a transaction message generated by simulating user transaction by the test transaction initiating device is used as the test load.
5. The method of claim 4, further comprising:
acquiring a test load upper limit value generated by a test transaction initiating device in unit time;
determining the ratio of the target transaction amount to be processed to the upper limit value of the test load as waiting time;
the continuously receiving the transaction data to be processed, which is obtained by analyzing the financial system to be tested from the test load, comprises the following steps:
and continuously receiving the transaction data to be processed, which is analyzed from the test load by the financial system to be tested, in the waiting time.
6. The method according to claim 1, wherein the buffer includes a plurality of buffer queues, the number of the buffer queues is the same as the number of concurrent threads of the financial system under test in processing the transaction data to be processed, and each concurrent thread processes the transaction data to be processed in one buffer queue; the transaction data to be processed are sequentially stored in each buffer queue in turn according to the receiving time sequence;
controlling the financial system to be tested to start processing the transaction data to be processed in the cache, comprising the following steps:
and restoring the connection between each concurrent thread and the corresponding processed buffer queue.
7. A lightweight testing apparatus based on financial applications, the apparatus comprising:
the transaction cache module is used for continuously receiving transaction data to be processed and storing the transaction data to be processed into a cache, wherein the transaction data to be processed is generated by simulating user transaction by the test transaction initiating device;
the transaction control module is used for judging whether the current quantity of the transaction data to be processed stored in the cache reaches the target transaction quantity to be processed;
and the transaction control module is also used for controlling the to-be-processed transaction system to start processing the to-be-processed transaction data in the cache when the current quantity reaches the target to-be-processed transaction quantity.
8. The apparatus of claim 7, wherein the transaction control module is further configured to:
and when the current quantity is less than the target transaction amount to be processed, controlling the financial system to be tested to keep stopping processing the running state of the transaction data to be processed in the cache.
9. The apparatus of claim 7, wherein the transaction control module is further configured to:
acquiring the maximum processing capacity and the expected execution time length of the financial system to be tested, wherein the maximum processing capacity represents the maximum data volume which can be processed by the financial system to be tested in unit time;
and determining the product of the maximum processing capacity and the expected execution time length as a target transaction amount to be processed.
10. The apparatus of claim 8 or 9, wherein the transaction caching module is configured to:
and continuously receiving to-be-processed transaction data which is analyzed and obtained from the test load by the to-be-tested financial system, wherein a transaction message generated by simulating user transaction by the test transaction initiating device is used as the test load.
11. The apparatus of claim 10, wherein the transaction control module is further configured to obtain an upper limit value of a test load generated by the test transaction initiating device in a unit time;
determining the ratio of the target transaction amount to be processed to the upper limit value of the test load as waiting time;
a transaction caching module to: and continuously receiving the transaction data to be processed, which is analyzed from the test load by the financial system to be tested, in the waiting time.
12. The apparatus according to claim 7, wherein the buffer includes a plurality of buffer queues, the number of the buffer queues is the same as the number of concurrent threads of the financial system under test in processing the transaction data to be processed, and each concurrent thread processes the transaction data to be processed in one buffer queue; the transaction data to be processed are sequentially stored in each buffer queue in turn according to the receiving time sequence;
a transaction control module to: and restoring the connection between each concurrent thread and the corresponding processed buffer queue.
13. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 6 when executing the computer program.
14. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of any one of claims 1 to 6.
15. A computer program product, characterized in that the computer program product comprises a computer program which, when being executed by a processor, carries out the method of any one of claims 1 to 6.
CN202210182775.XA 2022-02-25 2022-02-25 Lightweight testing method and device based on financial application Pending CN114546871A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210182775.XA CN114546871A (en) 2022-02-25 2022-02-25 Lightweight testing method and device based on financial application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210182775.XA CN114546871A (en) 2022-02-25 2022-02-25 Lightweight testing method and device based on financial application

Publications (1)

Publication Number Publication Date
CN114546871A true CN114546871A (en) 2022-05-27

Family

ID=81678626

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210182775.XA Pending CN114546871A (en) 2022-02-25 2022-02-25 Lightweight testing method and device based on financial application

Country Status (1)

Country Link
CN (1) CN114546871A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115964307A (en) * 2023-03-16 2023-04-14 深圳华锐分布式技术股份有限公司 Transaction data automatic testing method, device, equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115964307A (en) * 2023-03-16 2023-04-14 深圳华锐分布式技术股份有限公司 Transaction data automatic testing method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US6256659B1 (en) System and method for performing hybrid preemptive and cooperative multi-tasking in a computer system
CN105045710B (en) A kind of automatic test data creation method under cloud computing environment
CN108446215B (en) POS machine test method, device, system and terminal
US6295518B1 (en) System and method for emulating telecommunications network devices
JPH04256034A (en) Computer system
CN107045475B (en) Test method and device
CN105302717A (en) Detection method and apparatus for big data platform
CN112767133A (en) Service decision method and device, storage medium and computer equipment
CN112346980B (en) Software performance testing method, system and readable storage medium
CN113157411A (en) Reliable configurable task system and device based on Celery
CN112767135A (en) Rule engine configuration method and device, storage medium and computer equipment
CN112650676A (en) Software testing method, device, equipment and storage medium
CN114546871A (en) Lightweight testing method and device based on financial application
US20060195732A1 (en) Method and system for executing test cases for a device under verification
CN107220165A (en) The method and apparatus of pressure test on a kind of artificial line
CN114519006A (en) Test method, device, equipment and storage medium
CN113191114B (en) Method and apparatus for validating a system
CN111290942A (en) Pressure testing method, device and computer readable medium
CN112000396B (en) Method, device, equipment and storage medium for testing and controlling fuel cell system
CN115757084A (en) Test method and test device and storage medium
CN113849484A (en) Big data component upgrading method and device, electronic equipment and storage medium
US7013467B1 (en) System and method for managing computer system resources using command control vectors
CN110908821B (en) Method, device, equipment and storage medium for task failure management
CN110727615B (en) Method and system for realizing acceleration of interface data request
CN114201403A (en) Distributed pressure test system and method of block chain network

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