Supercharge Your Innovation With Domain-Expert AI Agents!

Method and device for generating code coverage report

A code coverage and report generation technology, applied in instrumentation, error detection/correction, calculation, etc., can solve problems such as poor reusability

Active Publication Date: 2019-03-08
BEIJING QIHOO TECH CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The process of generating coverage reports through them is implemented by calling the interface provided by Jacoco with third-party tools. Due to the differences in the third-party tools used for project construction, the code and configuration files that each tool needs to write when building tasks exist. Differences, depending on the type of tool, the implementation process is also different, making it poor reusability

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
  • Method and device for generating code coverage report
  • Method and device for generating code coverage report
  • Method and device for generating code coverage report

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0058] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0059] In order to solve the above technical problem, an embodiment of the present invention provides a method for generating a code coverage report, which is applied to a code coverage tool, such as a Jacoco tool. The code coverage tool provided by the embodiment of the present invention integrates the function of code coverage data merging and code coverage report generation, and the function of code coverage data merging is encap...

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 provides a code coverage rate report generation method and device. The method comprises the following steps: when receiving a code coverage rate report generation instruction, obtaining a source code and a code of a tested program as well as one or more code coverage rate data files generated in the test process of the tested program; calling and executing the first task packaged in a code coverage rate tool and merging the one or more code coverage rate data files; calling and executing the second task packaged in the code coverage rate tool, reading the merged code coverage rate data files, and generating a code coverage rate report according to the merged code coverage rate data files and the source code and the code of the tested program. According to the code coverage rate report generation method and device, the configuration of a third party construction tool can be skipped and the code coverage rate report generation process is separated from the project construction environment, so that the operation of carrying out complicated configuration on the report generation environment is saved and a uniform automatic test process is realized.

Description

technical field [0001] The invention relates to the field of testing, in particular to a method and device for generating a code coverage report. Background technique [0002] Code coverage (code coverage) is an important index reflecting the degree of test case coverage of the program under test, and it is also a reference value for measuring the integrity of the test. Whether it is a unit test, an API (Application Program Interface, application program interface) test or a functional test, it is the code that calls the program in the end. After the test is over, through the code coverage data, you can know whether the test is sufficient and where the weaknesses of the test are, and then guide developers or testers to design test cases that can increase coverage. [0003] The Java code coverage test mainly uses the open source tool Jacoco (Java code coverage), and its testing process is as follows: 1) build the android project, and insert the code for generating coverage d...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F11/36
CPCG06F11/3676
Inventor 吕清娇刘双
Owner BEIJING QIHOO TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More