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

Method and device for automatic testing of code coverage rate, applied to Android system

A code coverage, automated testing technology, applied in software testing/debugging, error detection/correction, instruments, etc., to achieve the effect of optimizing test information, improving test functions, and high degree of automation

Inactive Publication Date: 2017-05-17
WUHAN DOUYU NETWORK TECH CO LTD
View PDF4 Cites 23 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The purpose of the present invention is in order to overcome the deficiency of above-mentioned background technology, provide a kind of automatic test method and device for the code coverage rate of Android system, can realize the automatic test of the code coverage rate of Android system, solve the code in the black box test Coverage issues, to meet the actual testing needs

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 automatic testing of code coverage rate, applied to Android system
  • Method and device for automatic testing of code coverage rate, applied to Android system
  • Method and device for automatic testing of code coverage rate, applied to Android system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0014] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0015] see figure 1 As shown, the embodiment of the present invention provides a kind of automated testing method for the code coverage of Android system, comprises the following steps:

[0016] Step S1: Perform the instrumentation operation of the Jacoco tool on the source code, and generate an inserted Class file. It can be understood that Jacoco is an open-source coverage tool, and in this embodiment, the instrumentation operation of the Jacoco tool is automatically completed through a Python (an object-oriented, interpreted computer programming language) program.

[0017] Step S2: Perform preprocessing on the inserted Class file before compiling.

[0018] Specifically, the preprocessing performed in step S2 specifically includes the following procedures:

[0019] Step S201: Add a specified JAVA source file to the inserted Class...

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 and device for automatic testing of a code coverage rate, applied to an Android system and relates to the technical field of Android testing. The method comprises the steps that pile insertion operations of a Jacoco tool are conducted to a source code, so a Class document which is already processed by pile insertion is generated; pre-processing before compiling is conducted to the Class document which is already processed by pile insertion; the pre-processed Class document is compiled and packaged, so an APK document which is already processed by pile insertion is generated; the APK document is installed into a testing machine for running testing, and log information of the code coverage rate is collected and recorded during testing; data integration is conducted to the log information of the code coverage rate, and an EC document containing the code coverage rate information is generated and uploaded to a web server; and integration processing is conducted to the web server, so a code coverage rate report of a designated format is formed and displayed. According to the invention, the automatic testing of the code coverage rate of the Android system can be achieved; the problem about the code coverage rate in black-box testing can be solved; and actual testing demands are satisfied.

Description

technical field [0001] The invention relates to the technical field of Android testing, in particular to an automated testing method and device for code coverage of an Android system. Background technique [0002] In the development and testing of the Android system, it is usually necessary to perform code coverage statistics. The so-called code coverage refers to the proportion and degree of the source code being tested, and the obtained proportion is called the code coverage. At present, the statistics of code coverage in the Android system all rely on codes, such as unit tests, which are tested by writing unit test functions. [0003] But in actual operation, for black-box manual testing, because it is a manual test, it is impossible to rely on the code to count the code coverage information. As a conventional iterative test, many software products rely on black-box testing, and how to measure the completeness and efficiency of manual testing requires the combination of...

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/3684G06F11/3688G06F11/3692
Inventor 丁萍
Owner WUHAN DOUYU 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