CN112148614B - Regression testing method and device - Google Patents

Regression testing method and device Download PDF

Info

Publication number
CN112148614B
CN112148614B CN202011047457.XA CN202011047457A CN112148614B CN 112148614 B CN112148614 B CN 112148614B CN 202011047457 A CN202011047457 A CN 202011047457A CN 112148614 B CN112148614 B CN 112148614B
Authority
CN
China
Prior art keywords
test
data
test result
regression
test case
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011047457.XA
Other languages
Chinese (zh)
Other versions
CN112148614A (en
Inventor
江丽萍
张凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202011047457.XA priority Critical patent/CN112148614B/en
Publication of CN112148614A publication Critical patent/CN112148614A/en
Application granted granted Critical
Publication of CN112148614B publication Critical patent/CN112148614B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • 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

Abstract

The invention provides a regression testing method and a regression testing device, which relate to the technical field of testing, and the method comprises the following steps: acquiring a first test result and a message returned by a target system; the first test result and the message returned by the target system are obtained by testing the data to be tested by using a first test case stored at the target moment; restoring the data to be tested; testing the data to be tested according to the second test case and the message returned by the target system to obtain a second test result; generating a second test case according to the modified system software data; the second test case comprises the first test case; and generating a regression test result according to the first test result and the second test result. The invention can realize automatic regression test, reduce the problem of inaccurate test results caused by deleting or modifying data in the database, realize updating of the message of the external target system of the regression test, improve the accuracy of the test and ensure the test quality.

Description

Regression testing method and device
Technical Field
The invention relates to the technical field of testing, in particular to a regression testing method and device.
Background
Regression testing refers to the fact that during the development of software, once a function is modified, other functions of the system are possibly affected, so that the test cases which are already verified need to be run again at this time to ensure that the modification of the function does not affect other existing functions of the system. The product requirements in the financial industry are continuously changed, the system is more and more complex, and the online period is faster and faster. In addition to fully performing unit test, integration test and performance test and user test, potential problems are found through regression test, so that the usability of the system function is more and more important. In the existing regression test, developers respectively maintain test cases of functions responsible for themselves, send the cases manually and compare results to perform the regression test, and the convenience, the sufficiency and the effectiveness of the regression test are required to be improved.
Disclosure of Invention
The invention provides a regression testing method and device, which can realize automatic regression testing, improve the efficiency of the regression testing and ensure the quality of the regression testing.
In a first aspect, an embodiment of the present invention provides a regression testing method, including: acquiring a first test result and a message returned by a target system; the first test result and the message returned by the target system are obtained by testing the data to be tested by using a first test case stored at the target moment; restoring the data to be tested; testing the data to be tested according to a second test case and a message returned by the target system to obtain a second test result; the second test case is generated according to the modified system software data; the second test case comprises the first test case; and generating a regression test result according to the first test result and the second test result.
In a second aspect, an embodiment of the present invention further provides a regression testing apparatus, including: the acquisition module is used for acquiring a first test result and a message returned by the target system; the first test result and the message returned by the target system are obtained by testing the data to be tested by using a first test case stored at the target moment; the reduction module is used for reducing the data to be tested; the test module is used for testing the data to be tested according to a second test case and a message returned by the target system to obtain a second test result; the second test case is generated according to the modified system software data; the second test case comprises the first test case; and the result module is used for generating a regression test result according to the first test result and the second test result.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor, where the processor implements the regression testing method described above when executing the computer program.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium storing a computer program for executing the regression testing method described above.
The embodiment of the invention has the following beneficial effects: the embodiment of the invention provides a regression testing scheme, which comprises the steps of firstly obtaining a first testing result and a message returned by a target system, testing data to be tested by using a first testing case stored at a target moment to obtain the first testing result and the message returned by the target system, then restoring the data to be tested, testing the data to be tested according to a second testing case and the message returned by the target system to obtain a second testing result, wherein the second testing case is generated according to modified system software data, the second testing case comprises the first testing case, and finally generating a regression testing result according to the first testing result and the second testing result. According to the embodiment of the invention, after the first test result is obtained according to the first test case backed up at the target moment and the second test result is obtained according to the second test case generated by the modified system software data, the regression test result is obtained according to the comparison of the first test result and the second test result, the regression test is automatically performed, the problem of inaccurate test result caused by deleting or modifying the data in the database can be reduced through data backup and reduction, and the update of the external target system message of the regression test is realized through the message returned by the target system, so that the test accuracy is improved, and the test quality is ensured.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a regression testing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a message for generating a first test result and returning to a target system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating steps performed by the regression testing method according to the embodiment of the present invention;
FIG. 4 is a block diagram of a regression testing apparatus according to an embodiment of the present invention;
FIG. 5 is a block diagram of another regression testing apparatus according to an embodiment of the present invention;
fig. 6 is a block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
At present, the development of banking system functions mainly comprises the following parts:
new functions. When developers develop new code, they do not fully focus on compatibility with existing code, and therefore need to use regression testing to find potential problems.
Functional modification and defect repair. When the system complexity is high, the developer may create more problems by modifying the code or removing existing functions according to the business needs. The regression test may then check for deleted or modified functionality without affecting other functionality.
And upgrading the development platform. Platform upgrades due to software framework bug fixes or platform functionality optimizations may cause problems with some business functions. This problem is difficult to find and needs to be confirmed by a regression test with sufficient cases.
After the traditional banking system is developed, unit testing, assembly testing and user testing are mainly performed, and regression testing is often omitted. Mainly because regression testing is repeated with much effort, coverage is not high, and defects found are too small for the effort. Currently, there are mainly two schemes for regression testing:
1) Manual regression testing. The developers respectively maintain the test cases of the functions responsible for the developers, and because fewer cases are needed, the cases are manually sent and the results are compared to carry out regression testing.
2) Traditional automated regression testing. In the traditional systematic regression test, the systematic regression test cases are automatically sent at the appointed time by evaluating and maintaining the case library, and the comparison result is automatically compared, so that the systematic regression test is realized.
The existing regression testing method has the following disadvantages:
1) Data problems are not considered. The deleting and modifying of the data in the development test process can influence the regression test result, so that the comparison result is easy to generate inconsistent comparison caused by the data problem.
2) The baffle message is unchanged. Banking systems often have a large number of outbound transactions. Even if the outbound transactions are subjected to iterative development of a plurality of rounds, baffle messages cannot change, the change of an external system is reflected, and potential problems caused by the external system cannot be captured.
3) The complete regression testing procedure is lacking. The traditional regression test only considers the sending and comparison of cases, and lacks the processing of a plurality of processes such as backup, restoration, case maintenance, inconsistent comparison, shielding rules and the like, so that various problems are easy to occur in the result of the regression test.
In conclusion, the traditional regression test has the problems of high cost, long time consumption, lack of maintenance of cases, unobvious defect effect solving and the like.
Based on the above, the regression testing method and device provided by the embodiment of the invention design an automatic systematic regression testing flow method from the perspective of improving the convenience, the sufficiency and the effectiveness of the regression testing, so that the manual participation is reduced as much as possible, and the product quality is effectively ensured on the premise of meeting the product requirement.
For the convenience of understanding the present embodiment, a regression testing method disclosed in the embodiment of the present invention will be described in detail.
The embodiment of the invention provides a regression testing method, referring to a flowchart of the regression testing method shown in fig. 1, comprising the following steps:
step S102, a first test result and a message returned by a target system are obtained.
In the embodiment of the invention, the first test result and the message returned by the target system are obtained by testing the data to be tested by using the first test case stored at the target moment.
The target time is a certain historical time before the regression test, and can be selected according to actual requirements, which is not particularly limited in the embodiment of the invention. Backing up the data to be tested adopted in the test at the target moment in advance, and storing the test cases adopted in the test at the target moment to obtain a first test case. And executing the data testing process to be tested according to the first testing case to obtain a first testing result. In the process of executing the first test case, interaction with other systems may be involved, the system which interacts with the system is taken as a target system, and test messages returned by the target system are collected.
It should be noted that, the message returned by the target system may be obtained from the data recorded when the first test case is executed at the target moment, so that the transaction is not required to be executed in the target system, and the data processing efficiency is improved. The change of the external system can be found in time through the message returned by the target system, the potential problem caused by the external system is solved, and the influence of the update of the external system on the regression test result of the embodiment of the invention is avoided.
It should be further noted that the first test case is a set of multiple test cases.
Step S104, restore the data to be tested.
In the embodiment of the invention, the data to be tested is backed up in advance, and when the regression testing method is executed, the data to be tested which is backed up in advance is added into the database to be accessed, so that the data to be tested is tested by using a second test case later.
And step S106, testing the data to be tested according to the second test case and the message returned by the target system to obtain a second test result.
In an embodiment of the present invention, a second test case is generated based on the modified system software data, the second test case comprising the first test case. The function is modified during the software development process from the target time to the time period when the regression test is performed, and the second test case is a case set produced for testing the modified system software data. To re-verify the execution result of the first test case, the case set of the second test case includes all cases in the case set of the first test case.
Step S108, generating a regression test result according to the first test result and the second test result.
In the embodiment of the invention, the first test result and the second test result are compared to verify whether the function corresponding to the first test case is affected by the modification of the system software data, so as to obtain a regression test result.
The embodiment of the invention provides a regression testing scheme, which comprises the steps of firstly obtaining a first testing result and a message returned by a target system, testing data to be tested by using a first testing case stored at a target moment to obtain the first testing result and the message returned by the target system, then restoring the data to be tested, testing the data to be tested according to a second testing case and the message returned by the target system to obtain a second testing result, wherein the second testing case is generated according to modified system software data, the second testing case comprises the first testing case, and finally generating a regression testing result according to the first testing result and the second testing result. According to the embodiment of the invention, after the first test result is obtained according to the first test case backed up at the target moment and the second test result is obtained according to the second test case generated by the modified system software data, the regression test result is obtained according to the comparison of the first test result and the second test result, the regression test is automatically performed, the problem of inaccurate test result caused by deleting or modifying the data in the database can be reduced through data backup and reduction, and the update of the external target system message of the regression test is realized through the message returned by the target system, so that the test accuracy is improved, and the test quality is ensured.
In order to more fully prepare the regression testing data, the following steps may be further executed before the first testing result and the message returned by the target system are acquired:
acquiring system parameters, time sequence parameters, a first test case and data to be tested; reading a first test case according to system parameters; according to the time sequence parameters, testing the data to be tested by using a first test case to obtain a first test result; and recording a message returned by the target system acquired in the process of executing the first test case.
In the embodiment of the present invention, the data to be tested is data that may affect the test function, for example, table data may be set according to actual requirements, and the embodiment of the present invention is not limited in particular. The system parameters are used for identifying the system to be subjected to regression testing, and after the system to be subjected to regression testing is determined according to the system parameters, the first test cases corresponding to the system are read, and it is required to be noted that different systems correspond to different first test cases. The timing parameters are used to determine a test order of the plurality of test cases in the first test case. And testing the data to be tested by using the first test case according to the sequence determined by the time sequence parameters to obtain a first test result. In the testing process, data interaction with the target system may be required, and a message returned by the target system acquired in the testing process is recorded.
In order to ensure that the automated regression test is successfully performed and reduce the number of interruptions, the following steps may be performed before the first test case is read according to the system parameters:
judging whether the data to be tested is backed up successfully or not; if yes, reading a first test case according to the system parameters; if not, the data to be tested is backed up again.
In the embodiment of the invention, whether the backup of the data to be tested is successful is checked, and if the backup is unsuccessful, the data to be tested is backed up again, so that the data to be tested can be tested by smoothly utilizing the first test case.
In order to ensure the accuracy of the test results, generating a regression test result according to the first test result and the second test result may be performed as follows:
judging whether the first test result and the second test result of the same first test case are consistent; if yes, determining that the regression test result is that the test passes; if not, determining that the regression test result is that the test is not passed.
In the embodiment of the invention, if the two test results of the same test case are consistent, the function corresponding to the test case is proved not to be affected by the modification of the system software data, the regression test result is the test passing, otherwise, the regression test result is not the test passing.
In view of further ensuring the sufficiency and accuracy of the subsequent regression test, after determining that the regression test result is a test pass, the following steps may also be performed:
updating the first test case according to the second test case.
In the embodiment of the invention, the test cases which are in the second test case set and are not in the first test case set are supplemented to the first test case, so that the first test case is updated, the updated first test case can be used in the subsequent regression test, the case library is enriched, and the accuracy and reliability of the regression test are further improved.
In order to improve the automation degree of the regression test result, after determining that the regression test result is that the test fails, the following steps may be further executed:
judging whether the difference information of the first test result and the second test result belongs to a preset difference range or not; if yes, generating shielding data according to the difference information, and updating a database according to the shielding data; if not, generating reminding information and sending the reminding information to an alarm module.
In the embodiment of the present invention, the difference information of the first test result and the second test result belongs to a preset difference range, for example, the position of the difference data of the first test result and the second test result belongs to the preset difference range, and the difference information is negligible, that is, the difference information is within the range determined by the preset difference range, and the first test result and the second test result are considered to be consistent under the condition. If the difference information of the first test result and the second test result is satisfied to belong to a preset range, generating shielding data according to the difference information, wherein the shielding data is used for controlling a comparison result of the first test result and the second test result; if the difference information of the first test result and the second test result does not meet the preset range, generating reminding information, and sending the reminding information to an alarm module so as to remind a developer of analyzing the problem and solving the problem.
It should be noted that, in the embodiment of the present invention, the preset difference range may be set according to actual requirements, which is not limited in particular.
The implementation of the method is described in one specific example.
Referring to the flowchart of the first test result and the message returned by the target system shown in fig. 2, the backup of the data is completed at a certain time point, the case library is queried to obtain the regression test case set of the system, namely the first test case, and the time sequence sending system case obtains the return message as the reference result of the regression test of the round, namely the first test result. And collecting a return message of the outbound transaction as an outbound baffle for the round of regression test. The outbound transaction refers to a transaction related to the target system, the return message of the outbound transaction refers to a message returned by the target system, and the outbound baffle message and the reference result are stored in a database.
Referring to the schematic diagram of the steps executed by the regression testing method shown in fig. 3, after the function verification is passed (including adding functions, function adjustment, defect repair, platform upgrade, etc.), the steps of fig. 3 are started to be executed. Loading a shielding rule, restoring by using the backup data in fig. 2, then reading a case in the database, namely a second test case, and obtaining a current case result by using a time sequence transmission case, namely a second test result, comparing the current result with a reference result, checking the inconsistency of the comparison result, ignoring the inconsistency of the field of the shielding rule, analyzing the reasons of the other inconsistent fields, and updating the fields which do not need to be compared into the shielding rule if the inconsistency is normal. If there is a new addition, modification or deletion of a case, the update is synchronized to the case library. And (5) ending the regression testing flow.
It should be noted that, the data backup and restore: the data backup is not to backup all data of the system, but to backup the minimum set of data that covers the system test functions. For example, select all data that can cover the posts and roles of the system function set for backup. And the data backup of different personnel is performed on the same post and role. And copying the backed-up data to a backup table, and restoring the corresponding data according to the data of the backup table when restoring. Collecting a return message of the outbound transaction: system coordination is required to output the return result of outbound transaction to the designated log file. The program scans the log file, analyzes all the returned messages, takes the event tracking number and the regression test iteration number as the key value, and stores the messages and related information into the database if the corresponding messages do not exist in the database. And (3) regression testing flow automation: the general cases in the regression test are more, the repeated workload is large, so the process is simplified, and the automation is a necessary choice. How to connect a plurality of flows in the regression test in series, the accuracy of the regression test result is ensured as much as possible, and the efficiency of the regression test is improved.
Data backup and restoration: used in the steps shown in fig. 3. At a certain point, for example, a new round of events is advanced after online, the data related to the system is backed up. The steps shown in fig. 3 are performed in a regression test by restoring the backed up data. The method solves the problems that data is modified, deleted and the like in the function development process. The results of the regression test are made more comparable.
And (3) maintaining a case library: all test cases of the system are stored in a database, and a developer does not need to maintain the system locally. After function development verification, the modification, the addition and the deletion of cases can be related, and the cases are maintained in a database. The stored case list comprises field information such as case message, case description, case reference result, sending time, time sequence, belonging system and the like.
Case timing transmission: because some functions of the system are required in sequence, the case transmission of the regression test needs to ensure the time sequence. And carrying out ascending sort according to the time sequence field of the case table to obtain the execution sequence of the cases.
And (3) batch comparison: the case results obtained during the regression test need to be compared with the reference results in the flow shown in fig. 2. Verifying whether the function corresponding to the case is affected. The comparison adopts XPATH (XML Path Language, extensible markup language path language) to compare the text segments, so if the field positions are inconsistent, the field positions are also judged to be inconsistent.
And (5) shielding rule maintenance. The developer maintains the fields that each case needs to mask through excel. When the regression testing flow is started, the shielding data such as shielding fields in excel are loaded in real time. Ensuring that the updated mask rules can take effect in real time.
In addition, the "analyze reason and solve" step in fig. 3. In the optimal flow, this module is not needed, i.e. no human intervention is needed. However, in the early stage, the masking rule is in the process from zero to perfect, and because of various uncertainty problems, a module is needed, and a developer is needed to analyze and process the situation of inconsistency outside the masking rule. In the method, in the step shown in fig. 2, an outbound transaction log is collected, and an outbound return message is obtained through analysis and is used as an outbound baffle for the round of regression test. The change of the external system is found, and the potential problem caused by the external system is solved.
The invention provides a regression testing method and a regression testing device. After the development of the function correlation function is completed and the verification is passed, a regression test is required for verification. Firstly restoring through backup data, then sending regression test cases in time sequence to obtain case return messages, comparing the results with reference results, filtering differences in shielding rules, analyzing and solving differences outside the shielding rules, and repeating the test flow until the results are consistent in comparison. The method comprises the steps of data backup, reference result, data restoration, time sequence case sending, result comparison, shielding rule maintenance, case library maintenance and the like. By backing up and restoring the data, the problem of inconsistent comparison caused by deleting or modifying the data can be solved. And through collection and configuration of outbound transaction return messages, updating of the iterative regression testing external messages is realized. The whole regression testing scheme realizes flow and automation, releases a large amount of repeated work, improves the accuracy of the test and improves the efficiency of the regression test.
The embodiment of the invention also provides a regression testing device, which is described in the following embodiment. Because the principle of the device for solving the problems is similar to that of the regression testing method, the implementation of the device can be referred to the implementation of the regression testing method, and the repetition is omitted. Referring to fig. 4, there is shown a block diagram of a regression testing apparatus, comprising:
an obtaining module 71, configured to obtain a first test result and a packet returned by the target system; the first test result and the message returned by the target system are obtained by testing the data to be tested by using a first test case stored at the target moment; a reduction module 72 for reducing the data to be tested; the testing module 73 is configured to test the data to be tested according to the second testing case and the message returned by the target system, so as to obtain a second testing result; generating a second test case according to the modified system software data; the second test case comprises the first test case; the result module 74 is configured to generate a regression test result according to the first test result and the second test result.
In one embodiment, referring to another regression testing apparatus block diagram of FIG. 5, the apparatus further includes a data module 75 for: acquiring system parameters, time sequence parameters, a first test case and data to be tested; reading a first test case according to system parameters; according to the time sequence parameters, testing the data to be tested by using a first test case to obtain a first test result; and recording a message returned by the target system acquired in the process of executing the first test case.
In one embodiment, the data module is further configured to: judging whether the data to be tested is backed up successfully or not; if yes, reading a first test case according to the system parameters; if not, the data to be tested is backed up again.
In one embodiment, a results module is used to: judging whether the first test result and the second test result of the same first test case are consistent; if yes, determining that the regression test result is that the test passes; if not, determining that the regression test result is that the test is not passed.
In one embodiment, referring to another regression testing apparatus block diagram of FIG. 5, the apparatus further includes a maintenance module 76 for: updating the first test case according to the second test case.
In one embodiment, referring to another block diagram of a regression testing apparatus shown in FIG. 5, the apparatus further includes an analysis module 77 for: judging whether the difference information of the first test result and the second test result belongs to a preset difference range or not; if yes, generating shielding data according to the difference information, and updating a database according to the shielding data; if not, generating reminding information and sending the reminding information to an alarm module.
The embodiment of the present invention further provides a computer device, referring to a schematic block diagram of a computer device structure shown in fig. 6, where the computer device includes a memory 81, a processor 82, and a computer program stored on the memory and capable of running on the processor, and when the processor executes the computer program, the processor implements the steps of any one of the regression testing methods described above.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the computer device described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
The embodiment of the invention also provides a computer readable storage medium, and the computer readable storage medium stores a computer program for executing any regression testing method.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A regression testing method, comprising:
acquiring a first test result and a message returned by a target system; the first test result and the message returned by the target system are obtained by testing the data to be tested by using a first test case stored at the target moment;
restoring the data to be tested;
testing the data to be tested according to a second test case and a message returned by the target system to obtain a second test result; the second test case is generated according to the modified system software data; the second test case comprises the first test case;
generating a regression test result according to the first test result and the second test result;
generating a regression test result according to the first test result and the second test result, including:
judging whether the first test result of the same first test case is consistent with the second test result of the second test case; if yes, determining that the regression test result is that the test passes;
if not, determining that the regression test result is that the test fails;
after determining that the regression test result is that the test fails, the method further comprises:
judging whether the difference information of the first test result and the second test result belongs to a preset difference range or not;
if yes, generating shielding data according to the difference information, and updating a database according to the shielding data; the shielding data is used for controlling the comparison result of the first test result and the second test result;
if not, generating reminding information and sending the reminding information to an alarm module.
2. The method of claim 1, further comprising, prior to obtaining the first test result and the message returned by the target system:
acquiring system parameters, time sequence parameters, a first test case and data to be tested;
reading the first test case according to the system parameters;
according to the time sequence parameters, testing the data to be tested by using the first test case to obtain a first test result;
and recording a message returned by the target system acquired in the process of executing the first test case.
3. The method of claim 2, further comprising, prior to reading the first test case in accordance with the system parameters:
judging whether the data to be tested is backed up successfully or not;
if yes, reading the first test case according to the system parameters;
if not, the data to be tested is backed up again.
4. The method of claim 1, wherein determining that the regression test result is after the test is passed further comprises:
updating the first test case according to the second test case.
5. A regression testing apparatus, comprising:
the acquisition module is used for acquiring a first test result and a message returned by the target system; the first test result and the message returned by the target system are obtained by testing the data to be tested by using a first test case stored at the target moment;
the reduction module is used for reducing the data to be tested;
the test module is used for testing the data to be tested according to a second test case and a message returned by the target system to obtain a second test result; the second test case is generated according to the modified system software data; the second test case comprises the first test case;
the result module is used for generating a regression test result according to the first test result and the second test result;
the result module is used for:
judging whether the first test result of the same first test case is consistent with the second test result of the second test case;
if yes, determining that the regression test result is that the test passes;
if not, determining that the regression test result is that the test fails;
also included is an analysis module for:
judging whether the difference information of the first test result and the second test result belongs to a preset difference range or not;
if yes, generating shielding data according to the difference information, and updating a database according to the shielding data;
if not, generating reminding information and sending the reminding information to an alarm module.
6. The apparatus of claim 5, further comprising a data module for:
acquiring system parameters, time sequence parameters, a first test case and data to be tested;
reading the first test case according to the system parameters;
according to the time sequence parameters, testing the data to be tested by using the first test case to obtain a first test result;
and recording a message returned by the target system acquired in the process of executing the first test case.
7. The apparatus of claim 6, wherein the data module is further configured to:
judging whether the data to be tested is backed up successfully or not;
if yes, reading the first test case according to the system parameters;
if not, the data to be tested is backed up again.
8. The apparatus of claim 5, further comprising a maintenance module to:
updating the first test case according to the second test case.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the regression testing 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 regression testing method according to any one of claims 1 to 4.
CN202011047457.XA 2020-09-29 2020-09-29 Regression testing method and device Active CN112148614B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011047457.XA CN112148614B (en) 2020-09-29 2020-09-29 Regression testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011047457.XA CN112148614B (en) 2020-09-29 2020-09-29 Regression testing method and device

