Methods, apparatuses, devices, media, and products for processing coverage files

By combining application layer protocol patterns and target interfaces, the problem of coverage data not being able to be automatically uploaded in container orchestration environments is solved, enabling real-time acquisition of coverage files and multi-tenant management, thereby improving user experience and data security.

CN123178247APending Publication Date: 2026-11-27HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510687441.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In complex container orchestration environments, the automatic extraction and stable uploading of existing coverage data cannot be achieved, resulting in a poor user experience and failing to meet the requirements for real-time performance and security.

Method used

The coverage file is transmitted in real time through the target interface using an application layer protocol mode. Data isolation is achieved by combining tenant and module identifiers, enabling remote automatic acquisition of coverage files and multi-tenant management.

Benefits of technology

It enables remote automatic acquisition of coverage files, meets real-time requirements, improves the transmission efficiency of test results and user experience, and ensures the security and accuracy of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178247A_ABST
    Figure CN123178247A_ABST
Patent Text Reader

Abstract

The application provides a method, device, equipment, medium and product for processing a coverage file, and relates to the field of software testing. The method comprises the following steps: obtaining a coverage file of code of an application, wherein the coverage file comprises statistical information of code execution; determining whether an output mode of the coverage file is set as an application layer protocol mode; and providing the coverage file to a target interface if the output mode of the coverage file is set as the application layer protocol mode, wherein the target interface corresponds to an interface address of the application layer protocol. In this way, the obtained coverage file can be transmitted to the target interface in real time through the corresponding interface address when the output mode of the coverage file is set as the application layer protocol mode, the remote automatic acquisition of the coverage file is realized, the real-time requirement of the coverage file uploading is met, the transmission efficiency of the test result is improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this disclosure generally relate to the field of software testing, and more specifically, the embodiments of this application relate to methods, apparatus, devices, media, and products for processing coverage files. Background Technology

[0002] Code coverage, as an important means of measuring test completeness, has been widely used in current software development processes. Modern software projects commonly adopt continuous integration and continuous delivery systems, making coverage data an important component of the quality assessment system. Various coverage tools have been widely integrated into build pipelines, supporting the generation of coverage reports during the build or testing phases to assess the extent to which code has been tested.

[0003] As applications are increasingly deployed to the cloud, code coverage collection and management are adapting to the characteristics of containerization and microservice architectures. By injecting a coverage collection agent during service startup, data collection can be performed without interrupting service operation, and unified data collection and archiving can be achieved in conjunction with a container scheduling platform. In common coverage collection methods, tools typically support generating coverage data files at the end of the service lifecycle, or can trigger the generation of coverage data for the current runtime via remote commands. However, in complex container orchestration environments, it is not yet possible to achieve automatic extraction and stable uploading of coverage data via remote connections, resulting in a poor user experience. Summary of the Invention

[0004] Embodiments of this application provide a scheme for processing coverage files.

[0005] According to a first aspect of this application, a method for processing a coverage file is provided. The method includes obtaining a coverage file for code of an application, the coverage file including statistics on code execution; determining whether the output mode of the coverage file is set to application layer protocol mode; and if the output mode of the coverage file is set to application layer protocol mode, providing the coverage file to a target interface, the target interface corresponding to an interface address for the application layer protocol.

[0006] In this way, when the output mode of the coverage file is set to application layer protocol mode, the acquired coverage file can be transmitted to the target interface in real time through the corresponding interface address. This realizes the remote automatic acquisition of the coverage file and meets the real-time requirements of coverage file upload, thereby improving the transmission efficiency of test results and enhancing the user experience.

[0007] In some embodiments, providing a coverage file to a target interface includes pushing the coverage file via the target interface at predetermined first time intervals through a service for obtaining coverage files. This method enables automatic and periodic collection of runtime code coverage data, thereby ensuring the real-time and continuous updating of coverage information.

[0008] In some embodiments, the method further includes: determining a tenant identifier of the tenant associated with the coverage file and a module identifier of the module used to store the coverage file; and providing the tenant identifier and module identifier to a target interface in conjunction with the coverage file. This approach enables multi-tenant isolation and module ownership management of coverage data, ensuring that uploaded coverage files are accurately associated with the corresponding system and user.

[0009] In some embodiments, the method further includes: if a coverage file is provided to a target interface, receiving a second time interval from the target interface for uploading the next coverage file. This allows for dynamic adjustment of the upload frequency of coverage files.

[0010] According to a second aspect of this application, a method for processing a coverage file is provided. The method includes: receiving a coverage file for application code via a target interface at a first time interval, the coverage file being provided to the target interface when the output mode of the coverage file is set to application layer protocol mode, the target interface corresponding to an interface address for the application layer protocol, and the coverage file including statistical information on code execution; and updating a coverage report for the code based on the coverage file.

[0011] In this way, when the output mode of the coverage file is set to application layer protocol mode, the acquired coverage file can be transmitted to the target interface in real time through the corresponding interface address, and a coverage report can be generated. This realizes remote automatic acquisition of coverage files, meets the real-time requirements of coverage file upload, improves the efficient collection and analysis of coverage data, and enhances the user experience.

[0012] In some embodiments, updating the code coverage report based on the coverage file includes: obtaining the tenant identifier of the tenant associated with the coverage file and the module identifier of the module used to store the coverage file through a target interface; and updating the application's code coverage report based on the tenant identifier, module identifier, and coverage file. This approach enables precise categorization and updating of coverage reports by tenant and module, ensuring data isolation and accuracy in a multi-tenant environment.

[0013] In some embodiments, updating the coverage report for application code based on tenant identifier, module identifier, and coverage file includes: determining the module used by the tenant based on the tenant identifier and module identifier; determining whether an editable coverage report exists in the module; and if an editable coverage report exists in the module, updating the coverage data in the coverage file to the coverage report. This method enables the updating of existing coverage reports, ensuring that coverage information is continuously improved and editable and maintainable.

