Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Real-time coverage rate statistics method, computer equipment and readable storage medium

A statistical method and coverage technology, applied in computing, instrumentation, electrical and digital data processing, etc., can solve the need for incremental line code coverage statistics without distributed statistics, unable to complete the coverage statistics requirements in the integration test phase, and no integration Test statistical solutions and other issues to achieve the effect of saving personnel costs, low access costs, and less code intrusion

Pending Publication Date: 2020-11-13
杭州有赞科技有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] At present, front-end coverage statistics rely on unit test frameworks such as mocha, and developers need to write unit test cases independently. In the existing technology, only unit test coverage can be counted. There is no statistical solution suitable for integration testing, and integration testing cannot be completed. Stage coverage statistics requirements
In addition, writing unit test cases requires a certain cost and requires subsequent maintenance; it is only applicable to the coverage statistics of unit tests and cannot be integrated into the test process. At the same time, it does not have the ability of distributed statistics and incremental line code coverage statistical ability

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
  • Real-time coverage rate statistics method, computer equipment and readable storage medium
  • Real-time coverage rate statistics method, computer equipment and readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0042] like figure 1As shown in , a real-time coverage statistics method is suitable for JavaScript codes. When JavaScript codes are packaged, flags and reporting tasks are implanted. When JavaScript codes are executed, the implanted flags will record coverage information, and at the same time The reporting task will regularly report the coverage information to the server, and the server will complete the data sorting and storage, and finally display the coverage data through the client, including the following steps:

[0043] In the process of code packaging, the code of the identification bit and the code of the reporting task are implanted. Code packaging includes -NODE-side code packaging and client-side code packaging.

[0044] For -NODE-side code packaging, the -NODE-side code contains / / @ts-ignore* annotations, and the code for implanting flags during the process of -NODE-side code packaging is: Add packaging scripts in the post-processing process of installing depende...

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 real-time coverage rate statistical method, computer equipment and a readable storage medium, relates to the technical field of computer software, and is suitable for JavaScript codes. The method comprises the following steps: implanting an identification bit and a code of a reporting task in a code packaging process; reporting coverage rate information by the reporting task according to the identification bit in the code execution process; receiving and processing the coverage rate information and then storing the coverage rate information; requesting and displayingthe coverage rate information via a client. According to the method provided by the invention, the labor cost of unit test code writing and later maintenance is saved; distributed statistics of the JavaScript code total quantity and the incremental coverage rate in the integration test stage can be realized only by one-time transformation.

Description

【Technical field】 [0001] The present invention relates to the technical field of computer software, in particular to a real-time coverage statistics method, computer equipment and a readable storage medium. 【Background technique】 [0002] At present, front-end coverage statistics rely on unit test frameworks such as mocha, and developers need to write unit test cases independently. In the existing technology, only unit test coverage can be counted. There is no statistical solution suitable for integration testing, and integration testing cannot be completed. Stage coverage statistics requirements. In addition, writing unit test cases requires a certain cost and requires subsequent maintenance; it is only applicable to the coverage statistics of unit tests and cannot be integrated into the test process. At the same time, it does not have the ability of distributed statistics and incremental line code coverage Statistical capabilities. 【Content of invention】 [0003] In or...

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 Applications(China)
IPC IPC(8): G06F11/36
CPCG06F11/3676G06F11/3684G06F11/3688
Inventor 郑凌峰
Owner 杭州有赞科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products