Publications (2)

Publication Number Publication Date
CN112148614A CN112148614A (en) 2020-12-29
CN112148614B true CN112148614B (en) 2024-04-16

Family

ID=73894982

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011047457.XA Active CN112148614B (en) 2020-09-29 2020-09-29 Regression testing method and device

Country Status (1)

Country Link
CN (1) CN112148614B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112835800A (en) * 2021-02-05 2021-05-25 兴业证券股份有限公司 Log playback method and device
CN112860492B (en) * 2021-03-29 2024-03-26 中信银行股份有限公司 Automatic regression testing method and system suitable for core system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108268373A (en) * 2017-09-21 2018-07-10 平安科技(深圳)有限公司 Automatic test cases management method, device, equipment and storage medium
CN110188036A (en) * 2019-05-10 2019-08-30 深圳前海微众银行股份有限公司 A kind of method for testing software and device
CN111352852A (en) * 2020-04-29 2020-06-30 中国银行股份有限公司 Regression test case selection method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108268373A (en) * 2017-09-21 2018-07-10 平安科技(深圳)有限公司 Automatic test cases management method, device, equipment and storage medium
CN110188036A (en) * 2019-05-10 2019-08-30 深圳前海微众银行股份有限公司 A kind of method for testing software and device
CN111352852A (en) * 2020-04-29 2020-06-30 中国银行股份有限公司 Regression test case selection method and device

