Application test method and device, electronic equipment and storage medium

By automating the determination and configuration of the function address information of the target interrupt function and using a preset function modification tool to perform abnormal interrupt operations, the problem of time-consuming and cumbersome interrupt reentry testing is solved, and efficient end-to-end interrupt reentry testing is achieved.

CN117931610BActive Publication Date: 2025-11-04TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211254704.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-13
Publication Date
2025-11-04
Estimated Expiration
2042-10-13

AI Technical Summary

Technical Problem

In existing technologies, the interrupt reentrancy test process is time-consuming, cumbersome, and inefficient, especially when the application under test needs to call a large number of functions, requiring multiple manual triggering of business processing requests and reentrancy requests.

Method used

By determining the function address information of the target interrupt function, the abnormal interrupt operation is automatically executed using a preset function modification tool, and a reentry request is sent after the interrupt execution result is detected, thereby realizing the automation of abnormal interruption and full-link interrupt reentry testing of the target application.

Benefits of technology

It improves the efficiency and convenience of interrupt reentrancy testing, automates function-level exception interruption, reduces the number of manual operations, and improves testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117931610B_ABST
    Figure CN117931610B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an application test method and device, electronic equipment and storage medium. The method comprises: in the case of receiving a service test request, determining target function address information corresponding to a target interrupt function from a first to-be-called function, writing the target function address information into a preset function modification tool, sending a first service processing request to a target application based on a request sending tool, in the case that the preset function modification tool detects a first function call instruction, obtaining first function address information, in the case that the first function address information matches the target function address information, executing a preset abnormal interrupt operation on the target application based on the preset function modification tool, and generating an interrupt execution result, in the case that the request sending tool detects the interrupt execution result, sending a re-entry request to the target application, and obtaining an interrupt test result corresponding to a current calling function. The embodiments of the present disclosure can greatly improve the test efficiency and convenience of interrupt re-entry test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to an application testing method, apparatus, electronic device, and storage medium. Background Technology

[0002] Anomaly testing is a crucial part of business verification. It involves simulating abnormal interruptions during test case execution in a specific scenario, and observing whether the business process can still execute normally after the user retryes. In the current microservice architecture, the completion of a business function requires processing by multiple programs, each containing multiple functions. Interruptions can occur at any point during request processing (due to network timeouts, jitter, etc.). After an interruption, when the caller initiates a retry, it is expected to return the same result as if the process had succeeded on the first attempt; that is, all scenarios and interfaces must be idempotent. Therefore, interruption and reentrancy testing of the process chain is an important part of system testing.

[0003] In existing technologies, the function address of the function to be interrupted is set first, and then a business processing request for the target processing business is sent to the application under test. This causes the application under test to throw an exception when it executes the set function to be interrupted during the processing of the business processing request. If the target processing business of the application under test is in an abnormal interruption state, a business processing request is manually sent to the application under test to perform interruption re-entry testing. However, the above method requires setting the function address and sending the business processing request for each function to be interrupted. Furthermore, since the application under test calls multiple functions during the processing of business processing requests, different functions need to be sequentially used as interruption functions for interruption re-entry testing. Therefore, during the interruption re-entry testing of the application under test, the business processing request for the target processing business needs to be manually triggered multiple times, and the re-entry request for the target processing business needs to be manually triggered multiple times. It is evident that when the number of functions called by the application under test is large, the above method makes the interruption testing process very time-consuming and cumbersome, resulting in low efficiency for the entire interruption re-entry testing process. Summary of the Invention

[0004] In view of the aforementioned technical problems, this disclosure proposes an application testing method, apparatus, electronic device, and storage medium.

[0005] According to one aspect of the embodiments of this disclosure, an application testing method is provided, comprising:

[0006] Upon receiving a business test request for a target processing service of a target application, the target function address information corresponding to the target interrupt function is determined from at least one first callable function corresponding to the business test request. The target interrupt function is any untested function among the at least one first callable function.

[0007] Write the target function address information into the preset function modification tool;

[0008] The request sending tool sends the first business processing request corresponding to the business test request to the target application.

[0009] When the preset function modification tool detects a first function call instruction for the currently called function, the tool obtains the address information of the first function corresponding to the first function call instruction; the currently called function is the function currently called by the target application during the processing of the first business processing request.

[0010] If the first function address information matches the target function address information in the preset function modification tool, a preset abnormal interruption operation is performed on the target application based on the preset function modification tool, so that the target processing business of the target application enters an abnormal interruption state and an interruption execution result is generated;

[0011] If the request sending tool detects the interruption execution result, it sends a reentry request for the target processing service to the target application based on the request sending tool, so that the target application can execute the business operation corresponding to the target processing service and obtain the interruption test result corresponding to the currently called function;

[0012] Repeat the steps of determining the target function address information corresponding to the target interrupt function from at least one first callable function corresponding to the business test request to sending a reentry request for the target processing business to the target application based on the request sending tool, until the interrupt test result corresponding to the at least one first callable function is obtained;

[0013] Based on the interrupt test results corresponding to the at least one first function to be called, the target interrupt test results corresponding to the target application are generated.

[0014] According to another aspect of the embodiments of this disclosure, an application testing apparatus is provided, comprising:

[0015] The target function address information determination module is used to determine the target function address information corresponding to the target interrupt function from at least one first callable function corresponding to the business test request when a business test request for the target processing business of the target application is received. The target interrupt function is any untested function among the at least one first callable function.

[0016] The target function address information writing module is used to write the target function address information into a preset function modification tool;

[0017] The first business processing request sending module is used to send the first business processing request corresponding to the business test request to the target application based on the request sending tool.

[0018] The first function address information acquisition module is used to acquire the first function address information corresponding to the first function call instruction based on the preset function modification tool when the preset function modification tool detects the first function call instruction of the currently called function; the currently called function is the function currently called by the target application during the processing of the first business processing request;

[0019] An interrupt operation execution module is used to perform a preset abnormal interrupt operation on the target application based on the preset function modification tool when the first function address information matches the target function address information in the preset function modification tool, so that the target processing business of the target application enters an abnormal interrupt state; the target function address information is the function address information pre-written into the preset function modification tool, and an interrupt execution result is generated;

