CN112506771A - Message comparison method and device - Google Patents

Message comparison method and device Download PDF

Info

Publication number
CN112506771A
CN112506771A CN202011407036.3A CN202011407036A CN112506771A CN 112506771 A CN112506771 A CN 112506771A CN 202011407036 A CN202011407036 A CN 202011407036A CN 112506771 A CN112506771 A CN 112506771A
Authority
CN
China
Prior art keywords
message
application
production environment
tested
response message
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
CN202011407036.3A
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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202011407036.3A priority Critical patent/CN112506771A/en
Publication of CN112506771A publication Critical patent/CN112506771A/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/3692Test management for test results analysis

Landscapes

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

Abstract

The invention discloses a message comparison method and device, and relates to the technical field of computers. One embodiment of the method comprises: backing up a database and a log of a production environment, sending data in the database to a tested application of a production environment, and analyzing the log to generate a request message and a response message; configuring a log conversion message rule; converting the request message into a request message of the application to be tested in the quasi-production environment and converting the response message into a response message with a format consistent with that of the response message of the application to be tested in the quasi-production environment through a BTS engine based on a log conversion message rule; sending a request message of the application to be tested in the quasi-production environment to the application to be tested in the quasi-production environment, and receiving a response message from the application to be tested in the quasi-production environment; and comparing the response message from the application to be tested in the production environment with the response message based on the log conversion, and outputting a comparison result.

Description