[0014] In some embodiments, updating the coverage report for the application's code based on the tenant identifier, module identifier, and coverage file further includes discarding the coverage file if no editable coverage report exists in the module. This approach avoids writing invalid data and wasting resources.

[0015] In some embodiments, the method further includes: obtaining a second time interval set by the tenant for uploading the next coverage file based on the tenant identifier; and returning the second time interval through a target interface. This approach enables flexible control over data uploading by supporting tenant-customized upload frequencies and dynamically distributing time intervals through a target interface.

[0016] In some embodiments, the method further includes: obtaining a baseline branch and a development branch for the application's code; determining incremental code based on the baseline branch and the development branch; and determining incremental coverage for the incremental code based on the incremental code and a coverage file. This approach enables automatic identification of code changes and calculation of incremental coverage.

[0017] In some embodiments, the method further includes determining full coverage for the development branch based on the development branch and coverage files. This allows for the automatic generation of a full coverage report for the development branch.

[0018] According to a third aspect of this application, an apparatus for processing coverage files is provided. The apparatus includes: a coverage acquisition unit configured to acquire a coverage file for application code, the coverage file including statistical information on code execution; an output mode determination unit configured to determine whether the output mode of the coverage file is set to application layer protocol mode; and a coverage file upload unit configured to provide the coverage file to a target interface if the output mode of the coverage file is set to application layer protocol mode, the target interface corresponding to an interface address for application layer protocol.

[0019] In some embodiments, the coverage file upload unit includes a push unit configured to push the coverage file via a target interface at predetermined first time intervals through a service for obtaining coverage files.

[0020] In some embodiments, the apparatus further includes: an identifier determination unit configured to determine a tenant identifier of a tenant associated with a coverage file and a module identifier of a module used to store the coverage file; and an identifier provision unit configured to provide the tenant identifier and module identifier to a target interface in connection with the coverage file.

[0021] In some embodiments, the apparatus further includes a second time interval receiving unit configured to receive a second time interval from the target interface for uploading the next coverage file if a coverage file is provided to the target interface.

[0022] According to a fourth aspect of this application, an apparatus for processing coverage files is provided. The apparatus includes: a file receiving unit configured to receive, at first time intervals, a coverage file for application code via a target interface, the coverage file being provided to the target interface when the output mode of the coverage file is set to application layer protocol mode, the target interface corresponding to an interface address for the application layer protocol, and the coverage file including statistical information on code execution; and a coverage report updating unit configured to update a coverage report for the code based on the coverage file.

[0023] In some embodiments, the coverage report update unit includes: an identifier acquisition unit configured to acquire, through a target interface, a tenant identifier of the tenant associated with the coverage file and a module identifier of the module used to store the coverage file; and a first update unit configured to update the coverage report for the application's code based on the tenant identifier, the module identifier, and the coverage file.

[0024] In some embodiments, the first update unit includes: a module determination unit configured to determine the module used by the tenant based on the tenant identifier and the module identifier; a report determination unit configured to determine whether there is an editable coverage report in the module; and a second update unit configured to update the coverage data in the coverage file to the coverage report if there is an editable coverage report in the module.

[0025] In some embodiments, the first update unit further includes a discard unit configured to discard the coverage file if no coverage report available for editing exists in the module.

[0026] In some embodiments, the apparatus further includes: a time interval acquisition unit configured to acquire a second time interval set by the tenant for uploading the next coverage file based on the tenant identifier; and a time interval return unit configured to return the second time interval through the target interface.

[0027] In some embodiments, the apparatus further includes: a branch acquisition unit configured to acquire a baseline branch and a development branch for code of the application; an incremental code determination unit configured to determine incremental code based on the baseline branch and the development branch; and an incremental coverage determination unit configured to determine incremental coverage for the incremental code based on the incremental code and the coverage file.

[0028] In some embodiments, the apparatus further includes a full coverage determination unit configured to determine full coverage for the development branch based on the development branch and the coverage file.

[0029] According to a fifth aspect of this application, an electronic device is also provided, comprising: at least one computing unit; and at least one memory coupled to the at least one computing unit and storing instructions for execution by the at least one computing unit, the instructions, when executed by the at least one computing unit, causing the device to perform the method according to a first or second aspect of this application.

[0030] According to a sixth aspect of this application, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the method described according to the first or second aspect of this application.

[0031] According to a seventh aspect of this application, a computer program product is also provided, including computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method described according to a first or second aspect of this application.

[0032] Understandably, the apparatus of the third aspect, the apparatus of the fourth aspect, the electronic device of the fifth aspect, the computer storage medium of the sixth aspect, or the computer program product of the seventh aspect provided above are used to perform the method provided in the first aspect. Therefore, the explanations or descriptions regarding the first and second aspects also apply to the third, fourth, fifth, sixth, and seventh aspects. Furthermore, the beneficial effects achievable by the third, fourth, fifth, sixth, and seventh aspects can be referred to the beneficial effects in the corresponding methods, and will not be repeated here. Attached Figure Description

[0033] The above and other features, advantages and aspects of the embodiments of this application will become more apparent when taken in conjunction with the accompanying drawings and the following detailed description.

[0034] In the accompanying drawings, the same or similar reference numerals denote the same or similar elements, wherein:

[0035] Figure 1 A schematic diagram illustrates an example environment in which several embodiments of this application can be implemented;

[0036] Figure 2 A schematic flowchart of a method for processing coverage files according to some embodiments of this application is shown;

[0037] Figure 3 A schematic flowchart of another method for processing coverage files according to some embodiments of this application is shown;

[0038] Figure 4 A schematic flowchart of a method for updating a coverage report according to some embodiments of this application is shown;

[0039] Figure 5 A flowchart illustrating the complete workflow of a real-time automated code coverage solution according to some embodiments of this application is shown.

[0040] Figure 6 A schematic diagram of a version configuration interface according to some embodiments of this application is shown;

[0041] Figure 7 A block diagram of an apparatus for processing coverage files according to some embodiments of this application is shown;

[0042] Figure 8 A block diagram of another apparatus for processing coverage files according to some embodiments of this application is shown; and