[0020] The first interruption test result determination module is used to send a reentry request for the target processing service to the target application based on the request sending tool when the request sending tool detects the interruption execution result, so that the target application executes the business operation corresponding to the target processing service and obtains the interruption test result corresponding to the currently called function.

[0021] The second interruption test result determination module is used to repeat the steps of determining the target function address information corresponding to the target interruption function from at least one first callable function corresponding to the service test request to sending a reentry request for the target processing service to the target application based on the request sending tool, until the interruption test result corresponding to the at least one first callable function is obtained;

[0022] The target interruption test result generation module is used to generate the target interruption test result corresponding to the target application based on the interruption test result corresponding to the at least one first callable function.

[0023] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the above-described application testing method.

[0024] According to another aspect of the present disclosure, a computer-readable storage medium is provided, which, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the above-described application testing method.

[0025] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects:

[0026] Upon receiving a business test request for a target application's target processing service, the target function address information corresponding to the target interrupt function is determined from at least one first callable function corresponding to the business test request. This target function address information is then written into a preset function modification tool, enabling dynamic configuration of the target function address information. After configuration, a first business processing request corresponding to the business test request is sent to the target application using a request sending tool. If the preset function modification tool detects the first function call instruction of the currently called function during the target application's processing of the first business processing request, it obtains the first function address information corresponding to the first function call instruction. If the first function address information matches the target function address information in the preset function modification tool, a preset abnormal interruption operation is executed on the target application using the preset function modification tool. This causes the target application's target processing service to enter an abnormal interruption state and generates an interruption execution result. This achieves function-level abnormal interruption. The preset function modification tool can detect the first function call instruction of the currently called function during the target application's processing of the first business processing request, and upon detection of the first function call instruction, the abnormal interruption of the target application can be achieved. The process automates interruption testing. Next, when the request sending tool detects an interruption execution result, it sends a re-entry request for the target processing business to the target application. This causes the target application to execute the business operation corresponding to the target processing business, obtaining the interruption test result for the currently called function. The request sending tool can detect the interruption execution result and automatically re-enter the target processing business upon detection. This eliminates the need for testers to manually trigger re-entry requests for the target processing business multiple times. The process repeats the steps from determining the target function address information corresponding to the target interruption function from at least one first-to-be-called function corresponding to the business test request to sending a re-entry request for the target processing business to the target application, until an interruption test result for at least one first-to-be-called function is obtained. Based on the interruption test result for at least one first-to-be-called function, the target interruption test result for the target application is generated. This automates the entire chain of interruption re-entry testing. With a single trigger of a business test request for the target processing business of the target application, interruption re-entry testing of at least one first-to-be-called function corresponding to the target processing business of the target application can be achieved, greatly improving the testing efficiency and convenience of interruption re-entry testing.

[0027] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0028] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0029] Figure 1 This is a schematic diagram illustrating an application system according to an exemplary embodiment;

[0030] Figure 2 This is a flowchart illustrating an application testing method according to an exemplary embodiment;

[0031] Figure 3 This is a schematic diagram illustrating the processing mode of a preset function modification tool according to an exemplary embodiment;

[0032] Figure 4 This is a block diagram illustrating an application testing apparatus according to an exemplary embodiment;

[0033] Figure 5 This is a block diagram illustrating an electronic device for performing interrupt reentry testing on a target application according to an exemplary embodiment;

[0034] Figure 6 This is a block diagram illustrating another electronic device for performing interrupt reentry testing on a target application, according to an exemplary embodiment. Detailed Implementation

[0035] Various exemplary embodiments, features, and aspects of this application will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.

[0036] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0037] Furthermore, to better illustrate this application, numerous specific details are provided in the following detailed embodiments. Those skilled in the art should understand that this application can be implemented without certain specific details. In some instances, methods, means, components, and circuits well-known to those skilled in the art have not been described in detail in order to highlight the main points of this application.

[0038] Please see Figure 1 , Figure 1 This is a schematic diagram of an application environment provided by an embodiment of the present invention, such as... Figure 1 As shown, the application environment may include server 01 and terminal 02.

[0039] Specifically, server 01 can be used to test target applications. Specifically, server 02 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0040] Specifically, terminal 02 can be an application testing terminal, which provides functions such as page display and test triggering. Specifically, terminal 02 can include physical devices such as smartphones, desktop computers, tablets, laptops, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, and smart wearable devices, and may also include software running on the physical device, such as applications. In this embodiment of the invention, the operating system running on the terminal can include, but is not limited to, Android, iOS, Linux, and Windows.

[0041] In practical applications, testers may need to view feature demonstration pages and trigger tests during functional testing of the target application. Accordingly, the terminal 02 side can provide feature demonstration and test trigger pages.

[0042] In addition, it should be noted that, Figure 1 The example shown is merely one application environment provided by this disclosure. In practical applications, other application environments may also be included. For example, the testing of the target application can also be implemented on terminal 02.

[0043] In the embodiments described in this specification, the terminal 02 and the server 01 can be directly or indirectly connected through wired or wireless communication, and this application does not limit this connection.

[0044] It should be noted that the following diagram shows one possible sequence of steps, and it is not strictly necessary to follow this order. Some steps can be executed in parallel without interdependence.

[0045] Specifically, Figure 2 This is a flowchart illustrating an application testing method according to an exemplary embodiment. For example... Figure 2 As shown, this application testing method can be used in electronic devices such as terminals or servers, and may specifically include the following steps:

[0046] In step S201, upon receiving a business test request for the target processing service of the target application, the target function address information corresponding to the target interrupt function is determined from at least one first callable function corresponding to the business test request.

[0047] In a specific embodiment, the target application can refer to the application to be tested. The target application may include payment applications or social applications, etc. The target processing service can be the service currently requested for testing among multiple services that the target application can handle. The target processing service may include payment services, information query services, or virtual resource interaction services, etc. The service test request can be used to request testing the interruption and re-entry function of the target processing service in the target application. The service test request may include identification information of the target application and the target processing service, as well as interruption test indication information. The interruption test indication information is used to indicate that an interruption and re-entry test is required for the target processing service of the target application.

[0048] In one specific embodiment, the at least one first function to be called corresponding to the business test request can refer to at least one function among multiple functions required to process the target business that needs to be interrupted by an exception. Specifically, the first function to be called can refer to the function among multiple functions that need to be interrupted by an exception during the runtime of the target application.

