CN112860492B - Automatic regression testing method and system suitable for core system - Google Patents

Automatic regression testing method and system suitable for core system Download PDF

Info

Publication number
CN112860492B
CN112860492B CN202110333949.3A CN202110333949A CN112860492B CN 112860492 B CN112860492 B CN 112860492B CN 202110333949 A CN202110333949 A CN 202110333949A CN 112860492 B CN112860492 B CN 112860492B
Authority
CN
China
Prior art keywords
instruction
database
obtaining
test
unit
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
CN202110333949.3A
Other languages
Chinese (zh)
Other versions
CN112860492A (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.)
China Citic Bank Corp Ltd
Original Assignee
China Citic Bank Corp 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 China Citic Bank Corp Ltd filed Critical China Citic Bank Corp Ltd
Priority to CN202110333949.3A priority Critical patent/CN112860492B/en
Publication of CN112860492A publication Critical patent/CN112860492A/en
Application granted granted Critical
Publication of CN112860492B publication Critical patent/CN112860492B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an automatic regression testing method and system suitable for a core system, wherein the method comprises the following steps: obtaining a first execution instruction; performing rollback operation on the database by adopting a CDM technology according to the first execution instruction; after the rollback is completed, correcting the rollback database, and backing up the corrected database; after the backed-up database is stored in the CDM, a first loading instruction is obtained, after the parameters of the application cluster are reloaded, a first restarting instruction is obtained, after the automatic regression testing system is restarted, a second executing instruction is obtained, and the automatic regression testing is started through the management tool; after the test is finished, a first coverage rate is obtained, a first test daily report is generated, and the first test daily report is stored in a preset catalog. The technical problems of low automatic regression testing efficiency, low reliability, difficult analysis of results and the like are solved.

Description

