CN113110995A - System migration test method and device - Google Patents

System migration test method and device Download PDF

Info

Publication number
CN113110995A
CN113110995A CN202110416808.8A CN202110416808A CN113110995A CN 113110995 A CN113110995 A CN 113110995A CN 202110416808 A CN202110416808 A CN 202110416808A CN 113110995 A CN113110995 A CN 113110995A
Authority
CN
China
Prior art keywords
message
test case
original system
original
test
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
CN202110416808.8A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110416808.8A priority Critical patent/CN113110995A/en
Publication of CN113110995A publication Critical patent/CN113110995A/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
    • 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/3676Test management for coverage analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2465Query processing support for facilitating data mining operations in structured databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a system migration testing method and device, which can be used in the financial field or other fields. The method comprises the following steps: acquiring a system message from an original system, and identifying the system message to obtain a test case message of the original system and a corresponding expected result; according to the parameter corresponding relation between the target system and the original system, carrying out format conversion on the test case message of the original system to obtain a test case message conforming to the message format of the target system; sending the test case message which accords with the message format of the target system to the target system for execution, and receiving an execution result returned by the target system; and comparing the expected result with the execution result to generate a migration test result. According to the invention, the original system message is collected to carry out secondary analysis and classification, and the transaction result is checked, so that all storage scenes can be covered, the whole process is automatically processed, the manual workload is reduced, and the business risk in the system migration process is effectively reduced.

Description

System migration test method and device
Technical Field
The present invention relates to the field of system migration technologies, and in particular, to a method and an apparatus for testing system migration.
Background
Under the localization trend, in order to prevent the system security risk, the financial industry system gradually reduces the dependence on a large-scale host system and migrates to a new system framework which is independently controllable. The financial system has extremely high requirements on reliability, stability and accuracy, and how to perform stable transition on stock transaction running on an old system to complete the migration of a new system and the old system becomes the most troublesome problem at present.
For older systems, it has often been running steadily for decades, supporting tens of millions of business functions. Each business function can trigger a plurality of application scenes, different operations of a client or a teller, and different parameter inputs can be generated when different business requirements call the same interface, so that different logic branches of a program are triggered, and different transaction results are caused. In the initial stage of research and development of the new system, the main objective requires that the functions of the new system and the old system are consistent, the new system and the old system are required to generate the same transaction result for the same parameter input, the method is transparent to clients and services, and the smooth transition of the service functions is completed. Based on the requirements, the manually prepared test case only covers common key transaction scenes, all application scenes in production are difficult to cover, and manual transaction result checking is difficult to operate, large in workload and easy to generate business risks.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiments of the present invention mainly aim to provide a method and an apparatus for testing system migration, which reduce the workload of workers, ensure comprehensive scene coverage of test cases, and largely avoid the service risk caused by system migration from the test level.
In order to achieve the above object, an embodiment of the present invention provides a method for testing system migration, where the method includes:
acquiring a system message from an original system, and identifying the system message to obtain a test case message of the original system and a corresponding expected result;
according to the parameter corresponding relation between the target system and the original system, carrying out format conversion on the test case message of the original system to obtain a test case message conforming to the message format of the target system;
sending a test case message which accords with a message format of a target system to the target system for execution, and receiving an execution result returned by the target system;
and comparing the expected result with the execution result to generate a migration test result.
Optionally, in an embodiment of the present invention, the obtaining a system packet from an original system, and identifying the system packet to obtain a test case packet of the original system and a corresponding expected result includes:
acquiring the system message from the original system; the system message comprises an access message and a return message;
analyzing the system message according to an original system message format to obtain an input parameter and an output parameter of the original system;
and obtaining the test case message of the original system and a corresponding expected result according to the input parameter and the output parameter.
Optionally, in an embodiment of the present invention, the obtaining the test case packet of the original system and the corresponding expected result according to the input parameter and the output parameter includes:
and classifying the input parameters and the output parameters by using a data mining algorithm to obtain the test case message of the original system and a corresponding expected result.
Optionally, in an embodiment of the present invention, the method further includes: and after receiving the execution result returned by the target system, carrying out format conversion on the test case message which accords with the message format of the target system, and recovering the test case message into the test case message of the original system.
An embodiment of the present invention further provides a system migration testing apparatus, where the apparatus includes:
the test case module is used for acquiring a system message from the original system, identifying the system message and obtaining a test case message of the original system and a corresponding expected result;
the format conversion module is used for carrying out format conversion on the test case message of the original system according to the parameter corresponding relation between the target system and the original system to obtain the test case message conforming to the message format of the target system;
the case execution module is used for sending the test case message which accords with the message format of the target system to the target system for execution and receiving the execution result returned by the target system;
and the test result module is used for comparing the expected result with the execution result to generate a migration test result.
Optionally, in an embodiment of the present invention, the test case module includes:
a message obtaining unit, configured to obtain the system message from the original system; the system message comprises an access message and a return message;
the message analysis unit is used for analyzing the system message according to an original system message format to obtain an input parameter and an output parameter of the original system;
and the test case unit is used for obtaining the test case message of the original system and a corresponding expected result according to the input parameters and the output parameters.
Optionally, in an embodiment of the present invention, the test case unit is further configured to classify the input parameters and the output parameters by using a data mining algorithm, so as to obtain the test case packet of the original system and a corresponding expected result.
Optionally, in an embodiment of the present invention, the apparatus further includes a format recovery module, configured to perform format conversion on the test case packet conforming to the target system packet format after receiving the execution result returned by the target system, and recover the test case packet as the test case packet of the original system.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method when executing the program.
The present invention also provides a computer-readable storage medium storing a computer program for executing the above method.
The invention solves the problems that the existing scene is difficult to be covered by test cases in all directions, the workload for manually converting the input messages of the new and old systems and checking the transaction results is large, the error is easy and the like in the migration of the new and old systems, can cover all stock scenes by collecting the messages of the original system to carry out secondary analysis and classification and checking the transaction results, automatically processes the whole process, reduces the manual workload and effectively reduces the business risk in the migration process of the systems.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method for testing system migration according to an embodiment of the present invention;
FIG. 2 is a flow chart of system message parsing and assembly in an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a system applying the system migration test method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a system operation flow of a test method for application system migration according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a request packet collection module of a test simulator in an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a return packet collection module of the test simulator in the embodiment of the present invention;
FIG. 7 is a diagram illustrating a raw system parameter memory according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating a structure of a test case identification module of the test simulator according to an embodiment of the present invention;
FIG. 9 is a diagram illustrating a test case storage module of the test simulator according to an embodiment of the present invention;
FIG. 10 is a diagram illustrating a structure of a message conversion module of a test simulator according to an embodiment of the present invention;
FIG. 11 is a schematic diagram of a test case generation module of the test simulator according to an embodiment of the present invention;
FIG. 12 is a diagram illustrating a test result storage module of the test simulator according to an embodiment of the present invention;
FIG. 13 is a system flowchart illustrating a method for testing application migration in accordance with an embodiment of the present invention;
FIG. 14 is a schematic structural diagram of a testing apparatus for system migration according to an embodiment of the present invention;
FIG. 15 is a schematic diagram of a test case module according to an embodiment of the present invention;
fig. 16 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method and a device for testing system migration, which can be used in the financial field or other fields.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart illustrating a method for testing system migration according to an embodiment of the present invention, where an execution subject of the method for testing system migration according to the embodiment of the present invention includes, but is not limited to, a computer. The method shown in the figure comprises the following steps:
and step S1, acquiring a system message from the original system, and identifying the system message to obtain a test case message of the original system and a corresponding expected result.
In the system migration stage, the original system is the old system to be migrated, and the corresponding new system is the target system. And obtaining a system message of the original system by accessing the original system, wherein the system message comprises an access message and a return message.
Further, the obtained system message is identified, specifically, the system message of the original system is identified according to the message format of the original system. The system message is identified to obtain the input parameters and the output parameters of the original system, and the induction and classification are carried out by utilizing a data mining algorithm. Specifically, a decision tree algorithm ID3 is adopted, input parameters and output parameters of an original system are used as a data analysis warehouse, and information entropy and information gain are used as measurement standards, so that induction and classification of the input parameters and the output parameters are realized. Specifically, parameter induction and classification are performed according to the difference between the parameters of the access message and the parameters of the put-back message, so that the test case message of the original system and the expected result corresponding to the test case are obtained.
And step S2, according to the parameter corresponding relation between the target system and the original system, carrying out format conversion on the test case message of the original system to obtain the test case message conforming to the message format of the target system.
The parameter correspondence between the target system and the original system may be the correspondence of a communication area field, and the test case message of the original system is converted into the test case message conforming to the message format of the target system according to the parameter correspondence. In addition, the parameter correspondence between the target system and the original system may be preset manually.
Step S3, sending the test case packet conforming to the target system packet format to the target system for execution, and receiving the execution result returned by the target system.
And sending the test case message after format conversion to a target system, wherein the test case message at the moment accords with the message format of the target system. And after the target system runs the test case message, receiving an execution result returned by the target system.
Step S4, comparing the expected result with the execution result to generate a migration test result.
And comparing the expected result in the original system with the execution result obtained by the target system to generate a migration test result. Specifically, if the expected result is inconsistent with the execution result, the migration test result is failed, which indicates that the test case packet does not completely cover all scenes in the target system. If the expected result is consistent with the execution result, the test result is passed through the migration, and the test case message completely covers all scenes in the target system.
As an embodiment of the present invention, as shown in fig. 2, the obtaining a system packet from an original system and identifying the system packet to obtain a test case packet of the original system and a corresponding expected result includes:
step S11, obtaining the system message from the original system; the system message comprises an access message and a return message;
step S12, analyzing the system message according to the original system message format to obtain the input parameter and the output parameter of the original system;
and step S13, obtaining the test case message of the original system and the corresponding expected result according to the input parameters and the output parameters.
The system message of the original system comprises an access message and a return message. And identifying the acquired system message, specifically, identifying the system message of the original system according to the message format of the original system. The system message is identified to obtain the input parameters and the output parameters of the original system, and the induction and classification are carried out by utilizing a data mining algorithm. And obtaining a test case message of the original system and an expected result corresponding to the test case.
In this embodiment, the obtaining the test case packet and the corresponding expected result of the original system according to the input parameter and the output parameter includes: and classifying the input parameters and the output parameters by using a data mining algorithm to obtain the test case message of the original system and a corresponding expected result.
The adopted data mining algorithm can be decision tree algorithm ID3, input parameters and output parameters of an original system are used as a data analysis warehouse, and information entropy and information gain are used as measurement standards, so that induction and classification of the input parameters and the output parameters are realized. Specifically, parameter induction and classification are performed according to the difference between the parameters of the access message and the parameters of the put-back message, so that the test case message of the original system and the expected result corresponding to the test case are obtained.
As an embodiment of the present invention, the method further comprises: and after receiving the execution result returned by the target system, carrying out format conversion on the test case message which accords with the message format of the target system, and recovering the test case message into the test case message of the original system.
After the target system executes the test case message and returns the execution result, format conversion is carried out on the test case message of the original system again. And restoring the test case message which accords with the message format of the target system into the test case message of the original system so as to test again.
In an embodiment of the present invention, as shown in fig. 3, a schematic structural diagram of a system applying a system migration test method in an embodiment of the present invention is shown, where the system shown in the drawing includes: an original system, a target system and a test simulator. On one hand, the system shown in the figure captures data and messages from an original system positioned in a production environment to form a test case; and the other side initiates a test case to the target system to complete the comparison of transaction results and form a test report.
In this embodiment, the test simulator includes a request packet collection module, a return packet collection module, an original system parameter storage module, a test case identification module, a packet conversion module, a test case storage module, a test result storage module, a test case generation module, a test result analysis module, and a test report module.
Specifically, the system operation flow of the application system migration test method shown in fig. 4 specifically includes:
firstly, a request \ return message acquisition module needs to be connected with an original system gateway and is used for acquiring access and return message records of an original system. And the request message acquisition module transmits the message to the original system parameter storage module through the asynchronous queue to complete the persistence of the message record.
And secondly, taking the persistent message as a data warehouse, classifying and summarizing the persistent message by using a data mining algorithm by using a test case identification module, identifying a test case, and storing the test case in a test case storage module.
Thirdly, because the original system message and the target system message have different formats and different communication area parameter definitions, the original system message needs to be converted into the target system message. Specifically, the message conversion module presets the corresponding relationship between the communication area fields of the original system and the target system. Based on the above, the message conversion module converts the original system message stored in the test case memory into the target system message according to the preset message conversion rule, and the persistence is completed in the test case memory module.
And fourthly, the test case generation module sends the test cases to the target system and stores the return messages of the target system to the test result storage module. And the test result analysis module compares the test result with the expected result of the test case and derives a test report.
In this embodiment, fig. 5 is a schematic structural diagram of a request packet collection module, configured to collect a request packet received by an original system gateway. The first initialization unit 201 is responsible for requesting initialization of the message collection module. The first communication unit 202 is responsible for requesting the message collection module to communicate with the original system gateway. The request message collection unit 203 is responsible for collecting the request message received by the original system. The asynchronous queue sending unit 204 is responsible for sending the received packet to an asynchronous queue.
Further, fig. 6 is a schematic structural diagram of a return packet collection module, which is used for collecting a return packet received by an original system gateway. The second initialization unit 301 is responsible for initializing the return packet collection module. The second communication unit 302 is responsible for communication between the return message collection module and the original system gateway. The return message collection unit 303 is responsible for collecting the transaction result message received by the original system.
Further, fig. 7 is a schematic structural diagram of an original system parameter storage module, which is mainly used for storing original system transaction parameters, and may be a relational database. The third initialization unit 401 is mainly responsible for initializing the original system parameter storage module. The third communication unit 402 is mainly responsible for communication with each message collection module. The 403 original system message parsing unit is mainly responsible for parsing the original system message, and each field value needs to be parsed according to the message format of the original system. The original system parameter storage unit 404 is mainly responsible for storing original system input/output parameters. The asynchronous queue receiving unit 405 is mainly responsible for receiving messages that the acquisition module generates to the asynchronous queue.
Further, fig. 8 is a schematic structural diagram of the test case recognition module, which is mainly used for recognition and classification of the test cases. The fourth initialization unit 501 is mainly responsible for the initialization of the test case identification module. The fourth communication unit 502 is mainly responsible for communication with the original system parameter storage module. The test case classifying and recognizing unit 503 is mainly responsible for analyzing the input/output parameters of the original system and classifying and recognizing the test cases.
The decision tree algorithm ID3 is selected to carry out data mining classification on the test cases, input and output parameters of an original system are used as a data analysis warehouse, and information entropy and information gain are used as measurement standards, so that induction classification of the test cases is realized. Where the information is used at dispute to measure how well an input field classifies a test case.
If an input parameter X takes on a valueComprises the following steps: x ═ X1,x2,…,xnAnd the probability of each value of the parameter is as follows: { p1,p2,…,pn}. The entropy of the input parameter X is defined as:
Figure BDA0003026253970000081
for an input variable, the more diverse its values in the case base, the larger its entropy h (x) and the more unstable the classification.
Taking C as a classification variable, and taking the value of C1,C2,…,CnAnd the probability of each type of test case is P (C)1),P(C2),…,P(Cn). Here n becomes the total number of test cases, so that the classification stability, i.e. entropy, of the test cases is
Figure BDA0003026253970000082
The ID3 algorithm uses information entropy gain as a decision attribute for test case classification, with the information gain: all the parameters are worth the difference between the information entropy and the information entropy of a certain parameter. The larger the information gain value is, the higher the decision-making property of the value of the parameter is, and the value is used for identifying the test case, namely the classification node. The calculation formula of the test information gain is as follows:
Figure BDA0003026253970000083
wherein, Encopy represents the Entropy of the father node; encopyiRepresenting the entropy of node i. PiRepresents the ratio of the data amount of the child node i to the node data amount. The larger the Info _ Gain is, the smaller the entropy of the classification case is, and the better the classification effect of the test case is. Therefore, the Info _ Gain is selected as the classification attribute of the test case.
The conditions for stopping the classification of the test cases are not described in detail.
Further, fig. 9 is a schematic structural diagram of a test case storage module, which is mainly used for storing test cases and may be a relational database. The fifth initializing unit 601 is responsible for initializing the test case storage module. The fifth communication unit 602 is mainly used for completing the communication with the test case identification module. The test case storage unit 603 is responsible for storing test cases.
Further, fig. 10 is a schematic structural diagram of a message conversion module, and the main function of the message conversion module is to convert an original system message into a target system message. The sixth initialization unit 701 is mainly responsible for initializing the message conversion module. The sixth communication unit 702 is mainly responsible for communication between the message conversion module and the test case storage module. The parameter correspondence unit 703 is mainly responsible for setting the correspondence between the parameters in the messages of the original system and the target system. The message exchange unit 704 is mainly responsible for acquiring input/output parameters of the original system and assembling a new message according to the message format of the target system.
Further, fig. 11 is a schematic structural diagram of a test case generation module, which is mainly used for initiating a test case to a target system and collecting a test result. The seventh initialization unit 801 is primarily responsible for the initialization of the test case generator. The seventh communication unit 802 is mainly responsible for communication between the test case generation module and the test case storage module. And the 803 test case generation unit is mainly responsible for sending a transaction request to a target system by using the message in the test case. The return message collection unit 804 is mainly responsible for collecting messages returned by the target system. The test data recovery unit 805 is mainly responsible for recovering the test data after the test case is completed, so as to facilitate the next test.
Further, fig. 12 is a schematic structural diagram of a test result storage module, which is mainly used for storing test results. The eighth initialization unit 901 is mainly used for initialization of the test result storage module. The eighth communication unit 902 is mainly responsible for the communication between the test result storage module and the test case generation module. The test result storage unit 903 is mainly used for storing test results, and may be a relational database. The test report derivation unit 904 is mainly used for comparing the test result with the test case and deriving the test result.
Further, fig. 13 shows a system migration automation test flow. The first step, catch the old system visit/return message, analyze the field and finish the persistence. And secondly, completing automatic message conversion based on the preset corresponding relation between the parameters of the original system and the parameters of the target system. And thirdly, completing classification induction of the test data by using a data mining algorithm according to the access and return parameter difference. And fourthly, sending the test case to the target system, collecting a transaction result and recovering the test data of the target system. And fifthly, comparing the test results and exporting a test report.
The invention relates to a method for testing the migration of new and old systems, which is difficult for a test case to comprehensively cover the existing scene, has large workload of manually converting input messages of the new and old systems and checking transaction results, and is easy to make mistakes. According to the invention, the production operation messages are collected to carry out secondary analysis and classification to form the test case library, the transaction results are checked, all stock scenes can be covered, the whole process is automatically processed, the manual workload is reduced, the service risk in the system migration process is effectively reduced, and the stable migration of new and old systems is completed.
Fig. 14 is a schematic structural diagram of a testing apparatus for system migration according to an embodiment of the present invention, where the apparatus includes:
the test case module 10 is configured to obtain a system packet from an original system, and identify the system packet to obtain a test case packet of the original system and a corresponding expected result.
In the system migration stage, the original system is the old system to be migrated, and the corresponding new system is the target system. And obtaining a system message of the original system by accessing the original system, wherein the system message comprises an access message and a return message.
Further, the obtained system message is identified, specifically, the system message of the original system is identified according to the message format of the original system. The system message is identified to obtain the input parameters and the output parameters of the original system, and the induction and classification are carried out by utilizing a data mining algorithm. Specifically, a decision tree algorithm ID3 is adopted, input parameters and output parameters of an original system are used as a data analysis warehouse, and information entropy and information gain are used as measurement standards, so that induction and classification of the input parameters and the output parameters are realized. Specifically, parameter induction and classification are performed according to the difference between the parameters of the access message and the parameters of the put-back message, so that the test case message of the original system and the expected result corresponding to the test case are obtained.
And the format conversion module 20 is configured to perform format conversion on the test case packet of the original system according to the parameter correspondence between the target system and the original system, so as to obtain a test case packet conforming to the format of the target system packet.
The parameter correspondence between the target system and the original system may be the correspondence of a communication area field, and the test case message of the original system is converted into the test case message conforming to the message format of the target system according to the parameter correspondence. In addition, the parameter correspondence between the target system and the original system may be preset manually.
The case execution module 30 is configured to send the test case packet conforming to the target system packet format to the target system for execution, and receive an execution result returned by the target system.
And sending the test case message after format conversion to a target system, wherein the test case message at the moment accords with the message format of the target system. And after the target system runs the test case message, receiving an execution result returned by the target system.
A test result module 40, configured to compare the expected result with the execution result, and generate a migration test result.
And comparing the expected result in the original system with the execution result obtained by the target system to generate a migration test result. Specifically, if the expected result is inconsistent with the execution result, the migration test result is failed, which indicates that the test case packet does not completely cover all scenes in the target system. If the expected result is consistent with the execution result, the test result is passed through the migration, and the test case message completely covers all scenes in the target system.
As an embodiment of the present invention, as shown in fig. 15, the test case module 10 includes:
a message obtaining unit 11, configured to obtain the system message from the original system; the system message comprises an access message and a return message;
a message analyzing unit 12, configured to analyze the system message according to an original system message format to obtain an input parameter and an output parameter of the original system;
and the test case unit 13 is configured to obtain a test case packet of the original system and a corresponding expected result according to the input parameter and the output parameter.
As an embodiment of the present invention, the test case unit is further configured to classify the input parameters and the output parameters by using a data mining algorithm, so as to obtain the test case packet of the original system and a corresponding expected result.
In this embodiment, the apparatus further includes a format recovery module, configured to perform format conversion on the test case packet conforming to the target system packet format after receiving the execution result returned by the target system, and recover the test case packet as the test case packet of the original system.
Based on the same application concept as the system migration testing method, the invention also provides a system migration testing device. Because the principle of solving the problems of the testing device for the system migration is similar to that of the testing method for the system migration, the implementation of the testing device for the system migration can refer to the implementation of the testing method for the system migration, and repeated details are omitted.
The invention solves the problems that the existing scene is difficult to be covered by test cases in all directions, the workload for manually converting the input messages of the new and old systems and checking the transaction results is large, the error is easy and the like in the migration of the new and old systems, can cover all stock scenes by collecting the messages of the original system to carry out secondary analysis and classification and checking the transaction results, automatically processes the whole process, reduces the manual workload and effectively reduces the business risk in the migration process of the systems.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method when executing the program.
The present invention also provides a computer-readable storage medium storing a computer program for executing the above method.
As shown in fig. 16, the electronic device 600 may further include: communication module 110, input unit 120, audio processing unit 130, display 160, power supply 170. It is noted that the electronic device 600 does not necessarily include all of the components shown in FIG. 16; furthermore, the electronic device 600 may also include components not shown in fig. 16, which may be referred to in the prior art.
As shown in fig. 16, the central processor 100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, the central processor 100 receiving input and controlling the operation of the various components of the electronic device 600.
The memory 140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 100 may execute the program stored in the memory 140 to realize information storage or processing, etc.
The input unit 120 provides input to the cpu 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display an object to be displayed, such as an image or a character. The display may be, for example, an LCD display, but is not limited thereto.
The memory 140 may be a solid state memory such as Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 140 may also be some other type of device. Memory 140 includes buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application/function storage section 142, and the application/function storage section 142 is used to store application programs and function programs or a flow for executing the operation of the electronic device 600 by the central processing unit 100.
The memory 140 may also include a data store 143, the data store 143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. The driver storage portion 144 of the memory 140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging application, address book application, etc.).
The communication module 110 is a transmitter/receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter/receiver) 110 is coupled to the central processor 100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide audio output via the speaker 131 and receive audio input from the microphone 132 to implement general telecommunications functions. Audio processor 130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, an audio processor 130 is also coupled to the central processor 100, so that recording on the local can be enabled through a microphone 132, and so that sound stored on the local can be played through a speaker 131.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for testing system migration, the method comprising:
acquiring a system message from an original system, and identifying the system message to obtain a test case message of the original system and a corresponding expected result;
according to the parameter corresponding relation between the target system and the original system, carrying out format conversion on the test case message of the original system to obtain a test case message conforming to the message format of the target system;
sending a test case message which accords with a message format of a target system to the target system for execution, and receiving an execution result returned by the target system;
and comparing the expected result with the execution result to generate a migration test result.
2. The method of claim 1, wherein obtaining the system packet from the original system and identifying the system packet to obtain the test case packet and the corresponding expected result of the original system comprises:
acquiring the system message from the original system; the system message comprises an access message and a return message;
analyzing the system message according to an original system message format to obtain an input parameter and an output parameter of the original system;
and obtaining the test case message of the original system and a corresponding expected result according to the input parameter and the output parameter.
3. The method of claim 2, wherein obtaining the test case message and the corresponding expected result of the original system according to the input parameters and the output parameters comprises:
and classifying the input parameters and the output parameters by using a data mining algorithm to obtain the test case message of the original system and a corresponding expected result.
4. The method of claim 1, further comprising: and after receiving the execution result returned by the target system, carrying out format conversion on the test case message which accords with the message format of the target system, and recovering the test case message into the test case message of the original system.
5. An apparatus for testing system migration, the apparatus comprising:
the test case module is used for acquiring a system message from the original system, identifying the system message and obtaining a test case message of the original system and a corresponding expected result;
the format conversion module is used for carrying out format conversion on the test case message of the original system according to the parameter corresponding relation between the target system and the original system to obtain the test case message conforming to the message format of the target system;
the case execution module is used for sending the test case message which accords with the message format of the target system to the target system for execution and receiving the execution result returned by the target system;
and the test result module is used for comparing the expected result with the execution result to generate a migration test result.
6. The apparatus of claim 5, wherein the test case module comprises:
a message obtaining unit, configured to obtain the system message from the original system; the system message comprises an access message and a return message;
the message analysis unit is used for analyzing the system message according to an original system message format to obtain an input parameter and an output parameter of the original system;
and the test case unit is used for obtaining the test case message of the original system and a corresponding expected result according to the input parameters and the output parameters.
7. The apparatus of claim 6, wherein the test case unit is further configured to classify the input parameters and the output parameters using a data mining algorithm to obtain test case messages and corresponding expected results for the original system.
8. The apparatus according to claim 5, further comprising a format recovery module, configured to perform format conversion on the test case packet conforming to the target system packet format after receiving the execution result returned by the target system, and recover the test case packet as the test case packet of the original system.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 4.
CN202110416808.8A 2021-04-19 2021-04-19 System migration test method and device Pending CN113110995A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110416808.8A CN113110995A (en) 2021-04-19 2021-04-19 System migration test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110416808.8A CN113110995A (en) 2021-04-19 2021-04-19 System migration test method and device

Publications (1)

Publication Number Publication Date
CN113110995A true CN113110995A (en) 2021-07-13

Family

ID=76718261

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110416808.8A Pending CN113110995A (en) 2021-04-19 2021-04-19 System migration test method and device

Country Status (1)

Country Link
CN (1) CN113110995A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113704101A (en) * 2021-08-23 2021-11-26 辽宁振兴银行股份有限公司 Distributed system compatibility test method based on gateway asynchronous replication
CN114338850A (en) * 2021-12-24 2022-04-12 百富计算机技术(深圳)有限公司 Message checking method and device, terminal equipment and computer readable storage medium
CN116383090A (en) * 2023-05-29 2023-07-04 麒麟软件有限公司 Automatic testing method and platform for kylin system migration tool

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120047492A1 (en) * 2010-08-17 2012-02-23 International Business Machines Corporation Deployment of a tool for testing migrated applications
CN104778179A (en) * 2014-01-14 2015-07-15 阿里巴巴集团控股有限公司 Data migration test method and system
CN106294115A (en) * 2015-06-11 2017-01-04 阿里巴巴集团控股有限公司 The method of testing of a kind of application system animal migration and device
CN108304309A (en) * 2018-02-24 2018-07-20 中国农业银行股份有限公司 A kind of method and device of automation contrast test data
CN111966665A (en) * 2020-08-17 2020-11-20 中国银行股份有限公司 Data migration test method and device
CN112486814A (en) * 2020-11-26 2021-03-12 北京三快在线科技有限公司 System migration test method, migration test system, device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120047492A1 (en) * 2010-08-17 2012-02-23 International Business Machines Corporation Deployment of a tool for testing migrated applications
CN104778179A (en) * 2014-01-14 2015-07-15 阿里巴巴集团控股有限公司 Data migration test method and system
CN106294115A (en) * 2015-06-11 2017-01-04 阿里巴巴集团控股有限公司 The method of testing of a kind of application system animal migration and device
CN108304309A (en) * 2018-02-24 2018-07-20 中国农业银行股份有限公司 A kind of method and device of automation contrast test data
CN111966665A (en) * 2020-08-17 2020-11-20 中国银行股份有限公司 Data migration test method and device
CN112486814A (en) * 2020-11-26 2021-03-12 北京三快在线科技有限公司 System migration test method, migration test system, device and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113704101A (en) * 2021-08-23 2021-11-26 辽宁振兴银行股份有限公司 Distributed system compatibility test method based on gateway asynchronous replication
CN114338850A (en) * 2021-12-24 2022-04-12 百富计算机技术(深圳)有限公司 Message checking method and device, terminal equipment and computer readable storage medium
WO2023116031A1 (en) * 2021-12-24 2023-06-29 百富计算机技术(深圳)有限公司 Message checking method and apparatus, and terminal device and computer-readable storage medium
CN114338850B (en) * 2021-12-24 2024-03-19 百富计算机技术(深圳)有限公司 Message checking method, device, terminal equipment and computer readable storage medium
CN116383090A (en) * 2023-05-29 2023-07-04 麒麟软件有限公司 Automatic testing method and platform for kylin system migration tool
CN116383090B (en) * 2023-05-29 2023-08-22 麒麟软件有限公司 Automatic testing method and platform for kylin system migration tool