[0043] Figure 9 A block diagram of a computing device capable of implementing several embodiments of the present application is shown. Detailed Implementation

[0044] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While some embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this application. It should be understood that the drawings and embodiments of this application are for illustrative purposes only and are not intended to limit the scope of protection of this application.

[0045] In the description of embodiments of this application, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0046] In the examples of this application, the term code coverage is a metric in software testing used to measure the proportion of code under test that is executed during testing. It reflects the degree to which test cases cover the code and is an important basis for evaluating the adequacy of testing. Common types of code coverage include: Statement Coverage, which measures whether each statement in the code is executed, and its calculation formula is: Statement Coverage = (Number of executed statements / Total number of statements) * 100%; Branch Coverage, which measures whether each branch (such as if-else, switch-case) in the code is covered, and its calculation formula is: Branch Coverage = (Number of executed branches / Total number of branches) * 100%; Condition Coverage, which measures whether the sub-conditions of each Boolean expression (such as 'a' and 'b' in 'a&&b') are covered; Path Coverage, which measures whether all possible execution paths in the code are covered; Function Coverage, which measures whether each function in the code is called, and its calculation formula is: Function Coverage = (Number of called functions / Total number of functions) * 100%; and Line Coverage. Coverage is a simplified version of statement coverage, used to measure whether each line of code is executed.

[0047] When testing code, traditional proxies are typically used to obtain code coverage data. Traditional proxies offer various coverage data output methods. In file and Transmission Control Protocol Client (Tcpclient) mode, coverage data is only generated or pushed when the Java Virtual Machine (JVM) terminates, failing to meet the need for dynamic runtime acquisition. While in Transmission Control Protocol Server (Tcpserver) mode, traditional proxies support runtime data retrieval, they rely on external access to the container's internal network, resulting in complex deployment, cumbersome operation, and security vulnerabilities. Furthermore, in containerized deployments, the Internet Protocol (IP) address changes with each startup, preventing direct external connections to the container and rendering remote connections unavailable. Therefore, when building a coverage platform with high real-time performance, automation, and multi-tenancy support in a containerized environment, existing proxy services cannot meet the system's comprehensive requirements for real-time performance, ease of use, and security.

[0048] For example, when using a coverage platform to obtain coverage data, a traditional approach is based on the TCP server model. This involves using scripts or tools to enter each container and perform download operations, copying the generated coverage files from the container. Finally, the files are pushed to the coverage platform. This process requires uninterrupted network connectivity between the coverage platform and each product server, and is extremely cumbersome. Furthermore, each application service needs to have its ports open, increasing the difficulty of integration and compromising security. Another approach is based on the TCP client model, utilizing coverage reporting capabilities when the service stops. However, because it relies on service shutdown triggers, it cannot support real-time requirements, and the long TCP connection method can become a performance bottleneck during large-scale access. Furthermore, traditional coverage platforms require manual processing to obtain coverage files, resulting in high labor costs. They also do not support continuous updates of coverage over an iteration, necessitating the creation of a new task for each update. Additionally, manually adding tasks requires manually uploading source code and class files, packaging them in a fixed format, which is cumbersome and needs to be repeated every time a report is generated. Finally, they fail to meet real-time requirements, as manual operations are time-consuming and cannot provide real-time updates.

[0049] To address at least some of the aforementioned issues and other potential problems, in embodiments of this application, the computing device can first obtain a coverage file for the application's code, which includes statistical information about code execution. Next, the computing device can determine whether the output mode of the coverage file is set to application layer protocol mode. Finally, when the output mode of the coverage file is set to application layer protocol mode, the computing device provides the coverage file to the target interface, where the target interface corresponds to the interface address for the application layer protocol. In this way, when the output mode of the coverage file is set to application layer protocol mode, the obtained coverage file can be transmitted to the target interface in real time via the corresponding interface address, achieving remote automatic acquisition of the coverage file and meeting the real-time requirements of coverage file upload, thereby improving the transmission efficiency of test results and enhancing the user experience.

[0050] Figure 1 A schematic diagram of an example environment 100 in which various embodiments of this application can be implemented is shown. For example... Figure 1As shown, example environment 100 includes computing device 102 and coverage platform 114. Examples of computing device 102 and coverage platform 114 include, but are not limited to, personal computers, server computers, handheld or laptop devices, mobile devices (such as mobile phones, personal digital assistants (PDAs), media players, etc.), multiprocessor systems, consumer electronics, minicomputers, mainframe computers, and distributed computing environments that include any of the above systems or devices.

[0051] The computing device 102 can be used to test the application's code. When testing the application's code, the computing device 102 can also launch an agent to acquire coverage data associated with the code tests. For example, the agent can be triggered during code testing. The agent can then acquire code-related data, such as whether the code was executed and the number of times it was executed. The agent can further calculate coverage data based on code execution statistics, such as statement coverage and branch coverage. Therefore, the computing device 102 can obtain a coverage file 104 through this agent, which includes coverage data for the application's code. Additionally, the computing device 102 can generate corresponding coverage files by acquiring coverage data in real time through this agent.

[0052] The agent running in computing device 102 for acquiring coverage data can include multiple output methods 106 for the coverage file. For example, the agent can include four output methods, one of which is file output. In this mode, the coverage data is written to the specified file when the JVM terminates. The second output method is Tcpserver, where the agent listens for incoming connections on the TCP port specified in predefined attributes. The coverage file is written to this TCP connection. The third output method is Tcpclient. In this mode, the agent connects to the TCP port specified in predefined attributes at startup. The coverage file is written to this TCP connection. Application layer protocol mode 108 can be a newly added fourth mode for outputting the coverage file in the agent. In this mode, the file can be uploaded via an interface after the coverage data file is automatically generated at scheduled intervals. The upload time can default to a predetermined duration, for example, uploading the coverage data file every 1 second or 2 seconds, or uploading the coverage data file in real time. Additionally, the upload timing can be configured by the user to a desired duration. For example, the application layer protocol pattern can be Hypertext Transfer Protocol (HTTP). The first and third patterns typically generate coverage files only when the JVM terminates, and cannot transmit coverage data in real time. The second pattern, in a container execution environment, cannot meet remote connection requirements due to IP address changes. The fourth pattern, however, uses an application layer protocol pattern for transmission, and can upload coverage files to the interface corresponding to the pre-determined interface address for a predetermined duration, thus achieving remote real-time transmission of coverage files.