Automatic regression testing method and system suitable for core system
Technical Field
The invention relates to the technical field of automatic regression testing, in particular to an automatic regression testing method and system suitable for a core system.
Background
Most of the existing automatic regression tests adopt a data, system and environment decoupling mode, namely, corresponding information is independently maintained, then corresponding data, system and environment are selected according to test requirements, and finally, automatic tests are automatically executed.
However, in the process of implementing the technical scheme of the invention in the embodiment of the application, the inventor of the application finds that at least the following technical problems exist in the above technology:
the existing automatic regression test has the technical problems of low test efficiency, low reliability, difficult analysis of test results, increased maintenance cost of the test and the like.
Disclosure of Invention
According to the automatic regression testing method and system suitable for the core system, the technical problems of low automatic regression testing efficiency, low reliability, difficulty in analysis of results and the like are solved, the data maintenance cost is greatly solved, the testing results are easy to analyze, and meanwhile, the technical effect of the reliability of the automatic regression testing is improved.
The embodiment of the application provides an automatic regression testing method suitable for a core system, which is applied to an automatic regression testing system, wherein the system comprises an application cluster, a database, a management tool and an automatic construction tool, and the method comprises the following steps: obtaining a first execution instruction, wherein the first execution instruction is an instruction for starting an automated regression test; performing rollback operation on the database by adopting a CDM technology according to the first execution instruction so that the database meets the execution requirement of the automatic regression test; when the rollback of the database is completed, a first correction instruction is obtained, and after the database after rollback is corrected according to the first correction instruction, a first backup instruction is obtained; according to the first backup instruction, the corrected database is backed up; after the backed-up database is stored in the CDM, a first loading instruction is obtained; according to the first loading instruction, after reloading the parameters of the application cluster, a first restarting instruction is obtained; according to the first restarting instruction, after restarting the automated regression testing system, obtaining a second executing instruction; starting the automated regression testing through the management tool according to the second execution instruction; after the automated regression testing is finished, obtaining a first coverage rate; and generating a first test daily report according to the first coverage rate, and storing the first test daily report in a preset catalog.
In another aspect, the present application also provides an automated regression testing system adapted for use with a core system, wherein the system comprises: a first obtaining unit: the first obtaining unit is used for obtaining a first execution instruction, wherein the first execution instruction is an instruction for starting an automatic regression test; a first rollback unit: the first rollback unit is configured to rollback the database by using a CDM technique according to the first execution instruction, so that the database meets an execution requirement of the automated regression test; a second obtaining unit: the second obtaining unit is used for obtaining a first correction instruction after the rollback of the database is completed, and obtaining a first backup instruction after correcting the database after the rollback according to the first correction instruction; a first backup unit: the first backup unit is used for backing up the corrected database according to the first backup instruction; a first storage unit: the first storage unit is used for obtaining a first loading instruction after storing the backed-up database into the CDM; a first loading unit: the first loading unit is used for obtaining a first restarting instruction after reloading the parameters of the application cluster according to the first loading instruction; a first restarting unit: the first restarting unit is used for restarting the automated regression testing system according to the first restarting instruction and then obtaining a second executing instruction; a first test unit: the first test unit is used for starting to conduct the automated regression test through the management tool according to the second execution instruction; a third obtaining unit: the third obtaining unit is used for obtaining a first coverage rate after the automatic regression test is finished; a first generation unit: the first generation unit is used for generating a first test daily report according to the first coverage rate, and storing the first test daily report in a preset catalog.
One or more technical solutions provided in the embodiments of the present application at least have the following technical effects or advantages:
through the minute-level recovery capability based on the CDM technology, an automatic regression testing method suitable for a bank core system is provided, and through quick rollback, backup and self-adaptive adjustment of a database, the database data of an automatic test can be ensured to be available each time, the influence of the database data on an automatic test result is avoided, so that the problem of the test can be positioned more efficiently, and the availability of the database data is further ensured.
The foregoing description is only an overview of the technical solutions of the present application, and may be implemented according to the content of the specification in order to make the technical means of the present application more clearly understood, and in order to make the above-mentioned and other objects, features and advantages of the present application more clearly understood, the following detailed description of the present application will be given.
Drawings
FIG. 1 is a schematic flow chart of an automated regression testing method for a core system according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an automated regression testing system for a core system according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an exemplary electronic device according to an embodiment of the present application.
Reference numerals illustrate: the device comprises a first obtaining unit 11, a first rollback unit 12, a second obtaining unit 13, a first backup unit 14, a first storage unit 15, a first loading unit 16, a first restarting unit 17, a first testing unit 18, a third obtaining unit 19, a first generating unit 20, a bus 300, a receiver 301, a processor 302, a transmitter 303, a memory 304 and a bus interface 305.
Detailed Description
According to the automatic regression testing method and system suitable for the core system, the technical problems of low automatic regression testing efficiency, low reliability, difficulty in analysis of results and the like are solved, the data maintenance cost is greatly solved, the testing results are easy to analyze, and meanwhile, the technical effect of the reliability of the automatic regression testing is improved.
Hereinafter, example embodiments according to the present application will be described in detail with reference to the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application and not all of the embodiments of the present application, and it should be understood that the present application is not limited by the example embodiments described herein.
Summary of the application
Most of the existing automatic regression tests adopt a data, system and environment decoupling mode, namely, corresponding information is independently maintained, then corresponding data, system and environment are selected according to test requirements, and finally, automatic tests are automatically executed. The existing automatic regression test has the technical problems of low test efficiency, low reliability, difficult analysis of test results, increased maintenance cost of the test and the like.
Aiming at the technical problems, the technical scheme provided by the application has the following overall thought:
the embodiment of the application provides an automatic regression testing method suitable for a core system, which is applied to an automatic regression testing system, wherein the system comprises an application cluster, a database, a management tool and an automatic construction tool, and the method comprises the following steps: obtaining a first execution instruction, wherein the first execution instruction is an instruction for starting an automated regression test; performing rollback operation on the database by adopting a CDM technology according to the first execution instruction so that the database meets the execution requirement of the automatic regression test; when the rollback of the database is completed, a first correction instruction is obtained, and after the database after rollback is corrected according to the first correction instruction, a first backup instruction is obtained; according to the first backup instruction, the corrected database is backed up; after the backed-up database is stored in the CDM, a first loading instruction is obtained; according to the first loading instruction, after reloading the parameters of the application cluster, a first restarting instruction is obtained; according to the first restarting instruction, after restarting the automated regression testing system, obtaining a second executing instruction; starting the automated regression testing through the management tool according to the second execution instruction; after the automated regression testing is finished, obtaining a first coverage rate; and generating a first test daily report according to the first coverage rate, and storing the first test daily report in a preset catalog.
In order to better understand the above technical solutions, the following detailed description will refer to the accompanying drawings and specific embodiments.
Example 1
As shown in fig. 1, an embodiment of the present application provides an automated regression testing method applicable to a core system, where the method further includes:
step S100: obtaining a first execution instruction, wherein the first execution instruction is an instruction for starting an automated regression test;
specifically, before testing the data, a first execution instruction may be obtained, where the first execution instruction is an instruction to start an automated regression test, where the regression test is to re-test after modifying the old code to confirm that the modification does not introduce a new error or cause other code to generate an error. The automatic regression test greatly reduces the cost of the system testing, maintenance and upgrading stages and the like.
Step S200: performing rollback operation on the database by adopting a CDM technology according to the first execution instruction so that the database meets the execution requirement of the automatic regression test;
specifically, CDM (Copy Data Management, replicated data management) technology can separate online data without interrupting service access, and transfer traffic such as query, test, analysis, etc. to non-production systems. The obtained data copy is instantly available, and the separated data is subjected to data recombination, application mode matching and data cleaning to quickly provide data support for the service. CDM can realize flow management, and the complexity of managing the duplicate data is simplified through automatic flow management. The CDM can also improve the data management efficiency, and the real-time performance of the data is improved by combining a log processing technology, so that the data with larger and more diversified capacity can be rapidly processed.
The database, one of the core components of the transaction, and any transaction is finally the addition, deletion and modification of the database, so that the position of the database is determined, and the accuracy and the availability of the database data are the key of the execution success and failure of the automated regression test. The rollback operation is further understood to be that the database needs to be guaranteed to return to a state that can be tested, for example, when a bank transfers 100 money, if the bank transfers 100 money, after the instruction of transferring 100 money is executed for the first time, the database needs to meet the execution requirement of the automated regression test because no money is reported on the account surface during the second execution.
Step S300: when the rollback of the database is completed, a first correction instruction is obtained, and after the database after rollback is corrected according to the first correction instruction, a first backup instruction is obtained;
step S400: according to the first backup instruction, the corrected database is backed up;
specifically, after the rollback operation is completed on the database, a first correction instruction can be obtained, the first correction instruction is to correct the database after rollback, and can be realized by automatically executing an sql script of a preset directory, so as to obtain a first backup instruction, wherein the first backup instruction is to backup the database after correction, and the data can be continuously self-corrected and derived by adopting the technology of CDM (code division multiple access) quick rollback and backup, so that the originally uncontrollable and stateless data can be finally changed into the controllable and stateful data.
Step S500: after the backed-up database is stored in the CDM, a first loading instruction is obtained;
specifically, after the backed-up database is backed up, since the CDM has a storage function, the backed-up database may be stored in the CDM, so as to obtain a first load instruction.
Step S600: according to the first loading instruction, after reloading the parameters of the application cluster, a first restarting instruction is obtained;
specifically, after the database is stored in the CDM, a first load instruction may be obtained, where the first load instruction is to reload parameters of the application cluster, and the application cluster, a service side of a transaction, needs to provide stable and reliable services, also needs to support automatic construction and deployment, ensures automatic update of program codes, and further obtains a first restart instruction.
Step S700: according to the first restarting instruction, after restarting the automated regression testing system, obtaining a second executing instruction;
specifically, after the parameters of the application cluster are reloaded, a first restart instruction is obtained, and the automatic regression testing system is restarted by the first restart instruction, so that convenience is provided for subsequent data testing.
Step S800: starting the automated regression testing through the management tool according to the second execution instruction;
specifically, after restarting the automated regression testing system, a second execution instruction may be obtained, where the second execution instruction is that the automated regression testing is started through the management tool, and the management tool is used as an initiator of an automated regression testing case to support case grouping, serial outside the case, and parallel inside the case, so that the execution sequence of the cases is ensured, and the execution efficiency of the cases is also considered. In addition, after the case is executed, the tool needs to analyze and collect the case execution result and store the result in a specified directory in the form of daily report.
Step S900: after the automated regression testing is finished, obtaining a first coverage rate;
step S1000: and generating a first test daily report according to the first coverage rate, and storing the first test daily report in a preset catalog.
Specifically, after the automatic regression test is finished, a first coverage rate, namely the coverage rate, is a measure for measuring the test integrity, is a measure for testing effectiveness, is expressed by an executed code and is used for evaluating reliability, stability and performance, and further generates a first test daily report according to the first coverage rate, wherein the first test daily report is recorded in the form of daily report of each test result, the first test daily report is stored in a preset catalog, the preset catalog is generated for the catalog of preset test items, and the first test daily report is stored in the preset catalog so as to facilitate the arrangement and analysis of the data test daily report.
Further, the embodiment of the application further comprises:
step S1110: after the database rollback is completed, first data information is obtained, wherein the first data information is initial data;
step S1120: when the returned database is corrected, second data information is obtained, wherein the second data information is data used for executing a test after the first data information is corrected;
step S1130: obtaining a first preset time and a first calling instruction;
step S1140: and according to the first calling instruction, after a first script on the management tool is called according to the first preset time, executing the automatic test according to the second data information.
Specifically, in order to perform an automatic test on data more specifically, after the database is rolled back, first data information is obtained, the first data information is initial data, the initial data refers to an original data state after the database is initialized, further after the database is corrected after the rolling back, second data information is obtained, the second data information is data for performing the test after the first data information is corrected, namely data before the automatic regression test is performed, the data state after the data correction is performed on the basis of the initial data, a first preset time and a first calling instruction are obtained at the same time, according to the first calling instruction, after a first script on the management tool is called according to the first preset time, the automatic test is performed according to the second data information, further the automatic test is understood as a script on a timing calling test case management tool server, and the automatic test is performed after the correction of the data, so that the technical effect of ensuring the execution sequence of cases is achieved.
Further, the embodiment of the application further comprises:
step S1160: when the automatic test is completed, obtaining third data information, wherein the third data information is data after the automatic test is completed;
step S1170: obtaining a first sending instruction;
step S1180: and sending the third data information to a first developer according to the first sending instruction, so that the first developer can conduct case analysis and debugging by using the third data information.
Specifically, after the automatic test is finished, third data information can be obtained, the third data information is data after the automatic test is finished, the data after execution represents a data state after the automatic regression test is finished, the data can be used for case analysis and debugging of a developer, meanwhile, a first sending instruction is obtained, the first sending instruction is used for sending the third data information to a first developer, so that the first developer can utilize the third data information to perform case analysis and debugging, and the defect of an application code can be exposed as early as possible through the automatic test, so that the technical effect of avoiding serious influence on a core system caused by online error codes is achieved.
Further, the embodiment of the application further comprises:
step S1131: after the corrected database is backed up, first backup data information is obtained, wherein the first backup data information is a copy of the second data information;
step S1132: obtaining the current time;
step S1133: obtaining a third execution instruction and a second time, wherein the second time is a time subsequent to the current time;
step S1134: and according to the third execution instruction, taking the first backup data information as initial data information of the second time.
Specifically, in order to update the database by backup, after the database is backed up after the database is modified, first backup data information is a copy of the second data information, the backup data is a copy of data before execution, the backup data is used for data recovery, the backup data on the T day is used as initial data on the t+1 day, and meanwhile, the current time is understood as the T day, and a third execution instruction and a second time are also obtained, wherein the second time is the time after the current time, that is, the t+1 day, and the third execution instruction is that the first backup data information is used as initial data information of the second time, so that the technical effects of continuously self-modifying and derivatizing the data are achieved.
Further, after the automatic regression test is finished and the first coverage is obtained, step S900 further includes:
step S910: obtaining a preset coverage rate threshold;
step S920: judging whether the first coverage rate meets the first preset coverage rate threshold value or not;
step S930: and if the first preset coverage rate threshold is not met, a first marking instruction is obtained, wherein the first marking instruction is used for marking the first test daily report.
Specifically, after the automatic regression test is finished, a first coverage rate threshold value is obtained, the first coverage rate threshold value is a coverage rate interval value of test integrity of a preset standard, whether the first coverage rate meets the first preset coverage rate threshold value or not is judged, namely whether the first coverage rate is within the first preset coverage rate threshold value or not, and when the first preset coverage rate threshold value is not met, a first marking instruction is obtained, wherein the first marking instruction is used for marking the first test daily report, for example, the test daily report which does not meet the preset coverage rate threshold value is marked red, so that the test daily report is clearly visible, and the technical effect of avoiding serious influence of error code online on a core system is achieved.
Further, the embodiment of the application further comprises:
step S940: if the first coverage rate meets the first preset coverage rate threshold value, a second sending instruction is obtained;
step S950: and according to the second sending instruction, sending the first test daily report to the first developer.
Specifically, when judging whether the first coverage rate meets the first preset coverage rate threshold, if the first coverage rate meets the first preset coverage rate threshold, that is, the first coverage rate is within a coverage rate interval value of a preset standard test integrity, a second sending instruction can be obtained, and the second sending instruction is to send the first test daily report to the first developer, so that the technical effect of facilitating the first developer to carry out subsequent operation test of the core system according to the test daily report is achieved.
Further, the embodiment of the application further comprises:
step S1210: obtaining a first extraction instruction;
step S1220: acquiring a fourth execution instruction after acquiring the sql script from the preset catalog according to the first extraction instruction;
step S1230: and automatically executing the sql script according to the fourth execution instruction.
Specifically, after the first test daily report is stored in a preset catalog, a first extraction instruction can be obtained, wherein the first extraction instruction is to obtain an sql script from the preset catalog, namely, obtain a correction script added by a development staff from a specified catalog, and automatically execute the sql script, wherein the sql script has a file suffix of sql, some added and deleted sql sentences are stored inside, the sql sentences are sql sentences containing one or more sql commands, the sql sentences are a language for operating a database, and the technical effect of self-adapting the database is achieved by executing the sql script obtained from the preset catalog.
In summary, the method and system for automated regression testing applicable to a core system provided by the embodiments of the present application have the following technical effects:
1. through the minute-level recovery capability based on the CDM technology, an automatic regression testing method suitable for a bank core system is provided, and through quick rollback, backup and self-adaptive adjustment of a database, the database data of an automatic test can be ensured to be available each time, the influence of the database data on an automatic test result is avoided, so that the problem of the test can be positioned more efficiently, and the availability of the database data is further ensured.
2. By executing the processes of automatic test, data recovery, execution of sql script, backup update and the like, the data is continuously self-corrected and derived, and finally the originally uncontrollable and stateless data is changed into controllable and stateful data, and meanwhile, the defect of an application code can be exposed as early as possible, thereby avoiding serious influence on a core system caused by the online of an error code.
Example two
Based on the same inventive concept as the automated regression testing method applied to the core system in the foregoing embodiment, the present invention further provides an automated regression testing system applied to the core system, as shown in fig. 2, the system includes:
the first obtaining unit 11: the first obtaining unit 11 is configured to obtain a first execution instruction, where the first execution instruction is an instruction for starting an automated regression test;
the first rollback unit 12: the first rollback unit 12 is configured to rollback the database by using CDM technology according to the first execution instruction, so that the database meets the execution requirement of the automated regression test;
the second obtaining unit 13: the second obtaining unit is used for obtaining a first correction instruction after the rollback of the database is completed, and obtaining a first backup instruction after correcting the database after the rollback according to the first correction instruction;
the first backup unit 14: the first backup unit 14 is configured to backup the database after correction according to the first backup instruction;
the first storage unit 15: the first storage unit 15 is configured to obtain a first load instruction after storing the backed up database in the CDM;
the first loading unit 16: the first loading unit 16 is configured to obtain a first restart instruction after reloading the parameters of the application cluster according to the first loading instruction;
the first restart unit 17: the first restarting unit 17 is configured to obtain a second execution instruction after restarting the automated regression testing system according to the first restarting instruction;
the first test unit 18: the first test unit 18 is configured to start the automated regression test through the management tool according to the second execution instruction;
third obtaining unit 19: the third obtaining unit 19 is configured to obtain a first coverage rate after the automated regression test is completed;
the first generation unit 20: the first generating unit 20 is configured to generate a first test daily according to the first coverage rate, and store the first test daily in a preset directory.
Further, the system further comprises:
fourth obtaining unit: the fourth obtaining unit is configured to obtain first data information after the database rollback is completed, where the first data information is initial data;
fifth obtaining unit: the fifth obtaining unit is configured to obtain second data information after the database after rollback is modified, where the second data information is data for performing a test after the first data information is modified;
sixth obtaining unit: the sixth obtaining unit is used for obtaining a first preset time and a first calling instruction;
a first calling unit: and the first calling unit is used for executing the automatic test after calling a first script on the management tool according to the first preset time according to the first calling instruction.
Further, the system further comprises:
seventh obtaining unit: the seventh obtaining unit is configured to obtain third data information after the automated test is completed, where the third data information is data after the automated test is completed;
eighth obtaining unit: the eighth obtaining unit is used for obtaining a first sending instruction;
a first transmitting unit: the first sending unit is used for sending the third data information to a first developer according to the first sending instruction, so that the first developer can conduct case analysis and debugging by using the third data information.
Further, the system further comprises:
a ninth obtaining unit: the ninth obtaining unit is configured to obtain first backup data information after the corrected database is backed up, where the first backup data information is a copy of the second data information;
tenth obtaining unit: the tenth obtaining unit is used for obtaining the current time;
eleventh obtaining unit: the eleventh obtaining unit is configured to obtain a third execution instruction and a second time, where the second time is a time subsequent to the current time;
a twelfth obtaining unit: the twelfth obtaining unit is configured to use the first backup data information as initial data information of the second time according to the third execution instruction.
Further, the system further comprises:
thirteenth obtaining unit: the thirteenth obtaining unit is used for obtaining a preset coverage rate threshold value;
a first judgment unit: the first judging unit is used for judging whether the first coverage rate meets the first preset coverage rate threshold value or not;
fourteenth obtaining unit: the fourteenth obtaining unit is configured to obtain a first marking instruction if the first preset coverage rate threshold is not met, where the first marking instruction is used to mark the first test daily report.
Further, the system further comprises:
fifteenth obtaining unit: the fifteenth obtaining unit is configured to obtain a second sending instruction if the first coverage rate meets the first preset coverage rate threshold;
the second sending unit is used for sending the first test daily report to the first developer according to the second sending instruction.
Further, the system further comprises:
sixteenth obtaining unit: the sixteenth obtaining unit is configured to obtain a first fetch instruction;
seventeenth obtaining unit: the seventeenth obtaining unit is configured to obtain a fourth execution instruction after obtaining, according to the first extraction instruction, the sql script from the preset directory;
a first execution unit: the first execution unit is used for automatically executing the sql script according to the fourth execution instruction.
The foregoing various modifications and specific examples of an automatic regression testing method for a core system in the first embodiment of fig. 1 are applicable to an automatic regression testing system for a core system in this embodiment, and those skilled in the art will clearly understand the detailed description of an automatic regression testing method for a core system in this embodiment, so that the detailed description will not be repeated for brevity of the description.
Example III
An electronic device of an embodiment of the present application is described below with reference to fig. 3.
Fig. 3 illustrates a schematic structural diagram of an electronic device according to an embodiment of the present application.
Based on the inventive concept of an automated regression testing method for a core system as in the previous embodiments, the present invention also provides an automated regression testing system for a core system, on which a computer program is stored which, when executed by a processor, implements the steps of any one of the methods described above as an automated regression testing method for a core system.
Where in FIG. 3 a bus architecture (represented by bus 300), bus 300 may comprise any number of interconnected buses and bridges, with bus 300 linking together various circuits, including one or more processors, represented by processor 302, and memory, represented by memory 304. Bus 300 may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., as are well known in the art and, therefore, will not be described further herein. Bus interface 305 provides an interface between bus 300 and receiver 301 and transmitter 303. The receiver 301 and the transmitter 303 may be the same element, i.e. a transceiver, providing a means for communicating with various other apparatus over a transmission medium. The processor 302 is responsible for managing the bus 300 and general processing, while the memory 304 may be used to store data used by the processor 302 in performing operations.
The embodiment of the application provides an automatic regression testing method suitable for a core system, which is applied to an automatic regression testing system, wherein the system comprises an application cluster, a database, a management tool and an automatic construction tool, and the method comprises the following steps: obtaining a first execution instruction, wherein the first execution instruction is an instruction for starting an automated regression test; performing rollback operation on the database by adopting a CDM technology according to the first execution instruction so that the database meets the execution requirement of the automatic regression test; when the rollback of the database is completed, a first correction instruction is obtained, and after the database after rollback is corrected according to the first correction instruction, a first backup instruction is obtained; according to the first backup instruction, the corrected database is backed up; after the backed-up database is stored in the CDM, a first loading instruction is obtained; according to the first loading instruction, after reloading the parameters of the application cluster, a first restarting instruction is obtained; according to the first restarting instruction, after restarting the automated regression testing system, obtaining a second executing instruction; starting the automated regression testing through the management tool according to the second execution instruction; after the automated regression testing is finished, obtaining a first coverage rate; and generating a first test daily report according to the first coverage rate, and storing the first test daily report in a preset catalog.
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.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (9)

