Method and device for testing application program

A technology of application programs and testing methods, applied in the field of mobile Internet, can solve problems such as risks, difficult maintenance of pile codes, product defect performance, etc., to achieve effective testing and improve maintainability

Active Publication Date: 2014-10-15
TENCENT TECH (SHENZHEN) CO LTD
View PDF3 Cites 23 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] However, in the existing test method, it is difficult to maintain the manually inserted stub code, because submitting cod

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 testing application program
  • Method and device for testing application program
  • Method and device for testing application program

Examples

Experimental program
Comparison scheme
Effect test

no. 1 example

[0023] like figure 1 As shown, the first embodiment of the present invention proposes an application program testing method, including:

[0024] Step S101, obtaining the source code of the application program under test, and precompiling the source code of the application program under test based on a pre-written test script;

[0025] The tested application program in this embodiment includes but not limited to the Android system application program, and this embodiment uses the Android system application program as an example for illustration.

[0026] Among them, the precompilation and subsequent compilation process of the source code of the application under test can be completed by a compiler, which can be a compiler that supports AOP (Aspect Oriented Programming, aspect-oriented programming) precompilation, such as ASM and Aspectj compiler etc.

[0027] In order to realize the testing of the application program, in this embodiment, a test script is pre-written according...

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 relates to a method and a device for testing an application program. The method for testing the application program comprises the following steps: acquiring a source code of the application program under test, and precompiling the source code of the application program under test on the basis of a test script complied advance; compiling the source code of the precompiled application program under test to generate an application program; running the generated application program, and outputting test information. According to the method and the device provided by the invention, during precompiling, according to the test script of aspect oriented programming, a debugging code for test is dynamically inserted into the source code of the application program under test; when the application program is run, the test information is output on the basis of the debugging code, and therefore, location and quality measurement can be performed on the bug of the application program according to the test information; as the source code of the application program under test does not need to be modified, the product defect and performance risk of the application program cannot be caused; while the validity test of the application program is realized, the maintainability of the code under test is improved.

Description

technical field [0001] The invention relates to the technical field of mobile Internet, in particular to an application program testing method and device. Background technique [0002] At present, when testing Android application software, it usually requires testers to manually insert a piece of test code into the application code under test. When the application program under test is running, it uses the test code to output debugging information or related performance indicators to locate the application software. Defects measure the quality of application software. [0003] However, in the existing test method, the stub code inserted manually is difficult to maintain, because submitting code related to testing but not related to product functions will inevitably cause product defects and performance risks. Contents of the invention [0004] The main purpose of the present invention is to provide an application program testing method and device, aiming at realizing effe...

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
Inventor 宁京
Owner TENCENT TECH (SHENZHEN) 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
Try Eureka
PatSnap group products