Supercharge Your Innovation With Domain-Expert AI Agents!

Differential line code coverage rate enhancement marking method, system and device and storage medium

A code coverage and marking method technology, applied in the field of systems, differential line code coverage enhancement marking methods, equipment and storage media, can solve the difficulty of code line difference rate inspection, reduce the priority of marking, and fail to go deep into code logic, etc. problems, to save testing time and improve user experience

Active Publication Date: 2021-04-06
上海品顺信息科技有限公司
View PDF7 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] At present, from the perspective of code coverage technology in the industry, although Objective-C code coverage supports the code coverage statistics of full code lines / difference code lines, but for The statistics of the difference code lines failed to go deep into the code logic. For some code lines with low business priority, such as exception capture, log printing, and null judgment processing, the priority of the mark was not lowered, which led to the inspection of the code line difference rate more difficult

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
  • Differential line code coverage rate enhancement marking method, system and device and storage medium
  • Differential line code coverage rate enhancement marking method, system and device and storage medium
  • Differential line code coverage rate enhancement marking method, system and device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0048] In view of the defects existing in the existing technology, the inventor actively researches and innovates based on years of rich practical experience and professional knowledge in this industry, and cooperates with the application of academic theories, in order to create a feasible differential line code coverage test technology to make it more practical. After continuous research, design and repeated trials and improvements, the present invention with real practical value is finally created.

[0049] see figure 1 , figure 1It is a schematic flow chart of a method for marking difference line code coverage enhancement disclosed in the embodiment of the present invention. The method is applicable to the scene of checking code difference rate. The method is executed by the difference line code coverage enhancement marking system. The system can be Implemented in software and / or hardware, integrated inside the computer. Such as figure 1 As shown, the differential line ...

Embodiment 2

[0065] Such as figure 2 As shown, the differential line code coverage enhancement marking method provided by Embodiment 2 of the present invention is based on the technical solution provided by Embodiment 1, and in step S106 "code blocks with low business priority in the syntax tree AST After filtering and generating a code coverage report for different lines, further optimization has been made. Explanations of terms that are the same as or corresponding to the above embodiments are not repeated here. The method also includes:

[0066] Extracting the file path in the difference line code coverage report, and analyzing the difference line code coverage rate of each file path;

[0067] According to the preset path business mapping relationship table, the difference line code coverage rate of the file path belonging to the same business line is summarized, and the difference line code coverage rate statistics of each business line are obtained.

[0068] Based on the above opt...

Embodiment 3

[0080] Please refer to the attached image 3 , image 3 Embodiment 3 of the present invention provides a differential line code coverage enhancement marking system, which is suitable for implementing the differential line code coverage enhancement marking method provided in the embodiment of the present invention. The system specifically includes the following modules:

[0081] The merging module 301 is used to merge the data file gcda generated during testing with the symbol file gcno generated by code compilation to obtain full code line coverage data;

[0082] An acquisition module 302, configured to acquire a version number commit_id and a difference comparison benchmark commit_baseline corresponding to the full line code coverage data;

[0083] A comparison module 303, configured to compare the version number commit_id with the difference comparison baseline commit_baseline to obtain a code difference log;

[0084] A marking module 304, configured to enhance and mark t...

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 differential line code coverage rate enhancement marking method, system and device and a storage medium, and the method comprises the steps of combining a data file gcda generated during a test with a symbol file gcno generated through code compiling, and obtaining full code line coverage rate data; obtaining a version number commit-id corresponding to the full row code coverage rate data and a difference comparison reference commit-baseline; comparing the version number commit-id with a difference comparison reference commit-baseline to obtain a code difference log; performing enhanced marking on code lines with high service priorities in the code difference log, and generating a difference line code coverage rate file; obtaining and scanning a source code file corresponding to the difference line code coverage rate file to obtain a syntax tree AST of the source code file; and filtering the code blocks with low service priorities in the syntax tree AST to generate a differential row code coverage rate report. According to the invention, the difference code lines with high service priorities are subjected to enhanced marking, so that a user can focus on code difference rate inspection, and the test time is saved.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a method, system, device and storage medium for enhanced marking of differential line code coverage. Background technique [0002] In the process of software development, developers need to test the developed code, and in the process of testing, it is usually necessary to count the code coverage rate of the software testing process. Code coverage is a measurement in software testing, which describes the proportion and degree of source code in the program being tested, and the resulting proportion is called code coverage. Code coverage is an important indicator reflecting the degree of coverage of the test case on the software under test, and is a reference value used to measure the integrity of the test. Through code coverage data, we can assess whether the test is sufficient, so as to decide whether software testing needs to be repeated. [0003] At present, from the...

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/36
CPCG06F11/3676
Inventor 陈超咏
Owner 上海品顺信息科技有限公司
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