1. An automated regression testing method applicable to a core system, which is applied to an automated regression testing system, wherein the system comprises an application cluster, a database, a management tool and an automated construction tool, and the method comprises the following steps:
obtaining a first execution instruction, wherein the first execution instruction is an instruction for starting an automated regression test;
performing rollback operation on the database by adopting a CDM technology according to the first execution instruction so that the database meets the execution requirement of the automatic regression test;
when the rollback of the database is completed, a first correction instruction is obtained, and after the database after rollback is corrected according to the first correction instruction, a first backup instruction is obtained;
according to the first backup instruction, the corrected database is backed up;
after the backed-up database is stored in the CDM, a first loading instruction is obtained;
according to the first loading instruction, after reloading the parameters of the application cluster, a first restarting instruction is obtained;
according to the first restarting instruction, after restarting the automated regression testing system, obtaining a second executing instruction;
starting the automated regression testing through the management tool according to the second execution instruction;
after the automated regression testing is finished, obtaining a first coverage rate;
and generating a first test daily report according to the first coverage rate, and storing the first test daily report in a preset catalog.
2. The method of claim 1, wherein the method further comprises:
after the database rollback is completed, first data information is obtained, wherein the first data information is initial data;
when the returned database is corrected, second data information is obtained, wherein the second data information is data used for executing a test after the first data information is corrected;
obtaining a first preset time and a first calling instruction;
and according to the first calling instruction, after a first script on the management tool is called according to the first preset time, executing the automatic regression test according to the second data information.
3. The method of claim 2, wherein the method further comprises:
when the automated regression test is completed, third data information is obtained, wherein the third data information is the data after the automated regression test is completed;
obtaining a first sending instruction;
and sending the third data information to a first developer according to the first sending instruction, so that the first developer can conduct case analysis and debugging by using the third data information.
4. The method of claim 2, wherein the method further comprises:
after the corrected database is backed up, first backup data information is obtained, wherein the first backup data information is a copy of the second data information;
obtaining the current time;
obtaining a third execution instruction and a second time, wherein the second time is a time subsequent to the current time;
and according to the third execution instruction, taking the first backup data information as initial data information of the second time.
5. The method of claim 3, wherein after obtaining the first coverage after the automated regression test is complete, the method further comprises:
obtaining a first preset coverage rate threshold;
judging whether the first coverage rate meets the first preset coverage rate threshold value or not;
and if the first preset coverage rate threshold is not met, a first marking instruction is obtained, wherein the first marking instruction is used for marking the first test daily report.
6. The method of claim 5, wherein the method further comprises:
if the first coverage rate meets the first preset coverage rate threshold value, a second sending instruction is obtained;
and according to the second sending instruction, sending the first test daily report to the first developer.
7. The method of claim 1, wherein the method further comprises:
obtaining a first extraction instruction;
acquiring a fourth execution instruction after acquiring the sql script from the preset catalog according to the first extraction instruction;
and automatically executing the sql script according to the fourth execution instruction.
8. An automated regression testing system adapted for use with a core system, the system comprising an application cluster, a database, a management tool, and an automated build tool, wherein the system comprises:
a first obtaining unit: the first obtaining unit is used for obtaining a first execution instruction, wherein the first execution instruction is an instruction for starting an automatic regression test;
a first rollback unit: the first rollback unit is configured to rollback the database by using a CDM technique according to the first execution instruction, so that the database meets an execution requirement of the automated regression test;
a second obtaining unit: the second obtaining unit is used for obtaining a first correction instruction after the rollback of the database is completed, and obtaining a first backup instruction after correcting the database after the rollback according to the first correction instruction;
a first backup unit: the first backup unit is used for backing up the corrected database according to the first backup instruction;
a first storage unit: the first storage unit is used for obtaining a first loading instruction after storing the backed-up database into the CDM;
a first loading unit: the first loading unit is used for obtaining a first restarting instruction after reloading the parameters of the application cluster according to the first loading instruction;
a first restarting unit: the first restarting unit is used for restarting the automated regression testing system according to the first restarting instruction and then obtaining a second executing instruction;
a first test unit: the first test unit is used for starting to conduct the automated regression test through the management tool according to the second execution instruction;
a third obtaining unit: the third obtaining unit is used for obtaining a first coverage rate after the automatic regression test is finished;
a first generation unit: the first generation unit is used for generating a first test daily report according to the first coverage rate, and storing the first test daily report in a preset catalog.
9. An automated regression testing system adapted for use in a core system comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1-7 when the program is executed by the processor.
CN202110333949.3A 2021-03-29 2021-03-29 Automatic regression testing method and system suitable for core system Active CN112860492B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110333949.3A CN112860492B (en) 2021-03-29 2021-03-29 Automatic regression testing method and system suitable for core system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110333949.3A CN112860492B (en) 2021-03-29 2021-03-29 Automatic regression testing method and system suitable for core system

