Testing methods and devices for timed refresh threads in banking applications
By automating the parsing and comparison of the configuration files and execution results of the bank application's timed refresh thread, the accuracy and efficiency issues in timed refresh thread testing are resolved, achieving efficient test result identification and resource optimization.
Patent Information
- Application Number
- CN202310833460.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-07-07
AI Technical Summary
During the acceptance testing of banking application systems, the startup frequency and time of the timed refresh thread are strongly correlated with the business scenario, resulting in frequent server restarts in the test environment, making it difficult to judge the accuracy of transaction results, and causing low testing efficiency and high resource pressure.
By obtaining the configuration file of the bank application's timed refresh thread, parsing the execution time, frequency, and method, automatically scheduling memory object variable names and parameter values, and comparing the differences between the refresh thread after restarting, automated testing is achieved.
It effectively identifies the actual differences between application restarts and timed refresh threads, improves testing efficiency and coverage effectiveness, reduces server resource pressure, and provides testing support for timed refresh processes.
Smart Images

Figure CN117435459B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to automated testing technology, specifically to financial technology scenarios, and more particularly to a testing method and apparatus for periodically refreshing threads in banking applications. Background Technology
[0002] This section is intended to provide background or context for the embodiments of the invention set forth in the claims. The description herein is not an admission that it is prior art simply because it is included in this section.
[0003] With the rapid development of internet finance, the types of business supported by bank channel products have gradually diversified. As a result, application systems have introduced numerous background timed threads to ensure timely updates of critical business data, such as product information refresh, precious metal information refresh, card BIN information refresh, gray-scale strategy refresh, and investment information refresh. The startup frequency and time of different refresh threads vary, ranging from 1 second to 24 hours, and from 0:00 to 24:00, depending on actual business needs.
[0004] In actual acceptance testing, the startup frequency and time of the scheduled refresh thread vary. However, the test environment server frequently restarts due to daily application version installations or changes, causing overlap between application initialization and thread refresh times. During business verification, it becomes difficult to determine whether the expected transaction result is updated by application initialization or by the scheduled thread. This is especially problematic when the scheduled thread runs at night, for example, between 10 PM and 5 AM, which is outside of working hours. After technical staff upgrade the application and restart it in the morning, business testers often lack the resources to cover thread refresh scenarios. Since the thread's startup frequency and time are strongly correlated with the business scenario, arbitrarily adjusting the timing and frequency of the scheduled thread in the test environment will not only affect transaction verification results but also put immense pressure on server resources, resulting in poor test coverage and low testing efficiency.
[0005] In summary, there is an urgent need for a technical solution that can overcome the above-mentioned shortcomings and improve the testing process of timed refresh threads. Summary of the Invention
[0006] To address the problems existing in the prior art, this invention proposes a testing method and apparatus for a timed refresh thread in a banking application.
[0007] In a first aspect of the present invention, a test processing method for a bank application's periodic refresh thread is proposed, comprising:
[0008] Obtain the configuration file for the bank application's timed refresh thread;
[0009] The configuration is parsed according to the configuration file of the timed refresh thread to determine the execution time, execution frequency, execution class and execution method of the timed refresh thread;
[0010] The execution class and execution method are parsed to determine the type of memory object operated by the timed refresh thread and the corresponding variable name;
[0011] Based on the type of memory object operated by the timed refresh thread and the corresponding variable name, the corresponding memory parameter values are retrieved from the application server.
[0012] Automatic scheduling is performed based on the execution time and frequency of the timed refresh thread and the dynamic restart initialization time of the application server, and the variable name and memory parameter value of the target timed refresh thread are obtained from the variable name and memory parameter value.
[0013] Based on the variable name and memory parameter value of the target timed refresh thread, the variable name and memory parameter value of the corresponding timed refresh thread will be compared when the application server restarts and executes the timed refresh thread to obtain the test results of the timed refresh thread.
[0014] In a second aspect of the present invention, a test processing device for a timed refresh thread in a banking application is provided, comprising:
[0015] The configuration file retrieval module is used to retrieve the configuration file of the bank application's timed refresh thread;
[0016] The timed refresh thread configuration parsing module is used to parse the configuration based on the configuration file of the timed refresh thread and determine the execution time, execution frequency, execution class and execution method of the timed refresh thread.
[0017] The thread execution class parsing module is used to parse the execution class and execution method to determine the type of memory object operated by the timed refresh thread and the corresponding variable name;
[0018] The execution result acquisition module is used to retrieve the corresponding memory parameter values from the application server based on the type of memory object operated by the timed refresh thread and the corresponding variable name.
[0019] The scheduling module is used to automatically schedule the timed refresh thread based on its execution time, execution frequency and the dynamic restart initialization time of the application server, and to obtain the variable name and memory parameter value of the target timed refresh thread from the variable name and memory parameter value.
[0020] The execution result verification module is used to compare the variable name and memory parameter value of the target timed refresh thread with the variable name and memory parameter value of the timed refresh thread when the application server is restarted and the timed refresh thread is executed, based on the variable name and memory parameter value of the target timed refresh thread, to obtain the timed refresh thread test result.
[0021] In a third aspect of the present invention, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a test processing method for a bank application's timed refresh thread.
[0022] In a fourth aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements a test processing method for a timed refresh thread of a banking application.
[0023] In a fifth aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program, wherein when the computer program is executed by a processor, a test processing method for a timed refresh thread of a banking application is implemented.
[0024] The test processing method and device for the timed refresh thread of banking applications proposed in this invention automatically parses and verifies the execution results of the background timed thread through digital methods. It can effectively identify the actual differences between the application restart initialization and the execution results of the timed refresh thread, avoid the impact and risks caused by the inability to identify due to frequent restarts of the test environment, effectively reduce the pressure on server resources, and effectively improve test efficiency and coverage effectiveness during the test process, providing strong technical support for the test of the timed refresh process. Attached Figure Description
[0025] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a schematic diagram of a test processing method for a bank application's timed refresh thread according to an embodiment of the present invention.
[0027] Figure 2 This is a schematic diagram of the configuration parsing process according to an embodiment of the present invention.
[0028] Figure 3 This is a detailed flowchart illustrating how a thread name, execution time, execution frequency, and execution program are obtained by scanning a thread configuration file according to the scanned content, based on one embodiment of the present invention.
[0029] Figure 4 This is a detailed flowchart illustrating how an execution class and execution method are obtained through program execution according to an embodiment of the present invention.
[0030] Figure 5 This is a schematic diagram of the thread execution class resolution process according to an embodiment of the present invention.
[0031] Figure 6 This is a detailed flowchart illustrating the thread execution class resolution process according to an embodiment of the present invention.
[0032] Figure 7 This is a schematic diagram of the process for obtaining execution results according to an embodiment of the present invention.
[0033] Figure 8 This is a schematic diagram of the automatic scheduling process according to an embodiment of the present invention.
[0034] Figure 9 This is a flowchart illustrating the comparison of execution results under different conditions according to an embodiment of the present invention.
[0035] Figure 10 This is a schematic diagram of the test processing device architecture for a bank application timed refresh thread according to an embodiment of the present invention.
[0036] Figure 11 This is a schematic diagram of a computer device structure according to an embodiment of the present invention. Detailed Implementation
[0037] The principles and spirit of the invention will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.
[0038] Those skilled in the art will recognize that embodiments of the present invention can be implemented as a system, apparatus, device, method, or computer program product. Therefore, this disclosure can be specifically implemented in the following forms: entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0039] According to embodiments of the present invention, a testing method and apparatus for timed refresh threads in banking applications are proposed, relating to automated testing technology and financial technology scenarios. In practical applications, if a uniformly high refresh frequency is set for continuous refresh, threads with large data volumes may experience thread backlog due to long single execution times, or abnormal pressure may arise due to threads reading database tables or external application interfaces. If a uniform time is set, the thread execution time may differ from production time; transactions may be normal in test mode, but in production, because the threads are not running at that specific time, untimely refreshes may cause transaction problems. If all threads are executed uniformly after server restart initialization, abnormal refresh parameters during server restart initialization may mask problems due to normal thread execution; furthermore, during production deployment, transaction impacts may occur in the period between server restart initialization and thread execution. To address this, the present invention tests timed refresh threads in banking applications based on Java, automatically analyzing the actual execution results of background timed threads using digital methods, providing support for testing timed refresh threads in banking systems. The overall solution of the present invention is applicable to banking application systems based on Java reflection mechanisms, and can effectively identify the actual differences in the execution results of application restart initialization and timed refresh threads.
[0040] The principles and spirit of the present invention will be explained in detail below with reference to several representative embodiments.
[0041] Figure 1 This is a schematic diagram of a test processing method for a timed refresh thread in a banking application according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0042] Step S101: Obtain the configuration file of the bank application's timed refresh thread;
[0043] Step S102: Based on the configuration file of the timed refresh thread, perform configuration parsing to determine the execution time, execution frequency, execution class, and execution method of the timed refresh thread;
[0044] Step S103: parse the execution class and execution method to determine the type of memory object operated by the timed refresh thread and the corresponding variable name;
[0045] Step S104: Based on the type of memory object operated by the timed refresh thread and the corresponding variable name, retrieve the corresponding memory parameter values from the application server.
[0046] Step S105: Automatic scheduling is performed based on the execution time, execution frequency and dynamic restart initialization time of the timed refresh thread, and the variable name and memory parameter value of the target timed refresh thread are obtained from the variable name and memory parameter value.
[0047] Step S106: Based on the variable name and memory parameter value of the target timed refresh thread, compare the variable name and memory parameter value of the timed refresh thread when the application server restarts and executes the timed refresh thread to obtain the timed refresh thread test result.
[0048] In practical application scenarios, the testing and processing method for the timed refresh thread in a banking application works as follows: The configuration file for the timed refresh thread of the banking application is obtained; the configuration is parsed to determine the execution time, execution frequency, execution class, and execution method of the timed refresh thread; the execution class and execution method are parsed to determine the type of memory object operated by the timed refresh thread and its corresponding variable name; based on the type of memory object operated by the timed refresh thread and its corresponding variable name, the corresponding memory parameter values are retrieved from the application server; automatic scheduling is performed based on the execution time, execution frequency, and dynamic restart initialization time of the application server, using the variable name and memory parameters... The system retrieves the variable name and memory parameter value of the target timed refresh thread from the data. It then compares the variable name and memory parameter value of the corresponding timed refresh thread under different application server restart and execution conditions to obtain the timed refresh thread test results. This invention's overall solution automatically parses and verifies the execution results of the background timed thread using digital methods. It effectively identifies the actual differences between application restart initialization and the execution results of the timed refresh thread, avoiding the impact and risks caused by frequent restarts of the test environment, effectively reducing the pressure on server resources, and significantly improving testing efficiency and coverage during the testing process. This provides strong technical support for testing the timed refresh process.
[0049] To provide a clearer explanation of the testing and processing methods for the timed refresh thread in the aforementioned banking application, a detailed explanation of each step is provided below.
[0050] Step S101: Obtain the configuration file for the bank application's timed refresh thread.
[0051] In one embodiment, the timed refresh thread refers to the timed refresh thread of the banking application; the specific method is to obtain the configuration file of the timed refresh thread of the banking application from the banking application system.
[0052] Step S102: Based on the configuration file of the timed refresh thread, perform configuration parsing to determine the execution time, execution frequency, execution class, and execution method of the timed refresh thread.
[0053] refer to Figure 2 The specific process for configuration parsing is as follows:
[0054] Step S1021: Scan the configuration file of the timed refresh thread to determine the thread name, execution time and execution program of the timed refresh thread;
[0055] Step S1022: parse the executable program and determine the execution class and execution method.
[0056] Table 1 shows examples of thread names, execution times, execution frequencies, execution classes, and execution methods for timed refresh threads obtained through scanning and parsing. Each thread name corresponds one-to-one with its execution time, execution frequency, execution class, and execution method.
[0057] Table 1
[0058] Thread name Execution time Execution frequency Execution class Execution method Job1 Time1 Frequency1 Class1 Method 1 Job2 Time2 Frequency2 Class2 Method 2 Job3 Time3 Frequency3 Class3 Method 3
[0059] During the parsing process, timed refresh threads within the first frequency range are automatically filtered out. Specifically, during the parsing process, threads with a frequency of 1 second to 10 seconds are automatically filtered out; this is because high-frequency threads do not pose a risk of insufficient test coverage or inconsistencies after server restart and initialization compared to before thread execution.
[0060] In practical applications, by scanning the thread configuration file, the thread name, execution time, execution frequency, and executable program are obtained based on the scanned content. The specific execution process is as follows: Figure 3 As shown. Further, by executing the program, the execution class and execution method are obtained through parsing. The specific execution process is as follows: Figure 4 As shown.
[0061] Step S103: The execution class and execution method are parsed to determine the type of memory object operated by the timed refresh thread and the corresponding variable name.
[0062] like Figure 5 As shown, the specific process of thread execution class resolution is as follows:
[0063] Step S1031: Parse the return value using the access control method (public method) and obtain the name of the memory variable operated by the timed refresh thread based on the return keyword;
[0064] Step S1032: Based on the memory variable name, trace back the static variables in the class to match the memory object type operated by the timed refresh thread, and determine the corresponding memory object variable name based on the memory object type.
[0065] In practical application scenarios, with Figure 6 For example, the initialization code defines two private variables and two public methods.
[0066] For public methods, resolving methods with return values (i.e., non-void methods containing the `return` keyword) can yield the names of the memory variables operated on by the timed refresh thread, because the timed refresh thread must return the updated memory object after execution.
[0067] `public` means public; members modified by `public` can be accessed in any class. `public` can be used to modify classes; only one class can be declared as `public` in a Java source file, and the filename of that source file must be the same as the name of the class modified by `public`, otherwise compilation will fail. `public` is used to modify members (variables and methods) within a class; members modified by `public` can be accessed in any class. Public members can be accessed freely by operating on objects of that class. `public` is also reflected in class inheritance; members modified by `public` can be inherited by all subclasses.
[0068] `private` means that a member can only be accessed within the current class; its scope is the smallest. `private` can modify data members, constructors, and method members, but cannot modify classes (referring to the outer class, not inner classes). Members modified by `private` can only be used within the class in which they are defined and cannot be accessed in other classes.
[0069] By tracing back through the memory variable names obtained above to the static variables in the class, the type of memory object operated on by the timed refresh thread can be determined. Figure 6 In this context, the object is a hashtable containing composite data types. The above process is used to determine whether to use basic data type comparison or object comparison when verifying the execution results.
[0070] Table 2 shows examples of the memory object types and corresponding variable names operated by the periodic refresh thread.
[0071] Table 2
[0072] Thread name The type of memory object being operated on The name of the memory object variable being operated on Job1 Type 1 Variable name 1
[0073] Step S104: Based on the memory object type and corresponding variable name operated by the timed refresh thread, retrieve the corresponding memory parameter values from the application server.
[0074] like Figure 7 As shown, the specific process for obtaining the execution result is as follows:
[0075] Step S1041: Determine the type of memory object operated by the timed refresh thread. The type of memory object includes at least: basic type and composite type.
[0076] Step S1042: If the type of the memory object being operated on is a basic type, directly obtain the memory parameter value;
[0077] Step S1043: If the type of the memory object being operated on is a composite type, obtain the memory parameter value corresponding to the variable name through Java's reflection mechanism.
[0078] Table 3 shows examples of memory parameter values.
[0079] Table 3
[0080] Thread name The name of the memory object variable being operated on The value of the memory object being operated on Job1 Variable name 1 Value 1
[0081] In practical applications, the detailed process for obtaining operation results is as follows:
[0082] If the memory object being operated on is a primitive type (e.g., int, string, etc.), the object value can be obtained directly.
[0083] If the memory object being operated on is a composite type (object), then Java reflection is needed to obtain its attribute values. Reflection allows for flexible retrieval of object attribute values based on their string names; specifically, this can be achieved using Java's Field class.
[0084] String calssName="com.xxx.xxx.CacheLoader";
[0085] Class clazz=Class.forName(className);
[0086] Object obj=clazz.newInstance();
[0087] / / Get object properties
[0088] Fields[]fields=clazz.getDeclaredFields();
[0089] for(Field field:fields){
[0090] String name=field.getName();
[0091] field.setAccessible(true); / / Private attributes must have access permissions set.
[0092] Object resultValue=field.get(obj);
[0093] Step S105: Automatic scheduling is performed based on the execution time and frequency of the timed refresh thread and the dynamic restart initialization time of the application server. The variable name and memory parameter value of the target timed refresh thread are obtained from the variable name and memory parameter value.
[0094] like Figure 8 As shown, the specific process of automatic scheduling is as follows:
[0095] Step S1051: When the time reaches the execution time of the timed refresh thread, obtain the variable name and memory parameter value of the target timed refresh thread from the variable name and memory parameter value, and repeat the acquisition process according to the execution frequency.
[0096] Step S1052: When the application server performs dynamic restart initialization, obtain the variable name and memory parameter value of the target timed refresh thread from the variable name and memory parameter value.
[0097] Specifically, in step S1052, it can be obtained through Java's Field class.
[0098] Step S106: Based on the variable name and memory parameter value of the target timed refresh thread, compare the variable name and memory parameter value of the timed refresh thread when the application server restarts and executes the timed refresh thread to obtain the timed refresh thread test result.
[0099] like Figure 9 As shown, the specific process for comparing execution results under different circumstances is as follows:
[0100] Step S1061: If the comparison result is consistent, and the result of the timed refresh thread and the application server restart initialization execution is the same, the reliability of the test result is determined to meet the standard.
[0101] Step S1062: If the comparison result is inconsistent, determine whether the refreshed data source has undergone maintenance changes during the day;
[0102] Among them, if the data does not change, the logic for determining the two cases of application server restart and execution of timed refresh thread is inconsistent, and the test result shows that there is a problem or defect.
[0103] If the data changes, wait for other testing processes to determine the detection status;
[0104] Step S1063: If the memory object operated by the thread cannot be obtained or does not exist after the application server restarts and initializes, and the comparison result cannot be obtained, it is determined that the memory structure was not created after the application server was initialized. The corresponding data cannot be used for transactions before the thread is triggered. The logic of the two cases of application server restart and execution of timed refresh thread is inconsistent. The test result is that there is a problem defect.
[0105] It should be noted that although the operation of the method of the present invention has been described in a specific order in the above embodiments and figures, this does not require or imply that the operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0106] After introducing the method of exemplary embodiments of the present invention, the following references are made. Figure 10 The present invention describes a test processing device for a bank application timed refresh thread according to an exemplary embodiment of the present invention.
[0107] The implementation of the test processing device for the bank application's timed refresh thread can refer to the implementation of the above method, and repeated details will not be elaborated further. The terms "module" or "unit" used below can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0108] Based on the same inventive concept, this invention also proposes a test processing device for a timed refresh thread in a banking application, such as... Figure 10 As shown, the device includes:
[0109] The configuration file acquisition module 1010 is used to acquire the configuration file of the bank application's timed refresh thread;
[0110] The timed refresh thread configuration parsing module 1020 is used to parse the configuration based on the configuration file of the timed refresh thread to determine the execution time, execution frequency, execution class and execution method of the timed refresh thread.
[0111] The thread execution class parsing module 1030 is used to parse the execution class and execution method to determine the type of memory object operated by the timed refresh thread and the corresponding variable name;
[0112] The execution result acquisition module 1040 is used to retrieve the corresponding memory parameter values from the application server based on the type of memory object operated by the timed refresh thread and the corresponding variable name.
[0113] The scheduling module 1050 is used to automatically schedule the timed refresh thread based on its execution time, execution frequency and the dynamic restart initialization time of the application server, and to obtain the variable name and memory parameter value of the target timed refresh thread from the variable name and memory parameter value.
[0114] The execution result verification module 1060 is used to compare the variable name and memory parameter value of the target timed refresh thread with the variable name and memory parameter value of the timed refresh thread when the application server is restarted and the timed refresh thread is executed, based on the variable name and memory parameter value of the target timed refresh thread, to obtain the timed refresh thread test result.
[0115] In one embodiment, the timed refresh thread configuration parsing module 1020 is specifically used for:
[0116] Scan the configuration file of the timed refresh thread to determine the thread name, execution time, and executor of the timed refresh thread;
[0117] The executable program is parsed to determine the execution class and execution method.
[0118] In one embodiment, the timed refresh thread configuration parsing module 1020 is specifically used for:
[0119] During the parsing process, timed refresh threads within the first frequency range are automatically filtered out.
[0120] In one embodiment, the thread execution class resolution module 1030 is specifically used for:
[0121] The return value is parsed using access control methods, and the name of the memory variable operated by the timed refresh thread is obtained based on the return keyword;
[0122] By tracing back through the static variables in the class based on the memory variable name, the type of memory object operated by the timed refresh thread is matched, and the corresponding memory object variable name is determined based on the memory object type.
[0123] In one embodiment, the execution result acquisition module 1040 is specifically used for:
[0124] Determine the type of memory object operated by the timed refresh thread, wherein the type of memory object includes at least: basic type and composite type;
[0125] If the type of the memory object being operated on is a primitive type, the memory parameter value is obtained directly;
[0126] If the type of the memory object being operated on is a composite type, the memory parameter value corresponding to the variable name can be obtained through Java's reflection mechanism.
[0127] In one embodiment, the scheduling module 1050 is specifically used for:
[0128] When the timer reaches the execution time of the timed refresh thread, the variable name and memory parameter value of the target timed refresh thread are obtained from the variable name and memory parameter value, and the obtaining process is repeated according to the execution frequency.
[0129] Based on the application server's dynamic restart initialization time, when the application server performs dynamic restart initialization, the variable name and memory parameter value of the target timed refresh thread are obtained from the variable name and memory parameter value.
[0130] In one embodiment, the execution result verification module 1060 is specifically used for:
[0131] If the comparison results are consistent, and the results of the timed refresh thread and the application server restart initialization are the same, the test results are considered to meet the reliability standards.
[0132] If the comparison results are inconsistent, determine whether the data source being refreshed has undergone maintenance changes during the day; if the data has not changed, determine that the logic of the two scenarios—application server restart and execution of the scheduled refresh thread—is inconsistent, and the test result indicates a problem or defect; if the data has changed, wait for other testing processes to determine the detection status.
[0133] If the memory object operated on by the thread cannot be obtained or does not exist after the application server restarts and initializes, and the comparison result cannot be obtained, it is determined that the memory structure was not created after the application server was initialized. The corresponding data cannot be used for transactions before the thread is triggered. The logic of the two cases of application server restart and execution of timed refresh thread is inconsistent, and the test result shows that there is a problem defect.
[0134] It should be noted that although several modules of the test processing device for the bank application's periodic refresh thread have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules described above can be embodied in a single module. Conversely, the features and functions of a single module described above can be further divided and embodied by multiple modules.
[0135] Based on the aforementioned inventive concept, such as Figure 11 As shown, the present invention also proposes a computer device 1100, including a memory 1110, a processor 1120, and a computer program 1130 stored in the memory 1110 and executable on the processor 1120. When the processor 1120 executes the computer program 1130, it implements the aforementioned test processing method for the timed refresh thread of the banking application.
[0136] Based on the aforementioned inventive concept, the present invention proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the aforementioned test processing method for the timed refresh thread of a banking application.
[0137] Based on the aforementioned inventive concept, this invention proposes a computer program product, which includes a computer program that, when executed by a processor, implements a test processing method for a bank application's timed refresh thread.
[0138] The test processing method and device for the timed refresh thread of banking applications proposed in this invention automatically parses and verifies the execution results of the background timed thread through digital methods. It can effectively identify the actual differences between the application restart initialization and the execution results of the timed refresh thread, avoid the impact and risks caused by the inability to identify due to frequent restarts of the test environment, effectively reduce the pressure on server resources, and effectively improve test efficiency and coverage effectiveness during the test process, providing strong technical support for the test of the timed refresh process.
[0139] The acquisition, storage, use, and processing of data in this application comply with relevant laws and regulations.
[0140] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can 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, etc.) containing computer-usable program code.
[0141] This invention is described with reference to flowchart illustrations and / or block diagrams of methods and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can 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, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0142] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0143] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0144] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A test processing method for a timed refresh thread in a banking application, characterized in that, include: Obtain the configuration file for the bank application's timed refresh thread; The configuration is parsed according to the configuration file of the timed refresh thread to determine the execution time, execution frequency, execution class and execution method of the timed refresh thread; The execution class and execution method are parsed to determine the type of memory object operated by the timed refresh thread and the corresponding variable name; Based on the type of memory object operated by the timed refresh thread and the corresponding variable name, the corresponding memory parameter values are retrieved from the application server. Automatic scheduling is performed based on the execution time and frequency of the timed refresh thread and the dynamic restart initialization time of the application server, and the variable name and memory parameter value of the target timed refresh thread are obtained from the variable name and memory parameter value. Based on the variable name and memory parameter value of the target timed refresh thread, the variable name and memory parameter value of the corresponding timed refresh thread will be compared when the application server restarts and executes the timed refresh thread to obtain the test results of the timed refresh thread.
2. The method according to claim 1, characterized in that, The configuration of the timed refresh thread is parsed to determine its execution time, frequency, class, and method, including: Scan the configuration file of the timed refresh thread to determine the thread name, execution time, and executor of the timed refresh thread; The executable program is parsed to determine the execution class and execution method.
3. The method according to claim 2, characterized in that, The configuration of the timed refresh thread is parsed to determine its execution time, frequency, class, and method, including: During the parsing process, timed refresh threads within the first frequency range are automatically filtered out.
4. The method according to claim 1, characterized in that, The execution class and execution method are parsed to determine the type of memory object operated on by the timed refresh thread and the corresponding variable name, including: The return value is parsed using access control methods, and the name of the memory variable operated by the timed refresh thread is obtained based on the return keyword; By tracing back through the static variables in the class based on the memory variable name, the type of memory object operated by the timed refresh thread is matched, and the corresponding memory object variable name is determined based on the memory object type.
5. The method according to claim 1, characterized in that, Based on the memory object type and corresponding variable name operated by the timed refresh thread, the corresponding memory parameter values are retrieved from the application server, including: Determine the type of memory object operated by the timed refresh thread, wherein the type of memory object includes at least: basic type and composite type; If the type of the memory object being operated on is a primitive type, the memory parameter value is obtained directly; If the type of the memory object being operated on is a composite type, the memory parameter value corresponding to the variable name can be obtained through Java's reflection mechanism.
6. The method according to claim 1, characterized in that, Automatic scheduling is performed based on the execution time and frequency of the timed refresh thread and the dynamic restart initialization time of the application server. The variable name and memory parameter values of the target timed refresh thread are obtained from the variable name and memory parameter values, including: When the timer reaches the execution time of the timed refresh thread, the variable name and memory parameter value of the target timed refresh thread are obtained from the variable name and memory parameter value, and the obtaining process is repeated according to the execution frequency. Based on the application server's dynamic restart initialization time, when the application server performs dynamic restart initialization, the variable name and memory parameter value of the target timed refresh thread are obtained from the variable name and memory parameter value.
7. The method according to claim 6, characterized in that, Based on the variable names and memory parameter values of the target timed refresh thread, the variable names and memory parameter values of the corresponding timed refresh thread will be compared when the application server restarts and executes the timed refresh thread to obtain the timed refresh thread test results, including: If the comparison results are consistent, and the results of the timed refresh thread and the application server restart initialization are the same, the test results are considered to meet the reliability standards. If the comparison results are inconsistent, determine whether the data source being refreshed has undergone maintenance changes during the day; if the data has not changed, determine that the logic of the two scenarios—application server restart and execution of the scheduled refresh thread—is inconsistent, and the test result indicates a problem or defect; if the data has changed, wait for other testing processes to determine the detection status. If the memory object operated on by the thread cannot be obtained or does not exist after the application server restarts and initializes, and the comparison result cannot be obtained, it is determined that the memory structure was not created after the application server was initialized. The corresponding data cannot be used for transactions before the thread is triggered. The logic of the two cases of application server restart and execution of timed refresh thread is inconsistent, and the test result shows that there is a problem defect.
8. A test processing device for a timed refresh thread in a banking application, characterized in that, include: The configuration file retrieval module is used to retrieve the configuration file of the bank application's timed refresh thread; The timed refresh thread configuration parsing module is used to parse the configuration based on the configuration file of the timed refresh thread and determine the execution time, execution frequency, execution class and execution method of the timed refresh thread. The thread execution class parsing module is used to parse the execution class and execution method to determine the type of memory object operated by the timed refresh thread and the corresponding variable name; The execution result acquisition module is used to retrieve the corresponding memory parameter values from the application server based on the type of memory object operated by the timed refresh thread and the corresponding variable name. The scheduling module is used to automatically schedule the timed refresh thread based on its execution time, execution frequency and the dynamic restart initialization time of the application server, and to obtain the variable name and memory parameter value of the target timed refresh thread from the variable name and memory parameter value. The execution result verification module is used to compare the variable name and memory parameter value of the target timed refresh thread with the variable name and memory parameter value of the timed refresh thread when the application server is restarted and the timed refresh thread is executed, based on the variable name and memory parameter value of the target timed refresh thread, to obtain the timed refresh thread test result.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 7.
11. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for testing software performance
CN102855173A
System and method for realizing integration testing of centralized analog server in cloud computing platform
CN105302721A
