Method and device for obtaining code coverage rate
A code coverage and code technology, applied in the field of obtaining code coverage, can solve the problems of unable to obtain manual test code coverage, consuming manpower and material resources, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0046] An embodiment of the present invention provides a method for obtaining code coverage, the execution subject of the method is a terminal, such as an Android device, such as figure 1 As shown, the method includes the following steps:
[0047] Step 101, obtaining the second code after adding the code for obtaining code coverage in the first code of the tested application program (Application, APP), and compiling the first code recorded in the second code process information to generate the first file;
[0048] In this step, the first code refers to the source code of the application program APP.
[0049]Wherein, the information of the first code includes version information of the code, package, class method and information of the line where the code is located. That is to say, the information of the first code includes the version information of the code, the package used, the class method used, and the line where a certain code is located.
[0050] This step includes:...
Embodiment 2
[0082] An embodiment of the present invention provides a method for obtaining code coverage, the method is executed by a terminal, such as an Android device, such as image 3 As shown, the method includes the following steps:
[0083] Step 301, obtaining the second code after adding the code for obtaining code coverage to the first code of the tested application program APP;
[0084] The first code in this step is the source code of the APP. APP is the abbreviation of Application, and APP mostly refers to third-party application programs of smart phones. In the embodiment of the present invention, APP may refer to an application program on an Android device.
[0085] Further, there are two ways to obtain the second code in this step:
[0086] Method 1: Receive the code for obtaining code coverage added in the function called when logging out or exiting in the first code of the APP under test, and obtain the code consisting of the first code and the code for obtaining code c...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com