Method, device and system for generating coverage data

Through the collaborative work of test equipment and analysis equipment, code information is automatically obtained and analyzed, and coverage data is generated, which solves the problem of single function of analysis equipment in the existing technology and improves the efficiency of coverage data generation and the function of analysis equipment.

CN112306847BActive Publication Date: 2024-09-20SHENZHEN TENCENT COMP SYST CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN201910702332.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-31
Publication Date
2024-09-20
Estimated Expiration
2039-07-31

AI Technical Summary

Technical Problem

In the existing technology, the analysis equipment has a relatively single function and cannot automatically obtain and analyze the code information generated by the test equipment, resulting in low coverage data generation efficiency and high tester participation.

Method used

Provide a coverage data generation method and system that automatically obtains and analyzes code information through the collaborative work of test equipment and analysis equipment, generates coverage data, and reduces tester participation.

Benefits of technology

It improves the efficiency of coverage data generation, enriches the functions of analysis equipment, and reduces the workload and participation of testers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112306847B
    Figure CN112306847B
Patent Text Reader

Abstract

The present application discloses a method, device and system for generating coverage data, and belongs to the field of computer technology. The method comprises: the testing device performs the i-th test on the total code of the target software version, and obtains the code information corresponding to the i-th test, wherein the code information includes the information of the total code during the i-th test, and the information of the executed code in the total code during the i-th test, i≥1; the analysis device obtains the code information corresponding to the i-th test; the analysis device generates the first coverage data corresponding to the target software version in the i-th test according to the code information corresponding to the i-th test, and the first coverage data is used to characterize: the execution status of the total code during the i-th test. The present application solves the problem that the function of the analysis device is relatively single. The present application is used to generate coverage data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device and system for generating coverage data. Background Art

[0002] After the software is developed, it is usually necessary to test the software and analyze the test results to evaluate the software performance. Among them, the coverage data used to evaluate the software performance can be obtained according to the test results. The coverage data includes: information about the executed and unexecuted codes in the total code of the software, and the proportion of the executed code in the total code.

[0003] In the related art, before using the test equipment to test the software, the tester needs to perform a series of operations on the test equipment so that the test equipment generates the information of the total code of the software. In the process of using the test equipment to test the software, the test equipment will generate the information of the executed code in the total code. After that, the tester can collect the information of the total code from the compilation device, and collect the information of the executed code in the total code from the test equipment, and input the collected information into the analysis device. Finally, the tester needs to operate the analysis device to generate the above coverage data based on the above total code information and the information of the executed code in the total code.

[0004] However, in the above process, the analysis device can only perform simple information analysis, so the function of the analysis device is relatively simple. Summary of the invention

[0005] The present application provides a method, device and system for generating coverage data, which can solve the problem that the function of the analysis device is relatively single. The technical solution is as follows:

[0006] In one aspect, a method for generating coverage data is provided, the method comprising:

[0007] The testing device performs an i-th test on the total code of the target software version to obtain code information corresponding to the i-th test, wherein the code information includes information about the total code during the i-th test and information about executed code in the total code during the i-th test, i≥1;

[0008] The analysis device obtains the code information corresponding to the i-th test;

[0009] The analysis device generates first coverage data corresponding to the target software version in the i-th test based on the code information corresponding to the i-th test, and the first coverage data is used to characterize: the execution status of the total code during the i-th test.

[0010] On the other hand, a system for generating coverage data is provided, the system comprising: a test device and an analysis device connected to each other;

[0011] The testing device is used to perform an i-th test on the total code of the target software version according to the test instruction, and obtain code information corresponding to the i-th test, wherein the code information includes information of the total code during the i-th test and information of executed code in the total code during the i-th test, i≥1;

[0012] The analysis device is used to obtain the code information corresponding to the i-th test; based on the code information corresponding to the i-th test, generate the first coverage data corresponding to the target software version in the i-th test, and the first coverage data is used to characterize: the execution status of the total code during the i-th test.

[0013] In another aspect, a method for generating coverage data is provided, the method being used for analyzing a device, the method comprising:

[0014] Obtaining code information corresponding to the i-th test obtained by the test device performing the i-th test on the total code of the target software version, wherein the code information includes information about the total code during the i-th test and information about the executed code in the total code during the i-th test, i≥1;

[0015] According to the code information corresponding to the i-th test, first coverage data corresponding to the target software version in the i-th test is generated, and the first coverage data is used to characterize: the execution status of the total code during the i-th test.

[0016] In another aspect, a device for generating coverage data is provided, the device for generating coverage data is used for analyzing a device, and the device for generating coverage data comprises:

[0017] an acquisition module, used for acquiring code information corresponding to the i-th test obtained by the test device performing the i-th test on the total code of the target software version, wherein the code information includes information of the total code during the i-th test and information of executed code in the total code during the i-th test, i≥1;

[0018] A generation module is used to generate first coverage data corresponding to the target software version in the i-th test based on the code information corresponding to the i-th test, wherein the first coverage data is used to characterize: the execution status of the total code during the i-th test.

[0019] In another aspect, a method for generating coverage data is provided, the method for generating coverage data being used for a user equipment, the method for generating coverage data comprising:

[0020] Sending a test instruction for a target software version to a test device;

[0021] Sending an end instruction for the target software version to the test device, the end instruction is used to instruct the test device to end the i-th test of the target software version and to instruct the test device whether to update the total code, i≥1;

[0022] When the end instruction is sent to the test device, a pull instruction for the i-th test performed on the target software version is sent to the pull device.

[0023] In another aspect, a device for generating coverage data is provided, the device for generating coverage data is used for a user equipment, and the device for generating coverage data comprises:

[0024] A first sending module, used for sending a test instruction for a target software version to a test device;

[0025] A second sending module is used to send an end instruction for the target software version to the test device, wherein the end instruction is used to instruct the test device to end the i-th test of the target software version and to instruct the test device whether to update the total code, i≥1;

[0026] The third sending module is used to send a pull instruction for the i-th test on the target software version to the pull device when sending an end instruction to the test device.

[0027] In another aspect, a method for generating coverage data is provided, the method for generating coverage data is used for pulling a device, and the method for generating coverage data comprises:

[0028] Receive a pull instruction for the i-th test of the target software version sent by the user device, i≥1;

[0029] Pulling the code information corresponding to the i-th test from the test device according to the pull instruction;

[0030] storing the code information corresponding to the i-th test in the target position corresponding to the i-th test;

[0031] A pull notification is sent to the analysis device, where the pull notification is used to indicate the target position corresponding to the i-th test.

[0032] In another aspect, a device for generating coverage data is provided, the device for generating coverage data is used for pulling equipment, and the device for generating coverage data comprises:

[0033] A receiving module, used for receiving a pull instruction for the i-th test on the target software version sent by a user device, where i≥1;

[0034] A pulling module, used to pull the code information corresponding to the i-th test from the test device according to the pulling instruction;

[0035] A storage module, used for storing the code information corresponding to the i-th test in a target location corresponding to the i-th test;

[0036] The sending module is used to send a pull notification to the analysis device, where the pull notification is used to indicate the target position corresponding to the i-th test.

[0037] In another aspect, a method for generating coverage data is provided, the method for generating coverage data being used for testing equipment, the method for generating coverage data comprising:

[0038] Receiving a test instruction for a target software version sent by a user device;

[0039] According to the test instruction, an installation package of the target software version for release is generated, and according to the test instruction, a plugging operation is performed on the total code of the target software version to generate a plugging package of the target software version;

[0040] The instrumentation package of the target software version is tested for the i-th time, i≥1.

[0041] In another aspect, a device for generating coverage data is provided, the device for generating coverage data is used for testing equipment, and the device for generating coverage data comprises:

[0042] A receiving module, used to receive a test instruction for a target software version sent by a user device;

[0043] A generation module, used to generate an installation package of the target software version for release according to the test instruction, and to perform a plug-in operation on the total code of the target software version according to the test instruction to generate an plug-in package of the target software version;

[0044] The test module is used to perform an i-th test on the instrumentation package of the target software version, where i≥1.

[0045] On the other hand, a device for generating coverage data is provided, comprising: a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the above-mentioned method for generating coverage data.

[0046] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set or instruction set is stored in the storage medium, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the above-mentioned method for generating coverage data.

[0047] In the present application, the analysis device can automatically obtain the code information corresponding to the i-th test, and generate the first coverage data corresponding to the target software version in the i-th test according to the code information corresponding to the i-th test. Since the analysis device can also automatically obtain the code information and can automatically analyze the obtained code information, the function of the analysis device is enriched. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a schematic diagram of an implementation environment of a method for generating coverage data provided in an embodiment of the present application;

[0049] Figure 2 is a schematic diagram of another system for generating coverage data provided in an embodiment of the present application;

[0050] Figure 3 is a flow chart of a method for generating coverage data provided in an embodiment of the present application;