[0053] Therefore, when acquiring the coverage file 104, the computing device 102 can further determine whether the output mode 106 used to output the coverage file in the agent is application layer protocol mode 108. If the output mode is application layer protocol mode, the interface address corresponding to the application layer protocol mode 108 pre-set in the agent can be further determined. This interface address corresponds to the target interface 110 pre-set in the coverage platform 114. Then, the computing device 102 provides the coverage file 104 to the target interface 110 corresponding to the interface address so that the coverage platform 114 can acquire the coverage file 104 for further processing. For example, when the coverage data file is received in real time, the coverage report 112 can be updated in real time.

[0054] In some embodiments, to further build data isolation functionality for tenants performing code tests, ensuring that each application tenant can only view and manipulate relevant data within its own tenant, the computing device 102 can further obtain the tenant identifier corresponding to the tenant in the coverage platform and the module identifier corresponding to the module. Different versions of the coverage report are typically stored in the module; for example, when performing a coverage update, the corresponding version of the coverage report can be opened. Then, the tenant identifier and module identifier are uploaded along with the coverage file to the target interface 110. Additionally, when adding an agent in the computing device 102, the user can pre-configure the output method, tenant identifier, module identifier, and the interface address for uploading data. By building isolation functionality for tenants, information leakage is avoided, and data security is improved.

[0055] After obtaining the coverage file 104 through the target interface 110, the coverage platform 114 can further process the coverage file, for example, for writing it into the coverage report 112. Additionally, after the coverage platform 114 distinguishes between tenants and modules, it can further utilize the tenant identifier and module identifier passed from the target interface 110 to find the module used by that tenant. Then, it uses the coverage file 104 to update the coverage report 112 in that tenant's module. Furthermore, tenants can also configure instrumentation data in the coverage platform, such as filling in information like the code repository address, source file path, compilation file path, and compilation parameters for each module, and can also configure the corresponding baseline and deployment branch. This allows for further determination of incremental coverage and full coverage by combining the coverage file.

[0056] In this way, when the coverage file output mode is set to application layer protocol mode, the acquired coverage file can be transmitted to the target interface in real time through the corresponding interface address. This realizes remote automatic acquisition of coverage files and meets the real-time requirements of coverage file upload, thereby improving the transmission efficiency of test results, enhancing the efficient collection and analysis of coverage data, and improving the user experience.

[0057] The above combination Figure 1 A schematic diagram illustrating an example environment 100 in which embodiments of this application can be implemented is described. The following is in conjunction with... Figure 2 A schematic flowchart illustrating a method for processing a coverage file according to some embodiments of this application is provided. Method 200 can be performed by... Figure 1 The computing device 102 and any suitable computing device in the system execute the process of acquiring the coverage file and uploading it. Figure 1 The coverage platform 114.

[0058] At box 202, computing device 102 acquires a code coverage file for the application, which includes statistics on code execution. When the application code is run on computing device 102, for example, during code testing, a coverage file describing code execution can be generated. This coverage file may include the executed code, the number of executions, statement coverage, branch coverage, condition coverage, path coverage, function coverage, line coverage, and other parameters.

[0059] In some embodiments, when obtaining a code coverage file for an application, a proxy service for obtaining the coverage file may be started. For example, the proxy service may be started when the application starts. The computing device 102 then uses the proxy service to obtain coverage data related to the execution of the code in real time to form the coverage file.

[0060] At box 204, computing device 102 determines whether the output method for the coverage file is set to application layer protocol mode. After obtaining the coverage file, computing device 102 also needs to further determine the output method of the proxy used to transmit the coverage file. If the output method of the coverage file is set to a mode other than application layer protocol mode, the coverage file is processed according to that mode. For example, if the output method is file mode, the coverage file is generated when the JVM finishes its work and transmitted through other means. However, in order to provide the coverage file remotely in real time, it is necessary to determine whether it is in application layer protocol mode, such as HTTP mode. This is because, in this mode, the interface address of the target interface corresponding to the application layer protocol mode is set so that the coverage file can be uploaded through that interface address.

[0061] At box 206, if the output mode for the coverage file is set to application layer protocol mode, the computing device 102 provides the coverage file to the target interface, where the target interface corresponds to the interface address for the application layer protocol. After determining that the output mode for the coverage file is set to application layer protocol mode, the computing device 102 can upload the coverage file to the pre-set interface address of the target interface for further processing by the coverage platform, thereby displaying it to the corresponding tenant. For example, the computing device 102 can push the coverage file via the target interface at a predetermined first time interval through a proxy service for obtaining the coverage file. For example, the first time interval can be set to 1 second, 2 seconds, etc. Alternatively, if the first time interval is set to 0 seconds, the coverage file can be transmitted in real time.

[0062] Additionally, the computing device 102 can further determine the tenant identifier of the tenant associated with the coverage file and the module identifier of the module used to store the coverage file. For example, the tenant identifier and module identifier are pre-set when configuring the agent's parameters on the computing device 102 side. For instance, the tenant identifier can be set to A and the module identifier to B, indicating that the coverage file is a coverage report from module B used by tenant A in the coverage platform. The computing device 102 can then provide the tenant identifier and module identifier to the target interface in association with the coverage file.

[0063] After the computing device 102 provides the coverage file to the target interface, the coverage platform 114 can further obtain a second time interval set by the tenant for uploading the next coverage file, based on the tenant identifier. Thus, the computing device 102 can continue to provide the next coverage file to the target interface when the second time interval expires.