[0049] In one specific embodiment, the target interrupt function can refer to the function that currently requires an exception interrupt. The target interrupt function can be any untested function from at least one of the first callable functions. The target function address information can refer to the address information of the target interrupt function.

[0050] In one specific embodiment, step S201 above may include:

[0051] Upon receiving a business test request, the second function address information of multiple second functions to be called corresponding to the target processing business is obtained based on the preset function modification tool.

[0052] Determine the function types corresponding to multiple second functions to be called;

[0053] Based on the function type, select the second function to be called from multiple second functions to be called that corresponds to the business function type, and obtain at least one first function to be called.

[0054] Select any untested function from at least one first function to be called as the target interrupt function;

[0055] From the second function address information, determine the target function address information corresponding to the target interrupt function.

[0056] In one specific embodiment, the preset function modification tool can be used to call functions, obtain function address information, or throw exceptions / interruptions. The preset function modification tool may include an injection modification lookup tool.

[0057] In one specific embodiment, the multiple second functions to be called corresponding to the target processing service can refer to functions that the target application needs to call during the process of processing the target processing service. The aforementioned multiple second functions to be called may include at least one first function to be called. The second function address information can refer to the function address information corresponding to the aforementioned multiple second functions to be called. The second function address information may include the function address information corresponding to each of the multiple second functions to be called.

[0058] In one specific embodiment, testers can trigger business test requests for target processing services of a target application through an application test terminal.

[0059] In a specific embodiment, the above-mentioned acquisition of the second function address information of multiple second functions to be called corresponding to the target processing business based on the preset function modification tool includes:

[0060] Send a second business processing request for the target processing business to the target application so that the target application can execute the business operation corresponding to the target processing business and trigger multiple second function call instructions;

[0061] When the preset function modification tool is in acquisition mode and any second function call instruction is detected, the function address information corresponding to any second function call instruction is obtained based on the preset function modification tool.

[0062] In one specific embodiment, the aforementioned second business processing request can be used to request the target application to execute the business operation corresponding to the target processing business, in order to collect the second function address information corresponding to the target application's target processing business. The business operation corresponding to the target processing business can refer to the operation that the target application needs to perform during the process of processing the target processing business. Taking the target processing business as a payment business as an example, the business operation corresponding to the target processing business can include order inquiry operation, order placement operation, inspection operation, and virtual resource deduction operation.

[0063] In one specific embodiment, a second function call instruction can refer to a function call instruction triggered by the target application calling any second function to be called during the execution of the business operation corresponding to the target processing business. Multiple second function call instructions can be call instructions targeting multiple second functions to be called.

[0064] In a specific embodiment, a second business processing request for a target processing business can be sent to the target application. Upon receiving the second business processing request, the target application can execute the business operation corresponding to the target processing business. Accordingly, during the execution of the above business operation by the target application, multiple second functions to be called are called in the order of the business processing flow, triggering multiple second function call instructions.

[0065] In one specific embodiment, the processing mode of the preset function modification tool may include an interrupt mode or a data acquisition mode. The processing mode of the preset function modification tool can be used to control its operation. Figure 3 This is a schematic diagram illustrating the processing mode of a preset function modification tool according to an exemplary embodiment. For example... Figure 3 As shown, in response to a call command, when the preset function modification tool's processing mode is in acquisition mode, the tool can acquire and save function address information. When the preset function modification tool's processing mode is in interrupt mode, it can acquire the first function address information corresponding to the call command, compare the first function address information with the target function address information, and throw an exception interrupt if the comparison result indicates that the first function address information and the target function address information are the same. If the comparison result indicates that the first function address information and the target function address information are different, the second function to be called is invoked. The preset function modification tool's processing mode can be set to acquisition mode by default, or it can be switched from acquisition mode to interrupt mode by modifying the processing mode. Specifically, the preset function modification tool's processing mode can be set by modifying a preset variable. For example, the preset variable is initially set to "0" (i.e., the processing mode is acquisition mode), and by assigning the preset variable a value of "1", the processing mode is switched to interrupt mode.

[0066] In a specific embodiment, when the preset function modification tool is in acquisition mode and detects any second function call instruction, the preset function modification tool can obtain the function address information corresponding to the second function call instruction through instrumentation functions. Specifically, preset compilation instructions can be added before compilation so that the compiler automatically adds instrumentation function calls at the entry and exit points of each function during compilation. Environment variables can be added to the preset function modification tool so that when the target processing business calls the second function to be called, the preset function modification tool is loaded first. Correspondingly, when a second function call instruction is received, before calling the second function to be called, the preset function modification tool can first call the function address storage function to record the call stack information of the second function to be called, generate the function address information of the second function to be called, and pass the function address information through preset parameters.

[0067] In a specific embodiment, the function type may include business function types and system function types, etc. Functions of business function type can be used to perform business operations. Functions of system function type can be used to perform system operations. It is understood that functions of business function type have a stronger correlation with the multiple processable business operations corresponding to the target application, while functions of system function type have a weaker correlation with these multiple processable business operations.

[0068] In one specific embodiment, the function type corresponding to each second function to be called can be determined based on a pre-built mapping relationship between function types and function names, or based on a pre-built mapping relationship between function types and function address information. Specifically, for a mapping relationship between function types and function names, the function name of each second function to be called can be determined first, and the function type corresponding to each second function to be called can be found based on the function name of each second function to be called and the aforementioned mapping relationship between function types and function names. Similarly, for a mapping relationship between function types and function address information, the function type corresponding to each second function to be called can be found based on the function address information of each second function to be called and the mapping relationship between function types and function address information.

[0069] In a specific embodiment, based on the function type corresponding to each second function to be called, the second function to be called that has a business function type among multiple second functions to be called can be selected as the first function to be called, thus obtaining at least one first function to be called. Based on this, untested first functions to be called can be selected from the at least one first function to be called, and any one of these untested first functions to be called can be selected as the target interrupt function. Correspondingly, the target function address information corresponding to the target interrupt function can be determined based on the function address information of each second function to be called in the second function address information.

[0070] In one specific embodiment, before the target interrupt function is determined for the first time, the function address information of multiple second functions to be called corresponding to the target processing business can be collected by a preset function modification tool; after the first exception interrupt is thrown, when updating the target interrupt function, it is not necessary to collect the second function address information again. Instead, any untested function can be selected directly from at least one first function to be called as the target interrupt function, and the target function address information corresponding to the target interrupt function can be determined from the second function address information.