[0051] Figure 4 is a flowchart of another method for generating coverage data provided by an embodiment of the present application;

[0052] Figure 5 is a flowchart of another method for generating coverage data provided in an embodiment of the present application;

[0053] Figure 6 It is a structural schematic diagram of a device for generating coverage data provided in an embodiment of the present application;

[0054] Figure 7 is a structural schematic diagram of another device for generating coverage data provided in an embodiment of the present application;

[0055] Figure 8 is a structural schematic diagram of another device for generating coverage data provided in an embodiment of the present application;

[0056] Fig. 9 is a structural schematic diagram of another device for generating coverage data provided in an embodiment of the present application;

[0057] Fig.10 is a flow chart of a method for generating coverage data provided in an embodiment of the present application;

[0058] Fig.11 It is a structural schematic diagram of a device for generating coverage data provided in an embodiment of the present application;

[0059] Fig.12 is a structural schematic diagram of another device for generating coverage data provided in an embodiment of the present application;

[0060] Fig.13 is a structural schematic diagram of another device for generating coverage data provided in an embodiment of the present application;

[0061] Fig.14 is a structural schematic diagram of another device for generating coverage data provided in an embodiment of the present application;

[0062] Fig.15 is a flow chart of a method for generating coverage data provided in an embodiment of the present application;

[0063] Fig.16 It is a structural schematic diagram of a device for generating coverage data provided in an embodiment of the present application;

[0064] Fig.17 is a flowchart of another method for generating coverage data provided by an embodiment of the present application;

[0065] Fig.18 is a structural schematic diagram of another device for generating coverage data provided in an embodiment of the present application;

[0066] Fig.19 It is a structural diagram of a server provided in an embodiment of the present application;

[0067] Fig. 20 It is a structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0068] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0069] Figure 1 FIG. 1 is a schematic diagram of an implementation environment of a method for generating coverage data provided in an embodiment of the present application. Figure 1As shown, the method for generating coverage data can be applied to a system 10 for generating coverage data. The system 10 may include a test device 102 and an analysis device 103 connected to each other. The test device 102 is used to test the software and obtain the test result; the analysis device 103 is used to analyze the test result and obtain the analysis result.

[0070] It should be noted that Figure 1 In the example, the system 10 includes a test device 102 and an analysis device 103. In the exemplary embodiment of the present application, the number of user devices 101, test devices 102 and analysis devices 103 in the system 10 can be any positive integer, such as two or three, which is not limited in the embodiment of the present application.

[0071] Optionally, Figure 2 Schematic diagram of another system for generating coverage data provided by an embodiment of the present application. Figure 2 As shown, the test device 102 may include multiple test sub-devices 1021, and each test sub-device 1021 may be used to test a part of the functions of the software. Figure 2 Taking the test device 102 including three test sub-devices 1021 as an example, the number of the test sub-devices can also be any positive integer, such as two or four, and the embodiment of the present application does not limit this. Of course, the test device 102 can also include only one test sub-device, in which case the test sub-device can be used to test some or all functions of the software.

[0072] Optionally, please continue to refer to Figure 2 The system 10 may further include: a user device 101, a pull device 104, and a storage device 105. The user device 101, the test device 102, and the pull device 104 may be connected to each other, the user device 101, the analysis device 103, and the pull device 104 may be connected to each other, and the user device 101, the analysis device 103, and the storage device 105 may also be connected to each other.

[0073] Optionally, the user device 101 can interact with the tester. The user device 101 can have a display function, and the user device 101 can display the test results generated by the test device 102, and can also display the analysis results generated by the analysis device 103. The pulling device 104 can pull data from the test device 102, such as pulling the test results generated by the test device 102, and the pulling device 104 can also store the pulled data in the storage area corresponding to the pulling device. It should be noted that the storage area can be a storage area in the pulling device 104, or it can also be any storage area outside the pulling device 104, such as the storage area can be a storage area in the storage device 105, or Figure 2The analysis device 103 can analyze the data pulled by the pulling device and store the generated analysis results in the storage device 105. The user device 101 can pull the analysis results from the storage device 105 for display.

[0074] It should be noted that the interconnected devices in the embodiments of the present application can be connected through a wired network or a wireless network, wherein the wired network may include but is not limited to: Universal Serial Bus (USB), and the wireless network may include but is not limited to: Wireless Fidelity (WIFI), Bluetooth, infrared, Zigbee, data network, etc.

[0075] Optionally, the test device 102, the analysis device 103, the pull device 104 and the storage device 105 can all be a server, or can also be a server cluster composed of multiple servers. Optionally, the user device 101 can be a terminal, such as a mobile phone, a laptop, a desktop computer, a tablet computer, a smart TV and other electronic devices.

[0076] It should be noted that the embodiment of the present application takes the user device 101, the test device 102, the analysis device 103, the pull device 104 and the storage device 105 in the system 10 as an example where they are all independent devices. Optionally, any at least two of the test device 102, the analysis device 103, the pull device 104 and the storage device 105 can also be integrated together. For example, the analysis device 103 has a storage function and also serves as the storage device 105.

[0077] Figure 3 This is a flow chart of a method for generating coverage data provided in an embodiment of the present application. Figure 1 or Figure 2 The system 10 shown. Figure 3 As shown, the method includes:

[0078] Step 301: The testing device performs the i-th test on the total code of the target software version to obtain code information corresponding to the i-th test, wherein the code information includes information about the total code during the i-th test and information about the executed code in the total code during the i-th test, i≥1.

[0079] Step 302: The analysis device obtains code information corresponding to the i-th test.

[0080] Step 303: The analysis device generates first coverage data corresponding to the target software version in the i-th test according to the code information corresponding to the i-th test, and the first coverage data is used to characterize: the execution status of the total code during the i-th test.

[0081] In summary, in the method for generating coverage data provided in the embodiment of the present application, the analysis device can automatically obtain the code information corresponding to the i-th test, and generate the first coverage data corresponding to the target software version in the i-th test according to the code information corresponding to the i-th test. Since the analysis device can also automatically obtain the code information and can automatically analyze the obtained code information, the function of the analysis device is enriched.

[0082] Furthermore, the participation of testers is reduced in the process of the analysis device generating the first coverage data, thereby improving the efficiency of generating the first coverage data.

[0083] Figure 4 This is a flow chart of a method for generating coverage data provided in an embodiment of the present application. This method can be used for Figure 1 or Figure 2 The system 10 shown. Figure 4 As shown, the method includes:

[0084] Step 401: The user equipment sends a test instruction for a target software version to the test equipment. Step 402 is executed.

[0085] Optionally, the user device may pre-store a correspondence between the software version and the test device. For example, the correspondence may be a correspondence between the software version and the Internet Protocol (IP) address of the test device. Optionally, the user device may also store a correspondence between the software version and the name of a target process in the test device, the target process including a process in the test device for testing the software version.

[0086] Optionally, the user device may also display the identifiers of multiple software versions, and the tester may perform a selection operation on the identifier of any software version (referred to as the target software version) among the multiple software versions, such as a click operation. When the user device detects the selection operation, the target software version selected by the user may be determined according to the selection operation, and the test device used to test the total code of the target software version may be determined according to the corresponding relationship, and then a test instruction for the target software version may be sent to the test device to instruct the test device to test the total code of the target software version.

[0087] Optionally, each test device may pre-store the master code of the corresponding software version, or the user device may send the master code of the target software version to the test device corresponding to the target software version according to the corresponding relationship when detecting a selection operation for the target software version.

[0088] Step 402 : The testing device performs the i-th test on the total code of the target software version according to the test instruction, and obtains the code information corresponding to the i-th test. Then, step 403 is executed.

[0089] It should be noted that the test device can test the total code of the target software version multiple times in sequence, and each time the test device receives a test instruction sent by the user device, it can test the total code of the target software version according to the test instruction. Optionally, the total code of the target software version is different in different tests. In the embodiment of the present application, i≥1, and the i-th test is any test performed by the test device on the total code of the target software version.

[0090] After the total code of the target software version is tested for the i-th time, the code information corresponding to the i-th test can be obtained. The code information includes the total code information of the target software version during the i-th test and the executed code information in the total code during the i-th test.

[0091] It should be noted that the test device tests the total code of the target software version, that is, makes the code of the target software version run in the test device. During the running process, all the codes in the total code may be run, or only part of the codes may be run. The run code in the total code is also the executed code in the total code.

[0092] For example, step 402 may include:

[0093] Step S1: The test device generates the total code information of the target software version according to the test instruction.

[0094] The test instruction can be used to instruct the test device to generate the total code information of the target software. For example, the total code information can be stored in the form of a code record (GCOV note, gcno) file of the coverage test tool, where GCOV is a tool for testing coverage, and the suffix of the file is ".gcno".

[0095] Step S2: The test device generates an installation package of the target software version for release according to the test instruction.