[0064] In this way, when the output mode of the coverage file is set to application layer protocol mode, the acquired coverage file can be transmitted to the target interface in real time through the corresponding interface address. This realizes the remote automatic acquisition of the coverage file and meets the real-time requirements of coverage file upload, thereby improving the transmission efficiency of test results and enhancing the user experience.

[0065] The above combination Figure 2 A schematic flowchart illustrating a method for processing coverage files according to an embodiment of this application is provided below. Figure 3 This illustration depicts a schematic flowchart of another method for processing coverage files according to some embodiments of this application. Method 300 can be... Figure 1 The coverage platform 114 and any suitable computing device in the middle are used to process data from... Figure 1 The coverage file for computing device 102.

[0066] At box 302, coverage platform 114 receives a coverage file for the application's code via a target interface at a first time interval. The coverage file is provided to the target interface when the output mode is set to application layer protocol mode. The target interface corresponds to the interface address for the application layer protocol, and the coverage file includes statistics on code execution. For example, this first time interval can be set to 1 second, 2 seconds, or any suitable duration. Alternatively, the first time interval can be set to 0 seconds, in which case coverage platform 114 receives the coverage file from computing device 102 in real time.

[0067] At box 304, the coverage platform 114 updates the code coverage report based on the coverage file. After obtaining the coverage file, the coverage platform 114 needs to use the coverage file to update the corresponding coverage report. For example, when the coverage platform 114 obtains the coverage file in real time, it can use the obtained coverage file to update the coverage report in real time; or, when the coverage platform obtains the coverage file at predetermined time intervals, it can use the obtained coverage file to update the coverage report at predetermined time intervals.

[0068] In some embodiments, when obtaining a coverage file, the coverage platform 114 also obtains, through a target interface, the tenant identifier of the tenant associated with the coverage file and the module identifier of the module used to store the coverage file. The coverage platform then uses the tenant identifier, module identifier, and coverage file to update the code coverage report for the application. This update process is combined with the following... Figure 4 A detailed description is provided. In some embodiments, after the coverage platform 114 obtains the coverage file, it can directly update the coverage report corresponding to the coverage file. For example, the coverage report can be updated based on the report identifier included in the coverage file. The above examples are merely for describing this disclosure and are not intended to limit the specific scope of this disclosure.

[0069] In some embodiments, the coverage platform 114 can also obtain the time interval set by the tenant for uploading the next coverage file, i.e., the second time interval, based on the obtained tenant identifier. For example, the tenant sets the time interval for uploading the next coverage file to 1 second or 2 seconds. Alternatively, the tenant can set the second time interval for real-time uploading of the next coverage file to 0 seconds, i.e., real-time uploading of the next coverage file. After obtaining the time interval, the coverage platform 114 returns the time interval to the computing device 102 through an interface.

[0070] In some embodiments, the coverage platform 114 can further utilize the coverage file to calculate the incremental coverage of the incremental code and the full coverage of some development branches. When determining incremental coverage, the coverage platform needs to obtain the baseline branch and development branch of the application code based on the address of the application code pre-set by the tenant. For example, it can obtain different branches by setting the code repository address and the source file path and compiled file path corresponding to different branches under that repository. The baseline branch is typically a version in the codebase considered "stable" or "released," such as the main branch or release branch. The development branch is derived from the baseline branch and is used to develop new features, fix defects, or make experimental changes. Then, using the obtained baseline branch and development branch, the incremental code is determined. This incremental code is the code that has changed from the baseline branch to the development branch. The incremental code and the coverage file can then be used to determine the incremental coverage for the incremental code. For example, the incremental code can be compared with the executable code in the coverage file to determine which code in the incremental code is executed, thereby determining the incremental coverage corresponding to the incremental code. In addition, the coverage platform can compare the code in the development branch with the code in the coverage file to determine the full coverage of all code for the development branch.

[0071] In this way, when the output mode of the coverage file is set to application layer protocol mode, the acquired coverage file can be transmitted to the target interface in real time through the corresponding interface address, and a coverage report can be generated. This realizes remote automatic acquisition of coverage files, meets the real-time requirements of coverage file upload, improves the efficient collection and analysis of coverage data, and enhances the user experience.

[0072] The above combination Figure 3 A schematic flowchart illustrating another method for processing coverage files, according to embodiments of this application, is described below. Figure 4 A schematic flowchart illustrating a method for updating a coverage report according to some embodiments of this application. Method 400 can be performed by... Figure 1 The method is executed on the coverage platform 114 and any suitable computing device. It primarily describes the process of updating coverage reports.

[0073] At box 402, the coverage platform 114 determines the module used by the tenant based on the tenant identifier and the module identifier. At this point, the coverage platform 114 first uses the tenant identifier to find the corresponding tenant. Then, it searches for the module corresponding to that module identifier among the modules used by that tenant for storing coverage reports.

[0074] Next, at box 404, the coverage platform 114 determines whether an editable coverage report exists in the module. If the tenant needs to update the coverage report, they can set the coverage report to be editable. At box 406, if an editable coverage report exists in the module, the coverage platform 114 updates the coverage data from the coverage file to the coverage report. For example, it uses new data from the coverage file to update old data in the coverage report, thus completing the coverage report update. If no editable coverage report exists in the module, it indicates that the tenant does not need to update the coverage report, and the coverage file is discarded. In this way, existing coverage reports can be updated, ensuring that coverage information is continuously improved and editable and maintainable.

[0075] The application layer protocol reporting method described above is implemented by adding a sub-thread within the proxy service. This sub-thread reports coverage data at intervals via HTTP. When the reporting time arrives, the coverage data is first downloaded from the proxy to the coverage file on the coverage platform's local machine. Then, the coverage file is reported via the interface. The parameters also require specifying the tenant identifier (TanentId) and module identifier (VersionId). The platform retrieves the corresponding version using the tenant identifier and module identifier, updates the coverage data to the corresponding version's coverage report, and simultaneously queries the current tenant's upload interval based on the tenant identifier, returning the interval to the proxy as the time interval for the next report.

[0076] For example, the parameters in the proxy are defined as follows:

[0077]

[0078]

[0079] The following is combined with Figure 5 A flowchart describing the complete workflow of a real-time automated code coverage solution according to some embodiments of this disclosure.

[0080] In Example 500, the entire process is mainly divided into three stages: environment initialization and agent configuration stage, automated data reporting stage, and platform data processing stage, which together constitute an efficient closed-loop system.

[0081] During the environment initialization and agent configuration phase, users first need to log in to the target deployment server at box 502. Then, at box 504, JVM parameters are configured. This step is a "one-time configuration," requiring only initial deployment and eliminating the need for subsequent repetition, significantly reducing maintenance costs. After completing the basic environment configuration, computing device 102 is added and started at box 506. Several core parameters need to be set during this process: the `output=http` parameter enables HTTP protocol as the data reporting method, replacing the traditional TCP mode; the `tenantid` parameter identifies different tenants, achieving data isolation and access control; the `versionid` parameter explicitly specifies the target module, ensuring accurate data classification; and the `codeUrl` parameter provides the reporting interface address for coverage files. The combination of `tenantid` and `versionid` determines a unique identifier on the platform, laying the foundation for subsequent automated reporting. Proper configuration of these parameters ensures the normal operation of the entire system.

[0082] After entering the automated data reporting phase at box 508, computing device 102 automatically reports coverage data according to preset time intervals. This process is entirely autonomous, requiring no manual intervention. This not only ensures data real-time performance but also achieves efficient use of system resources through fixed-frequency reporting. The reporting frequency can be dynamically adjusted according to actual needs. After processing the data, the platform returns new time interval parameters, achieving adaptive optimization of the reporting frequency. This design satisfies the requirements of real-time monitoring while avoiding the waste of network or system resources caused by excessively frequent reporting.

[0083] During the coverage platform data processing phase, necessary system configuration is required first. Users need to create tenant information in box 510, which is the foundation of a multi-tenant architecture, ensuring complete data isolation between different teams or projects. In box 512, specific product, module, branch, and version information are then configured; this metadata provides necessary contextual information for subsequent coverage analysis. After these configurations are completed, computing device 102 automatically performs code fetching and compilation operations, building instrumented data and storing it in the database in box 514, preparing the data for subsequent coverage analysis. When coverage data arrives at the platform via HTTP request, the coverage platform 114 extracts the `tenantid` in box 518 to query the tenant's reporting interval configuration. Then, in box 522, the time interval data is returned to the agent for use in the next coverage file upload. Simultaneously, in box 520, the specific module is located using the `versionid`. At box 524, the computing device checks if a version with coverage statistics enabled exists under this module. If it does, the subsequent data processing continues; otherwise, the coverage file is discarded at box 526 to avoid wasting resources due to invalid data processing. For valid data, the computing device performs decompression and parsing operations at box 528 to convert the raw data into an analyzable format. Finally, this processed data is persisted to the database, and the corresponding version of the coverage report is updated in real time at box 530. The entire process fully considers data security and consistency to ensure that the final coverage report is accurate and reliable.

[0084] In the system architecture that implements the above process, a tenant function has been added to provide data isolation for each product. Each product's personnel can only view and manipulate relevant data within their respective tenants, avoiding information leakage and security compliance risks. Additionally, an automatic data building function has been added. After each module fills in the code repository address, source file path, compilation file path, and compilation parameters, and configures the corresponding baseline and deployment branch, the system will automatically pull and compile code according to the deployment branch and baseline branch when creating a version, obtaining both full and incremental code, thus achieving full and incremental coverage in subsequent use. Furthermore, a coverage receiving interface and coverage processing function have been added. A new interface has been added to the coverage platform to receive and process uploaded coverage files; the interface is registered with the Application Programming Interface Gateway (APIG) to allow access from the external network; the service is started using a proxy, and output uses HTTP, with the codeUrl using the APIG link; the microservice downloads coverage data every 10 seconds, calls the interface to pass it to the coverage platform, and the coverage platform processes the data. The framework further adds an updateable iteration coverage feature, allowing version coverage statistics to be used. Once coverage is uploaded to a version, the version coverage report will be updated. Manual operations are reduced; currently, manual operations are only required when configuring JVM parameters and creating tenants, products, modules, branches, and versions. Furthermore, JVM parameter configuration only needs to be done once, and only version creation is required for each iteration; all other operations are automated. Incremental coverage can be obtained by comparing the baseline branch and the development branch, requiring pre-definition of the two branches for automatic incremental coverage acquisition. Full coverage can also be obtained by pre-defining the collection of coverage for a specific branch, such as the development branch, which is the branch currently under development for the current version.

[0085] This method, combining HTTP reporting mechanisms with adaptive frequency adjustment, not only optimizes resource utilization but also ensures data real-time performance and integrity. Simultaneously, modular configuration and intelligent data processing reduce reliance on professional testers, significantly enhance the system's adaptability in cloud-native architectures, and decrease dependence on fixed network configurations, making code coverage analysis more widespread and standardized.

[0086] The above combination Figure 5 A flowchart describing the complete workflow of a real-time automated code coverage solution according to some embodiments of this disclosure is described below; in conjunction with Figure 6 A schematic diagram illustrating a version configuration interface according to some embodiments of the present disclosure.

[0087] In Example 600, users can configure module parameters related to code coverage analysis, including several configurable items. In the basic information configuration section, users need to manually fill in the basic attributes of the module. The top displays the currently modified node ID as 16, belonging to the "Certificates" module under the "**Learning" category. The interface provides a clear hierarchical display, indicating that the parent node of this module is the "**Learning" system. Configuration items include basic information such as module name and type, which will be used for subsequent coverage report classification and display. In the code repository settings area, the computing device requires users to enter key source code management information. The configuration of the code repository address is fundamental for the computing device to obtain source code. It also includes the selection of the Java Development Kit (JDK) version, the path settings for the source code directory (Src_dir), and the compilation output directory (Class_dir). This path information helps the system accurately locate the target files that need coverage analysis. In the build parameter configuration section, the computing device provides more advanced settings options. The "Project Directory" field allows users to specify the project root directory, but is marked as optional. The parent node is displayed as "**Learning", clearly indicating the module's hierarchical relationship. "Override Inheritance" and "Baseline Building" are two important strategy options. Baseline building offers two modes: an automatic mode that "always uses the latest build as the baseline" and a "manual setting" mode. Users can choose different baseline strategies according to their actual needs. By configuring these parameters, both the collection of necessary information and sufficient flexibility are ensured for users.