[0071] In step S203, the target function address information is written into the preset function modification tool.

[0072] In one specific embodiment, step S203 above may include:

[0073] Obtain preset instruction information;

[0074] The preset instruction information is written into the header of the preset system file of the target application, so that the target operating system calls the address writing function based on the preset instruction information and writes the target function address information into the preset function modification tool.

[0075] In one specific embodiment, the preset instruction information may be the instruction information corresponding to the system call function of the target operating system. The preset instruction information may include syscall functions. Specifically, the preset instruction information may be based on the system call function of the target operating system, with the instruction information corresponding to the system call function pre-set and stored in a preset memory; correspondingly, the preset instruction information can be retrieved from the preset memory.

[0076] In one specific embodiment, the preset system file may refer to the ELF (Executable and Linkable Format) file of the target application. The header of the preset system file may refer to the ELF header of the ELF file.

[0077] In one specific embodiment, the target operating system can refer to the operating system on which the target application resides. It is understood that the target application runs on the aforementioned target operating system; the target operating system runs on the application testing terminal.

[0078] In one specific embodiment, the address writing function can be used to write function address information to a preset function modification tool. The address writing function may include a breakpoint setting function; optionally, the breakpoint setting function may be a setbreakpoint function.

[0079] In one specific embodiment, the 8 bytes of unused memory in the ELF header can be used as the machine code storage address for the address writing function. When preset instruction information is written into the header of the target application's preset system file, the target operating system can execute the operation corresponding to the preset instruction information, triggering the call to the address writing function. Then, by calling the address writing function, the target function address information can be written into the preset function modification tool, allowing the tool to subsequently match the target function address information and determine whether an exception interrupt needs to be thrown.

[0080] In the above embodiments, by writing the preset instruction information into the header of the preset system file of the target application and calling the address writing function, the target function address information is written. The operation is simple and can improve the efficiency and convenience of writing the target function address information, thereby improving the efficiency of interrupt reentry testing of the target application.

[0081] In one specific embodiment, when the called function is a function called by a process loaded as a dynamic link library, a restart of the target application will cause the address information of the function called by the process loaded as a dynamic link library to change. After the target application restarts, the target function address information can be re-determined and rewritten into the preset function modification tool.

[0082] In the above embodiments, after the target application restarts, by re-determining the target function address information and rewriting the target function address information into the preset function modification tool, the function address information of the function called by the process loaded in the form of a dynamic link library can be dynamically configured, thereby enabling the abnormal interruption of the function called by the process loaded in the form of a dynamic link library.

[0083] In the above embodiments, the target function address information can be dynamically configured by writing the target function address information into a preset function modification tool.

[0084] In step S205, the first business processing request corresponding to the business test request is sent to the target application based on the request sending tool.

[0085] In one specific embodiment, the request sending tool can be used to send a first business processing request corresponding to a business test request and, if an interruption execution result is detected, to send a reentry request for the target processing business.

[0086] In one specific embodiment, the aforementioned first service processing request can be used to request the target application to execute the service operation corresponding to the target processing service, thereby triggering an abnormal interruption of the target interrupt function. The service requested by the first service processing request is the same as the service requested for testing by the service test request.

[0087] In a specific embodiment, a first business processing request corresponding to a business test request can be sent to the target application through a request sending tool. Accordingly, upon receiving the first business processing request, the target application can execute the business operation corresponding to the target processing business. During the execution of the above business operation by the target application, functions are called in the order of the business processing flow, triggering function call instructions.

[0088] In step S207, when the preset function modification tool detects the first function call instruction of the currently calling function, the first function address information corresponding to the first function call instruction is obtained based on the preset function modification tool.

[0089] In one specific embodiment, the currently invoked function can refer to the function currently invoked by the target application during the processing of the first business processing request. The currently invoked function can be any one of a plurality of second functions to be invoked. The first function call instruction can refer to a call instruction for the currently invoked function.

[0090] In a specific embodiment, the first function address information may refer to the function address information of the currently called function. It is understood that when the target operating system needs to call the currently called function to perform corresponding business operations, it can jump to the function entry point corresponding to the first function address information to execute the code of the currently called function. Optionally, taking a Linux system as an example, if the currently called function is a function that can be called by an executable program in the Linux system, the first function address information may include the compilation address; if the currently called function is a function called by a process loaded as a dynamic link library, the first function address information may include the compilation address and the starting address of the dynamic link library.

[0091] In one specific embodiment, the preset function modification tool can obtain the address information of the first function through instrumentation functions. Specifically, preset compilation instructions can be added before compilation so that the compiler automatically adds calls to the instrumentation functions at the entry and exit points of each function during compilation. Environment variables can be added to the preset function modification tool so that the target processing business will prioritize loading the preset function modification tool when calling the currently called function. Correspondingly, when receiving the first function call instruction for the target application's target processing business, before calling the currently called function, the preset function modification tool can prioritize calling the function address storage function to record the call stack information of the currently called function, generate the first function address information, and pass the first function address information through preset parameters.

[0092] In step S209, if the first function address information matches the target function address information in the preset function modification tool, a preset abnormal interruption operation is performed on the target application based on the preset function modification tool, so that the target processing business of the target application enters an abnormal interruption state and an interruption execution result is generated.

[0093] In one specific embodiment, a preset abnormal interruption operation can be used to cause the target processing service to enter an abnormal interruption state. Here, the abnormal interruption state refers to a state where the target processing service is abnormally unable to continue executing its operations.

[0094] In a specific embodiment, the interruption execution result can represent the completion of a preset abnormal interruption operation.

[0095] In one specific embodiment, after writing the preset instruction information into the header of the preset system file of the target application, so that the target operating system calls the address writing function based on the preset instruction information and writes the target function address information into the preset function modification tool, the above method may further include:

[0096] Switch the processing mode of the preset function modification tool from acquisition mode to interrupt mode;

[0097] If the address information of the first function matches the address information of the target function in the preset function modification tool, a preset exception interruption operation is performed on the target application based on the preset function modification tool, so that the target processing business of the target application enters an exception interruption state, and an interruption execution result is generated, including:

[0098] When the processing mode is interrupt mode, the target function address information and the first function address information are compared based on the preset function modification tool to obtain the comparison result;

