CN116150029A - Automatic overdue batch testing method and device for loan system - Google Patents

Automatic overdue batch testing method and device for loan system Download PDF

Info

Publication number
CN116150029A
CN116150029A CN202310218824.5A CN202310218824A CN116150029A CN 116150029 A CN116150029 A CN 116150029A CN 202310218824 A CN202310218824 A CN 202310218824A CN 116150029 A CN116150029 A CN 116150029A
Authority
CN
China
Prior art keywords
batch
overdue
running
test
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310218824.5A
Other languages
Chinese (zh)
Inventor
李长旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
ICBC Technology Co Ltd
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
ICBC Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC, ICBC Technology Co Ltd filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310218824.5A priority Critical patent/CN116150029A/en
Publication of CN116150029A publication Critical patent/CN116150029A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The application provides a loan system overdue running batch automatic test method and device, relates to the field of software testing, can also be used in the financial field, and comprises the following steps: generating an automatic test case of overdue running lot based on the original loan business data; executing the automatic test case by calling a session control interface at a preset time point; if the fault occurs in the execution process, fault recovery processing is carried out to complete the overdue batch running automatic test of the loan system. The method and the device can automatically generate and maintain the test cases, automatically execute the overdue batch running test of the loan system and complete fault processing.

Description

Automatic overdue batch testing method and device for loan system
Technical Field
The application relates to the field of software testing, and can be used in the financial field, in particular to a method and a device for automatically testing overdue running of a loan system.
Background
With the rapid development of credit services, the business complexity of credit systems is also increasing. Credit systems typically involve a loan overdue run function, and testing for the loan overdue run function is typically performed by means of manual testing. Because the data flow to be measured of the early-stage business of the loan overdue batch running function is long, the internal logic is complex, and the testing process is time-consuming and labor-consuming, the efficiency of completing the testing flow by a manual testing method is low, and errors are easy to occur.
Considering that the overdue batch calculation rules are different based on various different loan product interest rates, overdue days and overdue penalties, when a product combination scene exists in the loan, the complexity of the overdue batch calculation rules is increased more times, and the final calculation result data and the data in the calculation process are verified in the overdue batch test process. Thus, the difficulty of overdue run tests is greatly increased. At present, no method for reasonably improving the overdue batch test efficiency and reducing the error rate exists.
Disclosure of Invention
Aiming at the problems in the prior art, the application provides an automatic testing method and device for overdue batch running of a loan system, which can automatically generate and maintain test cases, automatically execute the overdue batch running test of the loan system and complete fault processing.
In order to solve the technical problems, the application provides the following technical scheme:
in a first aspect, the present application provides a method for automated testing of overdue runs of a loan system, comprising:
generating an automatic test case of the overdue running batch test based on the original loan business data;
executing the automatic test case by calling a session control interface at a preset time point;
If the fault occurs in the execution process, fault recovery processing is carried out to complete the overdue batch running automatic test of the loan system.
Further, the automatic test case for generating the overdue running batch test based on the original loan business data comprises:
acquiring a test business rule calculation model according to the test business category corresponding to the original loan business data;
and generating an automatic test case corresponding to the original loan business data by using the test business rule calculation model.
Further, at a preset time point, executing the automated test case by calling a session control interface, including:
invoking a predefined batch generation interface through the session control interface, and generating batch running task batches corresponding to the time points through the batch generation interface;
invoking a predefined running batch task executing interface through the session control interface, and executing a running batch task according to the running batch task batch through the running batch task executing interface; the batch running task is used for executing the automatic test case.
Further, the fault recovery processing includes:
accessing a log library and pulling a log file corresponding to the fault;
Identifying the log file and acquiring a key error code corresponding to the fault;
and calling a fault recovery model according to the key error code, and executing rule correction operation according to the fault recovery model.
Further, the automated testing of overdue batch of loan system further comprises:
calling an acquisition batch result interface through the session control interface to acquire a batch running task execution result through the acquisition batch result interface; the running batch task execution result is a correct running batch task execution result;
and returning the correct running batch task execution result to the client.
Further, after calling a predefined running batch task executing interface through the session control interface and executing the running batch task according to the running batch task batch through the running batch task executing interface, the method further comprises:
calling an execution result query interface of the running batch task through the session control interface, and monitoring an execution day batch result of the running batch task through the execution result query interface of the running batch task;
if the daily batch result returns successfully, judging whether the cycle days exist or not;
and if no cycle days exist, ending the batch of tasks and sending a test result.
In a second aspect, the present application provides an automated testing apparatus for overdue runs of a loan system, comprising:
the test case generation unit is used for generating an automatic test case of the overdue running batch test based on the original loan business data;
the test case execution unit is used for executing the automatic test case by calling a session control interface at a preset time point;
and the fault recovery processing unit is used for carrying out fault recovery processing if faults occur in the execution process so as to finish the overdue batch running automatic test of the loan system.
Further, the test case generating unit includes:
the calculation model determining module is used for obtaining a test business rule calculation model according to the test business category corresponding to the original loan business data;
and the test case generation module is used for generating an automatic test case corresponding to the original loan service data by utilizing the test service rule calculation model.
Further, the test case execution unit includes:
the task batch generation module is used for calling a predefined batch generation interface through the session control interface and generating batch running task batches corresponding to the time points through the batch generation interface;
The task batch execution module is used for calling a predefined execution batch task interface through the session control interface and executing batch tasks according to the batch task batch through the execution batch task interface; the batch running task is used for executing the automatic test case.
Further, the fault recovery processing unit includes:
the fault log pulling module is used for accessing the log library and pulling a log file corresponding to the fault;
the error code acquisition module is used for identifying the log file and acquiring the key error code corresponding to the fault;
and the correction operation module is used for calling a fault recovery model according to the key error code and executing rule correction operation according to the fault recovery model.
Further, the automated testing device for overdue batch of loan system further comprises:
the execution result acquisition unit is used for calling an acquisition batch result interface through the session control interface so as to acquire the execution result of the batch running task through the acquisition batch result interface; the running batch task execution result is a correct running batch task execution result;
and the execution result feedback unit is used for returning the correct running batch task execution result to the client.
Further, the automated testing device for overdue batch of loan system further comprises:
the daily batch result acquisition unit is used for calling an execution result query interface of the batch running task through the session control interface and monitoring the execution daily batch result of the batch running task through the execution result query interface of the batch running task;
the cycle number checking unit is used for judging whether cycle number exists or not if the daily batch result returns successfully;
and the test feedback unit is used for ending the batch of tasks and sending test results if no cycle days exist.
In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the loan system overdue run batch automatic test method when executing the program.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the loan system overdue run batch automatic test method.
In a fifth aspect, the present application provides a computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the loan system overdue run batch automatic test method.
Aiming at the problems in the prior art, the automatic test method and the device for overdue batch running of the loan system can automatically deploy test cases, execute unified operation and maintenance, automatically execute batch running tasks in a keyword-driven mode, reduce the organization difficulty, enlarge the applicable personnel range, automatically generate the test cases and automatically maintain the test cases, greatly reduce the personnel cost, ensure the stability of overdue batch running scene test execution of the credit system with high complexity by combining a plurality of technologies such as Jenkins, httpclient, webdrier and the like, greatly improve the test efficiency, and are a set of highly universal and flexible test method and device.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an automated testing method for overdue run of a loan system, in accordance with an embodiment of the present application;
FIG. 2 is a flow chart of generating an automated test case in an embodiment of the present application;
FIG. 3 is a flow chart of an example of performing automated testing in an embodiment of the present application;
FIG. 4 is a flowchart of a fault recovery process in an embodiment of the present application;
FIG. 5 is a second flowchart of an automated testing method for overdue batch of loan system, in accordance with an embodiment of the present application;
FIG. 6 is a third flowchart of an automated testing method for overdue run of a loan system, in accordance with an embodiment of the present application;
FIG. 7 is a block diagram of an automated testing apparatus for overdue batch of loan systems, in accordance with an embodiment of the present application;
FIG. 8 is a block diagram of a test case generating unit in an embodiment of the present application;
FIG. 9 is a block diagram of a test case execution unit in an embodiment of the present application;
FIG. 10 is a block diagram of a fault recovery processing unit in an embodiment of the present application;
FIG. 11 is a second block diagram of an automated testing apparatus for overdue batch of loan systems, in accordance with one embodiment of the present application;
FIG. 12 is a third block diagram of an automated testing apparatus for overdue batch of loan systems, in accordance with one embodiment of the present application;
fig. 13 is a schematic structural diagram of an electronic device in an embodiment of the present application;
FIG. 14 is a schematic diagram of the logic structure of an automated testing device for overdue run of a loan system, in accordance with an embodiment of the disclosure;
FIG. 15 is a schematic diagram of an interface call relationship in an embodiment of the present application;
FIG. 16 is a schematic diagram of a fault handling flow in an embodiment of the present application;
FIG. 17 is a schematic diagram of screening test cases according to an embodiment of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It should be noted that the automatic testing method and device for overdue running batch of loan system provided by the application can be used in the financial field and any field except the financial field, and the application field of the automatic testing method and device for overdue running batch of loan system provided by the application is not limited.
The data acquisition, storage, use, processing and the like in the technical scheme meet the relevant regulations of national laws and regulations.
In order to solve the problems of long testing time, complex process, high error rate and the like of the existing overdue batch function of the loan, the invention provides a unified and highly-automatic testing method, and the automatic generation and maintenance of the testing cases and the automatic correction of system anomalies and the automatic execution of testing operations are realized by a continuous integration and continuous deployment mode, so that the testing efficiency and the deployment efficiency are improved, and the error rate is reduced.
In one embodiment, referring to fig. 1, in order to automatically generate and maintain a test case, automatically execute a overdue batch test of a loan system and complete fault handling, the present application provides a method for automatically testing overdue batch of a loan system, comprising:
s101: generating an automatic test case of the overdue running batch test based on the original loan business data;
s102: executing the automatic test case by calling a session control interface at a preset time point; in this embodiment of the present application, the Session control interface may be a Session interface;
s103: if the fault occurs in the execution process, fault recovery processing is carried out to complete the overdue batch running automatic test of the loan system.
The invention combines Jenkins, httpclient, webdrier and other technologies, realizes the automatic processing of test data and the automatic execution of test cases, realizes the automatic deployment and unified operation and maintenance of the test process, automatically executes batch running tasks in a keyword-driven mode, reduces the difficulty of test organization, expands the range of applicable personnel, greatly reduces the cost of the test personnel by automatically generating the test cases and automatically maintaining the test cases, ensures the stability of overdue batch running scene test execution of a credit system with high complexity, greatly improves the test efficiency, and is a set of highly universal and flexible test method.
Referring to fig. 14, 15 and 16, in the embodiment of the present application, first, test cases are generated, and the generated test cases are screened according to preset rules. Then, the test cases are automatically executed by the timing tasks. Specifically, a httpclient drives a credit system login interface to obtain a Session, the Session is provided for a batch task generation interface and a batch execution interface, and a batch system is triggered to generate batch processing tasks through the batch interface; and monitoring the result of the execution day batch through a batch running task execution result query interface. And finally, when the automatic test fails, performing fault processing and completing the automatic test.
As can be seen from the above description, the automatic testing method for overdue running batch of the loan system provided by the application can automatically deploy test cases, execute unified operation and maintenance, automatically execute running batch tasks in a keyword-driven manner, reduce organization difficulty, enlarge applicable personnel range, automatically generate the test cases and automatically maintain the test cases, greatly reduce personnel cost, and ensure the stability of overdue running batch scene test execution of the credit system with high complexity by combining with a plurality of technologies such as Jenkins, httpclient, webdrier, thereby greatly improving testing efficiency.
Steps S101 to S103 are described in detail below.
Step S101: and generating an automatic test case of the overdue running batch test based on the original loan business data.
In this step, the execution body of the embodiment of the present application determines a test business rule calculation model based on the original loan business data, and invokes the test business rule calculation model from the database, and then generates an automated test case corresponding to the original loan business data by using the test business rule calculation model.
FIG. 2 is a diagram of one embodiment of the present application for automated testing of overdue runs of a loan system.
Referring to fig. 2, step S101: the automatic test case for generating the overdue running batch test based on the original loan business data comprises the following steps: acquiring a test business rule calculation model according to the test business category corresponding to the original loan business data (S201); and generating an automatic test case corresponding to the original loan business data by using the test business rule calculation model (S202). The step S202 is executed, and specifically includes: inquiring a test case generation strategy in the test business rule calculation model; traversing a full-volume data table corresponding to the original loan service data to obtain a pre-generated test case; and screening the pre-generated test cases according to the test case generation strategy to obtain the corresponding automatic test cases.
When the method is implemented, firstly, an interface method of a use case operation model (also called a test service rule calculation model) calls an original data preprocessing function so as to ensure that each application of a tested system can be normally started, and a test result is not influenced by dirty data. The preprocessing implementation of the original data comprises the following steps: firstly, executing a preset shell file, and checking whether each application state is normal; if not, executing the shell stopping operation. Secondly, executing a preset sql script, and screening whether abnormal data exist; if so, then a directed clear sql script is executed.
Second, different raw loan business data may correspond to different test business categories, and thus to different test business rule calculation models (also referred to as business rule calculation models). Therefore, it is necessary to acquire a test business rule calculation model according to the test business category corresponding to the original loan business data.
The management of the test cases comprises a method for generating and maintaining the full-service-scope coverage cases. The method can read the case C in the case library to load related service parameters, match a service model, show differences according to service rules (such as whether preferential or no penalty exists according to personal credit, and the like), and test cases can be combined under various conditions.
It should be noted that, in the cases of C1 to C16, C belongs to the reuse case identically to C1, and according to the principle that there is no preference when a blacklist is hit in the service model, C1 is an invalid case, and C1, C4, C5, C7, and C8 are removed from the case table, thereby realizing automatic generation of a full use case, and automatically removing the non-valid case according to the service, and greatly saving the manual test cost.
Specifically, the use case table queries out all field data of the use case C according to the id: product type, personal credit, product interest rate, overdue days, offers, blacklist, whitelist, overdue penalty corresponding field names v_ptype, v_credit, v_prate, v_orate, v_odate, v_discount, v_bla, v_ whi. According to and default rule 1: the product type, personal credit, product interest rate and overdue interest rate are required items, whether the V_ODate, V_discrete, V_bla and V_ whi 4 items input data or not, 16 cases are generated according to a combination number formula C (2, 1) x C (2, 1) =16 and are inserted into a case table, and the purpose of generating the full test scene coverage cases is achieved.
Next, a "business rule calculation model" is invoked and corresponding product-related customized business rules are queried according to the product type.
Examples: business rule record product P1 business customization rule
Rule 2: overdue days, offers, blacklists, whitelists, overdue penalties are optional items
Rule 3: blacklist and preferential exclusion if (v_bla=y) then v_discover not equal to Y
Then, if the field data completely accords with the data in the traversing use case table, the data is sequentially executed according to the rule 2 traversing use case table data accords with the rule, the data of the relevant use case is sequentially executed according to the rule 3 traversing encountering C4, C5, C6 and C7 in the following table, if other rules continue to sequentially execute traversing until the data is finished, thereby realizing automatic generation of the full use case and automatic removal of the non-valid use case according to the complex business rule, and referring to FIG. 17.
As can be seen from the above description, the automated testing method for overdue batch testing of the loan system provided by the present application can generate automated testing cases for overdue batch testing based on the original loan business data.
Step S102: and executing the automatic test case by calling a session control interface at a preset time point.
In this step, the execution subject of the embodiment of the present application calls the Session control interface (Session interface) to execute the automated test case generated in step S101. In the executing process, the executing main body of the embodiment of the application invokes the batch generating interface and the batch running task executing interface in a mode of invoking the session control interface to respectively complete batch generation and execution of batch running tasks. The "preset time point" may have periodicity, or may be preset according to a service requirement, which is not limited in this application.
FIG. 3 is a diagram of one embodiment of the present application for automated testing of overdue runs of a loan system.
Referring to fig. 3, step S102: at a preset time point, executing the automated test case by calling a Session control interface (Session interface), including: invoking a batch generation interface through the session control interface, and generating a batch running task batch corresponding to the time point through the batch generation interface (S301); invoking an execution running batch task interface through the session control interface, and executing a running batch task according to the running batch task batch through the execution running batch task interface (S302); the batch running task is used for executing the automatic test case.
When the method is specifically implemented, the use case is automatically executed through a timing task, the use case operation model calls a series of services of newly building products, defining service flows, generating product numbers, types, interest rates and the like in the service model module through the webdriver driving module, reads the use case table case_data to obtain test data, namely specific values of interest rates, product periods and penalty rules, and generates test service data in a service system. And automatically recording the product business flow, the product number, the type, the parameters and the execution data into a case_result table.
The Webdriver driving module implementation method and processing logic are as follows:
the Webdriver driving module encapsulates the Webdriver native driver and the method, and the case operation model calls the Webdriver driver; invoking relevant factors of products in the business model, such as industrial process, product number, type and parameters; obtaining service parameters stored in a database table through DB driving; therefore, the three operations of driving, data and model combination are realized, new products of the credit system are created, and a series of operations of loan information parameters, loans and the like are generated.
Further, the use case operation model obtains a credit system login interface through httpcLIent driving, obtains a session, and provides the session for a batch task generation interface and a batch execution interface. The batch running system is triggered to generate batch tasks through the batch interface, at the moment, the batch executing interfaces T0 and T1.
Further, the running batch task execution result query interface is used for monitoring the execution day batch result, if the query result is successful, whether the number of circulation days exists or not is judged, and if the number of circulation days does not exist, the current batch task is ended, and the test result is sent.
Further, monitoring the batch result of the execution day through a batch running task execution result query interface, querying the number of circulation days if the batch running task is successful, executing the batch running task of the next day after the time of the execution day is switched by the background if the circulation days exist, and circulating the current batch tasks T0 and T1.
The running batch execution operation result obtains and invokes the test business rule calculation model (records each business related rule to compare whether the results generated by the system operation rule are consistent or not) so as to reduce the manual calculation cost compared with the correctness of the test result. If the matching is successful, the running batch is consistent with the overdue result, the result suc field weight +1 is recorded, and the data is extracted to case_all (use case set table).
From the above description, the automated testing method for overdue batch of loan system provided by the present application can execute the automated test case by calling the Session interface at a preset time point.
Step S103: if the fault occurs in the execution process, fault recovery processing is carried out to complete the overdue batch running automatic test of the loan system.
Faults may occur during the execution of the test case, resulting in a run-out that is not smooth. Thus, in this step, the executing entity of the embodiments of the present application may perform a failback process to complete the automated testing of the overdue batch of the loan system. The specific flow of fault recovery is described below.
FIG. 4 is a diagram of one embodiment of the present application for automated testing of overdue runs of a loan system.
Referring to fig. 4, in step S103, the fault recovery process includes: accessing the log library and pulling a log file corresponding to the fault (S401); identifying the log file and acquiring a key error code corresponding to the fault (S402); and calling a fault recovery model according to the key error code, and executing rule correction operation according to the fault recovery model (S403).
The fault recovery function in the embodiment of the present application refers to: the complex test environment often causes that the system cannot normally execute running batch due to dirty data, abnormal starting of sub-services and the like, and fault processing (recovering normal running batch) is needed.
For example, when task execution is stopped in the execution process, the log_data of the access log library pulls the error log to identify and traverse the log file to obtain a key error code, and if the matching of the error code is successful, the fault recovery model is invoked. And then, a fault distribution module (after the fault distribution module matches the error code, the related class method is called to execute the related code) calls the related processing method to execute error processing, and after the error processing is successful, the rule correction result is executed, and the result weight is +1. If the deviation correcting library is successfully matched and the execution fails, the correcting result weight is-1, the weights are ordered in high and low order, and if the correcting result weight is smaller than 0, the model is regularly maintained.
In summary, the fault recovery implementation provides a design approach:
the fault recovery processing is carried out by identifying and analyzing the keywords of the error processing module, and identifying and loading the error library method by loading the local error library data and carrying out the execution and distribution processing results; error library maintenance the error library is regularly maintained through local file loading and reading by editing and uploading the error library template file.
As can be seen from the above description, the automated testing method for overdue batch of loan system provided by the present application can perform fault recovery processing to complete automated testing for overdue batch of loan system.
In one embodiment, referring to fig. 5, the automated testing method for overdue batch of loan system provided in the present application further comprises: invoking an acquire batch result interface through the Session interface to acquire a run batch task execution result through the acquire batch result interface (S501); the running batch task execution result is a correct running batch task execution result; and returning the correct running batch task execution result to the client (S502).
In one embodiment, referring to fig. 6, after calling a predefined running batch task executing interface through the session control interface and executing a running batch task according to the running batch task batch through the running batch task executing interface, the method further includes: calling an execution result query interface of the running batch task through the session control interface, and monitoring an execution day batch result of the running batch task through the execution result query interface of the running batch task (S601); if the daily lot result returns successfully, judging whether the cycle days exist or not (S602); if there is no cycle number, the batch task is ended, and a test result is transmitted (S603).
And finally, generating a test report. And after the test case is executed, a result is automatically generated, and the platform uniformly manages tasks and test results of different batches, so that problem analysis is facilitated.
For example, the results are analyzed: by rewriting the testng report and the assertion method of the assert, the execution steps described by natural language are printed in the report, the analysis of the execution result is reduced, and common testers and business personnel can conduct problem investigation according to the result.
As can be seen from the above description, the automatic testing method for overdue running batch of the loan system provided by the application can automatically deploy test cases, execute unified operation and maintenance, automatically execute running batch tasks in a keyword-driven manner, reduce organization difficulty, enlarge applicable personnel range, automatically generate the test cases and automatically maintain the test cases, greatly reduce personnel cost, and ensure the stability of overdue running batch scene test execution of the credit system with high complexity by combining with a plurality of technologies such as Jenkins, httpclient, webdrier, thereby greatly improving testing efficiency.
Based on the same inventive concept, the embodiment of the present application also provides a loan system overdue batch automatic testing device, which can be used to implement the method described in the above embodiment, as described in the following embodiment. Because the principle of the automated testing device for overdue batch of loan system for solving the problem is similar to that of the automated testing method for overdue batch of loan system, the implementation of the automated testing device for overdue batch of loan system can be referred to the implementation of the determining method based on the software performance standard, and the repetition is omitted. As used below, the term "unit" or "module" may be a combination of software and/or hardware that implements the intended function. While the system described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
In one embodiment, to automatically generate and maintain test cases, automatically execute a loan system overdue batch test to complete fault processing, referring to fig. 7, the present application provides an automated testing device for overdue batch of a loan system, comprising: test case generation unit 701, test case execution unit 702, and failure recovery processing unit 703.
The test case generating unit 701 is configured to generate an automated test case of the overdue running batch test based on the original loan service data;
the test case execution unit 702 is configured to execute the automated test case by calling a session control interface at a preset time point;
the fault recovery processing unit 703 is configured to perform fault recovery processing to complete the overdue batch running automatic test of the loan system if a fault occurs during the execution process.
In one embodiment, referring to fig. 8, the test case generating unit 701 includes: the calculation model determination module 801 and the test case generation module 802.
A calculation model determining module 801, configured to obtain a test service rule calculation model according to a test service class corresponding to the original loan service data;
and the test case generating module 802 is configured to generate an automated test case corresponding to the original loan service data by using the test service rule calculation model.
In one embodiment, referring to fig. 9, the test case execution unit 702 includes: task lot generation module 901 and task lot execution module 902.
The task batch generation module 901 is configured to invoke a predefined generation batch interface through the session control interface, and generate a batch running task batch corresponding to the time point through the generation batch interface;
a task batch execution module 902, configured to invoke a predefined execution batch task interface through the session control interface, and execute a batch task according to the batch task batch through the execution batch task interface; the batch running task is used for executing the automatic test case.
In one embodiment, referring to fig. 10, the fault recovery processing unit 703 includes:
the fault log pulling module 1001 is configured to access a log library and pull a log file corresponding to a fault;
an error code obtaining module 1002, configured to identify the log file, and obtain a key error code corresponding to the fault;
and the correction operation module 1003 is used for calling a fault recovery model according to the key error code and executing rule correction operation according to the fault recovery model.
In one embodiment, referring to fig. 11, the automated testing device for overdue batch of loan system further comprises:
An execution result obtaining unit 1101, configured to invoke an obtain batch result interface through the session control interface, so as to obtain a running batch task execution result through the obtain batch result interface; the running batch task execution result is a correct running batch task execution result;
and the execution result feedback unit 1102 is configured to return the execution result of the correct running batch task to the client.
In one embodiment, referring to fig. 12, the automated testing device for overdue batch of loan system further comprises: a day batch result acquisition unit 1201, a cycle day check unit 1202, and a test feedback unit 1203.
A daily lot result obtaining unit 1201, configured to invoke a running lot task execution result query interface through the session control interface, and monitor an execution daily lot result of the running lot task through the running lot task execution result query interface;
a cycle number checking unit 1202, configured to determine whether there is a cycle number if the day batch result returns to success;
and the test feedback unit 1203 is configured to end the batch task and send a test result if there is no cycle number.
In order to automatically generate and maintain test cases in terms of hardware, automatically execute a loan system overdue batch test and complete fault processing, the application provides an embodiment of an electronic device for implementing all or part of contents in the loan system overdue batch automatic test method, wherein the electronic device specifically comprises the following contents:
A Processor (Processor), a Memory (Memory), a communication interface (Communications Interface), and a bus; the processor, the memory and the communication interface complete communication with each other through the bus; the communication interface is used for realizing information transmission between the overdue batch automatic testing device of the loan system and related equipment such as a core service system, a user terminal and a related database; the logic controller may be a desktop computer, a tablet computer, a mobile terminal, etc., and the embodiment is not limited thereto. In this embodiment, the logic controller may refer to the embodiments of the automated testing method for overdue batch of loan system and the embodiments of the automated testing apparatus for overdue batch of loan system, and the contents thereof are incorporated herein and are not repeated here.
It is understood that the user terminal may include a smart phone, a tablet electronic device, a network set top box, a portable computer, a desktop computer, a Personal Digital Assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Wherein, intelligent wearing equipment can include intelligent glasses, intelligent wrist-watch, intelligent bracelet etc..
In practical applications, part of the automated testing method for overdue batch of loan system may be performed on the electronic device side as described above, or all operations may be performed in the client device. Specifically, the selection may be made according to the processing capability of the client device, and restrictions of the use scenario of the user. The present application is not limited in this regard. If all operations are performed in the client device, the client device may further include a processor.
The client device may have a communication module (i.e. a communication unit) and may be connected to a remote server in a communication manner, so as to implement data transmission with the server. The server may include a server on the side of the task scheduling center, and in other implementations may include a server on an intermediate platform, such as a server on a third party server platform having a communication link with the task scheduling center server. The server may include a single computer device, a server cluster formed by a plurality of servers, or a server structure of a distributed device.
Fig. 13 is a schematic block diagram of a system configuration of an electronic device 9600 of an embodiment of the present application. As shown in fig. 13, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. Notably, this fig. 13 is exemplary; other types of structures may also be used in addition to or in place of the structures to implement telecommunications functions or other functions.
In one embodiment, the loan system overdue run automatic test method functionality may be integrated into the CPU 9100. The central processor 9100 may be configured to perform the following control:
s101: generating an automatic test case of the overdue running batch test based on the original loan business data;
s102: executing the automatic test case by calling a session control interface at a preset time point;
s103: if the fault occurs in the execution process, fault recovery processing is carried out to complete the overdue batch running automatic test of the loan system.
As can be seen from the above description, the automatic testing method for overdue running batch of the loan system provided by the application can automatically deploy test cases, execute unified operation and maintenance, automatically execute running batch tasks in a keyword-driven manner, reduce organization difficulty, enlarge applicable personnel range, automatically generate the test cases and automatically maintain the test cases, greatly reduce personnel cost, and ensure the stability of overdue running batch scene test execution of the credit system with high complexity by combining with a plurality of technologies such as Jenkins, httpclient, webdrier, thereby greatly improving testing efficiency.
In another embodiment, the automated testing device for overdue batch of loan system may be configured separately from the central processing unit 9100, for example, the automated testing device for overdue batch of loan system of data composite transmission device may be configured as a chip connected to the central processing unit 9100, and the functions of the automated testing method for overdue batch of loan system may be implemented under the control of the central processing unit.
As shown in fig. 13, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is noted that the electronic device 9600 need not include all of the components shown in fig. 13; in addition, the electronic device 9600 may further include components not shown in fig. 13, and reference may be made to the related art.
As shown in fig. 13, the central processor 9100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, which central processor 9100 receives inputs and controls the operation of the various components of the electronic device 9600.
The memory 9140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information about failure may be stored, and a program for executing the information may be stored. And the central processor 9100 can execute the program stored in the memory 9140 to realize information storage or processing, and the like.
The input unit 9120 provides input to the central processor 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used for displaying display objects such as images and characters. The display may be, for example, but not limited to, an LCD display.
The memory 9140 may be a solid state memory such as Read Only Memory (ROM), random Access Memory (RAM), SIM card, etc. But also a memory which holds information even when powered down, can be selectively erased and provided with further data, an example of which is sometimes referred to as EPROM or the like. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application/function storage portion 9142, the application/function storage portion 9142 storing application programs and function programs or a flow for executing operations of the electronic device 9600 by the central processor 9100.
The memory 9140 may also include a data store 9143, the data store 9143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by an electronic device. The driver storage portion 9144 of the memory 9140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, address book applications, etc.).
The communication module 9110 is a transmitter/receiver 9110 that transmits and receives signals via an antenna 9111. The communication module (transmitter/receiver) 9110 is coupled to the central processor 9100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 9110, such as a cellular network module, a bluetooth module, and/or a wireless lan module, may be provided in the same electronic device. The communication module (transmitter/receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and to receive audio input from the microphone 9132 to implement usual telecommunications functions. The audio processor 9130 can include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 9130 is also coupled to the central processor 9100 so that sound can be recorded locally through the microphone 9132 and sound stored locally can be played through the speaker 9131.
Embodiments of the present application further provide a computer readable storage medium capable of implementing all the steps in the loan system overdue batch automatic test method in which the execution subject is a server or a client, and the computer readable storage medium stores thereon a computer program, which when executed by a processor implements all the steps in the loan system overdue batch automatic test method in which the execution subject is a server or a client, for example, the processor implements the following steps when executing the computer program:
S101: generating an automatic test case of the overdue running batch test based on the original loan business data;
s102: executing the automatic test case by calling a session control interface at a preset time point;
s103: if the fault occurs in the execution process, fault recovery processing is carried out to complete the overdue batch running automatic test of the loan system.
As can be seen from the above description, the automatic testing method for overdue running batch of the loan system provided by the application can automatically deploy test cases, execute unified operation and maintenance, automatically execute running batch tasks in a keyword-driven manner, reduce organization difficulty, enlarge applicable personnel range, automatically generate the test cases and automatically maintain the test cases, greatly reduce personnel cost, and ensure the stability of overdue running batch scene test execution of the credit system with high complexity by combining with a plurality of technologies such as Jenkins, httpclient, webdrier, thereby greatly improving testing efficiency.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, 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 (devices), 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.
The principles and embodiments of the present invention have been described in detail with reference to specific examples, which are provided to facilitate understanding of the method and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (11)

1. An automated testing method for overdue runs of a loan system, comprising:
generating an automatic test case of the overdue running batch test based on the original loan business data;
executing the automatic test case by calling a session control interface at a preset time point;
If the fault occurs in the execution process, fault recovery processing is carried out to complete the overdue batch running automatic test of the loan system.
2. The automated testing method of overdue batch of loan system of claim 1, wherein the automated testing case for generating the overdue batch test based on the original loan business data comprises:
acquiring a test business rule calculation model according to the test business category corresponding to the original loan business data;
and generating an automatic test case corresponding to the original loan business data by using the test business rule calculation model.
3. The automated testing method for overdue batch of loan system of claim 2, wherein generating the automated test case corresponding to the original loan business data using the test business rule calculation model comprises:
inquiring a test case generation strategy in the test business rule calculation model;
traversing a full-volume data table corresponding to the original loan service data to obtain a pre-generated test case;
and screening the pre-generated test cases according to the test case generation strategy to obtain the corresponding automatic test cases.
4. The automated testing method of overdue batch of loan system of claim 1, wherein the executing the automated test case by invoking the session control interface at a preset point in time comprises:
invoking a predefined batch generation interface through the session control interface, and generating batch running task batches corresponding to the time points through the batch generation interface;
invoking a predefined running batch task executing interface through the session control interface, and executing a running batch task according to the running batch task batch through the running batch task executing interface; the batch running task is used for executing the automatic test case.
5. The automated loan system overdue batch testing method of claim 1, wherein the performing fault recovery process comprises:
accessing a log library and pulling a log file corresponding to the fault;
identifying the log file and acquiring a key error code corresponding to the fault;
and calling a fault recovery model according to the key error code, and executing rule correction operation according to the fault recovery model.
6. The automated loan system overdue run testing method of claim 1, further comprising:
Calling a batch obtaining result interface through the session control interface, and obtaining a batch running task execution result through the batch obtaining result interface; the running batch task execution result is a correct running batch task execution result;
and returning the correct running batch task execution result to the client.
7. The automated testing method of overdue batch of loan system of claim 4, further comprising, after invoking a predefined execution batch task interface via the session control interface and executing a batch task in accordance with the batch task batch via the execution batch task interface:
calling an execution result query interface of the running batch task through the session control interface, and monitoring an execution day batch result of the running batch task through the execution result query interface of the running batch task;
if the daily batch result returns successfully, judging whether the cycle days exist or not;
and if no cycle days exist, ending the batch of tasks and sending a test result.
8. An automated testing device for overdue runs of a loan system, comprising:
the test case generation unit is used for generating an automatic test case of the overdue running batch test based on the original loan business data;
The test case execution unit is used for executing the automatic test case by calling a session control interface at a preset time point;
and the fault recovery processing unit is used for carrying out fault recovery processing if faults occur in the execution process so as to finish the overdue batch running automatic test of the loan system.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor performs the steps of the automated loan system overdue batch testing method of any of claims 1-7 when the program is executed.
10. A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the automated loan system overdue run testing method of any of claims 1 to 7.
11. A computer program product comprising computer program/instructions which, when executed by a processor, implement the steps of the automated loan system overdue run testing method of any of claims 1 to 7.
CN202310218824.5A 2023-03-01 2023-03-01 Automatic overdue batch testing method and device for loan system Pending CN116150029A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310218824.5A CN116150029A (en) 2023-03-01 2023-03-01 Automatic overdue batch testing method and device for loan system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310218824.5A CN116150029A (en) 2023-03-01 2023-03-01 Automatic overdue batch testing method and device for loan system

Publications (1)

Publication Number Publication Date
CN116150029A true CN116150029A (en) 2023-05-23

Family

ID=86373605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310218824.5A Pending CN116150029A (en) 2023-03-01 2023-03-01 Automatic overdue batch testing method and device for loan system

Country Status (1)

Country Link
CN (1) CN116150029A (en)

Similar Documents

Publication Publication Date Title
CN112783793B (en) Automatic interface test system and method
CN110543301B (en) Method and device for generating jenkins code file
CN112905459B (en) Service interface testing method and device, electronic equipment and storage medium
CN112463634A (en) Software testing method and device under micro-service architecture
CN111897738B (en) Automatic testing method and device based on atomic service
CN115391219A (en) Test case generation method and device, electronic equipment and storage medium
CN115630835A (en) Activity-based workflow general parameter configuration method and system
CN113760611B (en) System site switching method and device, electronic equipment and storage medium
CN114489989A (en) Method and system for parallel scheduling based on proxy client
CN112905461A (en) Method and device for executing automatic interface test case
CN113515447B (en) Automatic testing method and device for system
CN116150029A (en) Automatic overdue batch testing method and device for loan system
CN113837870B (en) Financial risk data approval method and device
CN114285657B (en) Firewall security policy change verification method and device
CN114328180A (en) Interface automation test method, system, electronic equipment and storage medium
CN114676113A (en) Heterogeneous database migration method and system based on task decomposition
CN112783799A (en) Software daemon test method and device
CN113298538B (en) Customer service data processing method and device
CN111158744B (en) Cross-platform heterogeneous data integration method and device
CN116820973A (en) Automatic test method and system based on pseudo code
CN113434407A (en) Distributed program coverage rate statistical method and device
CN115422064A (en) Modularized testing method and device
CN113688044A (en) Automatic testing method and device based on business scene library
CN117350836A (en) Letter service processing method and system
CN117033191A (en) Test case parameterization method and system based on parameter attribute classification

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