Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Detection method, device and apparatus for realizing incremental code coverage rate based on lcov

A code coverage and detection method technology, which is applied in the field of software development code quality monitoring, can solve the problems that the coverage report cannot be automatically generated, and the development and testing process cannot be combined, so as to achieve the effect of ensuring project quality and accurate detection results

Pending Publication Date: 2020-03-27
WUHAN JIYI NETWORK TECH CO LTD
View PDF11 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The technical problem to be solved by the present invention is to provide a detection method, device and equipment based on lcov to realize incremental code coverage in view of the defect that the coverage report cannot be automatically generated in the prior art and cannot be combined with the entire development and testing process

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Detection method, device and apparatus for realizing incremental code coverage rate based on lcov
  • Detection method, device and apparatus for realizing incremental code coverage rate based on lcov
  • Detection method, device and apparatus for realizing incremental code coverage rate based on lcov

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0043] A detection method based on lcov to realize incremental code coverage provided by the present invention includes the following steps (please refer to the specific execution flow figure 1 ):

[0044] S1. Configure compilation options through the Xcode tool, enter the compilation process, and generate an application installation package; wherein, push the generated application installation package to the front end for installation and operation;

[0045] S2. Pack and compress the ".gcno" file generated during the compilation process and upload it to the server; the generation principle of the ".gcno" file is: during the compilation process, the script will call Xcode command line tools to further generate " ipa" file, after the "ipa" file is generated, the corresponding ".gcno" file will be automatically generated. Currently, input the file compression command (the curl command is executed in this embodiment) at the compilation backend, and convert all " .gcno" file is c...

Embodiment 2

[0079] The present invention discloses a detection device based on lcov to realize incremental code coverage. For the system structure diagram of the device, please refer to figure 2 ,Depend on figure 2 As shown, the detection device includes the following modules:

[0080] The compilation module L1 is used to configure the compilation options through the Xcode tool, enter the compilation process, and generate the application installation package; wherein, the generated application installation package is pushed to the front end for installation and operation;

[0081] The file upload module L2 is used to pack and compress the ".gcno" file generated during the compilation process and upload it to the server; at the same time, based on the compilation module, during the running of the application, the coverage distribution function is called to generate the corresponding ". gcda" file, after running, obtain the final generated ".gcda" file from the sandbox of the application...

Embodiment 3

[0087] A device disclosed in this embodiment includes a detection device for implementing incremental code coverage using Embodiment 2. For the structure diagram of the device, please refer to image 3 ,Depend on image 3 As shown, the device includes a memory and a processor, and the memory is used to store data processed by the compilation module, the file upload module, the data integration module, the incremental ".info" file generation module and the coverage report generation module. The processor is used to obtain corresponding data from the memory, and further perform incremental code coverage detection.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method, a device and apparatus for detecting incremental code coverage rate based on lcov. The method comprises the following steps that:.gcno files generated in a compilingprocess and corresponding gcda files generated by calling a coverage rate distribution function in the running process of an application program are separately packaged, compressed and uploaded to a server; after the received. gcno files and the received. gcda files are integrated at the server side, info files are generated through a lcov tool; the generated. info files are compared with info files of the baseline version, and increment. info files are obtained, and a genhtml tool is further utilized to generate a coverage rate report; and a detection result of the incremental code coverage rate is acquired according to the coverage rate report. Coverage rate detection and the whole development process are tightly combined together, so a coverage rate report with extremely high readability is generated, and Git push is controlled through a coverage rate threshold value, so that the project quality is ensured.

Description

technical field [0001] The invention relates to the field of software development code quality monitoring, and more specifically relates to a detection method, device and equipment for realizing incremental code coverage based on lcov. Background technique [0002] In the process of software development, code coverage is a means to measure the integrity of development. In order to further improve the quality of software delivery, monitor omissions in the development process, and reduce online accidents, there are new detection methods for code coverage. How to accurately measure coverage is also a technical bottleneck encountered by many developers. [0003] The existing incremental code coverage detection scheme: first obtain the full code coverage information, then obtain the incremental code information through Gitdiff, then map the incremental code change line to the line object of the abstract syntax tree, and traverse the lines of the abstract syntax tree Object, dete...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F11/36G06F8/77G06F8/41G06F8/61
CPCG06F11/3676G06F8/41G06F8/77G06F8/61
Inventor 刘练陈国庆谢强
Owner WUHAN JIYI NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Eureka Blog
Learn More
PatSnap group products