[0099] If the comparison result indicates that the target function address information is the same as the first function address information, a preset abnormal interruption operation is performed on the target application based on the preset function modification tool, so that the target processing business of the target application enters an abnormal interruption state and an interruption execution result is generated.

[0100] In a specific embodiment, after the target function address information is written into the preset function modification tool, the processing mode of the preset function modification tool can be switched from acquisition mode to interrupt mode by modifying the preset variable. This allows the preset function modification tool to compare the acquired first function address information with the target function address information in the preset function modification tool when the processing mode is interrupt mode, obtain the comparison result, and throw an exception interrupt when the comparison result indicates that the target function address information is the same as the first function address information, and generate an interrupt execution result.

[0101] In one specific embodiment, the comparison result can characterize whether the target function address information and the first function address information are the same. The comparison result can include a first comparison result and a second comparison result; wherein, the first comparison result can characterize that the target function address information and the first function address information are the same, and the second comparison result can characterize that the target function address information and the first function address information are different.

[0102] In a specific embodiment, when the processing mode is interrupt mode, the preset function modification tool can compare the target function address information and the first function address information to obtain a comparison result. Specifically, if the target function address information and the first function address information are the same, the comparison result can be determined as the first comparison result; if the target function address information and the first function address information are different, the comparison result can be determined as the second comparison result.

[0103] In a specific embodiment, if the comparison result indicates that the target function address information is the same as the first function address information, the preset function modification tool can execute a preset exception interruption operation to throw an exception interruption, thereby causing the target processing service to enter an exception interruption state and generating an interruption execution result. Specifically, the preset function modification tool can implement the exception interruption of the target interruption function by calling a system interruption function. Optionally, the aforementioned system interruption function can be a throw function. It is understood that after the preset function modification tool detects the first function call instruction of the currently called function, the preset function modification tool compares the target function address information and the first function address information. If the comparison result indicates that the target function address information is the same as the first function address information, the preset function modification tool does not call the currently called function, but instead calls the system interruption function, causing the target application's target processing service to enter an exception interruption state.

[0104] In one specific embodiment, if the comparison result indicates that the target function address information is different from the first function address information, the preset function modification tool can call the currently called function corresponding to the first function address information based on the first function address information. It is understood that if the comparison result indicates that the target function address information is different from the first function address information, it can be determined that the currently called function corresponding to the first function address information is not the function that needs to be interrupted, and thus the currently called function is called normally.

[0105] In the above embodiments, a preset function modification tool can be used to detect the first function call instruction of the currently called function during the processing of the first business processing request of the target application, and upon detection of the first function call instruction of the currently called function, the abnormal interruption of the target application can be automated.

[0106] In step S211, if the request sending tool detects the interruption execution result, it sends a reentry request for the target processing business to the target application so that the target application can execute the business operation corresponding to the target processing business and obtain the interruption test result corresponding to the currently called function.

[0107] In one specific embodiment, a reentry request can be used to request the reprocessing of the target processing service when the target processing service is in an abnormal interruption state.

[0108] In a specific embodiment, the interrupt test result corresponding to the currently called function can characterize whether the re-entry function of the target processing service to the interrupt of the target interrupt function is abnormal. The interrupt test result corresponding to the currently called function may include a first test result or a second test result. The first test result can characterize that the re-entry function of the target processing service to the interrupt of the target interrupt function is normal; the second test result can characterize that the re-entry function of the target processing service to the interrupt of the target interrupt function is abnormal.

[0109] In one specific embodiment, after step S209, the method may further include:

[0110] Switch the processing mode of the preset function modification tool from interrupt mode to acquisition mode;

[0111] Accordingly, step S211 above may include:

[0112] When the processing mode is the acquisition mode, a reentrancy request for the target processing business is sent to the target application based on the request sending tool, so that the target application can execute the business operation corresponding to the target processing business and obtain the interruption test result corresponding to the currently called function.

[0113] In one specific embodiment, after the preset exception interruption operation is performed based on the preset function modification tool, the processing mode of the preset function modification tool can be switched from interrupt mode to acquisition mode by modifying the preset variable, so that the preset function modification tool can normally call the function required in the target processing business process when it receives the function call instruction of the target application.

[0114] In a specific embodiment, after receiving a reentrancy request, the target application executes the business operation corresponding to the target processing business. During the target processing business, the preset function modification tool can receive function call requests from the target application for the target processing business. When the preset function modification tool is in acquisition mode, it can normally call the function corresponding to the above function call request. After the target processing business is completed, i.e., after obtaining the corresponding business processing result, the interruption test result corresponding to the currently called function can be determined as the first test result. If no business processing result is obtained within a preset time or the target processing business times out, the interruption test result corresponding to the currently called function can be determined as the second test result. It is understood that when the preset function modification tool is in acquisition mode, even if the function address information of the called function is the same as the target function address information, the preset function modification tool will not throw an abnormal interrupt.

[0115] In the above embodiments, by modifying the preset parameters to switch the processing mode of the preset function modification tool, the preset function modification tool can obtain function address information and throw abnormal interrupts, thereby enabling function-level abnormal interrupt reentry testing.

[0116] In the above embodiments, the interruption execution result can be detected by the request sending tool, and the target processing service can be automatically re-entered when the interruption execution result is detected, so that testers do not need to manually trigger the re-entry request for the target processing service multiple times.

[0117] In step S213, the process of determining the target function address information corresponding to the target interrupt function from at least one first callable function corresponding to the business test request and sending a reentry request for the target processing business to the target application based on the request sending tool is repeated until the interrupt test result corresponding to at least one first callable function is obtained.

[0118] In one specific embodiment, the interruption test result corresponding to any one of the first callable functions may include a first test result or a second test result.

[0119] In a specific embodiment, the interrupt test result corresponding to each first function to be called can be obtained by repeating the above steps from determining the target function address information corresponding to the target interrupt function from at least one first function to be called corresponding to the business test request to sending a re-entry request for the target processing business to the target application based on the request sending tool detecting the interrupt execution result. Accordingly, at least one interrupt test result corresponding to the first function to be called can be obtained.

[0120] In step S215, based on the interrupt test results corresponding to at least one first function to be called, a target interrupt test result corresponding to the target application is generated.