Message comparison method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for comparing messages.
Background
From the large environment of the modern financial technology field, the pure technical transformation from a single system type to component integration type is an important opportunity and challenge in the current financial technology field. The technical transformation is characterized in that the service logic is not changed, and only the interaction of internal components and the change of interfaces are carried out. Aiming at the pure technical improvement, how to replace the most comprehensive and accurate test coverage with the minimum cost is an important problem to be solved by the test.
In the test implementation process, a large amount of early-stage data preparation and case preparation are required for manual testing. In the preparation process, due to the loose coupling requirement of a system architecture, multiple applications and multiple databases are required to be matched in the data preparation process, the time and labor are consumed for obtaining data, and the data preparation quality is difficult to guarantee.
The test method adopted at present is mainly a manual test mode, and aiming at a system after technical transformation, firstly, system transformation points are evaluated, documents are designed according to transformation requirements to carry out actual scene design, and meanwhile, test case design is carried out aiming at each scene. And after the design is finished, the test case is evaluated, and after the technical transformation of the system is finished, the test is carried out.
The following technical problems exist in the testing mode:
the test case is difficult to design and high in cost: in the testing process, requirements and design documents are incomplete and inaccurate, updating is not timely, all actual scenes cannot be constructed completely, the capabilities of testers are uneven, the testing scenes and cases are incompletely compiled, and testing missing is formed.
The test data is time-consuming and labor-consuming: the cross-system data preparation is difficult, multiple systems are required to cooperate simultaneously to complete data construction, meanwhile, the data preparation quality is low, and the consumable data cannot be reused after being used up.
The test execution efficiency is low: the manual test execution test cases are about 30-50 per person per day, the efficiency is very low, and the statistical dimension of the test result is single.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for comparing messages in the field of financial technology. Acquiring a real transaction message or a real assembly line from a production environment, automatically playing back the message in a production-ready environment, simulating a production business scene, and verifying the correctness of the function of the new application and the correctness of the financial accounting by comparing a new transaction result with an old transaction result with a financial accounting result; and the non-functional characteristics of the system are verified through monitoring and analyzing the response time, the system resources and the like.
To achieve the above object, according to an aspect of the embodiments of the present invention, a method for comparing messages is provided.
The message comparison method of the embodiment of the invention comprises the following steps:
backing up a database and a log of a production environment, sending data in the database to a tested application of a production environment, and analyzing the log to generate a request message and a response message;
configuring a log conversion message rule;
converting the request message into a request message of the application to be tested in the quasi-production environment and converting the response message into a response message with a format consistent with that of the response message of the application to be tested in the quasi-production environment through a BTS engine based on a log conversion message rule;
sending a request message of the application to be tested in the quasi-production environment to the application to be tested in the quasi-production environment, and receiving a response message from the application to be tested in the quasi-production environment; and
and comparing the response message from the application to be tested in the production environment with the response message based on the log conversion, and outputting a comparison result.
Optionally, the data in the database comprises initial state data and final state data of the transaction.
Optionally, the method further comprises: and converting the logs in different formats to form a unified log format. The conversion comprises the following steps: forming a key, namely a value key-value pair; and (4) independently extracting the time, serial number, account number and response code in the message for grouping and constructing a scene test set.
Optionally, the configuring the log conversion message rule includes: and adding a mapping content column behind each message field of the document of each request message to identify whether the input of the message field in the tested application is changed.
Optionally, the varying comprises: direct conversion, conversion to fixed value, single-field mapping, multi-field mapping, and interception.
Optionally, the method further comprises: and converting the request message of the application to be tested into an XML format message through a BTS engine.
Optionally, the method further comprises: and converting the XML format message into a message which can be identified by the transaction of the application system under test in the production environment through an LTR tool.
Optionally, the method further comprises: grouping the messages according to the time sequence of the messages on production, and simulating the occurrence sequence of the messages on production to send the messages.
To achieve the above object, according to another aspect of the embodiments of the present invention, a message comparison apparatus is provided.
The message comparison device of the embodiment of the invention is characterized by comprising the following components:
the backup unit is used for backing up a database and a log of a production environment, sending data in the database to a tested application of a production environment, and analyzing the log to generate a request message and a response message;
the configuration unit is used for configuring a log conversion message rule;
the conversion unit converts the request message into a request message of the application to be tested in the quasi-production environment and converts the response message into a response message with a format consistent with that of the response message of the application to be tested in the quasi-production environment through a BTS engine based on a log conversion message rule;
a transceiver unit, which transmits the request message of the application under test in the quasi-production environment to the application under test in the quasi-production environment, receives the response message from the application under test in the quasi-production environment, and
and the comparison unit compares the response message from the application to be tested in the production environment with the response message based on the log conversion and outputs a comparison result.
In order to achieve the above object, according to another aspect of the embodiments of the present invention, an electronic device for comparing messages is provided.
The electronic equipment for updating the test case of the embodiment of the invention comprises: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the message comparison method according to the embodiment of the invention.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer-readable storage medium.
A computer-readable storage medium of an embodiment of the present invention stores thereon a computer program, and when the computer program is executed by a processor, the computer program implements a method for comparing messages of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: a complete production service scene, millions of cases. The message comparison device implements the environment using complete production data, and keeps data consistency across the system. Various data are prepared in the flow message and can be directly used, so that the data preparation is omitted. Millions of cases per round; execution efficiency of 200 pens + per second; objective test results.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram illustrating main steps of a message comparison method according to an embodiment of the present invention;
fig. 2 is a system diagram of a message comparison method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a technical framework of a message comparison apparatus according to an embodiment of the present invention;
fig. 4A-F are schematic diagrams illustrating a specific process of a message comparison method according to an embodiment of the present invention;
fig. 5 is a schematic diagram of main modules of a message comparison apparatus according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 7 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments of the present invention and the technical features of the embodiments may be combined with each other without conflict.
Fig. 1 is a schematic diagram illustrating major steps of a message comparison method according to an embodiment of the present invention.
As shown in fig. 1, a method for comparing messages according to an embodiment of the present invention mainly includes the following steps:
step S101: the method comprises the steps of backing up a database and a log of a production environment, sending data in the database to a tested application of a production environment, and analyzing the log to generate a request message and a response message.
Step S102: and configuring a log conversion message rule.
Step S103: and converting the request message into a request message of the application to be tested in the quasi-production environment and converting the response message into a response message with a format consistent with that of the response message of the application to be tested in the quasi-production environment by a BTS (Business Transfer system) engine based on the log conversion message rule.
Step S104: and sending the request message of the application to be tested in the quasi-production environment to the application to be tested in the quasi-production environment, and receiving a response message from the application to be tested in the quasi-production environment.
Step S105: and comparing the response message from the application to be tested in the production environment with the response message based on the log conversion, and outputting a comparison result.
The working principle of the message comparison device is described in detail below with reference to fig. 2.
And (3) simulating the full-volume influence accounting and account state transaction in the last day or multiple days of production by taking the contract account in the current production as a reference, and verifying the transaction result of the new system, the correctness of the customer contract account and the non-functional characteristics.
Referring first to fig. 2, the principle of message alignment in a credit card production environment is described.
Referring to fig. 2, it describes the relationship between the T-day online transaction, T-day batch processing, data after T-1 day change and data after T-day change, wherein there are three units of "transaction conversion", "transaction execution" and "accounting analysis" in the accounting environment, and the "transaction conversion" unit gives the principle of message comparison, i.e. first, transaction data is imported, log analysis is performed, service conversion is performed, grouping by account number and sorting by time, rule conversion, new and old core transaction interface mapping table and rule conversion library.
The message comparison of the invention mainly relates to the following steps:
a) planning a plan
And determining the system range, the transaction range and the test method implemented by the message comparison device through test analysis. And determining data and turn plans used by the message comparison device.
b) Environment, data, test design
And according to the scheme, setting up an environment for implementing the message comparison device, deploying application, backing up production data and carrying out data migration. New and old message mapping (mapping) analysis, conversion and testing.
c) Test execution
Grouping messages and testing strategies in multiple rounds. And (6) green light and debugging. The messages are sent in single stroke and batch. And (4) performing regression testing.
d) Analysis of results
And comparing the execution results by taking production as a reference. And analyzing the non-functional characteristics of the system. Found problematic and repaired.
The following describes the working process of the message comparison apparatus in detail with reference to fig. 3 and fig. 4A-F:
referring first to fig. 3, the main architecture of message alignment is described.
(1) Acquiring production flow/log;
(2) backing up a current production database and recovering in a message comparison device implementation environment;
(3) analyzing the production flow/log;
(4) manually configuring log conversion message rules (including requests and responses);
(5) the BTS engine converts the log into an XML format message according to the rule;
(6) packet and time sequence analysis;
(7) an LTR (Link test runner) tool performs protocol conversion and safety processing on the message, and sends the message;
(8) the LTR receives a response message;
(9) LTR batch compares expected and actual response messages;
(10) analyzing results, processing problems and repairing defects;
(11) and (5) next round of simulation verification.
Details of the above main architecture are described in detail below with reference to fig. 3 and 4A-F:
1) acquiring production runs/logs
And acquiring a data backup scheme according to the data backup plan and the transaction range of message comparison. There are two forms of backup schemes for production environment pipelining: databases and logs. The database records the current initial state of the system, and when a section of a certain time node of the database is obtained, the initial state before transaction occurs is obtained. The log records the action of the transaction process of the system, and the request message and the response message of the transaction message are recorded by using the log to complete the transaction. After a plurality of transactions are completed, the interface of the next time node of the database is obtained again, and the final state after the transactions occur is obtained. Fig. 3 (1) shows that the request message in the data of the transaction process is sent to the message comparison device as an input.
2) Backing up the current production database and recovering in the implementation environment of the message comparison device
Fig. 3 (2) shows that the database information of the initial state and the final state is sent to the production environment to be tested. And importing the data into a database of the application to be tested as an initial database section of the converted application.
3) Parsing production streams/logs
And analyzing and standardizing the log data in different formats. Since the way of logging each transaction on production is different, as shown in fig. 4A, we need to convert the log on production by using a unified tool, and need to first unify the log format, for example,
-forming a key value key-value pair;
and independently extracting time, serial number, account number, response code and the like in the message for grouping and constructing a scene test set.
4) Manual configuration log conversion message rule (including request and response)
Each transaction has its own description of the message content structure, shown in columns A-N in FIG. 4B. Adding a mapping content O-R column behind each message field (each row) of each excel document supporting a request message, identifying whether the input of the message field in the tested application is changed, wherein the current system only supports five changes: 1. direct conversion; 2. converting into a fixed value; 3. mapping single-word segments; 4. multi-field mapping; 5. and (6) intercepting.
The first three most commonly used can be seen in fig. 4C. Direct conversion is to convert to a fixed field for a new transaction; this is also the most commonly used one. Conversion to a fixed value, i.e. in a new transaction this field is defined directly as a fixed string or number. A single field mapping is that the field may be a sequence in a new transaction, with different options for each character.
After the Excel form is filled, the form is converted into an xml file shown in fig. 4D by using a small tool, and the file is an important bridge between messages of a production system and a test system. As shown in fig. 4D.
5) BTS engine converts log into XML format message according to rule
The input of BTS engine is the message of production system and the format rule of conversion rule xml, and the output is the message of new test system. After the step is completed, the log data taken from production is converted into a request message in the application to be tested in the production environment. Meanwhile, the response message of the production system can be converted into the response message with the format unified with the response message of the tested application in the quasi-production environment according to the rule according to the same method, so that the final comparison is convenient.
6) Packet and timing analysis
Grouping according to the time sequence of the production messages, and simulating the generation sequence of the production messages to transmit.
7) The LTR tool performs protocol conversion, safety processing and sending on the message
The LTR tool can convert the files in the xml format into messages which can be identified by the transaction of the application system under test in the production environment, and the messages are sent in the form of the messages.
8) LTR receives response message
And returning a response message to the LTR tool after the message sent to the quasi-production environment tested application system for transaction is transacted in the system.
9) LTR batch comparison expected and actual response message
The LTR tool can compare the returned response message with the response message in the production log directly converted by the BTS engine in 5) and then output an excel file. See the interface shown in fig. 4E.
10) Manual analysis processing perfection rule and tested system
When the response messages are inconsistent, referring to fig. 4F, there are two possibilities, one is that there are problems that we have not considered in the rule conversion process, and the other is an application defect of the system under test. In any case, inconsistency occurs, and it is sufficient to strictly complement the rule conversion rule or the recording application defect.
Fig. 5 is a schematic diagram of main modules of an updating apparatus for test cases according to an embodiment of the present invention.
As shown in fig. 5, an updating 500 of a test case according to an embodiment of the present invention includes: a backup unit 501, a configuration unit 502, a conversion unit 503, a transceiver unit 504 and a comparison unit 505; wherein the content of the first and second substances,
the backup unit 501 is configured to backup a database and a log of a production environment, send data in the database to a to-be-tested application of a production environment, and analyze the log to generate a request message and a response message;
the configuration unit 502 is configured to configure a log conversion message rule;
the conversion unit 503 converts the request message into a request message of the application to be tested in the quasi-production environment and converts the response message into a response message with a format consistent with that of the response message of the application to be tested in the quasi-production environment through the BTS engine based on the log conversion message rule;
the transceiver 504 sends the request message of the application under test in the quasi-production environment to the application under test in the quasi-production environment, receives the response message from the application under test in the quasi-production environment, and
the comparison unit 505 compares the response message from the application under test in the production environment with the response message based on the log conversion, and outputs a comparison result.
In one embodiment of the invention, the data in the database includes initial state data and final state data for the transaction.
In an embodiment of the present invention, the conversion unit 503 converts the logs with different formats to form a unified log format. The conversion comprises the following steps: forming a key, namely a value key-value pair; and (4) independently extracting the time, serial number, account number and response code in the message for grouping and constructing a scene test set.
In an embodiment of the present invention, the configuring unit 502 configures the log conversion message rule, including: and adding a mapping content column behind each message field of the document of each request message to identify whether the input of the message field in the tested application is changed.
In one embodiment of the invention, the varying comprises: direct conversion, conversion to fixed value, single-field mapping, multi-field mapping, and interception.
In an embodiment of the present invention, the converting unit 503 converts the request message of the application under test into an XML format message through a BTS engine.
In an embodiment of the present invention, the conversion unit 503 converts the XML format message into a message recognizable for the transaction of the application system under test in the production environment through the LTR tool; and grouping the messages according to the time sequence of the messages on production, and simulating the occurrence sequence of the messages on production to send the messages.
According to the message comparison device provided by the embodiment of the invention, the backup unit is used for backing up the database and the log of the production environment, sending the data in the database to the application to be tested of the production environment, and analyzing the log to generate the request message and the response message; the configuration unit is used for configuring the rule of the log conversion message; the conversion unit converts the request message into a request message of the application to be tested in the quasi-production environment and converts the response message into a response message with a format consistent with that of the response message of the application to be tested in the quasi-production environment through a BTS engine based on a log conversion message rule; the receiving and sending unit sends the request message of the application to be tested in the quasi-production environment to the application to be tested in the quasi-production environment, receives the response message from the application to be tested in the quasi-production environment, and the comparison unit compares the response message from the application to be tested in the quasi-production environment with the response message based on the log conversion and outputs a comparison result.
Fig. 6 shows an exemplary system architecture 600 to which a message comparison method or a message comparison apparatus according to an embodiment of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. Various communication client applications, such as an internet banking application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like, may be installed on the terminal devices 601, 602, and 603.
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 605 may be a server that provides various services, such as a background management server that supports a bank-like website browsed by a user using the terminal devices 601, 602, and 603. The background management server can analyze and process the received data such as the query requests of various cases and feed back the processing result to the terminal equipment.
It should be noted that the updating method for the test case provided by the embodiment of the present invention is generally executed by the server 605, and accordingly, the message comparing apparatus is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software or hardware.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: backing up a database and a log of a production environment, sending data in the database to a tested application of a production environment, and analyzing the log to generate a request message and a response message; configuring a log conversion message rule; converting the request message into a request message of the application to be tested in the quasi-production environment and converting the response message into a response message with a format consistent with that of the response message of the application to be tested in the quasi-production environment through a BTS engine based on a log conversion message rule; sending a request message of the application to be tested in the quasi-production environment to the application to be tested in the quasi-production environment, and receiving a response message from the application to be tested in the quasi-production environment; and comparing the response message from the application to be tested in the production environment with the response message based on the log conversion, and outputting a comparison result.
According to the technical scheme of the embodiment of the invention, the data in the database comprises initial state data and final state data of the transaction; and converting the logs in different formats to form a unified log format, wherein the converting comprises: forming a key, namely a value key-value pair; and (4) independently extracting the time, serial number, account number and response code in the message for grouping and constructing a scene test set. In addition, the configuration log conversion message rule includes: adding a mapping content column behind each message field of the document of each request message to identify whether the input of the message field in the tested application changes; the variation includes: direct conversion, conversion to fixed value, single-field mapping, multi-field mapping, and interception. In addition, the message comparison method converts the request message of the application to be tested into an XML format message through a BTS engine; and further converting the XML format message into a message which can be identified by the transaction of the application system under test in the production environment through an LTR tool.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. A method for comparing messages, comprising:
backing up a database and a log of a production environment, sending data in the database to a tested application of a production environment, and analyzing the log to generate a request message and a response message;
configuring a log conversion message rule;
converting the request message into a request message of the application to be tested in the quasi-production environment and converting the response message into a response message with a format consistent with that of the response message of the application to be tested in the quasi-production environment through a BTS engine based on a log conversion message rule;
sending a request message of the application to be tested in the quasi-production environment to the application to be tested in the quasi-production environment, and receiving a response message from the application to be tested in the quasi-production environment; and
and comparing the response message from the application to be tested in the production environment with the response message based on the log conversion, and outputting a comparison result.
2. The method of claim 1,
the data in the database includes initial state data and final state data for the transaction.
3. The method of claim 1, further comprising:
and converting the logs in different formats to form a unified log format.
4. The method of claim 3, wherein the converting comprises:
forming a key, namely a value key-value pair;
and (4) independently extracting the time, serial number, account number and response code in the message for grouping and constructing a scene test set.
5. The method of claim 1, wherein configuring the log conversion message rule comprises:
and adding a mapping content column behind each message field of the document of each request message to identify whether the input of the message field in the tested application is changed.
6. The method of claim 5, wherein the varying comprises: direct conversion, conversion to fixed value, single-field mapping, multi-field mapping, and interception.
7. The method of claim 4, further comprising:
and converting the request message of the application to be tested into an XML format message through a BTS engine.
8. The method of claim 7, further comprising:
and converting the XML format message into a message which can be identified by the transaction of the application system under test in the production environment through an LTR tool.
9. The method of claim 8, further comprising:
grouping the messages according to the time sequence of the messages on production, and simulating the occurrence sequence of the messages on production to send the messages.
10. A message comparison device, comprising:
the backup unit is used for backing up a database and a log of a production environment, sending data in the database to a tested application of a production environment, and analyzing the log to generate a request message and a response message;
the configuration unit is used for configuring a log conversion message rule;
the conversion unit converts the request message into a request message of the application to be tested in the quasi-production environment and converts the response message into a response message with a format consistent with that of the response message of the application to be tested in the quasi-production environment through a BTS engine based on a log conversion message rule;
a transceiver unit, which transmits the request message of the application under test in the quasi-production environment to the application under test in the quasi-production environment, receives the response message from the application under test in the quasi-production environment, and
and the comparison unit compares the response message from the application to be tested in the production environment with the response message based on the log conversion and outputs a comparison result.
11. An electronic device for comparing messages, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the message comparison method of any of claims 1-9.
12. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out a method for message comparison according to any one of claims 1 to 9.
CN202011407036.3A 2020-12-03 2020-12-03 Message comparison method and device Pending CN112506771A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011407036.3A CN112506771A (en) 2020-12-03 2020-12-03 Message comparison method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011407036.3A CN112506771A (en) 2020-12-03 2020-12-03 Message comparison method and device

Publications (1)

Publication Number Publication Date
CN112506771A true CN112506771A (en) 2021-03-16

Family

ID=74970098

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011407036.3A Pending CN112506771A (en) 2020-12-03 2020-12-03 Message comparison method and device

Country Status (1)

Country Link
CN (1) CN112506771A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113206772A (en) * 2021-04-28 2021-08-03 中国农业银行股份有限公司 Method, device, equipment, medium and product for judging correctness of response message
CN116112554A (en) * 2022-12-07 2023-05-12 上海通联金融服务有限公司 Message conversion method
CN116340187A (en) * 2023-05-25 2023-06-27 建信金融科技有限责任公司 Rule engine migration test method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580945A (en) * 2012-08-07 2014-02-12 百度在线网络技术(北京)有限公司 Method and device for generating testing data for complex service system
CN106844220A (en) * 2017-03-09 2017-06-13 北京融信易安信息技术有限公司 A kind of method of testing and system of simulation computer web application real running environment
CN106919508A (en) * 2017-03-09 2017-07-04 北京融信易安信息技术有限公司 A kind of generation method of application program of computer network test cases

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580945A (en) * 2012-08-07 2014-02-12 百度在线网络技术(北京)有限公司 Method and device for generating testing data for complex service system
CN106844220A (en) * 2017-03-09 2017-06-13 北京融信易安信息技术有限公司 A kind of method of testing and system of simulation computer web application real running environment
CN106919508A (en) * 2017-03-09 2017-07-04 北京融信易安信息技术有限公司 A kind of generation method of application program of computer network test cases

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113206772A (en) * 2021-04-28 2021-08-03 中国农业银行股份有限公司 Method, device, equipment, medium and product for judging correctness of response message
CN113206772B (en) * 2021-04-28 2022-07-22 中国农业银行股份有限公司 Method, device, equipment, medium and product for judging correctness of response message
CN116112554A (en) * 2022-12-07 2023-05-12 上海通联金融服务有限公司 Message conversion method
CN116340187A (en) * 2023-05-25 2023-06-27 建信金融科技有限责任公司 Rule engine migration test method and device, electronic equipment and storage medium
CN116340187B (en) * 2023-05-25 2023-08-15 建信金融科技有限责任公司 Rule engine migration test method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112506771A (en) Message comparison method and device
US8924402B2 (en) Generating a test workload for a database
US9218270B2 (en) Functional software testing framework for determinate level testing
CN108804306B (en) Method and system for automatic test system
CN109460841B (en) User account opening method, system and storage medium
CN108111364B (en) Service system testing method and device
CN112445866A (en) Data processing method and device, computer readable medium and electronic equipment
CN113220907A (en) Business knowledge graph construction method and device, medium and electronic equipment
US10956914B2 (en) System and method for mapping a customer journey to a category
CN115576817A (en) Automatic test system, method, electronic equipment and storage medium
CN110866031B (en) Database access path optimization method and device, computing equipment and medium
CN116662302A (en) Data processing method, device, electronic equipment and storage medium
CN113760680A (en) Method and device for testing system pressure performance
CN114385722A (en) Interface attribute consistency checking method and device, electronic equipment and storage medium
CN112579428A (en) Interface testing method and device, electronic equipment and storage medium
CN110650063A (en) Centralized bank third-party software simulation system and method
US20100030598A1 (en) Platform provisioning system and method
CN113050925B (en) Block chain intelligent contract repairing method and device
CN114741577B (en) Service data management method, system, electronic equipment and readable storage medium
CN114997977B (en) Data processing method, device, electronic equipment and computer readable medium
US11520688B1 (en) Systems and methods for automated test data microservices
CN114490854A (en) Report generation method and device, electronic equipment and computer readable medium
CN117707943A (en) Data regression testing method and device
CN116128518A (en) Electronic archive management method, device, equipment and storage medium
CN113778476A (en) Method, device, equipment and computer readable medium for updating mobile application version

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