[0088] This configuration mechanism, combined with flexible scheduling and parameterized management of coverage data collection tasks, not only improves controllability and scalability but also ensures the accuracy and traceability of coverage data. Furthermore, the visualized configuration process and intelligent path recognition significantly lower the user's operational threshold, enhance the tool's compatibility across multiple projects and environments, and reduce reliance on fixed development processes.

[0089] Figure 7 A block diagram of an apparatus 700 for processing coverage files according to an embodiment of this application is further shown. The apparatus 700 can be applied to... Figure 1 The computing device 102 may include multiple modules for performing tasks such as Figure 2 The corresponding steps in example 200 of the method discussed herein. For example... Figure 7As shown, the apparatus 700 includes: a coverage acquisition unit 702 configured to acquire a coverage file of code for an application, the coverage file including statistical information of code execution; an output mode determination unit 704 configured to determine whether the output mode of the coverage file is set to application layer protocol mode; and a coverage file upload unit 706 configured to provide the coverage file to a target interface if the output mode of the coverage file is set to application layer protocol mode, the target interface corresponding to the interface address for application layer protocol.

[0090] In some embodiments, the coverage file upload unit 706 includes a push unit configured to push the coverage file via a target interface at predetermined first time intervals through a service for obtaining the coverage file.

[0091] In some embodiments, the apparatus 700 further includes: an identifier determination unit configured to determine a tenant identifier of a tenant associated with a coverage file and a module identifier of a module used to store the coverage file; and an identifier provision unit configured to provide the tenant identifier and module identifier to a target interface in connection with the coverage file.

[0092] In some embodiments, the apparatus 700 further includes a time interval receiving unit configured to receive a second time interval from the target interface for uploading the next coverage file if a coverage file is provided to the target interface.

[0093] Figure 8 A block diagram of an apparatus 800 for processing coverage files according to an embodiment of this application is further shown. The apparatus 800 can be applied to... Figure 1 The coverage platform 114 in the middle may include multiple modules for performing tasks such as Figure 3 The corresponding steps in example 300 of the method discussed herein. For example... Figure 8 As shown, the apparatus 800 includes: a file receiving unit 802 configured to receive a coverage file of application code at a first time interval through a target interface, the coverage file being provided to the target interface when the output mode of the coverage file is set to application layer protocol mode, the target interface corresponding to an interface address for the application layer protocol, and the coverage file including statistical information of code execution; and a coverage report updating unit 804 configured to update a coverage report of code based on the coverage file.

[0094] In some embodiments, the coverage report update unit 804 includes: an identifier acquisition unit configured to acquire, through a target interface, a tenant identifier of the tenant associated with the coverage file and a module identifier of the module used to store the coverage file; and a first update unit configured to update the coverage report for the application's code based on the tenant identifier, the module identifier, and the coverage file.

[0095] In some embodiments, the first update unit includes: a module determination unit configured to determine a module used by a tenant based on a tenant identifier and a module identifier; a report determination unit configured to determine whether there is an editable coverage report in the module; and a second update unit configured to update the coverage data in the coverage file to the coverage report if there is an editable coverage report in the module.

[0096] In some embodiments, the first update unit further includes a discard unit configured to discard the coverage file if no coverage report is available for editing in the module.

[0097] In some embodiments, the apparatus 800 further includes: a time interval acquisition unit configured to acquire a second time interval set by a tenant for uploading the next coverage file based on a tenant identifier; and a time interval return unit configured to return the second time interval through a target interface.

[0098] In some embodiments, the apparatus 800 further includes: a branch acquisition unit configured to acquire a baseline branch and a development branch for the application's code; an incremental code determination unit configured to determine incremental code based on the baseline branch and the development branch; and an incremental coverage determination unit configured to determine incremental coverage for the incremental code based on the incremental code and a coverage file.

[0099] In some embodiments, the apparatus 800 further includes a full coverage determination unit configured to determine full coverage for a development branch based on the development branch and a coverage file.

[0100] Figure 9 A schematic block diagram of an example device 900 that can be used to implement embodiments of the present application is shown. For example, embodiments of the present application... Figure 1The computing device 102 and coverage platform 114 can be implemented by the example device 900. As shown, device 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) 902 or loaded from storage unit 908 into random access memory (RAM) 903. Various programs and data required for the operation of device 900 can also be stored in RAM 903. CPU 901, ROM 902, and RAM 903 are interconnected via bus 904. Input / output (I / O) interface 905 is also connected to bus 904.

[0101] Multiple components in device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of monitors, speakers, etc.; storage unit 908, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0102] The various processes and handling described above, such as example methods 200, 300, and 400, can be executed by processing unit 901. For example, in some embodiments, method example 200 can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by CPU 901, one or more actions of example methods 200, 300, and 400 described above can be performed.

[0103] This application may be a method, apparatus, system, chip, and / or computer program product. A chip may include a processing unit and a communication interface, the processing unit being capable of processing program instructions received from the communication interface. A computer program product may include a computer-readable storage medium on which computer-readable program instructions for performing various aspects of this application are stored.

[0104] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0105] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0106] The computer program instructions used to perform the operations of this application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing the status information of the computer-readable program instructions. These electronic circuits can execute the computer-readable program instructions to implement various aspects of this application.

[0107] Various aspects of this application are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0108] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0109] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0110] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0111] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for processing coverage files, characterized in that, The method includes: Obtain a code coverage file for the application, the coverage file including statistics on the execution of the code; Determine whether the output method for the coverage file is set to application layer protocol mode; and If the output mode for the coverage file is set to the application layer protocol mode, the coverage file is provided to the target interface, which corresponds to the interface address for the application layer protocol.

