CN117785630A - Performance test method and device for transaction system - Google Patents
Performance test method and device for transaction system Download PDFInfo
- Publication number
- CN117785630A CN117785630A CN202311684860.7A CN202311684860A CN117785630A CN 117785630 A CN117785630 A CN 117785630A CN 202311684860 A CN202311684860 A CN 202311684860A CN 117785630 A CN117785630 A CN 117785630A
- Authority
- CN
- China
- Prior art keywords
- transaction
- test
- production
- request
- transaction system
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 75
- 238000011056 performance test Methods 0.000 title abstract description 26
- 238000012360 testing method Methods 0.000 claims abstract description 237
- 230000004044 response Effects 0.000 claims abstract description 167
- 238000004519 manufacturing process Methods 0.000 claims abstract description 131
- 230000000977 initiatory effect Effects 0.000 claims abstract description 16
- 230000002159 abnormal effect Effects 0.000 claims description 39
- 238000012545 processing Methods 0.000 claims description 36
- 238000011009 performance qualification Methods 0.000 claims description 20
- 238000003860 storage Methods 0.000 claims description 18
- 238000012216 screening Methods 0.000 claims description 13
- 238000004891 communication Methods 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 7
- 230000008859 change Effects 0.000 claims description 5
- 230000005856 abnormality Effects 0.000 claims description 4
- 230000001934 delay Effects 0.000 claims 1
- 238000010998 test method Methods 0.000 claims 1
- 230000000694 effects Effects 0.000 abstract description 5
- 230000008569 process Effects 0.000 description 28
- 238000010586 diagram Methods 0.000 description 23
- 239000003999 initiator Substances 0.000 description 12
- 238000007726 management method Methods 0.000 description 12
- 238000004458 analytical method Methods 0.000 description 9
- 238000001514 detection method Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 230000003111 delayed effect Effects 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 6
- 230000006978 adaptation Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 5
- 230000003993 interaction Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 230000003068 static effect Effects 0.000 description 3
- 230000004075 alteration Effects 0.000 description 2
- 238000000586 desensitisation Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 241000282813 Aepyceros melampus Species 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- FFBHFFJDDLITSX-UHFFFAOYSA-N benzyl N-[2-hydroxy-4-(3-oxomorpholin-4-yl)phenyl]carbamate Chemical compound OC1=C(NC(=O)OCC2=CC=CC=C2)C=CC(=C1)N1CCOCC1=O FFBHFFJDDLITSX-UHFFFAOYSA-N 0.000 description 1
- 230000003139 buffering effect Effects 0.000 description 1
- 230000001364 causal effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 239000007943 implant Substances 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000006386 memory function Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000007619 statistical method Methods 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 239000003826 tablet Substances 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Classifications
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a performance test method and device of a transaction system, wherein the method comprises the following steps: determining a production response message pair of a transaction system in a first production transaction scene in a production environment; determining a target test data generation template from the candidate generation template set based on response codes and time delay information in the production response message pair, and generating corresponding test service data in a first transaction scene in a test environment based on the target test data generation template; replacing service data carried in an online transaction request with test service data to obtain a test request message pair; and initiating a request to the new version transaction system based on the test request message to obtain a test response message pair, and comparing the production response message pair with the test response message pair to obtain a comparison result. Test business data in a test environment which meets the requirements of an actual production environment is built, and the stock function and performance test effect of a transaction system of a new version are improved.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a performance testing method and apparatus for a transaction system.
Background
Currently, performance testing for transaction systems is typically performed based on fixed or predefined data in such a way that it is difficult to simulate the complexity and uncertainty of a real transaction scenario, especially in a high-concurrency, large-scale data processing scenario, resulting in poor performance testing of the transaction system.
Disclosure of Invention
The embodiment of the invention provides a performance test method and device for a transaction system, which are used for improving the performance test effect on the transaction system.
In one aspect, a method for testing performance of a transaction system is provided, the method comprising:
determining a production response message pair of the transaction system in a first production transaction scene in a production environment; the production response message is composed of response messages sent by the transaction system for processing an online transaction request;
determining a target test data generation template from a candidate generation template set based on response codes and time delay information in a production response message pair, and generating corresponding test service data in the first transaction scene in a test environment based on the target test data generation template;
replacing service data carried in the online transaction request with the test service data to obtain a test request message pair;
And initiating a request to the new version of the transaction system based on the test request message, obtaining a test response message pair, and comparing the production response message pair with the test response message pair to obtain a comparison result, wherein the comparison result is used for indicating the performance difference of the transaction system of the new version and the transaction system on-line transaction request processing.
In one possible implementation manner, determining a production response message pair of the transaction system in a first production transaction scenario in a production environment includes:
collecting message information in a log generated by trading of the first production trading scene in a production environment, and analyzing the message information according to a communication protocol to obtain a trading data set;
screening and desensitizing the transaction data set to obtain a candidate production transaction data set, carrying out message pairing on data in the candidate production transaction data set, and determining a production response message pair for responding to the online transaction request.
In one possible implementation manner, the method for obtaining the test response message pair based on the test request message initiating a request to the new version of the transaction system includes:
Adding a transaction tag to each request message of the test request message pair to obtain a test request message pair containing the transaction tag; the transaction tag is used for locating a message involved in the online transaction request;
and initiating a request to a new version of the transaction system based on the test request message containing the transaction tag, obtaining all response messages which are positioned and fed back by the new version of the transaction system based on the transaction tag, and taking all response messages as test response message pairs.
In one possible implementation manner, after obtaining the test request message pair including the transaction tag, the method further includes:
and setting the sending time of the message for the service data of the test request message pair containing the transaction tag according to the service element, and obtaining a new test request message pair.
In one possible implementation, before determining the production response message pair of the transaction system in the first production transaction scenario in the production environment, the method further includes:
determining abnormal parameter information causing the abnormality of the transaction system, classifying the abnormal parameters, and determining abnormal scenes of each category;
Determining an abnormal data template set according to the abnormal scenes of each category and the corresponding abnormal parameters; the method comprises the steps of,
determining normal parameter information of the transaction system, and determining a normal data template set based on the normal parameter information;
and obtaining a candidate generation template set based on the abnormal data template set, the normal data template set and the test requirement information of the transaction system of the new version.
In one possible implementation, the candidate set of generation templates includes a first generation template for indicating that the business data is erroneous, a second generation template for indicating that a partial transaction is delayed or timed out, a third generation template for partially accessing an object of the new version of the transaction system that is unresponsive, a fourth generation template for indicating that a partial transaction is failed, and a fifth generation template for indicating that the transaction is normal.
In one possible embodiment, after obtaining the comparison result, the method further includes:
determining whether the comparison result meets a performance qualification condition, wherein the performance qualification condition is used for indicating that information change in response of the transaction system of the new version to the online transaction request is in a preset range;
And outputting performance qualification prompt information after determining that the comparison result meets the performance qualification condition.
In one aspect, there is provided a performance testing apparatus for a transaction system, the apparatus comprising:
the determining unit is used for determining a production response message pair of the transaction system in a first production transaction scene in a production environment; the production response message is composed of response messages sent by the transaction system for processing an online transaction request;
the generating unit is used for determining a target test data generating template from the candidate generating template set based on the response code and the time delay information in the production response message pair, generating a corresponding test service data in the first transaction scene in the test environment based on the target test data generating template;
the obtaining unit is used for replacing the service data carried in the online transaction request by the test service data to obtain a test request message pair;
and the processing unit is used for initiating a request to the new version of the transaction system based on the test request message, obtaining a test response message pair, comparing the production response message pair with the test response message pair, and obtaining a comparison result, wherein the comparison result is used for indicating the performance difference of the transaction system of the new version and the transaction system for processing the on-line transaction request.
In a possible embodiment, the determining unit is specifically configured to:
collecting message information in a log generated by trading of the first production trading scene in a production environment, and analyzing the message information according to a communication protocol to obtain a trading data set;
screening and desensitizing the transaction data set to obtain a candidate production transaction data set, carrying out message pairing on data in the candidate production transaction data set, and determining a production response message pair for responding to the online transaction request.
In a possible embodiment, the obtaining unit is specifically configured to:
adding a transaction tag to each request message of the test request message pair to obtain a test request message pair containing the transaction tag; the transaction tag is used for locating a message involved in the online transaction request;
and initiating a request to a new version of the transaction system based on the test request message containing the transaction tag, obtaining all response messages which are positioned and fed back by the new version of the transaction system based on the transaction tag, and taking all response messages as test response message pairs.
In a possible embodiment, the apparatus further comprises a configuration unit for:
determining abnormal parameter information causing the abnormality of the transaction system, classifying the abnormal parameters, and determining abnormal scenes of each category;
determining an abnormal data template set according to the abnormal scenes of each category and the corresponding abnormal parameters; the method comprises the steps of,
determining normal parameter information of the transaction system, and determining a normal data template set based on the normal parameter information;
and obtaining a candidate generation template set based on the abnormal data template set, the normal data template set and the test requirement information of the transaction system of the new version.
In one possible implementation, the candidate set of generation templates includes a first generation template for indicating that the business data is erroneous, a second generation template for indicating that a partial transaction is delayed or timed out, a third generation template for partially accessing an object of the new version of the transaction system that is unresponsive, a fourth generation template for indicating that a partial transaction is failed, and a fifth generation template for indicating that the transaction is normal.
In a possible implementation manner, the device further comprises a prompting unit, configured to:
Determining whether the comparison result meets a performance qualification condition, wherein the performance qualification condition is used for indicating that information change in response of the transaction system of the new version to the online transaction request is in a preset range;
and outputting performance qualification prompt information after determining that the comparison result meets the performance qualification condition.
In one aspect, an embodiment of the present invention further provides an electronic device, including a processor and a memory, where the memory stores program codes, and when the program codes are executed by the processor, the processor is caused to execute the performance test method of the transaction system.
In one aspect, embodiments of the present invention also provide a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the electronic device reads the computer instructions from the computer readable storage medium and executes the computer instructions to cause the electronic device to perform the performance testing method of the transaction system described above.
In one aspect, embodiments of the present invention provide a computer readable storage medium comprising program code for causing an electronic device to perform the steps of the performance testing method of any one of the transaction systems described above, when the program product is run on the electronic device.
The invention has the following beneficial effects:
in the embodiment of the invention, the production response message pair of the transaction system in the first production transaction scene in the production environment can be determined; the production response message is composed of response messages sent by a transaction system for processing an online transaction request; determining a target test data generation template from a candidate generation template set based on the response code and the time delay information in the production response message pair, and generating corresponding test service data in a first transaction scene in a test environment based on the target test data generation template; replacing service data carried in an online transaction request with test service data to obtain a test request message pair; therefore, in the embodiment of the invention, the data under the test scene constructed by the data of the production environment, namely the test service data, enables the obtained test request message pair to be more in line with the actual real transaction scene.
Further, a request is initiated to a new version transaction system based on a test request message which is more in line with a real transaction scene, a test response message pair is obtained, and a production response message pair and a test response message pair are compared to obtain a comparison result, so that the performance test effect of the transaction system is improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described, and it is apparent that the drawings in the following description are only embodiments of the present invention, and other drawings may be obtained according to the provided drawings without inventive effort for those skilled in the art.
FIG. 1 is an alternative schematic diagram of an application scenario in an embodiment of the present invention;
FIG. 2 is an alternative schematic diagram of an application scenario in an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating a transaction system message interaction in a production environment according to an embodiment of the present invention;
FIG. 4 is a diagram of the overall architecture of a test system for performance testing of a transaction system in accordance with one embodiment of the present invention;
FIG. 5 is a schematic diagram of an overall architecture of a testing system for performing performance testing on a transaction system according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an overall processing procedure of a test system for a message according to an embodiment of the present invention;
FIG. 7 is a flow chart of a performance testing method of a transaction system according to an embodiment of the invention;
FIG. 8 is a schematic diagram of a parameter for adjusting performance test according to an embodiment of the present invention;
FIG. 9 is a schematic diagram illustrating transaction system message interactions in a testing environment according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a chain of acquisition transaction data in an embodiment of the present invention;
FIG. 11 is a schematic diagram of obtaining a test response message pair according to an embodiment of the present invention;
FIG. 12 is a flow chart of a performance testing method of a transaction system according to another embodiment of the invention;
FIG. 13 is a schematic diagram showing the structure of a performance testing apparatus of a transaction system according to an embodiment of the present invention;
FIG. 14 is a schematic diagram of an electronic device according to an embodiment of the present invention;
fig. 15 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention. Embodiments of the invention and features of the embodiments may be combined with one another arbitrarily without conflict. Also, while a logical order is depicted in the flowchart, in some cases, the steps depicted or described may be performed in a different order than presented herein.
The terms first, second and the like in the description and in the claims and in the above-described figures are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be capable of operation in sequences other than those illustrated or otherwise described.
The word "exemplary" is used herein to mean "serving as an example, embodiment, or illustration. Any embodiment described as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Currently, as previously described, performance testing for transaction systems is typically performed based on fixed or predefined data in such a way that it is difficult to simulate the complexity and uncertainty of a real transaction scenario, especially in a high-concurrency, large-scale data processing scenario, resulting in poor performance testing of the transaction system.
In view of this, an embodiment of the present invention provides a performance testing method of a transaction system, by which a production response message pair of the transaction system in a first production transaction scenario in a production environment can be determined; the production response message is composed of response messages sent by a transaction system for processing an online transaction request; determining a target test data generation template from the candidate generation template set based on response codes and time delay information in the production response message pair, and generating corresponding test service data in a first transaction scene in a test environment based on the target test data generation template; replacing service data carried in an online transaction request with test service data to obtain a test request message pair; therefore, in the embodiment of the invention, the data under the test scene constructed by the data of the production environment, namely the test service data, enables the obtained test request message pair to be more in line with the actual real transaction scene.
Further, a request is initiated to a new version transaction system based on a test request message which is more in line with a real transaction scene, a test response message pair is obtained, and a production response message pair and a test response message pair are compared to obtain a comparison result, so that the performance test effect of the transaction system is improved.
In order to better understand the technical solution provided by the embodiments of the present invention, some simple descriptions are provided below for application scenarios applicable to the technical solution provided by the embodiments of the present invention, and it should be noted that the application scenarios described below are only used to illustrate the embodiments of the present invention, but not limited thereto. In the specific implementation, the technical scheme provided by the embodiment of the invention can be flexibly applied according to actual needs.
Referring to fig. 1, fig. 1 is an application scenario to which the technical solution of the embodiment of the present invention is applicable. In the scene diagram, the device 101 corresponding to the transaction initiator, the device 102 corresponding to the transaction service, the device 103 corresponding to the transaction system and the device 104 corresponding to the test system for performing performance test on the transaction system are included. That is, the transaction system in the embodiment of the invention can process the linkage transaction request initiated by the transaction initiator by at least two transaction service parties under the linkage microservice architecture, namely the transaction system is an online system.
The devices 104 corresponding to each test system may include one or more processors 1041, memory 1042, and I/O interfaces 1043 to interact with the devices, among others. And, devices 101, 102, 103, and 104, and each may be connected directly or indirectly via one or more networks 105.
It should be noted that, in the embodiment of the present invention, the device 101-1, the devices 101-2, … …, the object 1 of the device 101-n, the objects 2, … …, and the objects n, n are positive integers, and may initiate a transaction at the same time, so that the transaction system may receive a large number of concurrent online transaction requests, that is, the object 1 initiates the transaction first, and the object 2 initiates the transaction again, which is not limited in the embodiment of the present invention.
Referring to fig. 2, fig. 2 is an application scenario to which the technical solution of the embodiment of the present invention can be applied, where the application scenario includes 1 device 101, 2 devices 102, and 1 device 103, where the devices 102-1 and 102-2 are used by a service provider a and a service provider C, respectively. For example, the transaction initiator 1 may send a request a to the device 103 corresponding to the transaction system through the device 101, and the device 103 then processes the request a.
The application scenario shown in fig. 2 takes 1 transaction initiator and 2 transaction service parties as an example, where the request a initiated by the transaction initiator 1 is an online transaction request, and an online service provider a and a service provider C are needed. Referring to fig. 3, fig. 3 is a schematic diagram illustrating a transaction system message interaction in a production environment according to an embodiment of the present invention. The schematic shows the interaction of the transaction initiator 1 with the service provider a and the service provider C.
Specifically, after the transaction initiator 1 sends the request a to the device 103 corresponding to the transaction system through the device 101, the device 103 may send the request B to the device 102-1 corresponding to the service provider a, and receive the response B replied by the device 102-1 corresponding to the service provider a in response to the request B. And, the device 103 may send the request C to the device 102-2 corresponding to the service provider C, and receive the response C replied by the device 102-2 corresponding to the service provider C in response to the request C, and determine the response a based on the response B and the response C, and feed back the response a to the device 101, so that the transaction initiator 1 obtains the response a.
That is, in the transaction process shown in fig. 3, a response message pair corresponding to an online transaction request includes a response a, a response B, and a response C, and a received message pair includes a request a, a request B, and a request C.
Each device in fig. 1 and 2 may be a mobile phone, a tablet personal computer (PAD), a personal computer (Personal computer, PC), a smart television, a smart watch, a smart sound box, a smart vehicle-mounted device, a wearable device, or the like, but not limited thereto, and these devices may have a function of logging in and using a learning website.
The devices in fig. 1 and 2 may be independent physical servers, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be cloud servers for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms, but are not limited thereto.
The network 105 may be a wired network, or may be a Wireless network, for example, a mobile cellular network, or may be a Wireless-Fidelity (WIFI) network, or may be other possible networks, which the embodiments of the present invention are not limited to.
Of course, the method provided by the embodiment of the present invention is not limited to the application scenario shown in fig. 1 and fig. 2, but may be used in other possible application scenarios, and the embodiment of the present invention is not limited.
Referring to fig. 4, fig. 4 is an overall architecture diagram of a test system for performing performance test on a transaction system according to an embodiment of the invention. In fig. 4, the overall architecture of the test system includes a configuration layer for performing configuration management, a storage layer for storing packet comparison, packet parsing and configuration indexes, a buffer layer for buffering playback, parsing and access, a packet playback layer for performing packet playback, a packet processing layer for performing the packet processing, and a data access layer for performing data access. The message comparison result is stored in an Impala novel query system, the message analysis result is stored in an HBase database, and the configuration index is stored in a mysql database.
For a more clear detailed description of the overall architecture of the test system for performing performance test on the transaction system, refer to fig. 5, and fig. 5 is a schematic diagram of the overall architecture of another test system for performing performance test on the transaction system according to an embodiment of the present invention. In fig. 5, the system for performing performance test on the transaction system includes 9 modules, where the management platform module is configured with various parameters, for example, a production message source and attribute, a communication protocol between the present test system and a new version transaction system (for example, a new version transaction system), a message parsing rule, a message screening rule, a desensitizing field and a desensitizing mode, a rule of message pairing and concatenation, a transmission parameter from a production domain to a test domain, a threshold replacing and encryption transferring parameter required by adapting to a test environment for playback, a correspondence between a response code and a test environment parameter, a parameter of playback (for example, a playback time sequence, a concurrency degree, a delay processing mode, etc.), a comparison range and mode (which message domains need to be compared, a condition passing comparison, etc.), and a configuration related to a result statistics report. It should be noted that, in the embodiment of the present invention, the configuration parameters in the management platform may be updated, corrected, and adjusted correspondingly based on actual implementation, which is not limited in the embodiment of the present invention.
With continued reference to fig. 5, the production domain includes a message collection module for collecting message information in the production flow and log, a message analysis template for analyzing the message according to the communication protocol and the message specification analysis configured by the management platform module, a message processing module for performing processes such as message screening and desensitizing according to the message screening rule and the desensitizing field and the desensitizing mode configured by the management platform module, and a pairing serial module for performing message pairing according to the message pairing and serial rule configured by the management platform module. The cross-over transmission module is used for transmitting the compliance data from the production domain to the test domain.
The test domain comprises a message adaptation module for adapting the transmitted compliance data, a playback comparison module for carrying out playback comparison on the messages generated by the production environment and the test messages generated by the transaction system based on the new version according to the configuration of the management platform module, and a result statistics module for carrying out statistical analysis and displaying the comparison result.
For a clearer description of the overall processing procedure of the message by the test system in the embodiment of the present invention, please refer to fig. 6. Fig. 6 is mainly divided into an acquisition stage of an original message, an acquisition stage of a comparison message in a test environment, and a stage of performing playback comparison on the two acquired groups of messages.
In the acquisition stage of the original message, log data and flow data can be acquired based on acquisition rules configured by the management platform module, so that the original message is obtained. And then, carrying out protocol distribution on a communication protocol between the transaction system and the test system to obtain a distributed original message, analyzing the distributed original message based on analysis rules configured by the management platform module to obtain an analyzed message, and screening the analyzed message based on screening rules to obtain a candidate message. And desensitizing the candidate message based on the desensitization rule to obtain a desensitized message, pairing the desensitized message based on the serial rule to obtain a production response message pair, and performing message adaptation on the production response message pair to obtain a test request message pair.
Further, the message playback can be performed based on the playback rule and the test request message pair, namely, the test request message pair is sent to the transaction system of the new version so as to obtain the test response message pair; and comparing the test response message pair and the production response message pair based on the comparison rule to obtain a comparison result
In order to further explain the technical solution provided by the embodiments of the present invention, the following details are described with reference to the accompanying drawings and the detailed description. Although embodiments of the present invention provide the method operational steps shown in the following embodiments or figures, more or fewer operational steps may be included in the method, either on a routine or non-inventive basis. In steps where there is logically no necessary causal relationship, the execution order of the steps is not limited to the execution order provided by the embodiments of the present invention. The methods may be performed sequentially or in parallel as shown in the embodiments or the drawings when the actual processing or the apparatus is performed.
Referring to fig. 7, fig. 7 is a flowchart illustrating a performance testing method of a transaction system according to an embodiment of the invention, wherein the performance testing method of the transaction system can be performed by the device 104 in fig. 1, and the testing system shown in fig. 4-6 is deployed on the device 104.
Step 701: determining a production response message pair of a transaction system in a first production transaction scene in a production environment; the production response message is composed of response messages sent by the transaction system for processing an online transaction request.
In the embodiment of the invention, the equipment can collect the message information in the log generated by the transaction of the first production transaction scene in the production environment, and analyze the message information according to the communication protocol to obtain a transaction data set; screening and desensitizing the transaction data set to obtain a candidate production transaction data set, and carrying out message pairing on the data in the candidate production transaction data set to determine a production response message pair for responding to an online transaction request. The foregoing process may be executed by the device based on the collection rule, the parsing rule, the desensitizing rule, the screening rule and the tandem rule configured by the management platform module in fig. 4-6, which are not described herein.
Step 702: and determining a target test data generation template from the candidate generation template set based on the response code and the time delay information in the production response message pair, and generating corresponding test service data in a first transaction scene in a test environment based on the target test data generation template.
In the embodiment of the invention, when the transaction system operates, the equipment can pre-determine abnormal parameter information causing the transaction system to be abnormal, classify the abnormal parameters and determine abnormal scenes of each category; determining an abnormal data template set according to the abnormal scenes of each category and the corresponding abnormal parameters; determining normal parameter information of the transaction system, and determining a normal data template set based on the normal parameter information; and obtaining a candidate generation template set based on the abnormal data template set, the normal data template set and the test requirement information of the transaction system of the new version.
Optionally, the candidate set of generation templates includes a first generation template for indicating that the business data is in error, a second generation template for indicating that the partial transaction is delayed or timed out, a third generation template for partially accessing the object of the new version of the transaction system to be unresponsive, a fourth generation template for indicating that the partial transaction is failed, and a fifth generation template for indicating that the transaction is normal.
In the embodiment of the invention, the test service data under different abnormal scenes can be obtained by screening the generation templates in the candidate generation template set, so that the performance test under different scenes can be carried out on the transaction system, and the high availability of the transaction system and the effectiveness and timeliness of the emergency plan are verified.
Step 703: and replacing the service data carried in the online transaction request with the test service data to obtain a test request message pair.
In the embodiment of the invention, after obtaining the test service data, the device can replace the service data carried in an online transaction request by using the test service data to obtain the test request message pair.
The device can analyze and count the production response information to obtain a generation response pair, and then generate a test service parameter in a test environment according to a target test data generation template and import the test service parameter into a database or a memory; thus, a test parameter scene (such as business parameter error, amount overrun abnormal transaction scene and the like) similar to the production environment is constructed. Thus, the static data part of the real transaction scene reconstruction under the test environment is completed.
Step 704: and initiating a request to the new version transaction system based on the test request message, obtaining a test response message pair, comparing the production response message pair with the test response message pair, and obtaining a comparison result, wherein the comparison result is used for indicating the performance difference of the new version transaction system and the transaction system on-line transaction request processing.
In the embodiment of the invention, the device can add a transaction tag to each request message of the test request message pair to obtain the test request message pair containing the transaction tag; the transaction tag is used to locate messages involved in an online transaction request. And initiating a request to a new version transaction system based on a test request message containing a transaction tag, obtaining all response messages which are positioned and fed back by the new version transaction system based on the transaction tag, and taking all response messages as test response message pairs.
Optionally, considering that when the message is collected in the production environment, for example, the message is played back completely according to the time sequence, the generated Transaction Per Second (TPS) is equivalent to the actual TPS in the actual transaction scenario. However, the TPS required for performance testing of the test environment is typically several or tens of times the peak of the production TPS. Therefore, when the "boosting technology" is collected to adjust the test response message pair in the embodiment of the invention, specifically, the "boosting technology" can be understood as adding a mode of flexibly simulating various performance test scenes by using delay information and abnormal parameter information.
Specifically, after the device obtains the test request message pair including the transaction tag, the device may further set a sending time of the message according to the service element for the service data of the test request message pair including the transaction tag to obtain a new test request message pair, and initiate a request to the new version transaction system based on the new test request message to obtain a test response message pair.
For example, referring to fig. 8, fig. 8 is a schematic diagram illustrating a parameter for adjusting performance test according to an embodiment of the invention. In fig. 8, the device may adjust the concurrency of the transaction initiator to adjust parameters of performance tests on the new version of the transaction system (i.e., the test system in fig. 8), and the device may also adjust the response delay and flow rate of the transaction server to adjust parameters of performance tests on the new version of the transaction system. Of course, other manners are possible, and the embodiments of the present invention are not limited thereto.
Therefore, in the embodiment of the invention, the concurrency of the initiation of the transaction party request can be adjusted, so that different loads are simulated, performance test is performed on a new version transaction system, and adjustment under various response scenes is realized.
In the embodiment of the invention, the device can also determine whether the comparison result meets the performance qualification condition, wherein the performance qualification condition is used for indicating that the information change in the response of the new version transaction system to the online transaction request is in a preset range; and outputting performance qualification prompt information after determining that the comparison result meets the performance qualification condition.
In the embodiment of the invention, the equipment provided with the test system can synchronize desensitized transaction data to a test environment, after the new version of the transaction system finishes the upgrade of a new software version, the adaptively modified message, namely the test request message, is played back in the new version of the transaction system, the test response message pair of the new version of the transaction system under the production transaction scene is captured, and finally the test response message pair is compared with the production response message pair under the production environment to determine the difference point in the test response message pair, thereby evaluating the influence of the new software version. In addition, the performance of the new version transaction system under the high concurrency scene can be simulated, the more comprehensive performance test of the new version transaction system is completed, and the performance test effect is improved.
In order to more clearly describe the performance test method for the transaction system provided by the embodiment of the invention, a specific example is described below.
Referring to fig. 9, fig. 9 is a schematic diagram illustrating a transaction system message interaction in a testing environment according to an embodiment of the present invention. The tested system is a new version transaction system, and a transaction initiator and two transaction service parties interact with the new version transaction system.
It is assumed that the aforementioned transaction system includes six messages, i.e., request a, response a, request B, response B, request C, and response C, in the production environment, in an online transaction with a transaction initiator and two transaction servers. And the test request message pairs determined in the test environment are request a ', request B' and request C ', after the transaction system pair of the new version is processed, the test response pairs including response a', response B 'and response C' can be obtained.
Referring to fig. 10, in the embodiment of the present invention, a chain data structure is used to store a message in a production response message pair obtained from a production environment. An online transaction request corresponds to a transaction data chain that includes a plurality of production transactions. Wherein, a request message and a corresponding response message form a production transaction. For example, the request message a, the response message a, the transaction tag and the response message in fig. 10 are information contained in a production transaction. That is, each production transaction includes a transaction tag, a request message, a response message, and time delay response information, and the time delay response information in each production transaction affects the initiation time of the request message in the next production transaction. The delay response information may be understood as the foregoing delay information.
Further, test service data generated by the template is generated based on the response message pair and the target test data, and a test request message pair is generated based on the test service data. In this way, the test request message pair includes a transaction tag to facilitate the positioning of the test system from among the plurality of messages to the test request message for processing.
With continued reference to fig. 10, the test system obtains a transaction data chain in the test environment based on the following 6 processes.
Process 1: and the test system generates a message sequence and a transaction initiation concurrency process according to the configured concurrency and the time delay configuration, and initiates playback of the request A' to the transaction system of the new version.
Process 2: the new version transaction system initiates a request message B' to the delivery service side 1 (i.e. the test system) according to the transaction type, the transaction flow and the service parameter configuration.
Process 3: the transaction service side 1 (test system) searches and determines the response message B ' which is subjected to environment adaptation according to the request message B ', and sends the response message B ' to the transaction system of the new version. The sending response message B' needs to perform time control operation according to the time delay information in the chain data structure, so that scenes such as delayed response, overtime response and the like of the production environment are accurately simulated.
Process 4: the new version transaction system initiates a request message C' to the delivery server 2 (i.e. the test system) according to the transaction type, the transaction flow and the service parameter configuration.
Process 5: the transaction service side 2 (i.e. the test system) searches and determines the response message C ' which is subjected to environment adaptation according to the request message C ', and sends the response message C ' to the transaction system of the new version. The sending response message C' needs to perform time control operation according to the time delay information in the chain data structure, so that scenes such as delayed response, overtime response and the like of the production environment are accurately simulated.
Process 6: the new version transaction system returns the response message A' to the transaction requester (i.e. the test system) to form the whole transaction flow. In this way, the test system can obtain a chain of transaction data under a test environment.
In an embodiment of the invention, the test system supplements the received request B ', request C ', response a ', and delay information (the time difference between the transmission of request a ' to response a ' acceptance) to the transaction data chain of the test environment. Then, the differences of the request B, the request C and the response A' in the transaction data chain of the production environment and the transaction data chain of the test environment are compared to determine the test result.
In the embodiment of the present invention, considering that under the actual high concurrency test scenario, the transaction initiator process will continuously send the request messages A1', A2', … …, an ', and the transaction server 1 process will receive the request messages B1', B2', … …, bm' successively, so that a unique element is required to determine and send the corresponding association messages. Alternatively, when an identified business element or serial number id is present in the request message, the identification may be directly used as a transaction tag.
Alternatively, when the identified service element or serial number id does not exist in the request message, as shown in fig. 11, the devices may perform message concatenation through a label technology. Specifically, the device can identify the message domain transmitted in the new version transaction system by analyzing the production message, take the message domain as the tag domain, and implant the message in the test request message pair into the transaction tag. The message fields are, for example, the message fields in the request a ' and the request B ' and the request C ' in fig. 11, which have the same content and do not affect the operation of the transaction system of the new version, and the transaction tag is, for example, a serial number of the order of triggering the transaction.
Thus, the transaction server 1 process can find the response message B 'of the "chained data structure" according to the tag in the request message B'. Similarly, this method can be applied to the processing of the request message C 'and the response message C'.
In the embodiment of the invention, the chain type data structure with transaction labels is used, the operation of loading the messages into the shared memory can be performed in parallel in the playback comparison process, and if the request response messages with the transaction request party, the transaction service party 1 and the transaction service party 2 are treated as independent sets, all the messages need to be loaded into the shared memory at the beginning, and when the playback message quantity is huge, the memory resource is greatly consumed. The chain data structure ensures that the relevant messages of the transaction are loaded when the request message is loaded into the memory. Therefore, transaction playback can be smoothly performed without loading all messages into the memory at one time. And in the message comparison link, the chain data structure can realize the integral comparison of a plurality of message pairs related to one transaction, and compared with the comparison of a plurality of independent messages, the operation efficiency can be obviously improved. In this way, the inventory functionality for a new version of the transaction system may be improved.
Referring to fig. 12, fig. 12 is a schematic diagram illustrating a performance testing method of a transaction system according to another embodiment of the invention. The method may be performed by the device 104 of fig. 1 described above.
Step 1201: parameters of acquisition messages, message processing, message transmission, message playback and message comparison are configured.
In the embodiment of the present invention, step 1201 may refer to the foregoing description of the configuration of each parameter by the management platform module in fig. 5, which is not repeated herein.
Step 1202: data of the production environment are collected, and a transaction data chain of the production environment is formed through analysis, screening, desensitization, pairing and serial connection.
In the embodiment of the present invention, step 1202 may be jointly performed by the foregoing message collecting module, the message parsing module, the message processing module and the pairing tandem module in fig. 5, and the specific execution process is referred to the foregoing description and is not repeated here.
Step 1203: and playing back the transaction data chain of the production environment to the test environment to obtain a production response message pair.
In the embodiment of the present invention, step 1203 may be performed by the cross-domain transmission module in fig. 5, and the specific execution process refers to the foregoing description and is not repeated here.
Step 1204: and carrying out adaptive transformation on the production response message pair based on the candidate generation template set and the service parameters configured in the test environment to obtain test service data.
In the embodiment of the present invention, step 1204 may be performed by the message adaptation module in fig. 5, and the specific execution process is referred to in the foregoing description, which is not repeated here.
Step 1205: and playing back data based on a pre-configured strategy and test service data to obtain a transaction data chain of the test environment, and comparing the transaction data chain of the production environment with the transaction data chain of the test environment to obtain a comparison result.
In the embodiment of the present invention, step 1205 may be executed by the foregoing playback comparison module in fig. 5, specifically, the process of obtaining the test response message pair based on the request initiated by the transaction system of the new version of the test request message pair may be understood as a playback process, and the process of comparing the production response message pair with the test response message pair to obtain the comparison result may be understood as a comparison process. That is, the step 1205 can be understood as the foregoing execution of the step 704 in fig. 7, which is not repeated herein.
Step 1206: and automatically summarizing the comparison result, carrying out analysis statistics to obtain an analysis statistics result, and displaying the analysis statistics result.
In an embodiment of the present invention, step 1206 may be performed by the result statistics module of fig. 5 described above. Optionally, the device may also perform a visualization process on the analysis statistics to prompt the developer or tester to have a more visual understanding of the new version of the performance test results.
Based on the same inventive concept, the embodiment of the invention also provides a performance testing device of the transaction system. As shown in fig. 13, which is a schematic structural diagram of a performance testing apparatus 1300 of a transaction system, may include:
a determining unit 1301, configured to determine a production response message pair of the transaction system in a first production transaction scenario in a production environment; the production response message is composed of response messages sent by the transaction system for processing an online transaction request;
a generating unit 1302, configured to determine a target test data generating template from a candidate generating template set based on the response code and the delay information in the production response message pair, and generate corresponding test service data in the test environment under the first transaction scenario based on the target test data generating template;
an obtaining unit 1303, configured to replace service data carried in the online transaction request with the test service data, to obtain a test request packet pair;
and the processing unit 1304 is configured to initiate a request to the new version of the transaction system based on the test request packet, obtain a test response packet pair, and compare the production response packet pair with the test response packet pair to obtain a comparison result, where the comparison result is used to indicate a performance difference between processing of the new version of the transaction system and processing of the transaction system on-line transaction request.
In a possible implementation manner, the determining unit 1301 is specifically configured to:
collecting message information in a log generated by trading of the first production trading scene in a production environment, and analyzing the message information according to a communication protocol to obtain a trading data set;
screening and desensitizing the transaction data set to obtain a candidate production transaction data set, carrying out message pairing on data in the candidate production transaction data set, and determining a production response message pair for responding to the online transaction request.
In a possible implementation manner, the obtaining unit 1303 is specifically configured to:
adding a transaction tag to each request message of the test request message pair to obtain a test request message pair containing the transaction tag; the transaction tag is used for locating a message involved in the online transaction request;
and initiating a request to a new version of the transaction system based on the test request message containing the transaction tag, obtaining all response messages which are positioned and fed back by the new version of the transaction system based on the transaction tag, and taking all response messages as test response message pairs.
In a possible embodiment, the apparatus further comprises a configuration unit for:
determining abnormal parameter information causing the abnormality of the transaction system, classifying the abnormal parameters, and determining abnormal scenes of each category;
determining an abnormal data template set according to the abnormal scenes of each category and the corresponding abnormal parameters; the method comprises the steps of,
determining normal parameter information of the transaction system, and determining a normal data template set based on the normal parameter information;
and obtaining a candidate generation template set based on the abnormal data template set, the normal data template set and the test requirement information of the transaction system of the new version.
In one possible implementation, the candidate set of generation templates includes a first generation template for indicating that the business data is erroneous, a second generation template for indicating that a partial transaction is delayed or timed out, a third generation template for partially accessing an object of the new version of the transaction system that is unresponsive, a fourth generation template for indicating that a partial transaction is failed, and a fifth generation template for indicating that the transaction is normal.
In a possible implementation manner, the device further comprises a prompting unit, configured to:
Determining whether the comparison result meets a performance qualification condition, wherein the performance qualification condition is used for indicating that information change in response of the transaction system of the new version to the online transaction request is in a preset range;
and outputting performance qualification prompt information after determining that the comparison result meets the performance qualification condition.
For convenience of description, the above parts are described as being functionally divided into modules (or units) respectively. Of course, the functions of each module (or unit) may be implemented in the same piece or pieces of software or hardware when implementing the present invention.
It should be noted that, the determining unit 1301 may be understood as the message collecting module, the message parsing module, the message processing module, and the pairing-serial module in fig. 5, the generating unit 1302 may be understood as the message adapting module in fig. 5, the obtaining unit 1303 may be understood as the message playback process performed in the playback comparing module in fig. 5, the processing unit 1304 may be understood as the comparing process and the result statistics module performed in the playback comparing module in fig. 5, and the configuring unit may be understood as the management console module in fig. 5.
Having described the performance testing method and apparatus of the transaction system according to an exemplary embodiment of the present invention, next, an electronic device according to another exemplary embodiment of the present invention is described.
Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
The specific implementation manner of each module in the apparatus in the above embodiment has been described in detail in the embodiment related to the method, and will not be described in detail herein.
The principle of solving the problem of the electronic device is similar to that of the method of the above embodiment, so that the implementation of the electronic device can be referred to the implementation of the method, and the repetition is omitted.
Referring to fig. 14, fig. 14 is a block diagram of an electronic device 1400 according to an exemplary embodiment of the present invention, where the electronic device includes at least one processor 1401 and a memory 1402 connected to the at least one processor 1401, in the embodiment of the present invention, a specific connection medium between the processor 1401 and the memory 1402 is not limited to the embodiment of the present invention, and in fig. 14, the connection between the processor 1401 and the memory 1402 is exemplified by a bus 1400, and in fig. 14, the bus 1400 is indicated by a bold line, and a connection manner between other components is merely illustrative and not limited to the embodiment. The bus 1400 may be divided into an address bus, a data bus, a control bus, etc., and is shown with only one thick line in fig. 14 for ease of illustration, but does not represent only one bus or one type of bus.
In an embodiment of the present invention, the memory 1402 stores instructions executable by the at least one processor 1401, and the at least one processor 1401 can perform the steps included in the performance testing method of the transaction system described above by executing the instructions stored in the memory 1402.
The processor 1401 is a control center of the electronic device, and may use various interfaces and lines to connect various parts of the entire fault detection device, and by executing or executing instructions stored in the memory 1402 and invoking data stored in the memory 1402, various functions of the electronic device and processing data, thereby performing overall monitoring of the electronic device. Alternatively, the processor 1401 may include one or more processing units, and the processor 1401 may integrate an application processor and a modem processor, wherein the processor 1401 primarily processes an operating system, a user interface, an application program, and the like, and the modem processor primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 1401. In some embodiments, processor 1401 and memory 1402 may be implemented on the same chip, and in some embodiments they may be implemented separately on separate chips.
The processor 1401 may be a general purpose processor such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, and may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the invention. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in the processor for execution.
Memory 1402 acts as a non-volatile computer readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs, and modules. Memory 1402 may include at least one type of storage medium, which may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic Memory, magnetic disk, optical disk, and the like. Memory 1402 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. Memory 1402 in embodiments of the present invention may also be circuitry or any other device capable of performing memory functions for storing program instructions and/or data.
Based on the same inventive concept, an embodiment of the present invention further provides a further schematic diagram of an electronic device, referring to fig. 15, where the electronic device 104 includes a display unit 1540, a processor 1580, and a memory 1520, where the display unit 1540 includes a display panel 1541 for displaying information input by a user or information provided to the user, and various object selection interfaces of the electronic device 104, and in the embodiment of the present invention, the display unit is mainly used for displaying related operation interfaces, shortcut windows, and the like of social software installed in the electronic device 104. Alternatively, the display panel 1541 may be configured in the form of an LCD (Liquid Crystal Display) or an OLED (Organic Light-Emitting Diode) or the like.
The processor 1580 is configured to read a computer program and then execute a method defined by the computer program, for example, the processor 1580 reads an application program of social software, so as to run the social software on the electronic device 104, and display a relevant operation interface of the social software on the display unit 1540. The processor 1580 may include one or more general-purpose processors and may further include one or more DSPs (Digital Signal Processor, digital signal processors) for performing related operations to implement the technical solutions provided by the embodiments of the present invention.
Memory 1520 typically includes memory and external memory, which may be Random Access Memory (RAM), read Only Memory (ROM), and CACHE memory (CACHE), among others. The external memory can be a hard disk, an optical disk, a USB disk, a floppy disk, a tape drive, etc. The memory 1520 is used to store computer programs including application programs corresponding to respective software and the like, and other data, which may include data generated after the operating system or the application programs are executed, including system data (e.g., configuration parameters of the operating system) and user data. In the embodiment of the present invention, the program instructions are stored in the memory 1520, and the processor 1580 executes the program instructions stored therein to implement the functions of the performance test method of the transaction system as described above.
Further, the electronic device 104 may further include a display unit 1540 for receiving input digital information, character information, or touch operation/noncontact gestures, and generating signal inputs related to user settings and function controls of the electronic device 104, and the like. Specifically, in an embodiment of the present invention, the display unit 1540 may include a display panel 1541. The display panel 1541, for example, a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of a target object on the display panel 1541 or on the display panel 1541 using any suitable object or accessory such as a finger, a stylus, etc.), and drive the corresponding connection means according to a predetermined program. Alternatively, the display panel 1541 may include two parts, a touch detection device and a touch controller. The touch detection device comprises a touch controller, a touch detection device and a touch control device, wherein the touch detection device is used for detecting a touch direction of a user, detecting a signal brought by touch operation and transmitting the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 1580, and can receive and execute commands sent from the processor 1580. In the embodiment of the present invention, if a user performs a selection operation on an associated subroutine, the touch detection device in the display panel 1541 detects the touch operation, and then the touch controller sends a signal corresponding to the detected touch operation, the touch controller converts the signal into contact coordinates and sends the contact coordinates to the processor 1580, and the processor 1580 determines the associated subroutine selected by the user according to the received contact coordinates, and controls the display panel 1541 to display an interface for inputting a login account number and a login password, or controls the display panel 1541 to display an interface for successfully logging in the associated subroutine.
The display panel 1541 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the display unit 1540, the electronic device 104 may include an input unit 1530, and the input unit 1530 may include, but is not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc. In fig. 15, the input unit 1530 includes an image input device 1531 and other input devices 1532 as an example.
In addition to the above, the electronic device 104 may also include a power supply 1590 for powering other modules, audio circuitry 1560, near field communication module 1570, and RF circuitry 1510. The electronic device 104 may also include one or more sensors 1550, such as acceleration sensors, light sensors, pressure sensors, and the like. The audio circuit 1560 specifically includes a speaker 1561, a microphone 1562, and the like, so that, for example, a user can use voice control, the electronic device 104 can collect the voice of the user through the microphone 1562, can control the voice of the user, and can play corresponding alert sounds through the speaker 1561 when the user needs to be prompted.
In an exemplary embodiment, a storage medium is also provided that includes operations, such as memory 1402 including operations, that are executable by processor 1401 of electronic device 1400 to perform the methods described above. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
Based on the same inventive concept as the above-described method embodiments, aspects of the performance testing method of a transaction system provided by the present invention may also be implemented in the form of a program product comprising program code for causing an electronic device to perform the steps of the performance testing method of a transaction system according to various exemplary embodiments of the present invention described in the present specification when the program product is run on the electronic device, e.g. the electronic device may perform the steps as shown in fig. 7.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product of embodiments of the present invention may employ a portable compact disc read only memory (CD-ROM) and include program code and may run on a server. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with a command execution system, apparatus, or device.
The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with a command execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
Claims (10)
1. A method of testing performance of a transaction system, the method comprising:
determining a production response message pair of the transaction system in a first production transaction scene in a production environment; the production response message is composed of response messages sent by the transaction system for processing an online transaction request;
determining a target test data generation template from a candidate generation template set based on the response code and the time delay information in the production response message pair, and generating corresponding test service data in the first transaction scene in a test environment based on the target test data generation template;
Replacing service data carried in the online transaction request with the test service data to obtain a test request message pair;
and initiating a request to the new version of the transaction system based on the test request message, obtaining a test response message pair, and comparing the production response message pair with the test response message pair to obtain a comparison result, wherein the comparison result is used for indicating the performance difference of the transaction system of the new version and the transaction system on-line transaction request processing.
2. The method of claim 1, wherein determining a production reply message pair for the transaction system in a first production transaction scenario in a production environment comprises:
collecting message information in a log generated by trading of the first production trading scene in a production environment, and analyzing the message information according to a communication protocol to obtain a trading data set;
screening and desensitizing the transaction data set to obtain a candidate production transaction data set, carrying out message pairing on data in the candidate production transaction data set, and determining a production response message pair for responding to the online transaction request.
3. The method of claim 2, wherein initiating a request to a new version of the transaction system based on the test request message, obtaining a test response message pair, comprises:
adding a transaction tag to each request message of the test request message pair to obtain a test request message pair containing the transaction tag; the transaction tag is used for locating a message involved in the online transaction request;
and initiating a request to a new version of the transaction system based on the test request message containing the transaction tag, obtaining all response messages which are positioned and fed back by the new version of the transaction system based on the transaction tag, and taking all response messages as test response message pairs.
4. The method of claim 3, wherein after obtaining the test request message pair containing the transaction tag, the method further comprises:
and setting the sending time of the message for the service data of the test request message pair containing the transaction tag according to the service element, and obtaining a new test request message pair.
5. The method of any of claims 1-4, wherein prior to determining a production reply message pair for the transaction system in a first production transaction scenario in a production environment, the method further comprises:
Determining abnormal parameter information causing the abnormality of the transaction system, classifying the abnormal parameters, and determining abnormal scenes of each category;
determining an abnormal data template set according to the abnormal scenes of each category and the corresponding abnormal parameters; the method comprises the steps of,
determining normal parameter information of the transaction system, and determining a normal data template set based on the normal parameter information;
and obtaining a candidate generation template set based on the abnormal data template set, the normal data template set and the test requirement information of the transaction system of the new version.
6. The method of claim 5, wherein the set of candidate generation templates includes a first generation template for indicating traffic data errors, a second generation template for indicating partial transaction delays or timeouts, a third generation template for partial access to objects of the new version of the transaction system that are unresponsive, a fourth generation template for indicating partial transaction failures, and a fifth generation template for indicating normal transactions.
7. The method of claim 6, wherein after obtaining the alignment result, the method further comprises:
Determining whether the comparison result meets a performance qualification condition, wherein the performance qualification condition is used for indicating that information change in response of the transaction system of the new version to the online transaction request is in a preset range;
and outputting performance qualification prompt information after determining that the comparison result meets the performance qualification condition.
8. A performance testing apparatus for a transaction system, the apparatus comprising:
the determining unit is used for determining a production response message pair of the transaction system in a first production transaction scene in a production environment; the production response message is composed of response messages sent by the transaction system for processing an online transaction request;
the generating unit is used for determining a target test data generating template from the candidate generating template set based on the response code and the time delay information in the production response message pair, generating a corresponding test service data in the first transaction scene in the test environment based on the target test data generating template;
the obtaining unit is used for replacing the service data carried in the online transaction request by the test service data to obtain a test request message pair;
And the processing unit is used for initiating a request to the new version of the transaction system based on the test request message, obtaining a test response message pair, comparing the production response message pair with the test response message pair, and obtaining a comparison result, wherein the comparison result is used for indicating the performance difference of the transaction system of the new version and the transaction system for processing the on-line transaction request.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any of claims 1-7 when the computer program is executed.
10. A computer readable storage medium, characterized in that it comprises a program code for causing an electronic device to perform the steps of the method of any of claims 1-7, when the program product is run on the electronic device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311684860.7A CN117785630A (en) | 2023-12-08 | 2023-12-08 | Performance test method and device for transaction system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311684860.7A CN117785630A (en) | 2023-12-08 | 2023-12-08 | Performance test method and device for transaction system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117785630A true CN117785630A (en) | 2024-03-29 |
Family
ID=90397061
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311684860.7A Pending CN117785630A (en) | 2023-12-08 | 2023-12-08 | Performance test method and device for transaction system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117785630A (en) |
-
2023
- 2023-12-08 CN CN202311684860.7A patent/CN117785630A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3563243B1 (en) | Determining application test results using screenshot metadata | |
US10997063B1 (en) | System testing from production transactions | |
US9672137B1 (en) | Shadow test replay service | |
US20190114364A1 (en) | Systems and methods for web analytics testing and web development | |
CN108763076A (en) | A kind of Software Automatic Testing Method, device, equipment and medium | |
US20150347923A1 (en) | Error classification in a computing system | |
US11403208B2 (en) | Generating a virtualized stub service using deep learning for testing a software module | |
CN109815119B (en) | APP link channel testing method and device | |
CN110059011A (en) | Interface test method, device, medium and electronic equipment | |
CN111309343A (en) | Development deployment method and device | |
CN110851471A (en) | Distributed log data processing method, device and system | |
CN114328132A (en) | Method, device, equipment and medium for monitoring state of external data source | |
CN112363938A (en) | Data processing method and device, electronic equipment and storage medium | |
CN113656307A (en) | System capacity evaluation method, device, equipment and medium | |
CN110866031B (en) | Database access path optimization method and device, computing equipment and medium | |
CN114385722A (en) | Interface attribute consistency checking method and device, electronic equipment and storage medium | |
CN117632710A (en) | Method, device, equipment and storage medium for generating test code | |
CN112084114B (en) | Method and apparatus for testing interfaces | |
CN111352832B (en) | Method and device for automatically testing page | |
CN110362294A (en) | Development task executes method, apparatus, electronic equipment and storage medium | |
CN117785630A (en) | Performance test method and device for transaction system | |
CN113238940B (en) | Interface test result comparison method, device, equipment and storage medium | |
US20230409468A1 (en) | Providing application error data for use by third-party library development systems | |
CN109766228A (en) | Verification method and device on a kind of line based on interface | |
CN112506800A (en) | Method, apparatus, device, medium and program product for testing code |
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 |