[0121] In a specific embodiment, the target interruption test result corresponding to the target application can characterize whether the interruption re-entry function of the target processing service of the target application is abnormal. The target interruption test result can include a first target test result and a second target test result. The first target test result can characterize the interruption re-entry function of the target processing service of the target application as abnormal; the second target test result can characterize the interruption re-entry function of the target processing service of the target application as normal.

[0122] In one specific embodiment, step S215 above may include:

[0123] If the interrupt test result corresponding to any of the first functions to be called indicates that the target processing service has failed to re-enter, the target interrupt test result is determined as the first target test result.

[0124] In a specific embodiment, if at least one second test result exists in the interrupt test result corresponding to at least one first function to be called, it can be determined that the interrupt reentry function of the target processing service of the target application is abnormal, and the target interrupt test result can be determined as the first target test result.

[0125] In a specific embodiment, if there is no second test result in the interrupt test results corresponding to at least one first function to be called, it can be determined that the interrupt reentry function of the target processing service of the target application is normal, and the target interrupt test result can be determined as the second target test result.

[0126] In the above embodiments, upon receiving a business test request for a target application's target processing service, the target function address information corresponding to the target interrupt function is determined from at least one first callable function corresponding to the business test request. This target function address information is then written into a preset function modification tool, enabling dynamic configuration of the target function address information. After the target function address information is configured, a first business processing request corresponding to the business test request is sent to the target application using a request sending tool. When the preset function modification tool detects the first function call instruction of the currently called function during the target application's processing of the first business processing request, the first function address information corresponding to the first function call instruction is obtained using the preset function modification tool. If the first function address information matches the target function address information in the preset function modification tool, a preset abnormal interruption operation is performed on the target application using the preset function modification tool, causing the target application's target processing service to enter an abnormal interruption state and generating an interruption execution result. This enables function-level abnormal interruption. The preset function modification tool can detect the first function call instruction of the currently called function during the target application's processing of the first business processing request, and upon detecting the first function call instruction of the currently called function, the target application can achieve... The system utilizes automated exception interruption testing. Then, when the request sending tool detects the interruption execution result, it sends a re-entry request for the target processing business to the target application. This causes the target application to execute the business operation corresponding to the target processing business, obtaining the interruption test result corresponding to the currently called function. The system can detect the interruption execution result through the request sending tool and automatically re-enter the target processing business upon detection. This eliminates the need for testers to manually trigger re-entry requests for the target processing business multiple times. The process repeats the steps from determining the target function address information corresponding to the target interruption function from at least one first-to-be-called function corresponding to the business test request to sending a re-entry request for the target processing business to the target application, until an interruption test result corresponding to at least one first-to-be-called function is obtained. Based on the interruption test result corresponding to at least one first-to-be-called function, the target interruption test result corresponding to the target application is generated. This achieves automation of end-to-end interruption re-entry testing. With a single trigger of the business test request for the target processing business of the target application, interruption re-entry testing of at least one first-to-be-called function corresponding to the target processing business of the target application can be achieved, greatly improving the testing efficiency and convenience of interruption re-entry testing.

[0127] Figure 4 This is a block diagram illustrating an application testing apparatus according to an exemplary embodiment. Figure 4 As shown, the device may include:

[0128] The target function address information determination module 410 can be used to determine the target function address information corresponding to the target interrupt function from at least one first callable function corresponding to the business test request when a business test request for the target processing business of the target application is received. The target interrupt function is any untested function among at least one first callable function.

[0129] The target function address information writing module 420 can be used to write the target function address information into a preset function modification tool;

[0130] The first business processing request sending module 430 can be used to send the first business processing request corresponding to the business test request to the target application based on the request sending tool.

[0131] The first function address information acquisition module 440 can be used to acquire the first function address information corresponding to the first function call instruction based on the preset function modification tool when the preset function modification tool detects the first function call instruction of the currently called function; the currently called function is the function currently called during the process of the target application processing the first business processing request;

[0132] The interrupt operation execution module 450 can be used to perform a preset abnormal interrupt operation on the target application based on the preset function modification tool when the first function address information matches the target function address information in the preset function modification tool, so as to make the target processing business of the target application enter an abnormal interrupt state; the target function address information is the function address information pre-written into the preset function modification tool, and the interrupt execution result is generated;

[0133] The first interrupt test result determination module 460 can be used to send a reentry request for the target processing business to the target application based on the request sending tool when the request sending tool detects the interrupt execution result, so that the target application can execute the business operation corresponding to the target processing business and obtain the interrupt test result corresponding to the currently called function.

[0134] The second interrupt test result determination module 470 can be used to repeatedly determine the target function address information corresponding to the target interrupt function from at least one first callable function corresponding to the business test request, and send a reentry request for the target processing business to the target application based on the request sending tool, until the interrupt test result corresponding to at least one first callable function is obtained.

[0135] The target interrupt test result generation module 480 can be used to generate target interrupt test results for the target application based on the interrupt test results corresponding to at least one first function to be called.

[0136] In one specific embodiment, the target function address information writing module 420 may include:

[0137] The preset instruction information acquisition module can be used to acquire preset instruction information;

[0138] The preset instruction information writing module can be used to write preset instruction information into the header of the preset system file of the target application, so that the target operating system can call the address writing function based on the preset instruction information to write the target function address information into the preset function modification tool; wherein, the target application runs on the target operating system.

[0139] In one specific embodiment, the target function address information writing module 420 may further include:

[0140] The first processing mode switching module can be used to switch the processing mode of the preset function modification tool from acquisition mode to interrupt mode;

[0141] Accordingly, the interrupt operation execution module 450 mentioned above may include:

[0142] The address information comparison module can be used to compare the address information of the target function and the address information of the first function based on a preset function modification tool when the processing mode is interrupt mode, and obtain the comparison result.

[0143] The interrupt module can be used to perform a preset abnormal interrupt operation on the target application based on a preset function modification tool when the comparison result indicates that the target function address information is the same as the first function address information, so as to put the target processing business of the target application into an abnormal interrupt state and generate an interrupt execution result.

[0144] In one specific embodiment, the target function address information determination module 410 may include:

[0145] The second function address information acquisition module can be used to obtain the second function address information of multiple second functions to be called corresponding to the target processing business based on a preset function modification tool when a business test request is received.

[0146] The function type determination module can be used to determine the function type of multiple second functions to be called;

[0147] The first function to be called module can be used to filter out the second function to be called from multiple second functions to be called based on the function type, so as to obtain at least one first function to be called.

[0148] The target interrupt function determination module can be used to select any untested function as the target interrupt function from at least one first callable function;

[0149] The target function address information acquisition module can be used to determine the target function address information corresponding to the target interrupt function from the second function address information.

[0150] In one specific embodiment, the second function address information acquisition module described above may include:

[0151] The second function call instruction triggering module can be used to send a second business processing request for the target processing business to the target application, so that the target application can execute the business operation corresponding to the target processing business and trigger multiple second function call instructions, which are call instructions for multiple second functions to be called;

[0152] The function address information acquisition module can be used to acquire the function address information corresponding to any second function call instruction based on the preset function modification tool when the processing mode of the preset function modification tool is the acquisition mode and any second function call instruction is detected.

[0153] In one specific embodiment, the above-described apparatus may further include:

[0154] The second processing mode switching module can be used to switch the processing mode of the preset function modification tool from interrupt mode to acquisition mode;

[0155] Accordingly, the first interrupt test result determination module 460 mentioned above may include:

[0156] The third interrupt test result determination module can be used to send a reentrancy request for the target processing business to the target application based on the request sending tool when the processing mode is the acquisition mode, so that the target application can execute the business operation corresponding to the target processing business and obtain the interrupt test result corresponding to the currently called function.

[0157] In one specific embodiment, the target interruption test result generation module 480 described above may include:

[0158] The target interrupt test result determination module can be used to determine the target interrupt test result as the first target test result when the interrupt test result corresponding to any first function to be called indicates that the target processing service re-entry failure has failed. The first target test result is used to indicate that the interrupt re-entry function of the target processing service is abnormal.

[0159] Regarding the apparatus in the above embodiments, the specific manner in which each module and unit performs its operations has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0160] Figure 5This is a block diagram illustrating an electronic device for performing interrupt reentry testing on a target application according to an exemplary embodiment. The electronic device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, this electronic device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements an application testing method.

[0161] Figure 6 This is a block diagram illustrating another electronic device for performing interruption reentry testing on a target application, according to an exemplary embodiment. The electronic device may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown, the electronic device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements an application testing method. The display screen can be a liquid crystal display (LCD) or an e-ink display. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.

[0162] Those skilled in the art will understand that Figure 5 or Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present disclosure and does not constitute a limitation on the electronic device to which the present disclosure is applied. A specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0163] In an exemplary embodiment, an electronic device is also provided, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the application testing method as described in the embodiments of this disclosure.

[0164] In an exemplary embodiment, a computer-readable storage medium is also provided, wherein when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the application testing method of the present disclosure embodiments.

[0165] In an exemplary embodiment, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform the application testing method of the present disclosure embodiments.

[0166] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0167] It is understood that in the specific embodiments of this application, data such as user information are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0168] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0169] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. An application testing method, characterized in that, The method includes: Upon receiving a business test request for a target processing service of a target application, the target function address information corresponding to the target interrupt function is determined from at least one first callable function corresponding to the business test request. The target interrupt function is any untested function among the at least one first callable function. Write the target function address information into the preset function modification tool; The request sending tool sends the first business processing request corresponding to the business test request to the target application. When the preset function modification tool detects a first function call instruction for the currently called function, the tool obtains the address information of the first function corresponding to the first function call instruction; the currently called function is the function currently called by the target application during the processing of the first business processing request. If the first function address information matches the target function address information in the preset function modification tool, a preset abnormal interruption operation is performed on the target application based on the preset function modification tool, so that the target processing business of the target application enters an abnormal interruption state and an interruption execution result is generated; If the request sending tool detects the interruption execution result, it sends a reentry request for the target processing service to the target application based on the request sending tool, so that the target application can execute the business operation corresponding to the target processing service and obtain the interruption test result corresponding to the currently called function; Repeat the steps of determining the target function address information corresponding to the target interrupt function from at least one first callable function corresponding to the business test request to sending a reentry request for the target processing business to the target application based on the request sending tool, until the interrupt test result corresponding to the at least one first callable function is obtained; Based on the interrupt test results corresponding to the at least one first function to be called, the target interrupt test results corresponding to the target application are generated.

2. The method according to claim 1, characterized in that, The step of writing the target function address information into the preset function modification tool includes: Obtain preset instruction information; The preset instruction information is written into the header of the preset system file of the target application, so that the target operating system calls the address writing function based on the preset instruction information to write the target function address information into the preset function modification tool; The target application runs on the target operating system.

3. The method according to claim 2, characterized in that, After writing the preset instruction information into the header of the preset system file of the target application, so that the target operating system calls the address writing function based on the preset instruction information to write the target function address information into the preset function modification tool, the method further includes: Switch the processing mode of the preset function modification tool from acquisition mode to interrupt mode; When the first function address information matches the target function address information in the preset function modification tool, a preset exception interruption operation is performed on the target application based on the preset function modification tool to cause the target processing service of the target application to enter an exception interruption state and generate an interruption execution result, including: When the processing mode is the interrupt mode, the target function address information and the first function address information are compared based on the preset function modification tool to obtain the comparison result. If the comparison result indicates that the target function address information is the same as the first function address information, the preset abnormal interruption operation is performed on the target application based on the preset function modification tool, so that the target processing business of the target application enters the abnormal interruption state and the interruption execution result is generated.

4. The method according to claim 1, characterized in that, Upon receiving a service test request for a target processing service of a target application, determining the target function address information corresponding to the target interrupt function from at least one first callable function corresponding to the service test request includes: Upon receiving the business test request, the second function address information of multiple second functions to be called corresponding to the target processing business is obtained based on the preset function modification tool; Determine the function types corresponding to the plurality of second functions to be called; Based on the function type, select the second function to be called that corresponds to the business function type from the plurality of second functions to be called, and obtain the at least one first function to be called. From the at least one first function to be called, select any untested function as the target interrupt function; The target function address information corresponding to the target interrupt function is determined from the second function address information.

5. The method according to claim 4, characterized in that, The step of obtaining the second function address information of multiple second functions to be called corresponding to the target processing business based on the preset function modification tool includes: Send a second business processing request for the target processing business to the target application, so that the target application executes the business operation corresponding to the target processing business, triggering multiple second function call instructions, wherein the multiple second function call instructions are call instructions for the multiple second functions to be called; When the processing mode of the preset function modification tool is the acquisition mode and any second function call instruction is detected, the function address information corresponding to any second function call instruction is obtained based on the preset function modification tool.

6. The method according to claim 1, characterized in that, When the first function address information matches the target function address information in the preset function modification tool, the method further includes performing a preset exception interruption operation on the target application based on the preset function modification tool to cause the target processing service of the target application to enter an exception interruption state and generating an interruption execution result. Switch the processing mode of the preset function modification tool from interrupt mode to acquisition mode; When the request sending tool detects the interruption execution result, the request sending tool sends a reentry request for the target processing service to the target application, so that the target application executes the business operation corresponding to the target processing service, and obtains the interruption test result corresponding to the currently called function, including: When the processing mode is the acquisition mode, the request sending tool sends a reentry request for the target processing service to the target application, so that the target application executes the business operation corresponding to the target processing service and obtains the interruption test result corresponding to the currently called function.

7. The method according to any one of claims 1-6, characterized in that, The step of generating the target interrupt test result corresponding to the target application based on the interrupt test result corresponding to the at least one first function to be called includes: If the interrupt test result corresponding to any of the first callable functions indicates that the target processing service re-entry failed, the target interrupt test result is determined as the first target test result, which is used to indicate that the interrupt re-entry function of the target processing service is abnormal.

8. An application testing device, characterized in that, The device includes: The target function address information determination module is used to determine the target function address information corresponding to the target interrupt function from at least one first callable function corresponding to the business test request when a business test request for the target processing business of the target application is received. The target interrupt function is any untested function among the at least one first callable function. The target function address information writing module is used to write the target function address information into a preset function modification tool; The first business processing request sending module is used to send the first business processing request corresponding to the business test request to the target application based on the request sending tool. The first function address information acquisition module is used to acquire the first function address information corresponding to the first function call instruction based on the preset function modification tool when the preset function modification tool detects the first function call instruction of the currently called function; the currently called function is the function currently called by the target application during the processing of the first business processing request; An interrupt operation execution module is used to perform a preset abnormal interrupt operation on the target application based on the preset function modification tool when the first function address information matches the target function address information in the preset function modification tool, so that the target processing business of the target application enters an abnormal interrupt state; the target function address information is the function address information pre-written into the preset function modification tool, and an interrupt execution result is generated; The first interruption test result determination module is used to send a reentry request for the target processing service to the target application based on the request sending tool when the request sending tool detects the interruption execution result, so that the target application executes the business operation corresponding to the target processing service and obtains the interruption test result corresponding to the currently called function. The second interruption test result determination module is used to repeat the steps of determining the target function address information corresponding to the target interruption function from at least one first callable function corresponding to the service test request to sending a reentry request for the target processing service to the target application based on the request sending tool, until the interruption test result corresponding to the at least one first callable function is obtained; The target interruption test result generation module is used to generate the target interruption test result corresponding to the target application based on the interruption test result corresponding to the at least one first callable function.

9. The apparatus according to claim 8, characterized in that, The target function address information writing module includes: The preset instruction information acquisition module is used to acquire preset instruction information; A preset instruction information writing module is used to write the preset instruction information into the header of a preset system file of the target application, so that the target operating system calls an address writing function based on the preset instruction information to write the target function address information into the preset function modification tool; wherein, the target application runs on the target operating system.

10. The apparatus according to claim 9, characterized in that, The target function address information writing module also includes: The first processing mode switching module is used to switch the processing mode of the preset function modification tool from acquisition mode to interrupt mode; The interrupt operation execution module includes: The address information comparison module is used to compare the target function address information and the first function address information based on the preset function modification tool when the processing mode is the interrupt mode, and obtain the comparison result. The interrupt module is used to perform the preset abnormal interrupt operation on the target application based on the preset function modification tool when the comparison result indicates that the target function address information is the same as the first function address information, so as to cause the target processing business of the target application to enter the abnormal interrupt state and generate the interrupt execution result.

11. The apparatus according to claim 8, characterized in that, The objective function address information determination module includes: The second function address information acquisition module is used to acquire the second function address information of multiple second functions to be called corresponding to the target processing business based on the preset function modification tool when the business test request is received. The function type determination module is used to determine the function type corresponding to the plurality of second functions to be called; The first function to be called module is used to filter out the second function to be called from the plurality of second functions to be called based on the function type, so as to obtain the at least one first function to be called. The target interrupt function determination module is used to select any untested function from the at least one first callable function as the target interrupt function; The target function address information acquisition module is used to determine the target function address information corresponding to the target interrupt function from the second function address information.

12. The apparatus according to claim 11, characterized in that, The second function address information acquisition module includes: The second function call instruction triggering module is used to send a second business processing request for the target processing business to the target application, so that the target application executes the business operation corresponding to the target processing business and triggers multiple second function call instructions, wherein the multiple second function call instructions are call instructions for the multiple second functions to be called; The function address information acquisition module is used to acquire the function address information corresponding to any second function call instruction based on the preset function modification tool when the processing mode of the preset function modification tool is the acquisition mode and any second function call instruction is detected.

13. The apparatus according to claim 8, characterized in that, The device further includes: The second processing mode switching module is used to switch the processing mode of the preset function modification tool from interrupt mode to acquisition mode; The first interrupt test result determination module includes: The third interruption test result determination module is used to send a re-entry request for the target processing service to the target application based on the request sending tool when the processing mode is the acquisition mode, so that the target application executes the business operation corresponding to the target processing service and obtains the interruption test result corresponding to the currently called function.

14. The apparatus according to any one of claims 8-13, characterized in that, The target interruption test result generation module includes: The target interruption test result determination module is used to determine the target interruption test result as the first target test result when the interruption test result corresponding to any of the first callable functions indicates that the target processing service re-entry has failed. The first target test result is used to indicate that the interruption re-entry function of the target processing service is abnormal.

15. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to execute the executable instructions to implement the application testing method according to any one of claims 1 to 7.

16. A non-volatile computer-readable storage medium storing computer program instructions thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the application testing method according to any one of claims 1 to 7.

17. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by an electronic device, it implements the application testing method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Operating system level program target code coverage rate test method and system for and medium

    CN110580226A

  • Interface test method, device and system

    CN112540915A