2. The method according to claim 1, characterized in that, Providing the coverage file to the target interface includes: The coverage file is pushed via the target interface at predetermined first time intervals through the service used to obtain the coverage file.

3. The method according to claim 1, characterized in that, Also includes: Determine the tenant identifier of the tenant associated with the coverage file and the module identifier of the module used to store the coverage file; as well as The tenant identifier and the module identifier are provided to the target interface in conjunction with the coverage file.

4. The method according to claim 3, characterized in that, Also includes: If the coverage file is provided to the target interface, a second time interval for uploading the next coverage file is received from the target interface.

5. A method for processing coverage files, characterized in that, The methods include: A coverage file for the application's code is received via a target interface at a first time interval. The coverage file is provided to the target interface when the output mode of the coverage file is set to application layer protocol mode. The target interface corresponds to an interface address for the application layer protocol, and the coverage file includes statistics on the execution of the code. as well as Based on the coverage file, update the coverage report for the code.

6. The method according to claim 5, characterized in that, Based on the coverage file, updating the coverage report for the code includes: The target interface is used to obtain the tenant identifier of the tenant associated with the coverage file and the module identifier of the module used to store the coverage file. as well as Update the coverage report for the code of the application based on the tenant identifier, the module identifier, and the coverage file.

7. The method of claim 6, wherein updating the coverage report for the code of the application based on the tenant identifier, the module identifier, and the coverage file comprises: Based on the tenant identifier and the module identifier, the module used by the tenant is determined; Determine whether the coverage report is available for editing in the module; as well as If the coverage report exists in the module and can be edited, update the coverage data in the coverage file to the coverage report.

8. The method according to claim 7, characterized in that, Updating the coverage report for the code of the application based on the tenant identifier, the module identifier, and the coverage file further includes: If no coverage report is available for editing in the module, the coverage file is discarded.

9. The method according to claim 6, characterized in that, Also includes: Based on the tenant identifier, obtain the second time interval set by the tenant for uploading the next coverage file; as well as The second time interval is returned through the target interface.

10. The method according to claim 5, characterized in that, Also includes: Obtain the baseline branch and development branch of the code for the application; Based on the baseline branch and the development branch, determine the incremental code; as well as Based on the incremental code and the coverage file, determine the incremental coverage for the incremental code.

11. The method according to claim 10, characterized in that, Also includes: Based on the development branch and the coverage file, determine the full coverage for the development branch.

12. An apparatus for processing coverage files, characterized in that, include: The coverage acquisition unit is configured to acquire a coverage file of the application's code, the coverage file including statistical information on the execution of the code; The output mode determination unit is configured to determine whether the output mode for the coverage file is set to application layer protocol mode. as well as The coverage file upload unit is configured to provide the coverage file to a target interface if the output mode for the coverage file is set to the application layer protocol mode, wherein the target interface corresponds to the interface address for the application layer protocol.

13. The apparatus according to claim 12, characterized in that, The coverage file upload unit includes: The push unit is configured to push the coverage file via the target interface at predetermined first time intervals through a service for obtaining the coverage file.

14. The apparatus according to claim 12, characterized in that, Also includes: The identifier determination unit is configured to determine the tenant identifier of the tenant associated with the coverage file and the module identifier of the module used to store the coverage file; as well as An identifier providing unit is configured to provide the tenant identifier and the module identifier to the target interface in conjunction with the coverage file.

15. The apparatus according to claim 14, characterized in that, Also includes: The time interval receiving unit is configured to receive a second time interval from the target interface for uploading the next coverage file if the coverage file is provided to the target interface.

16. An apparatus for processing coverage files, characterized in that, The methods include: The file receiving unit is configured to receive a coverage file of application code via a target interface at a first time interval. The coverage file is provided to the target interface when the output mode of the coverage file is set to application layer protocol mode. The target interface corresponds to an interface address for the application layer protocol, and the coverage file includes statistical information on the execution of the code. as well as The coverage report update unit is configured to update the coverage report for the code based on the coverage file.

17. The apparatus according to claim 16, characterized in that, The coverage report update unit includes: The identifier acquisition unit is configured to acquire, through the target interface, the tenant identifier of the tenant associated with the coverage file and the module identifier of the module used to store the coverage file; as well as The first update unit is configured to update the coverage report of the code for the application based on the tenant identifier, the module identifier, and the coverage file.

18. The apparatus of claim 17, wherein the first updating unit comprises: The module determination unit is configured to determine the module used by the tenant based on the tenant identifier and the module identifier; The report determination unit is configured to determine whether the coverage report available for editing exists in the module; as well as The second update unit is configured to update the coverage data in the coverage file to the coverage report if the coverage report exists in the module and can be edited.

19. The apparatus according to claim 18, characterized in that, The first update unit further includes: The discard unit is configured to discard the coverage file if no coverage report available for editing exists in the module.

20. The apparatus according to claim 17, characterized in that, Also includes: The time interval acquisition unit is configured to acquire, based on the tenant identifier, a second time interval set by the tenant for uploading the next coverage file; as well as The time interval return unit is configured to return the second time interval through the target interface.

21. The apparatus according to claim 16, characterized in that, Also includes: The branch retrieval unit is configured to retrieve the baseline branch and development branch of the code for the application; An incremental code determination unit is configured to determine incremental code based on the baseline branch and the development branch; as well as The incremental coverage determination unit is configured to determine the incremental coverage for the incremental code based on the incremental code and the coverage file.

22. The apparatus according to claim 21, characterized in that, Also includes: The full coverage determination unit is configured to determine the full coverage for the development branch based on the development branch and the coverage file.

23. An electronic device, comprising: At least one computing unit; At least one memory coupled to the at least one computing unit and storing instructions for execution by the at least one computing unit, the instructions, when executed by the at least one computing unit, causing the electronic device to perform the method according to any one of claims 1-11.

24. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method according to any one of claims 1-11.

25. A computer program product comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method according to any one of claims 1-11.