CN110928776A - Detection method, device and equipment for realizing incremental code coverage rate based on lcov - Google Patents
Detection method, device and equipment for realizing incremental code coverage rate based on lcov Download PDFInfo
- Publication number
- CN110928776A CN110928776A CN201911125848.6A CN201911125848A CN110928776A CN 110928776 A CN110928776 A CN 110928776A CN 201911125848 A CN201911125848 A CN 201911125848A CN 110928776 A CN110928776 A CN 110928776A
- Authority
- CN
- China
- Prior art keywords
- file
- gcda
- coverage
- function
- info
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3676—Test management for coverage analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/77—Software metrics
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a detection method, a device and equipment for realizing incremental code coverage rate based on lcov, wherein a coverage rate distribution function is called in the running process of an application program through respectively packing and compressing a [ gcno ] file generated in the compiling process, and a corresponding [ gcda ] file is generated and uploaded to a server; integrating the received 'gcno' file and 'gcda' file at the server side, and generating a 'info' file through an lcov tool; comparing the generated ". info" file with the ". info" file of the baseline version, and further generating a coverage rate report by using a genhtml tool through obtaining an increment ". info" file; and obtaining a detection result of the coverage rate of the incremental code according to the coverage rate report. The invention tightly combines coverage rate detection with the whole development process to generate a coverage rate report with readability, and the Git push is controlled through a coverage rate threshold value to ensure the project quality.
Description
Technical Field
The invention relates to the field of software development code quality monitoring, in particular to a detection method, a device and equipment for realizing incremental code coverage rate based on lcov.
Background
In the process of software development, code coverage is a means for measuring development integrity, in order to further improve the delivery quality of software, monitor omission in the development process and reduce online accidents, a new requirement is provided for the detection of code coverage at present, and how to accurately measure the coverage is also a technical bottleneck encountered by numerous developers.
Existing incremental code coverage detection schemes: acquiring the coverage rate information of the full code, acquiring the incremental code information through Gitdiff, mapping an incremental code change line to a line object of an abstract syntax tree, traversing the line object of the abstract syntax tree, determining the total number of the characteristic information of the incremental code and the number of the covered characteristic information of the incremental code from the line object of the abstract syntax tree, and dividing the number of the covered characteristic information of the incremental code by the total number of the characteristic information of the incremental code to obtain the coverage rate information of the incremental code.
The existing detection technology can detect the code coverage rate by using Xcode and an Xcode self-carrying tool, but because the detection technology can only detect the coverage rate of the full code, the code quantity is huge in large engineering, the working efficiency of a developer can be greatly reduced under the condition that the coverage rate of the full code is paid attention again after each iteration, and the Xcode can not automatically generate a coverage rate report and can not be combined with the whole development test flow.
Disclosure of Invention
The invention aims to solve the technical problem that a coverage rate report cannot be automatically generated in the prior art and cannot be combined with the whole development test process, and provides a detection method, a device and equipment for realizing the coverage rate of an incremental code based on lcov.
The technical scheme adopted by the invention for solving the technical problems is as follows: constructing a detection method for realizing incremental code coverage based on lcov, comprising the following steps:
s1, configuring compiling options through an Xcode tool, entering a compiling process, and generating an application program installation package; pushing the generated application program installation package to a front end for installation and operation;
s2, packing and compressing the [ gcno ] file generated in the compiling process and uploading the compressed [ gcno ] file to a server;
s3, based on the step S1, in the running process of the application program, calling a coverage rate distribution function to generate a corresponding [ gcda ] file, acquiring the finally generated [ gcda ] file from the sandbox of the application program after the running is finished, compressing the [ gcda ] file and uploading the compressed [ gcda ] file to the server;
s4, integrating the received [ gcno ] file and [ gcda ] file at the server side, and generating an [ info ] file based on the integrated file through an lcov tool; the generated ". info" file is uploaded to a Git-open source distributed version control system;
s5, calling a gitdiff command, and comparing the ". info" file generated in the step S4 with the ". info" file of the baseline version to obtain an increment ". info" file;
s6, generating a coverage rate report based on the incremental ". info" file through a genhtml tool; and obtaining a detection result of the coverage rate of the incremental code according to the coverage rate report.
Integrating a ". gcno" file and a ". gcda" file at a server, wherein the ". gcno" file records the specific execution times of each section of code as the ". gcno" file contains the mapping relation between a code technologist and a source code, and the ". info" file generating the code coverage condition can be further integrated through the two files; comparing the generated ". info" file with the ". info" file of the baseline version, and indirectly reflecting the detection result of the coverage rate of the incremental code based on obtaining the incremental ". info" file; by combining the generated increment and info files, on one hand, the obtained detection result is accurate, and on the other hand, the final display result can be visualized by combining the generated coverage rate report, so that the user can further analyze the result.
Further, in the ". gcno" file generated in step S2, a relationship between a counting instrumented position and the source file is stored, where the counting instrumented position includes a function entry function and a branch function code line; when the Basic Block is executed while the count instruction is inserted, all instructions in the Basic Block are further executed in sequence, and the count instruction and the execution data of the Block are currently written into the gcno file by the compiler.
The source file comprises a source code of a currently running program, and the counting peg-in position comprises a code line of functions such as function entries and branches; basic Block is a Basic unit of code execution, namely a program Block, and is characterized by only having one inlet and one outlet, and basically all instructions in the Block can be executed in sequence as long as the first instruction in the Block is executed; the 'gcno' file records the execution information of the current Basic Block, so that the code execution condition of the subsequent recording unit test is facilitated, and which line of codes is executed and which line of codes is not executed are conveniently recorded.
Further, the compiler writes the execution data of the block and the counting instruction into the gcno file:
first, based on the components that the ". gcno" file includes: the file structure, the function structure, the Basic Block structure and the Basic Block line structure are written with marks for identifying the ". gcno file" and the ". gcda file"; then, traversing the address of the written file, the name of the function and the starting and stopping line number of the function in the source file according to the currently written identifier; and finally, marking the jump relation between the BasicBlock, which is convenient for the subsequent recording of the function execution condition.
Further, in step S3, the entry distribution function of the coverage distribution function is __ gcov _ flush (), wherein the coverage information is written into the ". gcda" file by calling __ llvm _ gcov _ flush function and __ llvm _ gcov _ writeout function.
Further, the process of calling __ llvm _ gcov _ writeout to write coverage information into the ". gcda" file is as follows:
firstly, generating a 'gcda' file corresponding to a source file;
secondly, writing in identifiers for identifying the ". gcno file" and the ". gcda file";
next, the loop execution llvm _ gcda _ emit _ function writes function information for marking a file format, for example, ASCII codes of 'g', 'c','d', 'a' characters, to the ". gcda" file; the function information comprises an entry line, an exit line and an instruction code line of the function;
secondly, circularly executing llvm _ gcda _ emit _ arcs to write the execution information of Basic Block into the ". gcda" file;
secondly, calling an llvm _ gcda _ summary _ info command, and writing verification information into the gcda file;
and finally, calling the llvm _ gcda _ end _ file command to end the current running process.
Further, in step S3, after the application program finishes running, the ". gcda" file is uploaded to the server through the HTTP interface.
Further, in step S4, generating an "info" file by using an lcov tool, where the info file includes coverage detection data that is finally required to be obtained, and the coverage detection data includes a source code path, a function name, a function execution number, a function total number, a position of the function in a source file, a line number, a line execution number, and a line total number; and further obtaining a final detection result through the obtained coverage rate detection data.
The invention provides a detection device for realizing incremental code coverage based on lcov, which comprises the following modules:
the compiling module is used for configuring compiling options through an Xcode tool, entering a compiling process and generating an application program installation package; pushing the generated application program installation package to a front end for installation and operation;
the file uploading module is used for packaging and compressing the [ gcno ] file generated in the compiling process and uploading the [ gcno ] file to the server; meanwhile, based on a compiling module, in the running process of the application program, calling a coverage rate distribution function to generate a corresponding [ gcda ] file, after the running is finished, acquiring the finally generated [ gcda ] file from a sandbox of the application program, compressing the [ gcda ] file and uploading the [ gcda ] file to a server;
the data integration module is used for generating an 'info' file based on the integrated file through an lcov tool after integrating the file transmitted by the file uploading module at the server; the generated ". info" file is uploaded to a Git-open source distributed version control system;
the incremental ". info" file generation module is used for calling a gitdiff command, comparing the ". info" file generated by the data integration module with the ". info" file of the baseline version to obtain an incremental ". info" file;
a coverage report generation module for generating a coverage report based on the delta ". info" file by a genhtml tool; and obtaining a detection result of the coverage rate of the incremental code according to the coverage rate report.
Further, the file uploading module includes a coverage information writing module, and the coverage information writing module is configured to set an entry distribution function of the coverage distribution function to be __ gcov _ flush (), where the coverage information is written into the ". gcda" file by calling __ llvm _ gcov _ flush function and __ llvm _ gcov _ writeout function.
The device comprises a memory and a processor, wherein the memory is used for storing data obtained by processing of a compiling module, a file uploading module, a data integration module, an increment ". info" file generation module and a coverage report generation module, and the processor is used for obtaining corresponding data from the memory and further detecting the coverage of the increment code.
In the detection method, the device and the equipment for realizing the incremental code coverage based on the lcov, coverage detection and the whole development process are closely combined to generate a coverage report with readability, and a Git push is controlled through a coverage threshold to ensure the project quality.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a flowchart of a detection method for realizing incremental code coverage based on lcov provided by the present invention;
FIG. 2 is a system structure diagram of a detection device for realizing incremental code coverage based on lcov provided by the invention;
FIG. 3 is a structural diagram of a detection device for implementing incremental code coverage based on lcov.
Detailed Description
For a more clear understanding of the technical features, objects and effects of the present invention, embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
Example 1:
the invention provides a detection method for realizing incremental code coverage based on lcov, which comprises the following steps (please refer to fig. 1 for a specific execution flow):
s1, configuring compiling options through an Xcode tool, entering a compiling process, and generating an application program installation package; pushing the generated application program installation package to a front end for installation and operation;
s2, packing and compressing the [ gcno ] file generated in the compiling process and uploading the compressed [ gcno ] file to a server; the generation principle of the ". gcno" file is as follows: in the compiling process, the script calls the Xcode command line tools to further generate an 'ipa' file, after the 'ipa' file is generated, a corresponding 'gcno' file is automatically generated, currently, a file compression command (a curl command is executed in the embodiment) is input at the compiling rear end, and all the 'gcno' files are packaged and compressed and then uploaded to the server.
In the above steps S1-S2, after the Xcode is configured with the compiling option, the LLVM may insert the count code by modifying the IR, and the LLVM may insert the coverage count instruction based on Basic Block. And the Basic Block has the characteristics of unique entry and unique exit, and as long as the first instruction in the Basic Block is executed, the subsequent instructions in the Basic Block can be sequentially executed. And the coverage count instruction insertion executes two layers of loops, wherein the inner layer loop traverses the BasicBlock of the function, the outer layer loop traverses the function in the compiling unit, and the current function traversal is used for writing function position information into the ". gcno" file. The generated ". gcno" file stores the relationship between the counting instrumented position and the source file, specifically, the counting instrumented position includes a function entry function and a branch function code line; executing Basic Block-Basic program Block while inserting counting instruction, executing all the instructions in the Basic program Block in further sequence, and writing the counting instruction and the execution data of the program Block into gcno file by a compiler currently; after the above operation steps are performed, the current ". gcno" file stores the relationship between the counting instrumented position and the source file, and when a Pass of the LLVM inserts a counting instruction, the Pass writes the file and information of the Basic Block into the gcno file based on a compiler, wherein the writing step is as follows:
1. creating a gcno file;
2. writing an identifier for distinguishing between the ". gcno" file and the ". gcda" file, in this embodiment, the back-end execution command is: magic number (oncg + version);
3. traversing the address of the written file, the name of the function and the starting and stopping line number of the function in the source file according to the currently written identifier;
4. and marking the jump relation between Basic blocks and the relation of the number of source code lines, so as to conveniently record the jump relation of the function execution condition subsequently.
From this, the. gcno file consists of four parts:
a. a file structure; b. a function structure; c. basic Block structure; d. and the Basic Block line structure can completely restore the association between the instrumentation code and the source code.
S3, based on the step S1, in the running process of the application program, calling a coverage rate distribution function to generate a corresponding [ gcda ] file, acquiring the finally generated [ gcda ] file from the sandbox of the application program after the running is finished, compressing the [ gcda ] file and uploading the compressed [ gcda ] file to the server;
in order to include the ". gcda" file, a. gcda file storage path is further provided in the embodiment; in the program running process, a storage path of the ". gcda" is set by an int setenv (content char __ name, content char __ value, int __ overlay) __ DARWIN _ alias (setenv) method, so that the ". gcda" file generated by the application program in the running process is automatically stored under the path, and the coverage rate information file ". info file" is conveniently generated together with the ". gcno" file in the following process.
In the current step, an entry distribution function for generating the ". gcda" file is __ gcov _ flush (), and currently, __ llvm _ gcov _ flush first calls a "__ llvm _ gcov _ writeout" command to write coverage information into the ". gcda" file;
then, the count array is cleared, the execution command is "__ llvm _ gcov _ ctr.xx", and the logic for previously executing "__ llvm _ gcov _ writeout" to write coverage information into the file is:
1. generating a ". gcda" file corresponding to the source file;
2. writing into a Magic number;
3. circularly executing 'llvm _ gcda _ emit _ function' to write function information into the 'gcda' file;
4. circularly executing 'llvm _ gcda _ emit _ arcs' to write the execution information of Basic Block into the 'gcda' file;
5. calling llvm _ gcda _ summary _ info to further write verification information;
6. calling 'llvm _ gcda _ end _ file', and writing an end character;
currently, the file structure of the ". gcda" is substantially consistent with the ". gcno" file.
After the application program is finished running, in this embodiment, the ". gcda" file is uploaded to the server through the HTTP interface.
S4, integrating the received [ gcno ] file and [ gcda ] file at the server side, and generating an [ info ] file based on the integrated file through an lcov tool; the generated ". info" file is uploaded to a Git-open source distributed version control system;
s5, calling a gitdiff command, and comparing the ". info" file generated in the step S4 with the ". info" file of the baseline version to obtain an increment ". info" file; wherein, the info file contains all information of the final presentation report, including source code path, function name, function execution times, function total number, function position in the source file, line number, line execution times, and line total number. ". info" structure contains the following fields and meanings:
TN is the name of the test case;
SF source code path name;
FN, initial line number, function name;
FNDA, execution times and function name;
FNF, total number of functions;
FNH, function execution number;
DA is code line number and execution times;
LF is the total number of effective lines of the code;
LH, the number of code validly executed;
after generating the 'info' file, generating a coverage report based on the incremental 'info' file through a genhtml tool; and obtaining a detection result of the coverage rate of the incremental code according to the coverage rate report.
In this embodiment, an incremental ". info" file is further generated by generating a ". info" file of a baseline version and a ". info" file of a new version; wherein, the ". info" file of the baseline version is integrated by the ". gcno" file of the baseline version and the ". gcda" file of the baseline version; finally, because the obtained incremental code 'info' file comprises the detection information of the incremental code, the final detection result can be visually displayed based on a genhtml tool, and the visual perception is always brought to the user.
Example 2:
the invention discloses a detection device for realizing incremental code coverage based on lcov, and the system structure diagram of the device refers to fig. 2, and is shown in fig. 2, the detection device comprises the following modules:
the compiling module L1 is used for configuring compiling options through an Xcode tool, entering a compiling process and generating an application program installation package; pushing the generated application program installation package to a front end for installation and operation;
the file uploading module L2 is used for packaging and compressing the ". gcno" file generated in the compiling process and uploading the compressed ". gcno" file to the server; meanwhile, based on a compiling module, in the running process of the application program, calling a coverage rate distribution function to generate a corresponding [ gcda ] file, after the running is finished, acquiring the finally generated [ gcda ] file from a sandbox of the application program, compressing the [ gcda ] file and uploading the [ gcda ] file to a server; wherein:
the L2 in the file upload module includes a coverage information write module L21, the coverage information write module L21 is configured to set an entry distribution function of the coverage distribution function to be __ gcov _ flush (), wherein the coverage information is written into the ". gcda" file by calling __ llvm _ gcov _ flush function and __ llvm _ gcov _ writeout function.
The data integration module L3 is used for generating an 'info' file based on the integrated file through an lcov tool after integrating the file transmitted by the file uploading module at the server; the generated ". info" file is uploaded to a Git-open source distributed version control system;
the incremental ". info" file generation module L4 is configured to invoke a gitdiff command, compare the ". info" file generated by the data integration module with the ". info" file of the baseline version, and obtain an incremental ". info" file;
the coverage report generating module L5 is used for generating a coverage report based on the delta ". info" file through a genhtml tool; and obtaining a detection result of the coverage rate of the incremental code according to the coverage rate report.
Example 3:
a device disclosed in this embodiment includes a detection apparatus for implementing incremental code coverage by using embodiment 2, and a structure diagram of the device refers to fig. 3, which is shown in fig. 3, the device includes a memory and a processor, the memory is used for storing data obtained by processing by a compiling module, a file uploading module, a data integration module, an incremental ". info" file generation module, and a coverage report generation module, and the processor is used for acquiring corresponding data from the memory and further performing coverage detection on an incremental code.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (10)
1. A detection method for realizing incremental code coverage based on lcov is characterized by comprising the following steps:
s1, configuring compiling options through an Xcode tool, entering a compiling process, and generating an application program installation package; pushing the generated application program installation package to a front end for installation and operation;
s2, packing and compressing the [ gcno ] file generated in the compiling process and uploading the compressed [ gcno ] file to a server;
s3, based on the step S1, in the running process of the application program, calling a coverage rate distribution function to generate a corresponding [ gcda ] file, acquiring the finally generated [ gcda ] file from the sandbox of the application program after the running is finished, compressing the [ gcda ] file and uploading the compressed [ gcda ] file to the server;
s4, integrating the received [ gcno ] file and [ gcda ] file at the server side, and generating an [ info ] file based on the integrated file through an lcov tool; the generated ". info" file is uploaded to a Git-open source distributed version control system;
s5, calling a gitdiff command, and comparing the ". info" file generated in the step S4 with the ". info" file of the baseline version to obtain an increment ". info" file;
s6, generating a coverage rate report based on the incremental ". info" file through a genhtml tool; and obtaining a detection result of the coverage rate of the incremental code according to the coverage rate report.
2. The method for detecting incremental code coverage according to claim 1, wherein the ". gcno" file generated in step S2 stores a relationship between a counting instrumented position and a source file, wherein the counting instrumented position includes a function entry function and a branch function code line; when the Basic Block is executed while the count instruction is inserted, all instructions in the Basic Block are further executed in sequence, and the count instruction and the execution data of the Block are currently written into the gcno file by the compiler.
3. The method for detecting incremental code coverage according to claim 2, wherein the writing of the counting instructions and the execution data of the program block into the ". gcno" file by the compiler comprises:
first, based on the components that the ". gcno" file includes: the file structure, the function structure, the Basic Block structure and the Basic Block line structure are written with marks for identifying the ". gcno file" and the ". gcda file"; then, traversing the address of the written file, the name of the function and the starting and stopping line number of the function in the source file according to the currently written identifier; and finally, marking the skip relation between the basic block and the basic program block, which is convenient for recording the execution condition of the function subsequently.
4. The method for detecting incremental code coverage according to claim 1, wherein in step S3, the entry distribution function of the coverage distribution function is __ gcov _ flush (), wherein the coverage information is written into the ". gcda" file by calling __ llvm _ gcov _ flush function and __ llvm _ gcov _ writeout function.
5. The method of claim 4, wherein the step of calling __ llvm _ gcov _ writeout function to write coverage information into the ". gcda" file is as follows:
firstly, generating a 'gcda' file corresponding to a source file;
secondly, writing in identifiers for identifying the ". gcno file" and the ". gcda file";
secondly, circularly executing llvm _ gcda _ emit _ function to write function information for marking file formats into the ". gcda" file; the function information comprises an entry line, an exit line and an instruction code line of the function;
secondly, circularly executing llvm _ gcda _ emit _ arcs command to write the execution information of Basic Block into the ". gcda" file;
secondly, calling an llvm _ gcda _ summary _ info command, and writing verification information into the gcda file;
and finally, calling the llvm _ gcda _ end _ file command to end the current running process.
6. The method for detecting incremental code coverage according to claim 5, wherein in step S3, after the application program finishes running, the ". gcda" file is uploaded to the server via the HTTP interface.
7. The method for detecting incremental code coverage according to claim 1, wherein in step S4, the lcov tool generates a ". info" file including finally obtained coverage detection data, where the coverage detection data includes a source code path, a function name, a function execution number, a function total number, a position of the function in the source file, a line number, a line execution number, and a line total number.
8. A detection device for realizing incremental code coverage based on lcov is characterized by comprising the following modules:
the compiling module is used for configuring compiling options through an Xcode tool, entering a compiling process and generating an application program installation package; pushing the generated application program installation package to a front end for installation and operation;
the file uploading module is used for packaging and compressing the [ gcno ] file generated in the compiling process and uploading the [ gcno ] file to the server; meanwhile, based on a compiling module, in the running process of the application program, calling a coverage rate distribution function to generate a corresponding [ gcda ] file, after the running is finished, acquiring the finally generated [ gcda ] file from a sandbox of the application program, compressing the [ gcda ] file and uploading the [ gcda ] file to a server;
the data integration module is used for generating an 'info' file based on the integrated file through an lcov tool after integrating the file transmitted by the file uploading module at the server; the generated ". info" file is uploaded to a Git-open source distributed version control system;
the incremental ". info" file generation module is used for calling a gitdiff command, comparing the ". info" file generated by the data integration module with the ". info" file of the baseline version to obtain an incremental ". info" file;
a coverage report generation module for generating a coverage report based on the delta ". info" file by a genhtml tool; and obtaining a detection result of the coverage rate of the incremental code according to the coverage rate report.
9. The apparatus for detecting incremental code coverage according to claim 8, wherein the file uploading module includes a coverage information writing module, and the coverage information writing module is configured to set an entry distribution function of the coverage distribution function to __ gcov _ flush (), wherein coverage information is written into the ". gcda" file by calling __ llvm _ gcov _ flush function and __ llvm _ gcov _ write out function.
10. The device comprising the apparatus for detecting incremental code coverage according to claim 8, wherein the device comprises a memory and a processor, the memory is configured to store data processed by the compiling module, the file uploading module, the data integrating module, the increment ". info" file generating module, and the coverage report generating module, and the processor is configured to obtain corresponding data from the memory and further perform coverage detection on the incremental code.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911125848.6A CN110928776A (en) | 2019-11-15 | 2019-11-15 | Detection method, device and equipment for realizing incremental code coverage rate based on lcov |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911125848.6A CN110928776A (en) | 2019-11-15 | 2019-11-15 | Detection method, device and equipment for realizing incremental code coverage rate based on lcov |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110928776A true CN110928776A (en) | 2020-03-27 |
Family
ID=69853187
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911125848.6A Pending CN110928776A (en) | 2019-11-15 | 2019-11-15 | Detection method, device and equipment for realizing incremental code coverage rate based on lcov |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110928776A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112416773A (en) * | 2020-11-23 | 2021-02-26 | 通号万全信号设备有限公司 | Cross-platform data visualization method |
CN112612716A (en) * | 2020-12-28 | 2021-04-06 | 上海品顺信息科技有限公司 | Method, system, equipment and storage medium for enhancing marking of coverage rate of difference line codes |
CN113934627A (en) * | 2021-09-26 | 2022-01-14 | 五八同城信息技术有限公司 | Code execution coverage rate statistical method and device, electronic equipment and readable medium |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103425573A (en) * | 2012-05-24 | 2013-12-04 | 腾讯科技(深圳)有限公司 | Code testing information collecting method and system |
CN104199773A (en) * | 2014-09-03 | 2014-12-10 | 腾讯科技(深圳)有限公司 | Method and device for obtaining code coverage information |
CN104714882A (en) * | 2013-12-17 | 2015-06-17 | 腾讯科技(深圳)有限公司 | Code information processing method and device |
US20150339217A1 (en) * | 2014-05-23 | 2015-11-26 | Carnegie Mellon University | Methods and systems for automatically testing software |
CN105988926A (en) * | 2015-02-13 | 2016-10-05 | 腾讯科技(深圳)有限公司 | Method and device for processing multi-version test data |
US20160299835A1 (en) * | 2015-04-08 | 2016-10-13 | Opshub, Inc. | Method and system for providing delta code coverage information |
CN107729239A (en) * | 2017-10-10 | 2018-02-23 | 郑州云海信息技术有限公司 | A kind of code coverage statistical method, system, device and computer-readable storage medium |
US20180173610A1 (en) * | 2016-12-19 | 2018-06-21 | Mediatek Inc. | Method for performing cared-zone code coverage evaluation with no source code modification |
CN108519945A (en) * | 2018-03-21 | 2018-09-11 | 腾讯科技(深圳)有限公司 | Coverage rate test method, apparatus and storage device |
CN108829593A (en) * | 2018-06-05 | 2018-11-16 | 平安壹钱包电子商务有限公司 | Code coverage calculation and analysis methods, device, equipment and storage medium |
CN109240911A (en) * | 2018-08-13 | 2019-01-18 | 腾讯科技(北京)有限公司 | Accurate test method, device and computer equipment |
-
2019
- 2019-11-15 CN CN201911125848.6A patent/CN110928776A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103425573A (en) * | 2012-05-24 | 2013-12-04 | 腾讯科技(深圳)有限公司 | Code testing information collecting method and system |
CN104714882A (en) * | 2013-12-17 | 2015-06-17 | 腾讯科技(深圳)有限公司 | Code information processing method and device |
US20150339217A1 (en) * | 2014-05-23 | 2015-11-26 | Carnegie Mellon University | Methods and systems for automatically testing software |
CN104199773A (en) * | 2014-09-03 | 2014-12-10 | 腾讯科技(深圳)有限公司 | Method and device for obtaining code coverage information |
CN105988926A (en) * | 2015-02-13 | 2016-10-05 | 腾讯科技(深圳)有限公司 | Method and device for processing multi-version test data |
US20160299835A1 (en) * | 2015-04-08 | 2016-10-13 | Opshub, Inc. | Method and system for providing delta code coverage information |
US20180173610A1 (en) * | 2016-12-19 | 2018-06-21 | Mediatek Inc. | Method for performing cared-zone code coverage evaluation with no source code modification |
CN107729239A (en) * | 2017-10-10 | 2018-02-23 | 郑州云海信息技术有限公司 | A kind of code coverage statistical method, system, device and computer-readable storage medium |
CN108519945A (en) * | 2018-03-21 | 2018-09-11 | 腾讯科技(深圳)有限公司 | Coverage rate test method, apparatus and storage device |
CN108829593A (en) * | 2018-06-05 | 2018-11-16 | 平安壹钱包电子商务有限公司 | Code coverage calculation and analysis methods, device, equipment and storage medium |
CN109240911A (en) * | 2018-08-13 | 2019-01-18 | 腾讯科技(北京)有限公司 | Accurate test method, device and computer equipment |
Non-Patent Citations (3)
Title |
---|
WEIXIN_30733003: "用lcov生成diff代码覆盖率报告", 《HTTPS://BLOG.CSDN.NET/WEIXIN_30733003》 * |
王晓华等: "基于复合执行剖面的测试用例缩减技术", 《高技术通讯》 * |
美团技术团队: "iOS覆盖率检测原理与增量代码测试覆盖率工具实现", 《HTTPS://WWW.CNBLOGS.COM/MEITUANTECH/P/10190417.HTML》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112416773A (en) * | 2020-11-23 | 2021-02-26 | 通号万全信号设备有限公司 | Cross-platform data visualization method |
CN112612716A (en) * | 2020-12-28 | 2021-04-06 | 上海品顺信息科技有限公司 | Method, system, equipment and storage medium for enhancing marking of coverage rate of difference line codes |
CN112612716B (en) * | 2020-12-28 | 2023-01-20 | 上海品顺信息科技有限公司 | Method, system, equipment and storage medium for enhancing marking of coverage rate of difference line codes |
CN113934627A (en) * | 2021-09-26 | 2022-01-14 | 五八同城信息技术有限公司 | Code execution coverage rate statistical method and device, electronic equipment and readable medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110764753B (en) | Business logic code generation method, device, equipment and storage medium | |
US10621068B2 (en) | Software code debugger for quick detection of error root causes | |
CN110928776A (en) | Detection method, device and equipment for realizing incremental code coverage rate based on lcov | |
US5987250A (en) | Transparent instrumentation for computer program behavior analysis | |
US10176078B1 (en) | Debugging process | |
US6964036B2 (en) | Descriptive variables while debugging | |
US9836379B2 (en) | Method and system for generating a memory trace of a program code executable on a programmable target | |
CN104407973A (en) | Method and device for realizing automatic unit test | |
CN111756575A (en) | Performance analysis method and device of storage server and electronic equipment | |
CN113568839A (en) | Method, device, equipment and medium for software testing and statistical test coverage rate | |
CN110196801B (en) | Code coverage rate based test method and device | |
CN104635507A (en) | Simulation and verification system of realtime airplane running monitoring system | |
CN107797805A (en) | Code packaging method and device and computer readable storage medium | |
CN113297064A (en) | Code coverage rate testing method, system, equipment and storage medium | |
CN110633199A (en) | Testing apparatus, method, and medium for block chain supporting intelligent contract | |
US20150286557A1 (en) | Embedded instruction sets for use in testing and error simulation of computing programs | |
CN116991751A (en) | Code testing method and device, electronic equipment and storage medium | |
CN115292418B (en) | Cross-system business process automatic processing method and system | |
CN110888641A (en) | Automatic script generation method and device, server and storage medium | |
CN110795358B (en) | Code instrumentation detection method, apparatus, device and medium | |
US20040019885A1 (en) | Performance monitoring | |
CN112699011A (en) | Method and device for counting incremental code coverage rate, electronic equipment and storage medium | |
CN112148581A (en) | Code specification checking method, device, system and storage medium | |
CN111771187B (en) | Method and device for eliminating code construction difference | |
CN110569199B (en) | Automatic bill testing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200327 |