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

Code coverage rate collection method and device

A code coverage and coverage technology, applied in the field of code coverage collection method and a code coverage collection device, can solve problems such as applications that cannot be directly applied to the platform

Active Publication Date: 2017-06-20
TENCENT TECH (SHENZHEN) CO LTD
View PDF10 Cites 18 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

It performs code insertion for Javascript code suitable for running on the browser side. The code coverage collection process of the inserted code is based on the code execution of the browser and cannot be directly applied to the application of the platform executed by the server side.

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
  • Code coverage rate collection method and device
  • Code coverage rate collection method and device
  • Code coverage rate collection method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0033] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, and do not limit the protection scope of the present invention.

[0034] figure 1 A schematic diagram of the working environment in one embodiment of the present invention is shown, as figure 1 As shown, its working environment involves coverage collection center server 100 and coverage collection terminal server 101, by figure 1 It can be seen that the coverage collection terminal server 101 may include multiple coverage collection central server 100 and the coverage collection terminal server 101 can communicate through the network 1, the coverage collection central server 100 and each coverage collection terminal server 101 jointly...

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 collection method and a code coverage rate collection device. The method of one embodiment comprises the following steps: receiving a service request sent by a terminal, wherein the service request contains an application identifier; acquiring a source file corresponding to the application identifier, a source file identifier and syntax tree information of the source file according to the service request; loading a source code of the source file into an internal memory; executing the source code loaded into the internal memory and recording code coverage rate data of a code line for executing the source code based on the syntax tree information in an executing process of the source code; sending code coverage rate reporting information to a code coverage rate collection central server, wherein the code coverage rate reporting information contains the source file identifier and the code coverage rate data; and determining the code coverage rate of the source file according to the code coverage rate reporting information, which is unloaded by code coverage rate collection terminal servers, by the code coverage rate collection terminal servers. According to the code coverage rate collection method and device, the collection of the code coverage rates of the servers is realized, and the source code does not need to be modified; and reediting on the source code of developers is not influenced.

Description

technical field [0001] The invention relates to the technical field of testing, in particular to a code coverage collection method and a code coverage collection device. Background technique [0002] Code coverage (code coverage) is an important measurement parameter in software testing, which is used to describe the proportion and degree of the source code in the program being tested. With the gradual popularization of interpreted languages ​​such as JavaScript, the application of platforms based on interpreted languages ​​such as JavaScript is becoming more and more widespread, and it is also becoming more and more important to test the code coverage of related applications based on platforms implemented by interpreted languages ​​such as JavaScript. An important content in the testing field. [0003] Taking the JavaScript platform as an example, for JavaScript applications running on the browser side, tools such as jscoverage already exist to collect code coverage on 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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
CPCG06F11/3676G06F11/3692
Inventor 符阳辉任洪平
Owner TENCENT TECH (SHENZHEN) CO LTD
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