[0096] Optionally, the test instruction can also be used to instruct the test device to compile the total code of the target software version. The test device can compile the total code of the target software version according to the test instruction to generate an installation package (i.e., an executable file of the total code) of the target software version for release.

[0097] Optionally, after the test device compiles the total code of the target software version, it can simultaneously obtain the total code information of the target software version and the installation package of the target software version for release.

[0098] Step S3: The test device performs a plug-in operation on the total code of the target software version according to the test instruction to generate a plug-in package of the target software version.

[0099] It should be noted that the test equipment performs a plug-in operation on the total code of the target software version, that is, inserts a specified code segment into the total code, and compiles the total code with these specified code segments inserted to obtain a plug-in package, which is an executable file. When running the plug-in package, the execution status of the total code can be known through the execution status of these specified code segments. For example, a specified code segment can correspond to a part of the total code. When it is determined that the specified code segment is executed, it can be determined that the part of the total code is executed.

[0100] It should be noted that in the related art, the tester needs to manually add the specified compilation parameters to the total code of the target software version, and then manually compile the total code with the added compilation parameters to obtain the instrumentation package. In the embodiment of the present application, the test device can directly perform instrumentation operations on the total code according to the test instructions to generate an instrumentation package without the need for manual compilation by the tester.

[0101] In addition, in the embodiment of the present application, the tester only needs to trigger the user device to send a test instruction to the test device, and the test device can compile the total code of the target software version according to the test instruction to generate an installation package of the target software version for release, and perform a plug-in operation on the total code to generate an instrumentation package. Therefore, the tester does not need to trigger the generation of the installation package and the instrumentation package separately, which reduces the workload of the tester in the process of generating the instrumentation package, and thus the efficiency of generating the instrumentation package is higher.

[0102] Step S4: The test device executes the test case for the instrumentation package to generate information about the executed code in the total code of the target software version during the i-th test.

[0103] Optionally, the test case includes: input information, execution conditions, and expected output results when the test device tests the total code of the target software version. Optionally, different functions of the target software version may correspond to different test cases, and the test device may execute test cases corresponding to any functions for the instrumentation package. For example, the test device may execute test cases corresponding to the message sending function for the instrumentation package of the instant messaging software. Afterwards, the tester (that is, the user of the user device) can determine whether the function corresponding to the test case in the target software version meets the requirements based on the information of the executed code generated during the execution of the test case.

[0104] Optionally, the information of the executed code can be stored in the form of a test data (GCOV data, gcda) file of the coverage test tool, and the suffix of the file is ".gcda". It should be noted that during the process of the test device executing the test case on the instrumentation package of the target software version, the information of the executed code in the total code of the target software version can change in real time.

[0105] It should be noted that in the embodiment of the present application, the test device generates the total code information of the target software version, the installation package of the target software version for release, and the instrumentation package of the total code according to the test instruction as an example. Optionally, the compiling device may also generate the total code information, the installation package, and the instrumentation package in advance according to the compiling instruction sent by the user device, and then when the user device sends the test instruction to the test device, it may send an instruction message to the compiling device to instruct the compiling device to send the instrumentation package to the test device.

[0106] It should be noted that the test device may only store the code information corresponding to the i-th test. If the test device needs to perform the next test after generating the code information corresponding to the i-th test, the test device may delete the code information corresponding to the i-th test stored therein. Alternatively, the test device may store the code information corresponding to multiple tests and mark the code information corresponding to each test in the order of the time of the tests.

[0107] Optionally, when the test device includes multiple test sub-devices, each test sub-device can test different functions of the target software version. For example, different test sub-devices can execute different test cases for the plug-in package of the target software code, and then each test sub-device can generate information about the executed code corresponding to the test sub-device. At this time, the code information corresponding to the i-th test of the total code of the target software version performed by the test device includes: the code information corresponding to each test sub-device, and the code information corresponding to each test sub-device includes: the information about the executed code generated by the test sub-device in the i-th test, and the information about the total code of the target software version. It should be noted that since the total code of the target software version running on each test sub-device is the same, the information about the total code generated by each test sub-device is also the same.

[0108] Step 403: The user equipment sends an end instruction for the target software version to the test equipment. Execute step 404.

[0109] The end instruction is used to instruct the test device to end the i-th test of the target software version. Optionally, the end instruction can also be used to instruct the test device whether to update the total code of the target software version. Optionally, the end instruction can also be used to instruct whether to update the test case.

[0110] In an optional implementation, when the test device detects a vulnerability (English: bug) in the software during the i-th test of the total code of the target software version, the test device can submit the vulnerability information to the user device, and the user device can display (such as display) the vulnerability information. After the tester learns the vulnerability information, he can send an end instruction to the test device through the user device to instruct the test device to end the i-th test of the target software version. For example, a vulnerability repair icon can be displayed on the user device. After learning the vulnerability information, the tester can click on the vulnerability repair icon displayed on the user device to trigger the user device to send an end instruction to the test device.

[0111] Optionally, when the user device sends the end instruction to the test device, it can also send a vulnerability repair instruction to the device used by the developer to instruct the developer to update the total code of the target software version to repair the vulnerability in the total code of the target software. At this time, the end instruction is also used to instruct the test device to update the total code and test cases of the target software version. Optionally, the updated total code is different from the total code before the update; the updated test cases can be the same as the test cases before the update, or they can be different from the test cases before the update.

[0112] In another optional implementation, when the tester determines that the target software version has passed the test, such as when the test device does not detect a vulnerability in the target software during the i-th test of the total code of the target software version, the tester can send an end instruction to the test device through the user device to instruct the test device to end the i-th test of the target software version. For example, a release icon can be displayed on the user device. The tester can click the release icon displayed on the user device to trigger the user device to send an end instruction to the test device.

[0113] Optionally, when the user device sends the end instruction to the test device, it can also send a release instruction to the device used by the operation and maintenance personnel to instruct the operation and maintenance personnel to obtain the installation package of the target software version for release from the test device or the compilation device, and publish the installation package to the user's resource acquisition platform for the user to download and use. At this time, the end instruction is also used to instruct the test device that there is no need to update the total code and test cases of the target software version.

[0114] Step 404 : The test device ends the i-th test on the target software version according to the end instruction. Then, step 405 is executed.

[0115] When the test device receives the end instruction, it can end the i-th test on the target software version according to the end instruction. At this time, the information of the executed code in the target software version no longer changes.

[0116] Step 405: When the end instruction is used to instruct the test device to update the total code of the target software version, the test device receives the updated total code sent by the user device and updates the total code of the target software version. Execute steps 401 and 406.

[0117] When the end instruction is used to instruct the test device to update the total code of the target software version, it means that the test device needs to continue testing the target software version, that is, it needs to continue to execute steps 401 to 405. When the end instruction is used to instruct the test device not to update the total code of the target software version, it means that the test device does not need to continue testing the target software version, and only needs to execute step 406 and subsequent steps.

[0118] Optionally, after the user device sends the vulnerability repair instruction to the device used by the developer, when the developer completes the update of the master code of the target software version, the developer can send the updated master code to the user device, and then the user device can send the updated master code to the test device. When the test device receives the updated master code, it can update the master code of the target software version stored therein, so that the updated master code can be used when the master code of the target software version is tested next time.

[0119] Optionally, when sending the updated total code to the test device, the user device may also send a test instruction to the test device to instruct the test device to test the total code of the target software version again for the updated total code, that is, to repeat steps 401 to 405. Optionally, the user device may also send a test instruction to the test device after sending the updated total code to the test device.

[0120] Step 406: The user device sends a pull instruction for the i-th test to the pull device. Execute step 407.

[0121] Optionally, when the user device sends an end instruction to the test device, it can also send a pull instruction for the i-th test to the pull device, and the pull instruction is used to instruct the test device to pull the code information corresponding to the i-th test. For example, when the user device detects a click operation on the vulnerability repair icon or the release icon, it can also send a pull instruction for the i-th test to the pull device.

[0122] Optionally, the pull instruction may indicate the storage location of the code information corresponding to the i-th test. For example, the pull instruction may carry the identification of the test device performing the i-th test and the storage path of the code information corresponding to the i-th test in the test device.

[0123] Step 407 : The pulling device pulls the code information corresponding to the i-th test from the test device according to the pulling instruction. Execute step 408 .

[0124] For example, the pulling device may pull the gcno file and the gcda file generated during the i-th test process from the testing device according to the pulling instruction.

[0125] Optionally, when the user device sends an end instruction for the target software version to the test device, it also sends a pull instruction for the i-th test to the pulling device, and the pull instruction is used to instruct the test device to pull the code information corresponding to the i-th test. Therefore, the code information pulled by the pulling device from the test device each time is the latest code information generated by the test device.

[0126] Optionally, when the test device includes multiple test sub-devices, the pulling device can pull the information of the executed code in each test sub-device from the test sub-device, and since the information of the total code of the target software version in each test sub-device is the same, the pulling device can pull the information of the total code from any test sub-device.