Publications (2)

Publication Number Publication Date
CN112860492A CN112860492A (en) 2021-05-28
CN112860492B true CN112860492B (en) 2024-03-26

Family

ID=75993107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110333949.3A Active CN112860492B (en) 2021-03-29 2021-03-29 Automatic regression testing method and system suitable for core system

Country Status (1)

Country Link
CN (1) CN112860492B (en)

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
CN108388511A (en) * 2018-02-12 2018-08-10 安徽千云度信息技术有限公司 A kind of integration test method for component-based software
CN112148614A (en) * 2020-09-29 2020-12-29 中国银行股份有限公司 Regression testing 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
CN108388511A (en) * 2018-02-12 2018-08-10 安徽千云度信息技术有限公司 A kind of integration test method for component-based software
CN112148614A (en) * 2020-09-29 2020-12-29 中国银行股份有限公司 Regression testing method and device

Also Published As

Publication number Publication date
CN112860492A (en) 2021-05-28

Similar Documents

Publication Publication Date Title
US8239854B2 (en) Bookmark and configuration file for installation sequence
US20080163003A1 (en) Method and System for Autonomic Target Testing
CN104252481A (en) Dynamic check method and device for consistency of main and salve databases
CN107193607B (en) Method and apparatus for updating code file, storage medium, processor, and terminal
US10990514B2 (en) Detecting problematic code changes
US11573780B2 (en) Automated generation of status chains for software updates
CN110990289B (en) Method and device for automatically submitting bug, electronic equipment and storage medium
CN112685312A (en) Test case recommendation method and device for uncovered codes
CN112100070A (en) Version defect detection method and device, server and storage medium
CN108241543B (en) Method, service server and system for executing service operation breakpoint
CN111198920B (en) Method and device for determining comparison table snapshot based on database synchronization
CN107992420B (en) Management method and system for test item
CN112860492B (en) Automatic regression testing method and system suitable for core system
CN108804239B (en) Platform integration method and device, computer equipment and storage medium
US11782800B2 (en) Methods to automatically correct and improve system recovery and replication processes
CN115373929A (en) Test method, device, equipment, readable storage medium and program product
CN109240906B (en) Database configuration information adaptation method and device, computer equipment and storage medium
CN109919674B (en) Advertisement settlement method, device and equipment
CA2420008C (en) Panic message analyzer
CN111209197A (en) Application program continuous integration test method, system, equipment and storage medium
US10437710B2 (en) Code coverage testing utilizing test-to-file maps
CN114595159B (en) Test data generation method, device, equipment and storage medium
CN115587048A (en) Regression testing method, terminal device and computer readable storage medium
CN112346994B (en) Test information association method, device, computer equipment and storage medium
WO2023058611A1 (en) Software failure analysis apparatus and software failure analysis method

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