Similar Documents

Publication Publication Date Title
CN113110995A (en) System migration test method and device
CN111210842B (en) Voice quality inspection method, device, terminal and computer readable storage medium
CN111552633A (en) Interface abnormal call testing method and device, computer equipment and storage medium
CN110211121B (en) Method and device for pushing model
CN112286827A (en) Software testing method, device, electronic device and storage medium
CN116204438A (en) Test case generation method, automatic test method and related device
CN112328631A (en) Production fault analysis method and device, electronic equipment and storage medium
CN111768242A (en) Order-placing rate prediction method, device and readable storage medium
CN112199935A (en) Data comparison method and device, electronic equipment and computer readable storage medium
CN115242894A (en) Data processing method, data processing device, storage medium and computer equipment
CN114398315A (en) Data storage method, system, storage medium and electronic equipment
CN110633318A (en) Data extraction processing method, device, equipment and storage medium
CN113760730A (en) Automatic testing method and device
CN115858049B (en) RPA flow componentization arrangement method, device, equipment and medium
CN111538542A (en) System configuration method and related device
CN112988598B (en) Method and device for automatically testing interface
CN112131611B (en) Data correctness verification method, device, equipment, system and storage medium
CN114171107A (en) Detection method, device, equipment and storage medium for VPD information of solid state disk
CN114065187A (en) Abnormal login detection method and device, computing equipment and storage medium
CN113128986A (en) Error reporting processing method and device for long-link transaction
CN113076355A (en) Method for sensing data security flow situation
CN110769248A (en) Set top box testing method and device and electronic equipment
CN105574038A (en) Text content recognition rate test method and device based on anti-recognition rendering
CN109523990B (en) Voice detection method and device
CN114816845B (en) MongoDB-based rapid data rollback method and device

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