[0127] Optionally, the pulling device may also determine whether it has successfully pulled the code information corresponding to the i-th test within a first time period after receiving the pulling instruction. If the code information corresponding to the i-th test is not pulled within the first time period, the pulling device may re-pull the code information corresponding to the i-th test from the test device.

[0128] Step 408 : The pulling device stores the code information corresponding to the i-th test in the target location corresponding to the i-th test. Execute step 409 .

[0129] Optionally, the pulling device may store the pulled information in a storage area corresponding to the pulling device, and store the code information corresponding to each test in a target location corresponding to the test.

[0130] Optionally, the storage area corresponding to the pull device may store code information corresponding to each test of each version of different software. Optionally, the code information in the storage area may be partitioned and saved according to different software, the code information corresponding to each test of the same software may be partitioned and saved according to the order of the test of the version, and the code information corresponding to the same test may be partitioned and saved according to different test sub-devices.

[0131] Optionally, the storage area may be a storage area in the pulling device, or may be a storage area in other devices independent of the pulling device.

[0132] Step 409: The pulling device sends a pulling notification to the analyzing device. Execute step 410.

[0133] The pull notification is used to indicate the target location for storing the code information generated when the target software version is tested for the i-th time. For example, the target location is located in the storage area corresponding to the pull device, and the pull notification may carry the identifier of the storage area and the storage path of the code information corresponding to the i-th test in the storage area. The target location in the storage area can be determined based on the storage path.

[0134] Step 410: The analysis device pulls the code information corresponding to the i-th test from the target location corresponding to the i-th test according to the pull notification. Execute step 411.

[0135] Step 411: The analysis device generates first coverage data corresponding to the target software version in the i-th test according to the code information corresponding to the i-th test. Execute step 412.

[0136] The first coverage data is used to characterize: the execution status of the total code during the i-th test process.

[0137] For example, the analysis device can use the lcov command in the GCOV tool to process the pulled code information to obtain the first coverage data representing the execution of the total code during the i-th test. The first coverage data includes: information about the executed and unexecuted codes in the total code of the target software version, and the proportion of the executed code in the total code, etc.

[0138] Optionally, when the test device includes multiple test sub-devices, the analysis device can pull the code information corresponding to each test sub-device to obtain the code information corresponding to the i-th test, and then process the code information corresponding to the i-th test to obtain the first coverage data.

[0139] Optionally, the analysis device may also first process the code information corresponding to each test sub-device to obtain auxiliary coverage data corresponding to each test sub-device, and the auxiliary coverage data is used to characterize the execution of the total code of the target software version during the test of the test sub-device. Afterwards, the analysis device may generate first coverage data based on the obtained auxiliary coverage data corresponding to each test sub-device.

[0140] Optionally, the first coverage data and the auxiliary coverage data can be stored in the form of a coverage information (information, info) file, and the suffix of the info file is ".info".

[0141] Optionally, the analysis device can also partition and store the generated first coverage data to corresponding storage locations in the storage device according to different software, different software versions, and the order of testing the software versions. Optionally, the first coverage data in the storage device can be partitioned and saved according to different software, the first coverage data corresponding to each test of the same software can be partitioned and saved according to the order of testing the version, and each auxiliary coverage data in the same test can be partitioned and saved according to different test sub-devices.

[0142] When the storage device and the analysis device are independent of each other, the analysis device can send the first coverage data corresponding to the generated target software version in the i-th test to the storage device, and the sent first coverage data can carry the identifier of the target software version and the identifier of the i-th test. When the storage device and the analysis device are integrated, the analysis device can directly store the generated first coverage data in the corresponding storage location.

[0143] It should be noted that in the embodiment of the present application, the same software may correspond to multiple versions, and multiple tests may be performed for each version, and the process of each test may refer to the above steps 401 to 405. For any version of any software, after each test, steps 406 to 411 may be executed to generate the first coverage data corresponding to the test of the software version.

[0144] It should also be noted that after generating the first coverage data corresponding to each test, the analysis device can further analyze the coverage data of the target software version according to the analysis instruction sent by the user device. The following is an explanation using three analysis instructions sent by the user device to the analysis device as an example.

[0145] Step 412: The user equipment sends a first analysis instruction to the analysis equipment. Execute step 413.

[0146] The first analysis instruction is used to indicate the mth test and the nth test, 1≤m<n≤i. That is, the nth test is a test performed after the mth test is completed, and both the mth test and the nth test have been performed.

[0147] For example, the testing device may perform multiple tests on the total code of the target software version. After any test, the user device may send a first analysis instruction to the analysis device to instruct the analysis device to analyze the test results of the mth test and the nth test that have been performed.

[0148] Optionally, the first analysis instruction can also be used to instruct the analysis device to generate first incremental coverage data. Optionally, the first incremental coverage data is used to characterize: the execution status of the first code, the first code belongs to the total code of the target software version in the nth test, and does not belong to the total code of the target software version in the mth test. The first code is also the first incremental code (that is, the code that has changed) in the total code of the target software version in the nth test relative to the total code of the target software version in the mth test.

[0149] Since the total code of the target software version in the nth test has been updated relative to the total code of the target software version in the mth test, analyzing the test results of the mth test and the nth test can help testers determine the functional effects of the changed codes in the total code of the target software version in the nth test.

[0150] Step 413: The analysis device determines first incremental coverage data according to the first analysis instruction based on the total code of the target software version in the mth test, the total code of the target software version in the nth test, and the first coverage data corresponding to the target software version in the nth test. Execute step 414.

[0151] Optionally, the analysis device may perform a difference (also called diff) process between the total code of the target software version in the mth test and the total code of the target software version in the nth test to obtain the information of the first incremental code. Then, the information of the first incremental code is compared and analyzed with the first incremental coverage data corresponding to the target software version in the mth test to obtain the first incremental coverage data.

[0152] Optionally, the first incremental coverage data is stored in the form of an info file. Optionally, after generating the first incremental coverage data, the analysis device may also convert the storage format of the first incremental coverage data to improve the visualization of the first incremental coverage data. For example, the analysis device may convert the info file into a Hypertext Markup Language (html) file through the genhtml command, and the html file may more intuitively display the coverage data in the form of a graphical table.

[0153] Step 414: The user equipment obtains and displays the first incremental coverage data.

[0154] Optionally, the analysis device may store the generated first incremental coverage data to a storage device, and may send a first response message to the user device to inform the user device that the generation of the first incremental coverage data is complete. The first response message may indicate the storage address of the first incremental coverage data, and the user device may obtain the first incremental coverage data from the storage device according to the storage address and display the first incremental coverage data.

[0155] Optionally, the analysis device may also directly send the first incremental coverage data to the user equipment, so that the user equipment displays the first incremental coverage data.

[0156] Step 415: The user device sends a third analysis instruction for the target software version to the analysis device. Execute step 416.

[0157] The third analysis instruction is used to indicate the target software version. Optionally, the third analysis instruction can also be used to instruct the analysis device to generate full coverage data for the target software version. The full coverage data for the target software version is used to characterize: the total code of the target software version in the last test that has been executed, and the execution status in all the tests that have been executed.

[0158] Step 416: The analysis device determines whether a pull notification is received within the target time after receiving the third analysis instruction. Execute step 417.

[0159] After each test of the total code of the target software version, the test device will trigger the pulling device to pull the code information corresponding to the test generated by the test device, and will send a pulling notification to the analysis device when the pulling device successfully pulls the code information corresponding to each test. Therefore, the analysis device can determine whether all sub-tests of the target software version by the test device are completed based on whether the pulling notification is received within the target time after receiving the third analysis instruction. When the analysis device determines that the pulling notification is not received within the target time after receiving the third analysis instruction, the analysis device can determine that there is no next test for the target software version, that is, determine that all sub-tests of the target software version by the test device are completed.

[0160] Optionally, the analysis device may also query the data stored in the storage area corresponding to the pulling device to determine whether the test device has completed all subtests of the target software version. For example, the storage area may be pre-partitioned according to different software versions, and the analysis device may determine whether the data in the storage location corresponding to the target software version in the storage area is being updated, that is, whether the code information of the target software version in the storage area is being updated. When the code information of the target software version is not updated, it is determined that the test device has completed all subtests of the target software version.

[0161] Step 417: When the analysis device does not receive the pull notification within the target duration, the analysis device determines the full coverage data of the target software version according to the first coverage data corresponding to all the tests that have been executed for the target software version. Execute step 418.

[0162] For example, when the analysis device does not receive a pull notification within the target duration, the analysis device may merge the first coverage data corresponding to all tests that have been executed for the target software version to obtain the full coverage data.

[0163] Optionally, the full coverage data is stored in the form of an info file. Optionally, after generating the full coverage data, the analysis device may also convert the storage format of the full coverage data, such as converting the storage format into an html file format, to improve the visualization of the full coverage data.

[0164] Step 418: The user equipment obtains and displays full coverage data.

[0165] Optionally, the analysis device may store the generated full coverage data to a storage device, and the analysis device may send a third response message to the user device to inform the user device that the full coverage data generation is complete. The user device may then obtain the full coverage data from the storage device and display the full coverage data.

[0166] Optionally, the analysis device may also directly send the full coverage data to the user device so that the user device can display the full coverage data.

[0167] Step 419: The user equipment sends a second analysis instruction to the analysis equipment. Then, step 420 is executed.

[0168] The second analysis instruction is used to indicate: the target software version and its historical software version.

[0169] Optionally, the second instruction can also be used to instruct the analysis device to generate second incremental coverage data. The second incremental coverage data is used to characterize: the execution status of the second code, the second code belongs to the total code of the target software version in the last test, and does not belong to the total code of the historical software version in the last test. The second code is the second incremental code of the target software version relative to the historical software version, that is, the code in the total code of the target software version in the last test that has changed relative to the total code of the historical software version in the last test.

[0170] It should be noted that each software can correspond to multiple versions, and the total code of each version has changed compared with the total code of the previous version. The testing of the version is largely to determine the functional effect of the changed code. Therefore, a second analysis instruction can be sent to the analysis device, instructing the analysis device to generate second incremental coverage data, and then the tester can determine the functional effect of the changed code in the total code of the target software version based on the second incremental coverage data.

[0171] Step 420: The analysis device determines second incremental coverage data according to the second analysis instruction based on the total code of the target software version in the last test, the total code of the historical software version in the last test, and the full coverage data corresponding to the target software version. Execute step 421.

[0172] Optionally, the analysis device may perform a subtraction process on the total code of the target software version in the last test and the total code of the historical software version in the last test to obtain the second incremental code information of the target software version. Then, the second incremental code information is compared and analyzed with the full coverage data corresponding to the target software version to obtain the second incremental coverage data.

[0173] Optionally, the second incremental coverage data is stored in the form of an info file. Optionally, after generating the second incremental coverage data, the analysis device may also convert the storage format of the second incremental coverage data, such as converting the format of an html file, to improve the visualization of the second incremental coverage data.

[0174] Step 421: The user equipment displays the second incremental coverage data.

[0175] Optionally, the analysis device may store the generated second incremental coverage data to a storage device, and the analysis device may send a second response message to the user device to inform the user device that the second incremental coverage data has been generated. The user device may then obtain the second incremental coverage data from the storage device and display the second incremental coverage data.

[0176] Optionally, the analysis device may also directly send the second incremental coverage data to the user equipment, so that the user equipment displays the second incremental coverage data.

[0177] It should be noted that in the embodiment of the present application, when the user device sends a test instruction for the target software version to the test device, the test device can generate an installation package of the target software version for release according to the test instruction, and generate a plug-in package for the target software version according to the test instruction, without the need for the tester to manually perform the plug-in operation, thereby reducing the workload of the tester and improving the efficiency of generating the plug-in package.

[0178] When the tester triggers the user device to send an end instruction to the test device, the user device can simultaneously send a pull instruction to the pulling device, and then the pulling device can pull the code information corresponding to the i-th test of the target software version according to the pull instruction. The tester does not need to trigger the pulling device to pull the code information, thereby further reducing the workload of the tester and improving the efficiency of pulling code information.

[0179] When the pulling device pulls the code information corresponding to the i-th test, it sends a pull notification to the analysis device, and the analysis device can pull the code information corresponding to the i-th test according to the pull notification, and generate the first coverage data corresponding to the target software version in the i-th test according to the pulled code information. Therefore, the tester does not need to manually input the code information into the analysis device, nor does it need to trigger the analysis device again to analyze the code information, and there is no need to manually operate the analysis device to analyze the code information, so the workload of the tester is further reduced and the efficiency of generating the first coverage data is improved.

[0180] In addition, in the embodiment of the present application, the analysis device can generate the first incremental coverage data of the target software version between any two tests of the target software version, the full coverage data of the target software version, and the second incremental coverage data corresponding to the incremental code between different versions. Therefore, the analysis device can generate more types of coverage data and the analysis device has richer functions. And the tester only needs to trigger the corresponding analysis instruction through the user device to obtain the corresponding coverage data, so the process for the tester to obtain the coverage data is relatively simple.

[0181] In summary, in the method for generating coverage data provided in the embodiment of the present application, the analysis device can automatically obtain the code information corresponding to the i-th test, and generate the first coverage data corresponding to the target software version in the i-th test according to the code information corresponding to the i-th test. Since the analysis device can also automatically obtain the code information and can automatically analyze the obtained code information, the function of the analysis device is enriched.

[0182] Furthermore, the participation of testers is reduced in the process of the analysis device generating the first coverage data, thereby improving the efficiency of generating the first coverage data.

[0183] The embodiment of the present application also provides a system for generating coverage data. The system for generating coverage data can be Figure 1 or Figure 2 The system 10 is shown.

[0184] The testing device can be used to: perform the i-th test on the total code of the target software version to obtain the code information corresponding to the i-th test, wherein the code information includes the information of the total code during the i-th test and the information of the executed code in the total code during the i-th test, i≥1; the analysis device can be used to: obtain the code information corresponding to the i-th test. The analysis device can also be used to generate the first coverage data corresponding to the target software version in the i-th test based on the code information corresponding to the i-th test, and the first coverage data is used to characterize: the execution status of the total code during the i-th test.

[0185] Optionally, the test device is further used to: before performing the i-th test on the total code of the target software version, receive a test instruction for the target software version sent by the user device. The test device is also used to: generate an installation package of the target software version for release according to the test instruction, and perform a plug-in operation on the total code according to the test instruction to generate a plug-in package of the target software version; the test device performs the i-th test on the plug-in package of the target software version.

[0186] Optionally, the pulling device is used to: receive a pulling instruction for the i-th test sent by the user device; pull the code information corresponding to the i-th test from the test device according to the pulling instruction; store the code information corresponding to the i-th test in a target location corresponding to the i-th test; send a pulling notification to the analysis device, the pulling notification is used to indicate the target location corresponding to the i-th test. The analysis device is used to: pull the code information corresponding to the i-th test from the target location corresponding to the i-th test according to the pulling notification.

[0187] Optionally, the test device is used to: upon receiving an end instruction for the target software version sent by the user device, end the i-th test of the target software version according to the end instruction, the end instruction is used to instruct the test device to end the i-th test of the target software version, and is used to instruct the test device whether to update the total code of the target software version; when the end instruction is used to instruct the test device to update the total code, receive the updated total code sent by the user device, and update the total code of the target software version. The pull device is used to: receive the pull instruction for the i-th test sent by the user device when sending the end instruction.

[0188] Optionally, the analysis device is used to: receive a first analysis instruction sent by a user device, wherein the first analysis instruction is used to indicate the mth test and the nth test, 1≤m<n≤i; according to the first analysis instruction, based on the total code of the target software version in the mth test, the total code of the target software version in the nth test, and the first coverage data corresponding to the target software version in the nth test, determine the first incremental coverage data. The first incremental coverage data is used to characterize: the execution status of the first code, the first code belongs to the total code of the target software version in the nth test, and does not belong to the total code of the target software version in the mth test. The user device is used to: obtain and display the first incremental coverage data.

[0189] Optionally, the analysis device is used to: receive a third analysis instruction for the target software version sent by a user device; determine whether a pull notification is received within a target time length after receiving the third analysis instruction; when the analysis device does not receive a pull notification within the target time length, determine the full coverage data of the target software version based on the first coverage data corresponding to the target software version in all tests that have been executed; wherein the full coverage data is used to characterize: the total code of the target software version in the last test that has been executed, and the execution status of all tests that have been executed.

[0190] Optionally, the analysis device receives a second analysis instruction sent by the user device, and the second analysis instruction is used to indicate: the target software version and its historical software version; according to the second analysis instruction, based on the total code of the target software version in the last test, the total code of the historical software version in the last test, and the full coverage data corresponding to the target software version, determine the second incremental coverage data; wherein the full coverage data is used to characterize: the total code of the target software version in the last test that has been executed, and the execution status in all tests that have been executed; the second incremental coverage data is used to characterize: the execution status of the second code, the second code belongs to the total code of the target software version in the last test, and does not belong to the total code of the historical software version in the last test; the user device is used to: obtain and display the second incremental coverage data.

[0191] Figure 5 This is a flowchart of another method for generating coverage data provided in an embodiment of the present application. This method can be used for Figure 1 or Figure 2 The analysis device 103 shown, such as Figure 5 As shown, the method may include:

[0192] Step 501, obtaining code information corresponding to the i-th test obtained by the test device performing the i-th test on the total code of the target software version, wherein the code information includes information about the total code during the i-th test and information about the executed code in the total code during the i-th test, i≥1.

[0193] Step 502: Generate first coverage data corresponding to the target software version in the i-th test according to the code information corresponding to the i-th test, where the first coverage data is used to represent: the execution status of the total code in the i-th test process.

[0194] Figure 6 is a schematic diagram of the structure of a device for generating coverage data provided in an embodiment of the present application. The device for generating coverage data is used to Figure 1 or Figure 2 The analysis device 103 shown, such as Figure 5 As shown, the coverage data generating device 60 may include:

[0195] Acquisition module 601 is used to obtain code information corresponding to the i-th test obtained by the test device performing the i-th test on the total code of the target software version, wherein the code information includes information about the total code during the i-th test and information about the executed code in the total code during the i-th test, i≥1.

[0196] The generation module 602 is used to generate first coverage data corresponding to the target software version in the i-th test according to the code information corresponding to the i-th test, and the first coverage data is used to represent: the execution status of the total code during the i-th test.

[0197] Optionally, the acquisition module 601 is further configured to receive a pull instruction for the i-th test sent by the pull device; and pull the code information corresponding to the i-th test from the target position corresponding to the i-th test according to the pull notification.

[0198] Optionally, refer to Figure 7 , the coverage data generation device 60 may also include: a first receiving module 603, used to receive a first analysis instruction sent by the user equipment, wherein the first analysis instruction is used to indicate the mth test and the nth test, 1≤m<n≤i. A first determination module 604 is used to determine the first incremental coverage data according to the first analysis instruction, based on the total code of the target software version in the mth test, the total code of the target software version in the nth test, and the first coverage data corresponding to the target software version in the nth test. The first incremental coverage data is used to characterize: the execution status of the first code, the first code belongs to the total code of the target software version in the nth test, and does not belong to the total code of the target software version in the mth test.

[0199] Optionally, refer to Figure 8 ,exist Figure 6 On the basis of, the coverage data generation device 60 may also include: a second receiving module 605, which is used to receive a second analysis instruction for the target software version sent by the user device. The second determination module 606 is used to determine the second incremental coverage data according to the second analysis instruction, based on the total code of the target software version in the last test, the total code of the historical software version in the last test, and the full coverage data corresponding to the target software version. Among them, the full coverage data is used to characterize: the total code of the target software version in the last test that has been executed, and the execution status in all tests that have been executed; the second incremental coverage data is used to characterize: the execution status of the second code, the second code belongs to the total code of the target software version in the last test, and does not belong to the total code of the historical software version in the last test.

[0200] Optionally, refer to Fig. 9 ,exist Figure 6On the basis of, the coverage data generation device 60 may also include: a third receiving module 607, which is used to receive a third analysis instruction for the target software version sent by the user device. A judgment module 608 is used to judge whether a pull notification is received within the target time length after receiving the third analysis instruction. A third determination module 609 is used to determine the full coverage data of the target software version according to the first coverage data corresponding to the target software version in all the tests that have been executed when no pull notification is received within the target time length. Among them, the full coverage data is used to characterize: the total code of the target software version in the last test that has been executed, and the execution status of all the tests that have been executed.

[0201] Fig.10 This is a flowchart of another method for generating coverage data provided in an embodiment of the present application. This method can be used Figure 1 or Figure 2 The user equipment 101 shown in FIG. Fig.10 As shown, the method may include:

[0202] Step 701: Send a test instruction for a target software version to a test device.

[0203] Step 702: Send an end instruction for the target software version to the test device. The end instruction is used to instruct the test device to end the i-th test on the target software version, i≥1. The end instruction is also used to instruct the test device whether to update the total code of the target software version.

[0204] Step 703: When sending the end instruction to the test device, send a pull instruction for the i-th test on the target software version to the pull device.

[0205] Fig.11 is a schematic diagram of the structure of a device for generating coverage data provided in an embodiment of the present application. The device for generating coverage data is used to Figure 1 or Figure 2 The user equipment 101 shown in FIG. Figure 1 As shown, the coverage data generating device 80 may include:

[0206] The first sending module 801 is used to send a test instruction for a target software version to a test device.

[0207] The second sending module 802 is used to send an end instruction for the target software version to the test device. The end instruction is used to instruct the test device to end the i-th test on the target software version, i≥1, and the end instruction is also used to instruct the test device whether to update the total code of the target software version.

[0208] The third sending module 803 is used to send a pull instruction for the i-th test on the target software version to the pull device when sending an end instruction to the test device.

[0209] Alternatively, if Fig.12 As shown, in Fig.11 On the basis of, the coverage data generation device 80 may also include: a fourth sending module 804, used to send a first analysis instruction to the analysis device, the first analysis instruction is used to indicate the mth test and the nth test, 1≤m<n≤i. A first acquisition module 805, used to acquire and display the first incremental coverage data generated by the analysis device according to the first analysis instruction, wherein the first incremental coverage data is used to characterize: the execution status of the first code, the first code belongs to the total code of the target software version in the nth test, and does not belong to the total code of the target software version in the mth test.

[0210] Alternatively, if Fig.13 As shown, in Fig.11 On the basis of, the coverage data generating device 80 may further include: a fifth sending module 806, used to send a second analysis instruction to the analysis device, the second analysis instruction is used to indicate: the target software version and its historical software version. A second acquisition module 807, used to acquire and display the second incremental coverage data generated by the analysis device according to the second analysis instruction, wherein the second incremental coverage data is used to characterize: the execution status of the second code, the second code belongs to the total code of the target software version in the last test, and does not belong to the total code of the historical software version in the last test.

[0211] Alternatively, if Fig.14 As shown, in Fig.11 On the basis of, the coverage data generating device 80 may further include: a sixth sending module 808, used to send a third analysis instruction to the analysis device, the third analysis instruction is used to indicate the target software version. A third acquisition module 809, used to acquire and display the full coverage data generated by the analysis device according to the third analysis instruction, wherein the full coverage data is used to characterize: the total code of the target software version in the last test that has been executed, and the execution status in all the tests that have been executed.

[0212] Fig.15 This is a flowchart of another method for generating coverage data provided in an embodiment of the present application. This method can be used Figure 2 The pulling device 104 shown, such as Fig.10 As shown, the method may include:

[0213] Step 901: Receive a pull instruction for the i-th test on a target software version sent by a user device, where i≥1.

[0214] Step 902: According to the pull instruction, pull the code information corresponding to the i-th test from the test device.

[0215] Step 903: Store the code information corresponding to the i-th test in the target position corresponding to the i-th test.

[0216] Step 904: Send a pull notification to the analysis device, where the pull notification is used to indicate the target position corresponding to the i-th test.

[0217] Fig.16 is a schematic diagram of the structure of a device for generating coverage data provided in an embodiment of the present application. The device for generating coverage data is used to Figure 2 The pulling device 104 shown, such as Figure 1 As shown, the coverage data generating device 160 may include:

[0218] The receiving module 1601 is used to receive a pull instruction for the i-th test of the target software version sent by the user device, i≥1. The pulling module 1602 is used to pull the code information corresponding to the i-th test from the test device according to the pull instruction. The storage module 1603 is used to store the code information corresponding to the i-th test in the target location corresponding to the i-th test. The sending module 1604 is used to send a pull notification to the analysis device, and the pull notification is used to indicate the target location corresponding to the i-th test.

[0219] Optionally, the pulling module 1602 is further configured to receive a pulling instruction for the i-th test sent by the user equipment when sending an end instruction for the target software version.

[0220] Fig.17 is a flow chart of another method for generating coverage data provided by an embodiment of the present application. The method for generating coverage data is used for testing equipment, such as Fig.17 As shown, the method includes:

[0221] Step 1701: Receive a test instruction for a target software version sent by a user device.

[0222] Step 1702: Generate an installation package of the target software version for release according to the test instruction, and perform a plug-in operation on the total code of the target software version according to the test instruction to generate an plug-in package of the target software version.

[0223] Step 1703: Perform the i-th test on the instrumentation package of the target software version, where i≥1.

[0224] Fig.181 is a schematic diagram of the structure of another device for generating coverage data provided in an embodiment of the present application. The device for generating coverage data is used for testing equipment, and the device for generating coverage data 180 includes:

[0225] The receiving module 1801 is used to receive a test instruction for a target software version sent by a user equipment.

[0226] The generation module 1802 is used to generate an installation package of the target software version for release according to the test instruction, and to perform a plug-in operation on the total code of the target software version according to the test instruction to generate an plug-in package of the target software version.

[0227] The testing module 1803 is used to perform the i-th test on the instrumentation package of the target software version, where i≥1.

[0228] In an exemplary embodiment, a device for generating coverage data is also provided, which may include a processor and a memory, wherein at least one instruction is stored in the memory. The at least one instruction is configured to be executed by one or more processors to implement any of the above-mentioned methods for generating coverage data.

[0229] Fig.19 Schematic diagram of the structure of a server provided in an embodiment of the present application. The server may be the testing device, analysis device, pulling device or storage device described in the above embodiment. Fig.19 As shown, the server 1900 includes a central processing unit (CPU) 1901, a system memory 1904 including a random access memory (RAM) 1902 and a read-only memory (ROM) 1903, and a system bus 1905 connecting the system memory 1904 and the central processing unit 1901. The server 1900 also includes a basic input / output system (I / O system) 1906 that helps transmit information between various components in the computer, and a large-capacity storage device 1907 for storing an operating system 1913, application programs 1914, and other program modules 1915.

[0230] The basic input / output system 1906 includes a display 1908 for displaying information and an input device 1909 such as a mouse and a keyboard for user inputting information. The display 1908 and the input device 1909 are connected to the central processing unit 1901 through an input / output controller 1910 connected to the system bus 1905. The basic input / output system 1906 may also include an input / output controller 1910 for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 810 also provides output to a display screen, a printer, or other types of output devices.

[0231] The mass storage device 1907 is connected to the central processing unit 1901 through a mass storage controller (not shown) connected to the system bus 1905. The mass storage device 1907 and its associated computer-readable media provide non-volatile storage for the server 1900. That is, the mass storage device 1907 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROM drive.

[0232] Without loss of generality, computer-readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, EPROM, EEPROM, flash memory or other solid-state storage technologies, CD-ROM, DVD or other optical storage, cassettes, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media are not limited to the above. The above-mentioned system memory 1904 and mass storage device 1907 may be collectively referred to as memory. The above-mentioned memory also includes one or more programs, one or more programs stored in the memory, and configured to be executed by the CPU.

[0233] According to various embodiments of the present application, the server 1900 can also be connected to a remote computer on the network through a network such as the Internet. That is, the server 1900 can be connected to the network 1912 through the network interface unit 1911 connected to the system bus 1905, or the network interface unit 1911 can be used to connect to other types of networks or remote computer systems (not shown).

[0234] Fig. 20 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application. The terminal may be a user device in the above embodiment, such as Fig. 20 As shown, the terminal 2000 may be a portable mobile terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer or a desktop computer. The terminal 2000 may also be called a user terminal, a portable terminal, a laptop terminal, a desktop terminal or other names. Generally, the terminal 2000 includes a processor 2001 and a memory 2002.

[0235] The processor 2001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 2001 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array) or PLA (Programmable Logic Array). The processor 2001 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 2001 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 2001 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0236] The memory 2002 may include one or more computer-readable storage media, which may be non-transitory. The memory 2002 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 2002 is used to store at least one instruction, which is used to be executed by the processor 2001 to implement the webpage acquisition method provided in the method embodiment of the present application.

[0237] In some embodiments, the terminal 2000 may further optionally include: a peripheral device interface 2003 and at least one peripheral device. The processor 2001, the memory 2002 and the peripheral device interface 2003 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 2003 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 2004, a touch display screen 2005, a camera 2006, an audio circuit 2007 or a power supply 2009.

[0238] The peripheral device interface 2003 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 2001 and the memory 2002. In some embodiments, the processor 2001, the memory 2002, and the peripheral device interface 2003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 2001, the memory 2002, and the peripheral device interface 2003 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0239] The radio frequency circuit 2004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 2004 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 2004 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 2004 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The radio frequency circuit 2004 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 2004 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.

[0240] The display screen 2005 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 2005 is a touch display screen, the display screen 2005 also has the ability to collect touch signals on the surface or above the surface of the display screen 2005. The touch signal can be input to the processor 2001 as a control signal for processing. At this time, the display screen 2005 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 2005 can be one, and the front panel of the terminal 2000 is set; in other embodiments, the display screen 2005 can be at least two, which are respectively set on different surfaces of the terminal 2000 or are folded; in some other embodiments, the display screen 2005 can be a flexible display screen, which is set on the curved surface or folded surface of the terminal 2000. Even, the display screen 2005 can also be set to a non-rectangular irregular figure, that is, a special-shaped screen. The display screen 2005 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0241] The camera assembly 2006 is used to capture images or videos. Optionally, the camera assembly 2006 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 2006 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0242] The audio circuit 2007 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 2001 for processing, or input them into the radio frequency circuit 2004 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 2000. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 2001 or the radio frequency circuit 2004 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 2007 may also include a headphone jack.

[0243] The power supply 2009 is used to power various components in the terminal 2000. The power supply 2009 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 2009 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0244] In some embodiments, the terminal 2000 further includes one or more sensors 2010. The one or more sensors 2010 include but are not limited to: an acceleration sensor 2011, a gyroscope sensor 2012, a pressure sensor 2013, an optical sensor 2015, and a proximity sensor 2016.

[0245] The acceleration sensor 2011 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 2000. For example, the acceleration sensor 2011 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 2001 can control the touch display screen 2005 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 2011. The acceleration sensor 2011 can also be used for collecting game or user motion data.

[0246] The gyro sensor 2012 can detect the body direction and rotation angle of the terminal 2000, and the gyro sensor 2012 can cooperate with the acceleration sensor 2011 to collect the user's 3D actions on the terminal 2000. The processor 2001 can implement the following functions based on the data collected by the gyro sensor 2012: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0247] The pressure sensor 2013 can be set on the side frame of the terminal 2000 and / or the lower layer of the touch display screen 2005. When the pressure sensor 2013 is set on the side frame of the terminal 2000, it can detect the user's holding signal of the terminal 2000, and the processor 2001 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 2013. When the pressure sensor 2013 is set on the lower layer of the touch display screen 2005, the processor 2001 controls the operability controls on the UI interface according to the user's pressure operation on the touch display screen 2005. The operability controls include at least one of a button control, a scroll bar control, an icon control, or a menu control.

[0248] The optical sensor 2015 is used to collect the ambient light intensity. In one embodiment, the processor 2001 can control the display brightness of the touch display screen 2005 according to the ambient light intensity collected by the optical sensor 2015. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 2005 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 2005 is decreased. In another embodiment, the processor 2001 can also dynamically adjust the shooting parameters of the camera assembly 2006 according to the ambient light intensity collected by the optical sensor 2015.

[0249] The proximity sensor 2016, also called a distance sensor, is usually arranged on the front panel of the terminal 2000. The proximity sensor 2016 is used to collect the distance between the user and the front of the terminal 2000. In one embodiment, when the proximity sensor 2016 detects that the distance between the user and the front of the terminal 2000 is gradually decreasing, the processor 2001 controls the touch display screen 2005 to switch from the screen-on state to the screen-off state; when the proximity sensor 2016 detects that the distance between the user and the front of the terminal 2000 is gradually increasing, the processor 2001 controls the touch display screen 2005 to switch from the screen-off state to the screen-on state.

[0250] It should be understood that Fig. 20 The structure shown in the figure does not constitute a limitation on the terminal 2000, and the terminal 2000 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

[0251] In an exemplary embodiment, a computer-readable storage medium is also provided, wherein the storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded by a processor and executes any of the above-mentioned methods for generating coverage data.

[0252] It should be noted that: the coverage data generation device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example when generating coverage data. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0253] It should be noted that the method embodiments provided in the embodiments of the present application can be referenced with the corresponding device embodiments, and the embodiments of the present application do not limit this. The sequence of the steps of the method embodiments provided in the embodiments of the present application can be appropriately adjusted, and the steps can be increased or decreased accordingly according to the circumstances. Any technician familiar with the technical field can easily think of the changed methods within the technical scope disclosed in the present application, and they should be included in the protection scope of the present application, so they will not be repeated.

[0254] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for generating coverage data, characterized in that: The method comprises: The testing device performs an i-th test on the total code of the target software version to obtain code information corresponding to the i-th test, wherein the code information includes information about the total code during the i-th test and information about executed code in the total code during the i-th test, i≥1; The analysis device obtains the code information corresponding to the i-th test; The analysis device generates, according to the code information corresponding to the i-th test, first coverage data corresponding to the target software version in the i-th test, wherein the first coverage data is used to characterize: the execution status of the total code in the i-th test process; The analysis device receives a first analysis instruction sent by a user device, wherein the first analysis instruction is used to indicate an mth test and an nth test, 1≤m<n≤i; The analysis device determines first incremental coverage data according to the first analysis instruction, based on the total code of the target software version in the mth test, the total code of the target software version in the nth test, and the first coverage data corresponding to the target software version in the nth test; The user device acquires and displays the first incremental coverage data; wherein the first incremental coverage data is used to characterize: an execution status of a first code, the first code belongs to the total code of the target software version in the nth test, and does not belong to the total code of the target software version in the mth test; The analysis device receives a second analysis instruction sent by the user device, where the second analysis instruction is used to indicate: the target software version and its historical software version; The analysis device determines second incremental coverage data according to the second analysis instruction, based on the total code of the target software version in the last test, the total code of the historical software version in the last test, and the full coverage data corresponding to the target software version; The user device obtains and displays the second incremental coverage data; wherein the full coverage data is used to characterize: the total code of the target software version in the last test that has been executed, and the execution status in all tests that have been executed; the second incremental coverage data is used to characterize: the execution status of the second code, the second code belongs to the total code of the target software version in the last test, and does not belong to the total code of the historical software version in the last test.