Also Published As

Publication number Publication date
CN112148614A (en) 2020-12-29

Similar Documents

Publication Publication Date Title
Macho et al. Automatically repairing dependency-related build breakage
Ampatzoglou et al. The effect of GoF design patterns on stability: a case study
Hammoudi et al. Why do record/replay tests of web applications break?
Mendling Empirical studies in process model verification
JP2010231782A (en) Method and system for function automation
CN112148614B (en) Regression testing method and device
Strandberg et al. Intermittently failing tests in the embedded systems domain
CN115328784A (en) Agile interface-oriented automatic testing method and system
CN114626069A (en) Threat modeling method and device
CN116431476A (en) JVM fuzzy test method based on code context variation
EP3514680B1 (en) Identification of changes in functional behavior and runtime behavior of a system during maintenance cycles
CN113672517A (en) Code checking method and device, electronic equipment and medium
Baker et al. Detect, fix, and verify TensorFlow API misuses
CN117493188A (en) Interface testing method and device, electronic equipment and storage medium
Sjösten-Andersson et al. Costs and benefits of structure-aware capture/replay tools
CN116467219A (en) Test processing method and device
De Jonge et al. Automated evaluation of syntax error recovery
Nakamura et al. Identifying domain-specific defect classes using inspections and change history
CN114490413A (en) Test data preparation method and device, storage medium and electronic equipment
CN110321130B (en) Non-repeatable compiling and positioning method based on system call log
Zhao et al. Automated recommendation of dynamic software update points: an exploratory study
Xie et al. Design and implementation of bank financial business automation testing framework based on QTP
Platonov et al. Development of a methodology for cost optimization of software testing for the automatically tests generation
Vijayasree et al. A Review on the Process of Automated Software Testing
Bicevskis et al. Data quality model-based testing of information systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant