Program testing method, computer equipment and computer storage medium
Through the traffic recording of user requests and instructions and the traffic playback of software system functions, the problems of high cost and low efficiency of traditional software testing methods are solved, and the rapid, simplified and efficient results of software system testing are achieved.
Patent Information
- Application Number
- CN202411878869.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-18
AI Technical Summary
Traditional software testing methods are costly and inefficient, making it difficult to simulate large traffic in the short term, and require manual operation by professionals, which are easy to miss and cause quality hazards.
By recording the traffic of user requests and instructions and playing back the functions of the software system, the program code testing of the software system can be quickly realized, reducing the testing cost and complexity.
It achieves rapid and efficient improvement in software system testing, without the need for a large number of testers to manually cover the test, reduces the testing cost and simplifies the operation process.
Smart Images

Figure CN119847918A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of software testing, and specifically to a program testing method, a computer device, and a computer storage medium. Background Art
[0002] Every iteration and code change of a software system means that a large number of regression tests need to be performed on the core functions of the software system. Traditional software testing methods and tools either rely on a large number of testers to manually perform coverage tests, or rely on professionals proficient in automated testing to develop a large number of test scripts, which is very costly and prone to omissions and quality risks.
[0003] When doing software system stress testing, traditional stress testing tools are difficult to simulate large online traffic in a short period of time. Moreover, professional testers are required to construct the request data format of each interface through operations such as packet capture and script development, which is a very complicated process. Summary of the invention
[0004] The embodiments of the present application provide a program testing method, a computer device, and a computer storage medium, which can quickly implement the testing process of the program code of the software system by recording the traffic of user requests and instructions and replaying the traffic of software system functions, thereby improving the testing efficiency of the software system.
[0005] A first aspect of an embodiment of the present application provides a program testing method, the method comprising:
[0006] Obtaining a function activation instruction input by a user, and running a preset target program code to execute a target function indicated by the function activation instruction;
[0007] recording the target program code and storing first execution data generated by executing the target function;
[0008] When receiving the function playback instruction, running the target program code to execute the target function and obtaining second execution data of the target function;
[0009] A test result of the target program code is determined according to the first execution data and the second execution data.
[0010] A second aspect of an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the method of the first aspect when executing the computer program.
[0011] A third aspect of an embodiment of the present application provides a computer storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the method of the first aspect.
[0012] A fourth aspect of the embodiments of the present application provides a computer program product. When the computer program product is run on a computer device, the computer device executes the method of the first aspect.
[0013] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0014] The computer device obtains the function activation instruction input by the user, runs the preset target program code to execute the target function indicated by the function activation instruction, records the target program code, and stores the first execution data generated by executing the target function. When receiving the function playback instruction, the target program code is run to execute the target function and obtain the second execution data of the target function. The test result of the target program code is determined according to the first execution data and the second execution data. Therefore, by recording the traffic of the user's request and instruction and replaying the traffic of the software system function, the test process of the program code of the software system can be quickly implemented, without the need for personnel to manually cover each function of the software system. The operation is simple, the test efficiency of the software system is improved, and there is no need to write a large number of test scripts to test the software system, which greatly reduces the test cost of the software system. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is a schematic diagram of the network framework in the embodiment of the present application;
[0016] Figure 2 A flowchart of a program testing method in an embodiment of the present application;
[0017] Figure 3 This is another flowchart of the program testing method in the embodiment of the present application;
[0018] Figure 4 This is an exemplary schematic diagram of a process node of traffic recording in an embodiment of the present application;
[0019] Figure 5 A schematic diagram of an architecture for configuring multiple plug-ins for the Agent component in an embodiment of the present application;
[0020] Figure 6 This is an exemplary schematic diagram of a process node for traffic playback in an embodiment of the present application;
[0021] Figure 7 A schematic diagram of an architecture for providing services and configurations on the server side in an embodiment of the present application;
[0022] Figure 8 It is a structural schematic diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The embodiments of the present application provide a program testing method, a computer device, and a computer storage medium, which can quickly implement the testing process of the program code of the software system by recording the traffic of user requests and instructions and replaying the traffic of software system functions, thereby improving the testing efficiency of the software system.
[0024] See also Figure 1 In the embodiment of the present application, the network framework includes:
[0025] The service server 100 and the terminal cluster; the terminal cluster may include: terminal device 200a, terminal device 200b, terminal device 200c, ..., terminal device 200n and other terminal devices.
[0026] The business server 100 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud database, cloud service, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform. The terminal device (including terminal device 200a, terminal device 200b, terminal device 200c, ..., terminal device 200n) may be a smart phone, tablet computer, laptop computer, desktop computer, PDA, mobile internet device (MID), wearable device (such as smart watch, smart bracelet, etc.), smart computer, smart car and other smart terminals.
[0027] Among them, the business server 100 can establish a communication connection with each terminal device in the terminal cluster, and a communication connection can also be established between each terminal device in the terminal cluster. In other words, the business server 100 can establish a communication connection with each terminal device in the terminal device 200a, terminal device 200b, terminal device 200c, ..., terminal device 200n. For example, a communication connection can be established between the terminal device 200a and the business server 100. A communication connection can be established between the terminal device 200a and the terminal device 200b, and a communication connection can also be established between the terminal device 200a and the terminal device 200c. Among them, the above-mentioned communication connection does not limit the connection method, and can be directly or indirectly connected through a wired communication method, or can be directly or indirectly connected through a wireless communication method, etc., which can be determined according to the actual application scenario, and this application is not limited here.
[0028] It should be understood that Figure 1Each terminal device in the terminal cluster shown can be installed with an application client. When the application client runs in each terminal device, it can interact with the business server 100 respectively, so that the business server 100 can receive business data from each terminal device (such as financial management data uploaded by the user through the terminal device). Among them, the application client can be an application client with the function of displaying text, images, audio and video, such as a financial management application, an enterprise affairs management application, a browser application, a social application, an instant messaging application, a live broadcast application, a game application, a short video application, a video application, a music application, a shopping application, a novel application, a payment application, etc., which can be determined according to the actual application scenario requirements and is not limited here. Among them, the application client can be an independent client or an embedded sub-client integrated in a client (such as a financial management client, an enterprise affairs management client, etc.), which can be determined according to the actual application scenario and is not limited here.
[0029] In relevant solutions, every iteration and code change of the software system means that a large number of regression tests need to be performed on the core functions of the software system. Traditional software testing methods and tools either rely on a large number of testers to manually perform coverage tests, or rely on professionals proficient in automated testing to develop a large number of test scripts, which is very costly and prone to omissions and quality risks.
[0030] When doing software system stress testing, traditional stress testing tools are difficult to simulate large online traffic in a short period of time. Moreover, professional testers are required to construct the request data format of each interface through operations such as packet capture and script development, which is a very complicated process.
[0031] Secondly, online users reported problems with the software system. This problem may be a hidden system bug, which is very difficult for system developers to reproduce in a test environment. They need to accurately simulate every step of the user's operation and perform packet capture analysis, etc. In addition, there is a lot of communication work involved in the process, which affects the testing efficiency of the software system.
[0032] In order to solve the above technical problems, a program testing method of the embodiment of the present application is proposed. Figure 1 The program testing method in the embodiment of the present application is described in the network framework:
[0033] See also Figure 2 , one embodiment of the program testing method in the embodiment of the present application includes:
[0034] 201. Obtain a function activation instruction input by a user, and run a preset target program code to execute a target function indicated by the function activation instruction;
[0035] The method of this embodiment can be applied to a computer device, which can be Figure 1 The business server 100 or each terminal device in the network framework shown. The computer device can monitor the user's function activation instruction for the software system, and when the user's function activation instruction for the target function in the software system is monitored, the preset target program code corresponding to the target function can be run to execute the target function indicated by the function activation instruction.
[0036] Among them, the function of the software system can be the function provided by the software system for users to handle any type of business, such as the approval form preparation and submission function provided by the financial system, or the reimbursement form preparation and submission approval function provided by the OA system, and so on.
[0037] 202. Record the target program code and store first execution data generated by executing the target function;
[0038] When executing the target function, the target program code corresponding to the target function can be recorded by traffic recording. Traffic recording is the process of serializing and storing the input parameters, output parameters, downstream RPC, DB (DataBase), cache, etc. of each request. Traffic recording refers to the process of recording network traffic data by technical means, mainly used for testing and debugging. Traffic recording can capture detailed information of network requests and responses, including request parameters, header information, response content, etc. This information can be saved and used for subsequent analysis, testing or playback.
[0039] Furthermore, when executing the target function, first execution data generated by executing the target function may also be stored. The first execution data may be any data generated during the execution of the target function, for example, intermediate data or result data generated by the execution of the target function.
[0040] 203. When receiving the function playback instruction, run the target program code to execute the target function and obtain second execution data of the target function;
[0041] The computer device can record the traffic of the user's function activation instructions for testing the software system in subsequent software system updates. During testing, a function playback instruction for the software system can be input, and the function playback instruction represents the test and playback of the target function. When the computer device receives the function playback instruction, it can run the previously recorded target program code through traffic playback to execute the target function and obtain the second execution data of the target function execution. Traffic playback is the process of restoring the recorded data, re-initiating one or N requests, and performing MOCK on a specific downstream node. When performing MOCK, the sub-call that is intercepted during traffic playback will not be actually called, but the previously recorded and saved results will be directly returned.
[0042] Similarly, the second execution data may be any data generated during the execution of the target function, for example, may be intermediate data or result data generated by the execution of the target function.
[0043] 204. Determine a test result of the target program code according to the first execution data and the second execution data;
[0044] Since the first execution data is the execution data generated when the target function is used by the user, and the second execution data is the data generated when the target function is reproduced during the traffic playback process and the target program code corresponding to the target function is rerun, the first execution data and the second execution data can be compared. Based on the comparison between the first execution data and the second execution data, the test result of the target program code corresponding to the target function can be obtained. The test result can reflect the running result of the target function after the software system is updated, and reflect whether the target function runs normally after the software system is updated and whether it can output expected results as usual.
[0045] In this embodiment, the computer device obtains the function activation instruction input by the user, runs the preset target program code to execute the target function indicated by the function activation instruction, records the target program code, and stores the first execution data generated by executing the target function. When receiving the function playback instruction, the target program code is run to execute the target function and obtain the second execution data of the target function. The test result of the target program code is determined according to the first execution data and the second execution data. Therefore, by recording the traffic of the user's request and instruction and replaying the traffic of the software system function, the test process of the program code of the software system can be quickly implemented, without the need for personnel to manually cover each function of the software system. The operation is simple, the test efficiency of the software system is improved, and there is no need to write a large number of test scripts to test the software system, which greatly reduces the test cost of the software system.
[0046] The following will be Figure 2Based on the embodiment shown, the embodiment of the present application is further described in detail. Figure 3 Another embodiment of the program testing method in the embodiment of the present application includes:
[0047] 301. Obtain a function activation instruction input by a user, and run a preset target program code to execute a target function indicated by the function activation instruction;
[0048] 302. Record the target program code and store first execution data generated by executing the target function;
[0049] In this embodiment, the interception and recording of the system request call can be implemented based on the JavaAgent technology, and the parameters and return results of the request call can be stored. Figure 4 An exemplary schematic diagram of the process node of traffic recording is shown. As shown in the figure, Agent captures and intercepts entry call traffic and sub-call traffic by configuring multiple plug-ins. Among them, the entry call traffic is generally the traffic source of the application, such as http / dubbo. The call input parameters, return values and other data are recorded during the call process, and used as the basis for comparing the traffic initiation and execution results during playback. Sub-call traffic is different from the entry call traffic. The sub-call is a method call during the call execution process. The sub-call traffic will record the input parameters, return values and other data of the method during recording, and use the return value for MOCK during playback.
[0050] When storing the first execution data generated by executing the target function, the call traffic corresponding to the execution of the target program code can be summarized to obtain an interface call record, wherein the interface call record is used to indicate the interface called during the execution of the target program code and the execution result corresponding to the interface call.
[0051] like Figure 4 As shown, after intercepting the inlet call traffic and the sub-call traffic, the inlet call traffic and the sub-call traffic are summarized to obtain the call record. After that, the call record can be serialized, and the API interface is called to store the serialized data in the ES search engine (Elastic Search). Among them, the call to the interface may include the interface call to databases such as Motan and MySQL.
[0052] Among them, Agent is a specific program running on the target JVM (Java Virtual Machine). Its responsibility is to obtain data from the target JVM and then pass the data to the external process. The loading of Agent when the target JVM is running is dynamic, which is very practical for debugging scenarios with unknown timing. Agent can record the process of user request processing and user instruction processing of the software system based on its configured multiple plug-ins. Agent can mainly run on the client and can be deployed on the same server as the application of the software system for traffic recording. The Agent component has a large number of built-in plug-ins, which can support the current mainstream technical frameworks and middleware.
[0053] like Figure 5 As shown, Figure 5 The figure shows various plug-ins configured in the Agent, such as entry call plug-in, replay plug-in, sub-call plug-in and dynamic AOP plug-in. Based on these plug-ins, the Agent can record the flow of the user request processing and user instruction processing of the software system. For example, through the built-in replay, the flow of each request call can be replayed with one click.
[0054] 303. When receiving the function playback instruction, run the target program code to execute the target function and obtain second execution data of the target function;
[0055] When performing traffic playback, you can play back the recorded target program code to simulate the execution process of the target function. Figure 6 As shown, the previously recorded target program code stored in the playback engine can be serialized to obtain a call record, and the inlet traffic call and the sub-call traffic are processed based on the call record, such as executing the corresponding request for the inlet traffic and performing a Mock call on the sub-call traffic. Among them, if it involves an interface call to a database such as Motan or MySQL, the interface call may not be executed, because it is only a test of the software system, and there is no need to call the database interface or write data to the database, thereby avoiding occupying too many database resources, reducing the operating time of the software system test, and improving the efficiency of the software system test.
[0056] In an optional implementation of this embodiment, when a function playback instruction is received, the target program code is run to execute the target function, and the second execution data of the target function is obtained. An optional implementation of this embodiment may be that the computer device obtains configuration data for function playback, and the configuration data for function playback is used to configure the execution items of the target function based on the target program code. When the function playback instruction is received, the target program code is run according to the configuration data for function playback to execute the target function and obtain the second execution data.
[0057] For example, Figure 7 A schematic diagram of a configuration architecture of the server side is shown. The server side is used to manage the test items of the software system. It can be deployed in any machine, provided that the network connection with the agent side is guaranteed. The server side can configure a variety of services such as Web services, the front-end page of the console, and the service capabilities of the agent side, the back-end management service capabilities, and configure a variety of data service components such as MySQL database and ES search engine. Therefore, the relevant items of the software system test can be configured through the above-mentioned various services and components configured on the server side, such as configuring the content of the traffic recording or the time point of the traffic recording, or configuring the frequency and time point of the traffic playback, etc. Furthermore, when performing software system testing, the target program code can be run based on the configuration data of the function playback of the target function to execute the target function, so that the test process of the target function meets the pre-configured items.
[0058] Therefore, by testing the target functions through pre-configured test items, the user's customized requirements for software system testing can be met, and the user's customized testing of the software system can be realized.
[0059] 304. Determine a test result of the target program code according to the first execution data and the second execution data;
[0060] In this embodiment, the test result of the target program code is determined based on the first execution data and the second execution data. An optional implementation method may be that if the execution result in the first execution data is consistent with the execution result in the second execution data, the test result of the target program code is determined to be normal; if the execution result in the first execution data is inconsistent with the execution result in the second execution data, the test result of the target program code is determined to be abnormal.
[0061] Therefore, if the response results of the recording and playback request calls are consistent, it means that the interface function is normal and has not been affected by code or configuration changes, and the function is reliable. If the response results of the two calls are inconsistent, the developer needs to analyze and check to determine whether the code of the interface has changed, so that software testers and software developers can find hidden problems in the software system in a timely manner.
[0062] 305. Displaying the fields and parameters of the target program code included in the first execution data in the interface, and displaying the fields and parameters of the target program code included in the second execution data in the interface; and displaying the test result of the target program code in the interface;
[0063] In this embodiment, the Agent component can implement a result comparison engine and interface, which can compare the original response content with the response content after playback, and support advanced features such as field noise reduction, so that users can quickly determine whether the results of the two requests are consistent and meet expectations.
[0064] Therefore, in an optional implementation, after determining the test result of the target program code according to the first execution data and the second execution data, the fields and parameters of the target program code included in the first execution data and the fields and parameters of the target program code included in the second execution data can be displayed in the interface. At the same time, the test result of the target program code can also be displayed in the interface.
[0065] Therefore, by displaying the fields and parameters of the target program code in the first execution data and the second execution data, it is convenient for the user to compare the similarities and differences between the first execution data of the target program code and the second execution data of the target program code, and it is convenient for the user to quickly determine the test result of the target program code based on the first execution data and the second execution data.
[0066] In addition, after determining the test results of the target program code based on the first execution data and the second execution data, the computer device can also display in the interface the difference fields where there are differences in field values between the fields of the target program code contained in the first execution data and the fields of the target program code contained in the second execution data, and display in the interface the comparison results between the execution results in the first execution data and the execution results in the second execution data.
[0067] Therefore, by displaying the difference field and the comparison result, the user can clearly view the difference between the first execution data and the second execution data, which is convenient for the user to quickly determine the test result of the target program code.
[0068] The difference fields may be all the difference fields between the fields of the target program code included in the first execution data and the fields of the target program code included in the second execution data, or may be part of the difference fields determined based on the configuration data.
[0069] Therefore, in an optional implementation, noise reduction configuration data for the difference field may be obtained, and the noise reduction configuration data is used to indicate that a target difference field in the difference field is to be displayed. Therefore, the target difference field in the difference field between the first execution data and the second execution data may be determined, and the target difference field between the first execution data and the second execution data may be displayed in the interface. In addition, other fields between the first execution data and the second execution data that do not belong to the target difference field may not be displayed on the interface, so that the user only needs to focus on the target difference field and will not be disturbed by other fields, thereby achieving noise reduction display of the data.
[0070] For example, fields such as system timestamps and random numbers can be configured as "noise reduction" fields to ignore the processing of such fields. In this way, they can be automatically ignored when comparing results, avoiding excessive information display that interferes with users' viewing and comparison of field data displayed on the interface.
[0071] Therefore, in this embodiment, the testing of the software system is non-invasive to the program code. Through Agent technology, there is no need for developers to change the code, and the hidden dangers caused by code changes in the iterative process of application system development can be identified in a timely and accurate manner to improve the system quality. Secondly, it is simple to operate, which can greatly improve the work efficiency of software testers and developers; it has strong versatility, rich built-in plug-ins, supports a large number of mainstream technical frameworks, components, and middleware, supports physical machines, virtual machines, and K8S containerized deployment; it has strong scalability. If you need to support a new framework, you only need to refer to the specification to define a new plug-in and implement the key interface, which can achieve microservices and cloud native architectures that meet the current mainstream. In addition, the process of software system testing is lightweight and pluggable, and can be started, stopped, and uninstalled at any time.
[0072] The computer device in the embodiment of the present application is described below. Figure 8 In the embodiment of the present application, one embodiment of the computer device includes:
[0073] The computer device 800 may include one or more central processing units (CPU) 801 and a memory 805 , wherein the memory 805 stores one or more application programs or data.
[0074] The memory 805 may be a volatile storage or a persistent storage. The program stored in the memory 805 may include one or more modules, each of which may include a series of instruction operations in the computer device. Furthermore, the central processing unit 801 may be configured to communicate with the memory 805 and execute a series of instruction operations in the memory 805 on the computer device 800.
[0075] The computer device 800 may also include one or more power supplies 802, one or more wired or wireless network interfaces 803, one or more input and output interfaces 804, and / or one or more operating systems, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0076] The CPU 801 can execute the aforementioned Figures 2 to 3 The operations performed by the computer device in the illustrated embodiment will not be described in detail here.
[0077] The present application also provides a computer storage medium, wherein one embodiment includes: the computer storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the aforementioned Figures 2 to 3 The operations performed by the computer device in the illustrated embodiment.
[0078] The present application also provides a computer program product, wherein one embodiment includes: when the computer program product is run on a computer device, the computer device executes the aforementioned Figures 2 to 3 The operations performed by the computer device in the illustrated embodiment.
[0079] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0080] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0081] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0082] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0083] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A program testing method, characterized in that: The method comprises: Obtaining a function activation instruction input by a user, and running a preset target program code to execute a target function indicated by the function activation instruction; recording the target program code and storing first execution data generated by executing the target function; When receiving the function playback instruction, running the target program code to execute the target function and obtaining second execution data of the target function; A test result of the target program code is determined according to the first execution data and the second execution data.
2. The method according to claim 1, characterized in that Determining the test result of the target program code according to the first execution data and the second execution data includes: If the execution result in the first execution data is consistent with the execution result in the second execution data, determining that the test result of the target program code is normal; If the execution result in the first execution data is inconsistent with the execution result in the second execution data, it is determined that the test result of the target program code is abnormal.
3. The method according to claim 1, characterized in that After determining the test result of the target program code according to the first execution data and the second execution data, the method further includes: Displaying the fields and parameters of the target program code included in the first execution data in an interface, and displaying the fields and parameters of the target program code included in the second execution data in the interface; The test result of the target program code is displayed in the interface.
4. The method according to claim 1, characterized in that After determining the test result of the target program code according to the first execution data and the second execution data, the method further includes: Displaying in the interface a difference field having a difference in field value between a field of the target program code included in the first execution data and a field of the target program code included in the second execution data; A comparison result between the execution result in the first execution data and the execution result in the second execution data is displayed in the interface.
5. The method according to claim 4, characterized in that The displaying in the interface the difference field having a difference in field value between the field of the target program code included in the first execution data and the field of the target program code included in the second execution data comprises: Acquire noise reduction configuration data for the difference field, where the noise reduction configuration data is used to indicate that a target difference field in the difference field is to be displayed; The target difference field in the difference field between the first execution data and the second execution data is determined, and the target difference field between the first execution data and the second execution data is displayed in the interface.
6. The method according to claim 1, characterized in that The step of, upon receiving the function playback instruction, running the target program code to execute the target function and obtaining second execution data of the target function comprises: Acquire configuration data for function playback, wherein the configuration data for function playback is used to configure execution items of the target function based on the target program code; When a function playback instruction is received, the target program code is run according to the configuration data of the function playback to execute the target function and obtain the second execution data.
7. The method according to any one of claims 1 to 6, characterized in that: The storing of the first execution data generated by executing the target function includes: The call traffic corresponding to the running of the target program code is summarized to obtain an interface call record; the interface call record is used to indicate the interface called during the running of the target program code and the execution result corresponding to the interface call.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
9. A computer storage medium, characterized in that The computer storage medium stores instructions, and when the instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that When the computer program product is executed on a computer device, the computer device is caused to perform the method according to any one of claims 1 to 7.