2. The method according to claim 1, characterized in that The method further comprises: Before the test device performs the i-th test on the total code of the target software version, the test device receives a test instruction for the target software version sent by the user equipment; The testing device performs an i-th test on the total code of the target software version, including: The test device generates an installation package of the target software version for release according to the test instruction, and performs a plug-in operation on the total code according to the test instruction to generate an plug-in package of the target software version; The testing device performs the i-th test on the instrumentation package of the target software version.

3. The method according to claim 1 or 2, characterized in that: The analyzing device obtains code information corresponding to the i-th test, including: The pulling device receives a pulling instruction for the i-th test sent by the user device; The pulling device pulls the code information corresponding to the i-th test from the testing device according to the pulling instruction; The pulling device stores the code information corresponding to the i-th test in the target position corresponding to the i-th test; The pulling device sends a pulling notification to the analyzing device, where the pulling notification is used to indicate a target position corresponding to the i-th test; The analysis device pulls the code information corresponding to the i-th test from the target location corresponding to the i-th test according to the pull notification.

4. The method according to claim 3, characterized in that: The method further comprises: When the test device receives the end instruction for the target software version sent by the user equipment, the test device ends the i-th test of the target software version according to the end instruction, wherein the end instruction is used to instruct the test device to end the i-th test of the target software version and to instruct the test device whether to update the total code; When the end instruction is used to instruct the test device to update the master code, the test device receives the updated master code sent by the user device, and updates the master code of the target software version; The pulling device receives a pulling instruction for the i-th test sent by the user device, including: The pulling device receives the pulling instruction for the i-th test sent by the user equipment when sending the end instruction.

5. A system for generating coverage data, characterized in that: The system comprises: a testing device and an analysis device connected to each other; The testing device is used to perform an i-th test on the total code of the target software version to obtain code information corresponding to the i-th test, wherein the code information includes information of the total code during the i-th test and information of executed code in the total code during the i-th test, i≥1; The analysis device is used to obtain code information corresponding to the i-th test; based on the code information corresponding to the i-th test, generate first coverage data corresponding to the target software version in the i-th test, wherein the first coverage data is used to characterize: the execution status of the total code during the i-th test; The analysis device is also used to receive a first analysis instruction sent by a user device, wherein the first analysis instruction is used to indicate an m-th test and an n-th test, 1≤m<n≤i; according to the first analysis instruction, based on the total code of the target software version in the m-th test, the total code of the target software version in the n-th test, and the first coverage data corresponding to the target software version in the n-th test, determine first incremental coverage data; wherein the first incremental coverage data is used to characterize: the execution status of a first code, the first code belongs to the total code of the target software version in the n-th test, and does not belong to the total code of the target software version in the m-th test; The user equipment is used to obtain and display the first incremental coverage data; The analysis device is also used to receive a second analysis instruction sent by the user device, the second analysis instruction is used to indicate: the target software version and its historical software version; according to the second analysis instruction, based on the total code of the target software version in the last test, the total code of the historical software version in the last test, and the full coverage data corresponding to the target software version, determine the second incremental coverage data; wherein the full coverage data is used to characterize: the total code of the target software version in the last test that has been executed, and the execution status in all tests that have been executed; the second incremental coverage data is used to characterize: the execution status of the second code, the second code belongs to the total code of the target software version in the last test, and does not belong to the total code of the historical software version in the last test; The user equipment is also used to obtain and display the second incremental coverage data.

6. The system according to claim 5, characterized in that The test equipment is also used to: Before the test device performs the i-th test on the total code of the target software version, the test device receives a test instruction for the target software version sent by the user equipment; The test device generates an installation package of the target software version for release according to the test instruction, and performs a plug-in operation on the total code according to the test instruction to generate an plug-in package of the target software version; The testing device performs the i-th test on the instrumentation package of the target software version.

7. The system according to claim 5 or 6, characterized in that: The system also includes a pulling device, the pulling device being used to: Receiving a pull instruction for the i-th test sent by a user device; Pulling code information corresponding to the i-th test from the test device according to the pull instruction; storing the code information corresponding to the i-th test in the target position corresponding to the i-th test; Sending a pull notification to the analysis device, wherein the pull notification is used to indicate a target position corresponding to the i-th test; The analytical equipment is used for: According to the pull notification, code information corresponding to the i-th test is pulled from a target location corresponding to the i-th test.

8. The system according to claim 7, characterized in that The test equipment is also used to: When receiving an end instruction for the target software version sent by the user equipment, end the i-th test of the target software version according to the end instruction, wherein the end instruction is used to instruct the test device to end the i-th test of the target software version and to instruct the test device whether to update the total code; When the end instruction is used to instruct the test device to update the master code, receiving the updated master code sent by the user device, and updating the master code of the target software version; The pulling device is used for: A pull instruction for the i-th test is received, which is sent by the user equipment when sending the end instruction.

9. A method for generating coverage data, characterized in that: The method is used for analyzing a device, and the method comprises: Obtaining code information corresponding to the i-th test obtained by the test device performing the i-th test on the total code of the target software version, wherein the code information includes information about the total code during the i-th test and information about the executed code in the total code during the i-th test, i≥1; Generate first coverage data corresponding to the target software version in the i-th test according to the code information corresponding to the i-th test, wherein the first coverage data is used to characterize: the execution status of the total code in the i-th test process; Receiving a first analysis instruction sent by a user equipment, wherein the first analysis instruction is used to indicate an mth test and an nth test, 1≤m<n≤i; According to the first analysis instruction, first incremental coverage data is determined based on the total code of the target software version in the m-th test, the total code of the target software version in the n-th test, and the first coverage data corresponding to the target software version in the n-th test; wherein the first incremental coverage data is used to characterize: the execution status of the first code, the first code belongs to the total code of the target software version in the n-th test, and does not belong to the total code of the target software version in the m-th test; receiving a second analysis instruction sent by the user equipment, where the second analysis instruction is used to indicate: the target software version and its historical software version; According to the second analysis instruction, second incremental coverage data is determined based on the total code of the target software version in the last test, the total code of the historical software version in the last test, and the full coverage data corresponding to the target software version; wherein the full coverage data is used to characterize: the total code of the target software version in the last test that has been executed, and the execution status in all tests that have been executed; the second incremental coverage data is used to characterize: the execution status of the second code, the second code belongs to the total code of the target software version in the last test, and does not belong to the total code of the historical software version in the last test.

10. A device for generating coverage data, characterized in that: The device for generating coverage data is used for analyzing equipment, and the device for generating coverage data includes: an acquisition module, used for acquiring code information corresponding to the i-th test obtained by the test device performing the i-th test on the total code of the target software version, wherein the code information includes information of the total code during the i-th test and information of executed code in the total code during the i-th test, i≥1; A generating module, configured to generate first coverage data corresponding to the target software version in the i-th test according to the code information corresponding to the i-th test, wherein the first coverage data is used to characterize: the execution status of the total code in the i-th test process; A first receiving module, configured to receive a first analysis instruction sent by a user equipment, wherein the first analysis instruction is used to indicate an mth test and an nth test, 1≤m<n≤i; A first determination module is configured to determine first incremental coverage data according to the first analysis instruction, based on the total code of the target software version in the m-th test, the total code of the target software version in the n-th test, and the first coverage data corresponding to the target software version in the n-th test; wherein the first incremental coverage data is used to characterize: an execution status of a first code, the first code belongs to the total code of the target software version in the n-th test, and does not belong to the total code of the target software version in the m-th test; A second receiving module is used to receive a second analysis instruction sent by the user equipment, where the second analysis instruction is used to indicate: the target software version and its historical software version; The second determination module is used to determine the second incremental coverage data according to the second analysis instruction, based on the total code of the target software version in the last test, the total code of the historical software version in the last test, and the full coverage data corresponding to the target software version; wherein the full coverage data is used to characterize: the total code of the target software version in the last test that has been executed, and the execution status in all tests that have been executed; the second incremental coverage data is used to characterize: the execution status of the second code, the second code belongs to the total code of the target software version in the last test, and does not belong to the total code of the historical software version in the last test.

11. The device according to claim 10, characterized in that The acquisition module is further used for: Receiving a pull instruction for the i-th test sent by a pull device; According to the pull notification, code information corresponding to the i-th test is pulled from a target location corresponding to the i-th test.

12. A device for generating coverage data, characterized in that: The device for generating coverage data includes: a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the method for generating coverage data as described in claim 9.

Citation Information

Patent Citations

  • Software testing device and method

    CN106201894A

  • Coverage rate data processing method and apparatus, and server

    CN106547698A

  • Code coverage analysis method, device, apparatus, and storage medium

    CN109388566A

  • Collecting and Reporting Code Coverage Data

    US20080172580A1